# Clients

List, read, create, update and archive clients through the TimeSubmit API: each operation, its scope, its body and the client's fields.

## The client object

The organisations your consultancy bills.

```json
{
  "id": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "name": "Fernhill Logistics Ltd",
  "status": "active",
  "email": "accounts@fernhill-logistics.example",
  "phone": "+44 20 7946 0321",
  "website": "https://fernhill-logistics.example",
  "logoUrl": null,
  "contactName": "Priya Natarajan",
  "contactEmail": "priya.natarajan@fernhill-logistics.example",
  "contactPhone": "+44 20 7946 0322",
  "currency": "GBP",
  "paymentTermDays": 30,
  "purchaseOrderRequired": true,
  "address": {
    "street": "14 Quayside Walk",
    "city": "Bristol",
    "region": "City of Bristol",
    "postalCode": "BS1 4XE",
    "country": "United Kingdom"
  },
  "createdAt": "2026-08-14T10:02:31.000Z",
  "updatedAt": "2026-10-01T15:47:09.000Z"
}
```

Every field below is in every answer. A required field always has a value; a nullable one is `null` when it has none. More fields may be added within `/v1`, so have your code ignore any it doesn't recognise.

| Field | Type | About it |
| --- | --- | --- |
| `id` (required) | string | The client's id. |
| `name` (required) | string | The client's name. |
| `status` (required) | "active" \| "archived" \| "pending_authorization" | Active, or archived. |
| `email` (nullable) | string or null | A general email address for the client. |
| `phone` (nullable) | string or null | A general phone number. |
| `website` (nullable) | string or null | The client's website. |
| `logoUrl` (nullable) | string or null | The client's logo. |
| `contactName` (nullable) | string or null | The person to contact. |
| `contactEmail` (nullable) | string or null | That person's email address. |
| `contactPhone` (nullable) | string or null | That person's phone number. |
| `currency` (nullable) | string or null | An ISO 4217 code. One of 7 values. Values: `GBP`, `USD`, `EUR`, `AUD`, `CAD`, `NZD`, `ZAR`. |
| `paymentTermDays` (nullable) | integer or null | Days the client has to pay an invoice. Unset uses the organisation's default. From 0 to 365. |
| `purchaseOrderRequired` (required) | boolean | Whether invoicing this client needs a purchase order. |
| `address` (required) | object | The postal address. Each part is optional. |
| `address.street` (nullable) | string or null | Street lines. |
| `address.city` (nullable) | string or null | Town or city. |
| `address.region` (nullable) | string or null | County, state or region. |
| `address.postalCode` (nullable) | string or null | Postcode or ZIP. |
| `address.country` (nullable) | string or null | Country. |
| `createdAt` (nullable) | time (ISO 8601) or null | When it was created. |
| `updatedAt` (nullable) | time (ISO 8601) or null | When it last changed. |

This list can grow within `/v1`, so ignore any you don't recognise rather than failing on it. See [versioning](https://www.timesubmit.com/developers/versioning).

## Operations

### `GET /clients`

**List clients.** A page of your organisation's clients, in the order they were created. Needs the `clients:read` scope. Succeeds with 200, a page of them.

| Query parameter | Type | About it |
| --- | --- | --- |
| `limit` (optional) | integer | How many to a page, 1 to 100. 25 when absent. From 1 to 100. |
| `cursor` (optional) | string | The `nextCursor` from the page before. |

Example request. The key is read from `TIMESUBMIT_API_KEY`:

curl:

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

JavaScript:

```javascript
const response = await fetch("https://www.timesubmit.com/api/v1/clients", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.TIMESUBMIT_API_KEY}`,
  },
});
const answer = await response.json();
```

Python:

```python
import os

import requests

response = requests.request(
    "GET",
    "https://www.timesubmit.com/api/v1/clients",
    headers={
        "Authorization": f"Bearer {os.environ['TIMESUBMIT_API_KEY']}",
    },
)
answer = response.json()
```

Example response, with status 200:

```json
{
  "data": [
    {
      "id": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
      "name": "Fernhill Logistics Ltd",
      "status": "active",
      "email": "accounts@fernhill-logistics.example",
      "phone": "+44 20 7946 0321",
      "website": "https://fernhill-logistics.example",
      "logoUrl": null,
      "contactName": "Priya Natarajan",
      "contactEmail": "priya.natarajan@fernhill-logistics.example",
      "contactPhone": "+44 20 7946 0322",
      "currency": "GBP",
      "paymentTermDays": 30,
      "purchaseOrderRequired": true,
      "address": {
        "street": "14 Quayside Walk",
        "city": "Bristol",
        "region": "City of Bristol",
        "postalCode": "BS1 4XE",
        "country": "United Kingdom"
      },
      "createdAt": "2026-08-14T10:02:31.000Z",
      "updatedAt": "2026-10-01T15:47:09.000Z"
    }
  ],
  "nextCursor": "eyJjcmVhdGVkQXQiOjE3NjQwNjA4MDB9"
}
```

The [error codes](https://www.timesubmit.com/developers/errors) it can answer with:

- `unauthorised` (401)
- `api_not_included` (403)
- `insufficient_scope` (403)
- `invalid_request` (400)
- `rate_limited` (429)

### `GET /clients/{id}`

**Read a client.** One client. Needs the `clients:read` scope. Succeeds with 200.

Example request. The key is read from `TIMESUBMIT_API_KEY`:

curl:

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

JavaScript:

```javascript
const response = await fetch("https://www.timesubmit.com/api/v1/clients/j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r", {
  method: "GET",
  headers: {
    Authorization: `Bearer ${process.env.TIMESUBMIT_API_KEY}`,
  },
});
const answer = await response.json();
```

Python:

```python
import os

import requests

response = requests.request(
    "GET",
    "https://www.timesubmit.com/api/v1/clients/j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
    headers={
        "Authorization": f"Bearer {os.environ['TIMESUBMIT_API_KEY']}",
    },
)
answer = response.json()
```

Example response, with status 200:

```json
{
  "id": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "name": "Fernhill Logistics Ltd",
  "status": "active",
  "email": "accounts@fernhill-logistics.example",
  "phone": "+44 20 7946 0321",
  "website": "https://fernhill-logistics.example",
  "logoUrl": null,
  "contactName": "Priya Natarajan",
  "contactEmail": "priya.natarajan@fernhill-logistics.example",
  "contactPhone": "+44 20 7946 0322",
  "currency": "GBP",
  "paymentTermDays": 30,
  "purchaseOrderRequired": true,
  "address": {
    "street": "14 Quayside Walk",
    "city": "Bristol",
    "region": "City of Bristol",
    "postalCode": "BS1 4XE",
    "country": "United Kingdom"
  },
  "createdAt": "2026-08-14T10:02:31.000Z",
  "updatedAt": "2026-10-01T15:47:09.000Z"
}
```

The [error codes](https://www.timesubmit.com/developers/errors) it can answer with:

- `unauthorised` (401)
- `api_not_included` (403)
- `insufficient_scope` (403)
- `not_found` (404)
- `rate_limited` (429)

### `POST /clients`

**Create a client.** Adds a client, within your plan's client limit. Audited under the key's name. Needs the `clients:write` scope. Accepts an Idempotency-Key. Succeeds with 201.

The body is a JSON object. Any other field is refused with its name.

| Field | Type | About it |
| --- | --- | --- |
| `name` (required) | string | The client's name. Required, and not blank. |
| `phone` (optional, nullable) | string or null | A general phone number. |
| `email` (optional, nullable) | string or null | A general email address; it must look like one. |
| `website` (optional, nullable) | string or null | A full URL, such as https://example.com. |
| `contactName` (optional, nullable) | string or null | The person to contact. |
| `contactEmail` (optional, nullable) | string or null | That person's email address. |
| `contactPhone` (optional, nullable) | string or null | That person's phone number. |
| `currency` (optional, nullable) | string or null | An ISO 4217 code. One of 7 values. Values: `GBP`, `USD`, `EUR`, `AUD`, `CAD`, `NZD`, `ZAR`. |
| `paymentTermDays` (optional, nullable) | integer or null | Days the client has to pay an invoice. Unset uses the organisation's default. From 0 to 365. |
| `address` (optional, nullable) | object | The postal address. Each part is optional. |
| `address.street` (optional, nullable) | string or null | Street lines. |
| `address.city` (optional, nullable) | string or null | Town or city. |
| `address.region` (optional, nullable) | string or null | County, state or region. |
| `address.postalCode` (optional, nullable) | string or null | Postcode or ZIP. |
| `address.country` (optional, nullable) | string or null | Country. |

This list can grow within `/v1`, so ignore any you don't recognise rather than failing on it. See [versioning](https://www.timesubmit.com/developers/versioning).

Example request, with a fresh Idempotency-Key each time it runs. The key is read from `TIMESUBMIT_API_KEY`:

curl:

```bash
curl -X POST 'https://www.timesubmit.com/api/v1/clients' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Fernhill Logistics Ltd",
  "email": "accounts@fernhill-logistics.example",
  "phone": "+44 20 7946 0321",
  "website": "https://fernhill-logistics.example",
  "contactName": "Priya Natarajan",
  "contactEmail": "priya.natarajan@fernhill-logistics.example",
  "contactPhone": "+44 20 7946 0322",
  "currency": "GBP",
  "paymentTermDays": 30,
  "address": {
    "street": "14 Quayside Walk",
    "city": "Bristol",
    "region": "City of Bristol",
    "postalCode": "BS1 4XE",
    "country": "United Kingdom"
  }
}'
```

JavaScript:

```javascript
const response = await fetch("https://www.timesubmit.com/api/v1/clients", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TIMESUBMIT_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "name": "Fernhill Logistics Ltd",
    "email": "accounts@fernhill-logistics.example",
    "phone": "+44 20 7946 0321",
    "website": "https://fernhill-logistics.example",
    "contactName": "Priya Natarajan",
    "contactEmail": "priya.natarajan@fernhill-logistics.example",
    "contactPhone": "+44 20 7946 0322",
    "currency": "GBP",
    "paymentTermDays": 30,
    "address": {
      "street": "14 Quayside Walk",
      "city": "Bristol",
      "region": "City of Bristol",
      "postalCode": "BS1 4XE",
      "country": "United Kingdom"
    }
  }),
});
const answer = await response.json();
```

Python:

```python
import os
import uuid

import requests

response = requests.request(
    "POST",
    "https://www.timesubmit.com/api/v1/clients",
    headers={
        "Authorization": f"Bearer {os.environ['TIMESUBMIT_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "name": "Fernhill Logistics Ltd",
        "email": "accounts@fernhill-logistics.example",
        "phone": "+44 20 7946 0321",
        "website": "https://fernhill-logistics.example",
        "contactName": "Priya Natarajan",
        "contactEmail": "priya.natarajan@fernhill-logistics.example",
        "contactPhone": "+44 20 7946 0322",
        "currency": "GBP",
        "paymentTermDays": 30,
        "address": {
            "street": "14 Quayside Walk",
            "city": "Bristol",
            "region": "City of Bristol",
            "postalCode": "BS1 4XE",
            "country": "United Kingdom",
        },
    },
)
answer = response.json()
```

Example response, with status 201:

```json
{
  "id": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "name": "Fernhill Logistics Ltd",
  "status": "active",
  "email": "accounts@fernhill-logistics.example",
  "phone": "+44 20 7946 0321",
  "website": "https://fernhill-logistics.example",
  "logoUrl": null,
  "contactName": "Priya Natarajan",
  "contactEmail": "priya.natarajan@fernhill-logistics.example",
  "contactPhone": "+44 20 7946 0322",
  "currency": "GBP",
  "paymentTermDays": 30,
  "purchaseOrderRequired": true,
  "address": {
    "street": "14 Quayside Walk",
    "city": "Bristol",
    "region": "City of Bristol",
    "postalCode": "BS1 4XE",
    "country": "United Kingdom"
  },
  "createdAt": "2026-08-14T10:02:31.000Z",
  "updatedAt": "2026-10-01T15:47:09.000Z"
}
```

The [error codes](https://www.timesubmit.com/developers/errors) it can answer with:

- `unauthorised` (401)
- `api_not_included` (403)
- `insufficient_scope` (403)
- `read_only` (403)
- `client_limit_reached` (403)
- `invalid_request` (400)
- `idempotency_conflict` (409)
- `rate_limited` (429)

### `PATCH /clients/{id}`

**Update a client.** Changes the fields sent and keeps the rest. `null` clears a field. Audited under the key's name. Needs the `clients:write` scope. Accepts an Idempotency-Key. Succeeds with 200.

The body is a JSON object. Send only the fields to change. Any other field is refused with its name.

| Field | Type | About it |
| --- | --- | --- |
| `name` (optional) | string | The client's name. Required, and not blank. |
| `phone` (optional, nullable) | string or null | A general phone number. |
| `email` (optional, nullable) | string or null | A general email address; it must look like one. |
| `website` (optional, nullable) | string or null | A full URL, such as https://example.com. |
| `contactName` (optional, nullable) | string or null | The person to contact. |
| `contactEmail` (optional, nullable) | string or null | That person's email address. |
| `contactPhone` (optional, nullable) | string or null | That person's phone number. |
| `currency` (optional, nullable) | string or null | An ISO 4217 code. One of 7 values. Values: `GBP`, `USD`, `EUR`, `AUD`, `CAD`, `NZD`, `ZAR`. |
| `paymentTermDays` (optional, nullable) | integer or null | Days the client has to pay an invoice. Unset uses the organisation's default. From 0 to 365. |
| `address` (optional, nullable) | object | The postal address. Each part is optional. |
| `address.street` (optional, nullable) | string or null | Street lines. |
| `address.city` (optional, nullable) | string or null | Town or city. |
| `address.region` (optional, nullable) | string or null | County, state or region. |
| `address.postalCode` (optional, nullable) | string or null | Postcode or ZIP. |
| `address.country` (optional, nullable) | string or null | Country. |
| `purchaseOrderRequired` (optional) | boolean | Whether invoicing the client needs a purchase order. Turning it on needs purchase orders on your plan. |

This list can grow within `/v1`, so ignore any you don't recognise rather than failing on it. See [versioning](https://www.timesubmit.com/developers/versioning).

Example request, with a fresh Idempotency-Key each time it runs. The key is read from `TIMESUBMIT_API_KEY`:

curl:

```bash
curl -X PATCH 'https://www.timesubmit.com/api/v1/clients/j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
  "contactName": "Owen Bradshaw",
  "contactEmail": "owen.bradshaw@fernhill-logistics.example",
  "paymentTermDays": 45
}'
```

JavaScript:

```javascript
const response = await fetch("https://www.timesubmit.com/api/v1/clients/j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.TIMESUBMIT_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "contactName": "Owen Bradshaw",
    "contactEmail": "owen.bradshaw@fernhill-logistics.example",
    "paymentTermDays": 45
  }),
});
const answer = await response.json();
```

Python:

```python
import os
import uuid

import requests

response = requests.request(
    "PATCH",
    "https://www.timesubmit.com/api/v1/clients/j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
    headers={
        "Authorization": f"Bearer {os.environ['TIMESUBMIT_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
    json={
        "contactName": "Owen Bradshaw",
        "contactEmail": "owen.bradshaw@fernhill-logistics.example",
        "paymentTermDays": 45,
    },
)
answer = response.json()
```

Example response, with status 200:

```json
{
  "id": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "name": "Fernhill Logistics Ltd",
  "status": "active",
  "email": "accounts@fernhill-logistics.example",
  "phone": "+44 20 7946 0321",
  "website": "https://fernhill-logistics.example",
  "logoUrl": null,
  "contactName": "Owen Bradshaw",
  "contactEmail": "owen.bradshaw@fernhill-logistics.example",
  "contactPhone": "+44 20 7946 0322",
  "currency": "GBP",
  "paymentTermDays": 45,
  "purchaseOrderRequired": true,
  "address": {
    "street": "14 Quayside Walk",
    "city": "Bristol",
    "region": "City of Bristol",
    "postalCode": "BS1 4XE",
    "country": "United Kingdom"
  },
  "createdAt": "2026-08-14T10:02:31.000Z",
  "updatedAt": "2026-10-01T15:47:09.000Z"
}
```

The [error codes](https://www.timesubmit.com/developers/errors) it can answer with:

- `unauthorised` (401)
- `api_not_included` (403)
- `insufficient_scope` (403)
- `read_only` (403)
- `not_on_plan` (403)
- `not_found` (404)
- `invalid_request` (400)
- `idempotency_conflict` (409)
- `rate_limited` (429)

### `POST /clients/{id}/archive`

**Archive a client.** Archives a client. There is no permanent delete. Takes no body. Needs the `clients:write` scope. Accepts an Idempotency-Key. Succeeds with 200.

Example request, with a fresh Idempotency-Key each time it runs. The key is read from `TIMESUBMIT_API_KEY`:

curl:

```bash
curl -X POST 'https://www.timesubmit.com/api/v1/clients/j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r/archive' \
  -H "Authorization: Bearer $TIMESUBMIT_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)"
```

JavaScript:

```javascript
const response = await fetch("https://www.timesubmit.com/api/v1/clients/j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r/archive", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TIMESUBMIT_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
const answer = await response.json();
```

Python:

```python
import os
import uuid

import requests

response = requests.request(
    "POST",
    "https://www.timesubmit.com/api/v1/clients/j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r/archive",
    headers={
        "Authorization": f"Bearer {os.environ['TIMESUBMIT_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
answer = response.json()
```

Example response, with status 200:

```json
{
  "id": "j57c2m8q4t1w9y3z6b0d5f7h2k4n8p1r",
  "name": "Fernhill Logistics Ltd",
  "status": "archived",
  "email": "accounts@fernhill-logistics.example",
  "phone": "+44 20 7946 0321",
  "website": "https://fernhill-logistics.example",
  "logoUrl": null,
  "contactName": "Priya Natarajan",
  "contactEmail": "priya.natarajan@fernhill-logistics.example",
  "contactPhone": "+44 20 7946 0322",
  "currency": "GBP",
  "paymentTermDays": 30,
  "purchaseOrderRequired": true,
  "address": {
    "street": "14 Quayside Walk",
    "city": "Bristol",
    "region": "City of Bristol",
    "postalCode": "BS1 4XE",
    "country": "United Kingdom"
  },
  "createdAt": "2026-08-14T10:02:31.000Z",
  "updatedAt": "2026-10-01T15:47:09.000Z"
}
```

The [error codes](https://www.timesubmit.com/developers/errors) it can answer with:

- `unauthorised` (401)
- `api_not_included` (403)
- `insufficient_scope` (403)
- `read_only` (403)
- `not_found` (404)
- `invalid_request` (400)
- `idempotency_conflict` (409)
- `rate_limited` (429)
