Skip to content

Client accounts

Client accounts operations in the Hlix API.

See the OpenAPI document for schemas and operation IDs.

  • Protected operations require an API key in x-api-key or 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.ai by default
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

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.

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 /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 /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.

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.

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.

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.

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.

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. A ValidationError body carries the failing fields; an ApiError body carries only error.
  • 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.