Get started

Authentication

How to create a TimeSubmit API key, send it as a bearer token, and choose the scopes it needs, with what each scope allows.

API keys

A consultancy admin creates a key under Settings, then API & Webhooks, and picks its scopes. The API is on the Core, Margin and Enterprise plans.

The key starts tsk_ and is shown once, so store it somewhere safe as soon as you create it. It acts for your organisation only: every record it reads or changes is your organisation's, and its changes appear in your audit log under the key's name.

Create one key for each system you connect. You can then revoke one without breaking the others.

Sending the key

Send the key as a bearer token in the Authorization header of every request to https://www.timesubmit.com/api/v1:

curl "https://www.timesubmit.com/api/v1/clients" \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY"

A missing, unknown, revoked or expired key is refused with 401 unauthorised. See errors for every answer.

Scopes

A key holds only the scopes it was given, and an operation outside them is refused with 403 insufficient_scope. Give each key the fewest scopes its job needs.

ScopeAllows
clients:readGET /clients, GET /clients/{id}
clients:writePOST /clients, PATCH /clients/{id}, POST /clients/{id}/archive
projects:readGET /projects, GET /projects/{id}
projects:writePOST /projects, PATCH /projects/{id}
consultants:readGET /consultants, GET /consultants/{id}
assignments:readGET /assignments, GET /assignments/{id}
assignments:writePOST /assignments, PATCH /assignments/{id}, DELETE /assignments/{id}
invoices:readGET /invoices, GET /invoices/{id}
purchase_orders:readGET /client-purchase-orders, GET /client-purchase-orders/{id}, GET /client-purchase-orders/{id}/changes, GET /consultant-purchase-orders, GET /consultant-purchase-orders/{id}, GET /consultant-purchase-orders/{id}/changes
purchase_orders:writePOST /client-purchase-orders, PATCH /client-purchase-orders/{id}, POST /client-purchase-orders/{id}/close, DELETE /client-purchase-orders/{id}, POST /consultant-purchase-orders, PATCH /consultant-purchase-orders/{id}, POST /consultant-purchase-orders/{id}/close, DELETE /consultant-purchase-orders/{id}
events:readGET /events

Write-only keys

A write scope does not include its read scope. A key that can write clients but not read them gets back only the id and status of what it changed, and for an assignment only the id.