Skip to main content

Overview

Clients are global entities in the agency system. They represent organizations or brands for which you manage links and campaigns. All authenticated users can access client endpoints.
All endpoints require authentication via Bearer token in the Authorization header.

List Clients

Response

id
string
Unique identifier (UUID) of the client.
name
string
Name of the client.
campaignsCount
number
Number of campaigns associated with this client.
Number of links associated with this client.
createdAt
string
ISO 8601 timestamp of creation.

Example Request

curl -X GET https://api.example.com/clients \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Acme Corp",
    "campaignsCount": 5,
    "linksCount": 127,
    "createdAt": "2026-01-15T08:00:00.000Z"
  },
  {
    "id": "234e5678-e89b-12d3-a456-426614174111",
    "name": "Tech Startup Inc",
    "campaignsCount": 3,
    "linksCount": 64,
    "createdAt": "2026-02-01T10:30:00.000Z"
  }
]

Create Client

Request Body

name
string
required
Name of the client. Must be at least 3 characters long and unique.

Response

id
string
Unique identifier (UUID) of the created client.
name
string
Name of the client.
createdAt
string
ISO 8601 timestamp of creation.
updatedAt
string
ISO 8601 timestamp of last update.

Example Request

curl -X POST https://api.example.com/clients \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "New Client Inc"
  }'

Example Response

{
  "id": "345e6789-e89b-12d3-a456-426614174222",
  "name": "New Client Inc",
  "createdAt": "2026-03-09T10:30:00.000Z",
  "updatedAt": "2026-03-09T10:30:00.000Z"
}

Error Responses

409
object
Client with this name already exists.
{
  "message": "Client already exists"
}

Get Client

Path Parameters

id
string
required
UUID of the client to retrieve.

Response

id
string
Unique identifier (UUID) of the client.
name
string
Name of the client.
createdAt
string
ISO 8601 timestamp of creation.
updatedAt
string
ISO 8601 timestamp of last update.

Example Request

curl -X GET https://api.example.com/clients/123e4567-e89b-12d3-a456-426614174000 \
  -H "Authorization: Bearer YOUR_TOKEN"

Example Response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Acme Corp",
  "createdAt": "2026-01-15T08:00:00.000Z",
  "updatedAt": "2026-01-15T08:00:00.000Z"
}

Error Responses

404
object
Client not found.
{
  "message": "Client not found"
}

Update Client

Path Parameters

id
string
required
UUID of the client to update.

Request Body

name
string
required
Updated name for the client. Must be at least 3 characters long and unique.

Response

Returns the updated client object with the same structure as the Get Client response.

Example Request

curl -X PUT https://api.example.com/clients/123e4567-e89b-12d3-a456-426614174000 \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Acme Corporation"
  }'

Example Response

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "Acme Corporation",
  "createdAt": "2026-01-15T08:00:00.000Z",
  "updatedAt": "2026-03-09T10:30:00.000Z"
}

Error Responses

404
object
Client not found.
{
  "message": "Client not found"
}
409
object
Another client with this name already exists.
{
  "message": "Client already exists"
}

Delete Client

Path Parameters

id
string
required
UUID of the client to delete.

Response

Returns 204 No Content on success.

Example Request

curl -X DELETE https://api.example.com/clients/123e4567-e89b-12d3-a456-426614174000 \
  -H "Authorization: Bearer YOUR_TOKEN"

Error Responses

404
object
Client not found.
{
  "message": "Client not found"
}
This operation is irreversible. Deleting a client will also permanently delete:
  • All campaigns associated with the client
  • All links associated with the client
  • All click analytics for those links

Build docs developers (and LLMs) love