Clients · Timeglass API

Create, rename, archive, and restore the clients that projects belong to.

List Clients

GET /v1/clients

Query parameters

  • limit · integer
  • cursor · string
  • status · any

Response 200

  • data · array of object · required
    • client_id · string · uuid · required
    • name · string · required
    • status · string · required · One of: active, archived
    • kind · string · required · One of: external, internal
    • created_at · string · timestamp · required
    • updated_at · string · timestamp · required
  • next_cursor · string · nullable · required
curl "https://api.timeglass.ai/v1/clients" \
  -H "Authorization: Bearer $TIMEGLASS_API_KEY"

Create a Client

POST /v1/clients

Requires a key with the read_write scope.

Request body

  • name · string · required

Response 200

  • client · object · required
    • client_id · string · uuid · required
    • name · string · required
    • status · string · required · One of: active, archived
    • kind · string · required · One of: external, internal
    • created_at · string · timestamp · required
    • updated_at · string · timestamp · required
  • restored · boolean · required · One of: true
curl -X POST "https://api.timeglass.ai/v1/clients" \
  -H "Authorization: Bearer $TIMEGLASS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Globex"
  }'

Update a Client

PATCH /v1/clients/{clientId}

Requires a key with the read_write scope.

Renames a client, archives it (status: archived), or restores it (status: active).

Path parameters

  • clientId · string · uuid · required

Request body

  • name · string
  • status · string · One of: active, archived

Response 200

  • client · object · required
    • client_id · string · uuid · required
    • name · string · required
    • status · string · required · One of: active, archived
    • kind · string · required · One of: external, internal
    • created_at · string · timestamp · required
    • updated_at · string · timestamp · required
curl -X PATCH "https://api.timeglass.ai/v1/clients/4bfe4a4b-c86b-4b8e-b3f5-3d1c4a2e9f10" \
  -H "Authorization: Bearer $TIMEGLASS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'