Manage clients within your companies. Clients are the organizations or individuals for whom projects are created and managed.
{
"id": 123,
"title": "Acme Corporation",
"company_id": 456,
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
}
| Attribute | Type | Description |
|---|---|---|
| id | integer | Unique identifier for the client |
| title | string | The client's name or company name |
| company_id | integer | ID of the company this client belongs to |
| created_at | string | ISO 8601 timestamp when the client was created |
| updated_at | string | ISO 8601 timestamp when the client was last updated |
Retrieves a list of clients for the authenticated user's companies.
/api/v1/clients
| Parameter | Type | Description |
|---|---|---|
| company_id | integer | Filter clients by specific company ID |
| title | string | Filter clients by title (partial match) |
| per_page | integer | Number of results per page (max 1000) |
GET /api/v1/clients?company_id=456&per_page=25
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
[
{
"id": 123,
"title": "Acme Corporation",
"company_id": 456,
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
},
{
"id": 124,
"title": "Beta Industries",
"company_id": 456,
"created_at": "2023-01-02T10:30:00Z",
"updated_at": "2023-01-02T10:30:00Z"
}
]
Retrieves a specific client by ID.
/api/v1/clients/{id}
GET /api/v1/clients/123
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
{
"id": 123,
"title": "Acme Corporation",
"company_id": 456,
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-01T12:00:00Z"
}
Creates a new client within the specified company.
/api/v1/clients
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | The client's name or company name |
| company_id | integer | Yes | ID of the company this client belongs to |
POST /api/v1/clients
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
Accept: application/json
{
"title": "New Client Corp",
"company_id": 456
}
{
"id": 125,
"title": "New Client Corp",
"company_id": 456,
"created_at": "2023-01-03T14:20:00Z",
"updated_at": "2023-01-03T14:20:00Z"
}
Updates an existing client's information.
/api/v1/clients/{id}
| Parameter | Type | Required | Description |
|---|---|---|---|
| title | string | No | The client's updated name |
PUT /api/v1/clients/123
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
Accept: application/json
{
"title": "Acme Corporation Ltd"
}
{
"id": 123,
"title": "Acme Corporation Ltd",
"company_id": 456,
"created_at": "2023-01-01T12:00:00Z",
"updated_at": "2023-01-03T15:45:00Z"
}
Permanently deletes a client. This action cannot be undone.
/api/v1/clients/{id}
Warning: Deleting a client will permanently remove it and may affect associated projects. This action cannot be undone.
DELETE /api/v1/clients/123
Authorization: Bearer YOUR_ACCESS_TOKEN
Accept: application/json
204 No Content