Client accounts
Client accounts operations in the Hlix API.
See the OpenAPI document for schemas and operation IDs.
Prerequisites
Section titled “Prerequisites”- Protected operations require an API key in
x-api-keyor a browser session cookie; some actions require a verified user session - Tenant-scoped operations use
X-Organization-Id; browser sessions can use their active workspace. Discovery and personal-workspace bootstrap do not require an active workspace - The base URL for your deployment,
https://server.hlix.aiby default
Operations
Section titled “Operations”| Method | Path | Operation |
|---|---|---|
GET |
/v1/api/client-accounts |
List the agency’s customers |
POST |
/v1/api/client-accounts |
Add a customer |
DELETE |
/v1/api/client-accounts/{id} |
Delete a customer |
GET |
/v1/api/client-accounts/{id} |
Get one customer |
PATCH |
/v1/api/client-accounts/{id} |
Update a customer |
GET |
/v1/api/client-accounts/{id}/projects |
List one customer’s projects |
DELETE |
/v1/api/client-accounts/{id}/projects/{projectId} |
Unassign a project from a customer |
PUT |
/v1/api/client-accounts/{id}/projects/{projectId} |
Assign a project to a customer |
List the agency’s customers
Section titled “List the agency’s customers”GET /v1/api/client-accounts · operation ID listClientAccounts
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
ClientAccount[] | Every client account, by display name. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | The caller is a client collaborator; the customer roster is agency-only. (Or the caller is not a member of this workspace at all.) |
404 |
ApiError | The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist. |
Add a customer
Section titled “Add a customer”POST /v1/api/client-accounts · operation ID createClientAccount
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Request body — application/json, CreateClientAccount (required)
| Property | Type | Required | Notes |
|---|---|---|---|
billingEmail |
string (email) | null | no | |
branding |
object | no | |
currency |
string | null | no | |
displayName |
string | yes | min length 1, max length 200 |
legalName |
string | null | no | |
portalSlug |
string | yes | min length 1, max length 100 |
status |
prospect | active |
no |
Responses
| Status | Body | Description |
|---|---|---|
201 |
ClientAccount | The stored account. The workspace is taken from the tenant context — a body cannot name the organization it writes into. |
400 |
ValidationError | ApiError | The JSON body failed schema validation (ValidationError), or the request named no active organization (ApiError). |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | The caller is a client collaborator; the customer roster is agency-only. (Or the caller is not a member of this workspace at all.) |
404 |
ApiError | The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist. |
409 |
ApiError | That portal slug is already taken in this workspace. |
500 |
ApiError | The account could not be written. |
Delete a customer
Section titled “Delete a customer”DELETE /v1/api/client-accounts/{id} · operation ID deleteClientAccount
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
MessageAck | The account is gone. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | The caller is a client collaborator; the customer roster is agency-only. (Or the caller is not a member of this workspace at all.) |
404 |
ApiError | No such client account in this workspace. |
409 |
ApiError | The client account still has assigned projects. Unassign the projects or archive the account before deleting it. |
Get one customer
Section titled “Get one customer”GET /v1/api/client-accounts/{id} · operation ID getClientAccount
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
ClientAccount | The account. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | The caller is a client collaborator; the customer roster is agency-only. (Or the caller is not a member of this workspace at all.) |
404 |
ApiError | No such client account in this workspace. |
Update a customer
Section titled “Update a customer”PATCH /v1/api/client-accounts/{id} · operation ID updateClientAccount
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Request body — application/json, UpdateClientAccount (required)
| Property | Type | Required | Notes |
|---|---|---|---|
billingEmail |
string (email) | null | no | |
branding |
object | no | |
currency |
string | null | no | |
displayName |
string | no | min length 1, max length 200 |
legalName |
string | null | no | |
portalSlug |
string | no | min length 1, max length 100 |
status |
prospect | active | archived |
no |
Responses
| Status | Body | Description |
|---|---|---|
200 |
ClientAccount | The updated account. |
400 |
ValidationError | ApiError | The JSON body failed schema validation (ValidationError), or the request named no active organization (ApiError). |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | The caller is a client collaborator; the customer roster is agency-only. (Or the caller is not a member of this workspace at all.) |
404 |
ApiError | No such client account in this workspace. |
409 |
ApiError | That portal slug is already taken in this workspace. |
List one customer’s projects
Section titled “List one customer’s projects”GET /v1/api/client-accounts/{id}/projects · operation ID listClientAccountProjects
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
ProjectSummaryRow[] | Projects assigned to this client account, with index counts. Repository collections are omitted; GET /v1/api/projects includes them. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | The caller is a client collaborator; the customer roster is agency-only. (Or the caller is not a member of this workspace at all.) |
404 |
ApiError | No such client account in this workspace. |
Unassign a project from a customer
Section titled “Unassign a project from a customer”DELETE /v1/api/client-accounts/{id}/projects/{projectId} · operation ID unassignProjectFromClientAccount
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string | |
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
ProjectRow | The updated project row, without its repository collection. The project is now unassigned. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | The caller is a client collaborator; the customer roster is agency-only. (Or the caller is not a member of this workspace at all.) |
404 |
ApiError | The project does not exist or is not assigned to the specified client account. Both cases return 404. |
Assign a project to a customer
Section titled “Assign a project to a customer”PUT /v1/api/client-accounts/{id}/projects/{projectId} · operation ID assignProjectToClientAccount
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id |
path | yes | string | |
projectId |
path | yes | string | |
X-Organization-Id |
header | no | string | The workspace (organization) to act in. Omitted, the session’s active organization is used. |
Responses
| Status | Body | Description |
|---|---|---|
200 |
ProjectRow | The updated project row, without its repository collection. Repeating the same assignment is idempotent. |
400 |
ApiError | The request named no active organization. |
401 |
ApiError | No valid session or API key. |
403 |
ApiError | The caller is a client collaborator; the customer roster is agency-only. (Or the caller is not a member of this workspace at all.) |
404 |
ApiError | No such client account, or no such project. |
409 |
ApiError | The project is the workspace’s sample, which cannot be shared with a client. |
If a request fails
Section titled “If a request fails”The response table for each operation lists its documented errors. Common status codes include:
400— the body failed schema validation, or the request named no active organization. AValidationErrorbody carries the failing fields; anApiErrorbody carries onlyerror.401— no valid session or API key.403— authenticated, but not a member of the named organization, or a client collaborator without the required access.404— check the resource ID and your access to the selected Workspace.409— the expected revision or state is stale, or another operation currently owns the transition.500— the operation failed server-side. Retry only where an idempotency key makes that safe.