Appearance
API Overview
The primaTime API is a comprehensive GraphQL-based API designed for time tracking, project management, and team collaboration. It provides a unified interface for managing organizations, projects, clients, tasks, time records, and more.
What You Can Do
With the primaTime API, you can:
- Manage Organizations — Create and configure workspaces for teams
- Track Time — Log time records against projects, tasks, and clients
- Manage Projects — Create projects, assign team members, and track progress
- Handle Clients — Organize client information and associate projects
- Manage Tasks — Create, assign, and track task completion within projects
- Generate Reports — Query time tracking summaries and financial reports
- Manage Users — Invite team members, assign roles, and control access
Key Concepts
GraphQL Endpoint
All API requests are sent to a single endpoint:
POST https://api.next.primatime.com/graphqlThe API uses standard GraphQL conventions:
- Queries for reading data
- Mutations for creating, updating, or deleting data
Authentication Flow
Choose the credential that fits your integration:
- API key — generated by a user in their profile, sent in the
X-Api-Keyheader. Best for scripts, cron jobs and automation. - OAuth access token — obtained by signing a user in, sent in the
Authorizationheader as a bearer token. Best for tools other people use with their own accounts.
Multi-Tenancy
primaTime is a multi-tenant system. Each organization is a separate tenant with isolated data. The organization travels with your credential — fixed when an API key is created, or chosen at sign-in for OAuth — so requests need no additional header.
Request/Response Flow
Basic Request Structure
Every GraphQL request contains:
json
{
"query": "...",
"variables": { ... }
}Example: Fetching Projects
graphql
query GetProjects {
projects(first: 10) {
edges {
node {
id
title
code
status {
title
}
}
}
pageInfo {
hasNextPage
endCursor
totalCount
}
}
}HTTP Request
bash
curl -X POST https://api.next.primatime.com/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-d '{
"query": "query GetProjects { projects(first: 10) { edges { node { id title code } } pageInfo { hasNextPage totalCount } } }"
}'Response Structure
Successful responses follow this structure:
json
{
"data": {
"projects": {
"edges": [
{
"node": {
"id": "abc123",
"title": "Website Redesign",
"code": "WEB-001"
}
}
],
"pageInfo": {
"hasNextPage": true,
"totalCount": 42
}
}
}
}Next Steps
- Authentication — Learn how to authenticate API requests
- Tenant Handling — Understand multi-tenancy
- Working with GraphQL — Query patterns and best practices
- Error Handling — Handle API errors gracefully
- Grids & Filtering — Filter, sort, and paginate data
- GraphiQL Playground — Explore the API interactively