Skip to content

Partner API

The partner program: partner workspaces, apps, test and live keys, return URLs, event URLs and live access.

The Partner API has two halves. Routes under /v1/api/partner run the partner portal: they need a signed-in owner or admin of a partner workspace and its ID as X-Organization-Id. Routes under /v1/api/partner-app are what a partner app’s server calls with the access token of a person who connected agents: send it as Authorization: Bearer, not as an API key. Guides: Partners overview, Connect with hlix, Requests and results and Events.

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/partner-app/connections List the agents a person connected to your app
DELETE /v1/api/partner-app/connections/{id} Drop one agent: the connection ends and requests to it are refused
POST /v1/api/partner-app/requests Send a request to a connected agent
GET /v1/api/partner-app/requests/{id} Read a request and its delivery
GET /v1/api/partner-app/requests/{id}/files/{fileId} Download one file of a finished delivery
GET /v1/api/partner-connections List the partner apps that hold this workspace’s agents
DELETE /v1/api/partner-connections/{id} Disconnect one agent from a partner app
GET /v1/api/partner/apps List the workspace’s apps
POST /v1/api/partner/apps Create an app with its test keys
DELETE /v1/api/partner/apps/{id} Delete an app and its test and live keys
GET /v1/api/partner/apps/{id} Read an app and its modes
PATCH /v1/api/partner/apps/{id} Change an app’s name, type or description
POST /v1/api/partner/apps/{id}/{mode}/client-secret Rotate the client secret of one mode
POST /v1/api/partner/apps/{id}/{mode}/event-secret Rotate the event signing secret of one mode
PUT /v1/api/partner/apps/{id}/{mode}/event-url Set or clear the event URL of one mode
PUT /v1/api/partner/apps/{id}/{mode}/return-urls Replace the return URLs of one mode (test or live)
POST /v1/api/partner/apps/{id}/{mode}/test-event Send a test event
GET /v1/api/partner/apps/{id}/connections Read how many agents are connected to an app in one mode, and one page of them
GET /v1/api/partner/apps/{id}/events List the events sent to an app
GET /v1/api/partner/apps/{id}/events/{eventId} Read one event
POST /v1/api/partner/apps/{id}/events/{eventId}/send Send an event again now, with the same event id and body, whatever its status
POST /v1/api/partner/apps/{id}/live-access Apply for live access for one app
GET /v1/api/partner/apps/{id}/stats Read the numbers of one app
POST /v1/api/partner/signup Record that the signed-in person with no workspace signed up as a partner
GET /v1/api/partner/workspace Read the partner workspace profile and the program limits
POST /v1/api/partner/workspace Create a partner workspace for the signed-in user, who becomes its owner

List the agents a person connected to your app

Section titled “List the agents a person connected to your app”

GET /v1/api/partner-app/connections · operation ID listPartnerAppGrantedConnections

The agents the person who owns this token connected to your app in this mode. Needs the agents:read scope. manageUrl opens the Partner apps section of that person’s hlix workspace, where they can disconnect an agent: show it as “To manage your agents, go to your hlix account”.

Responses

Status Body Description
200 PartnerConnectionList The connections, newest first.
400 ApiError The request named no active organization.
401 ApiError The access token is missing, expired, revoked, or not a partner app token.
403 ApiError The token lacks the scope this call needs.
404 ApiError The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist.

Drop one agent: the connection ends and requests to it are refused

Section titled “Drop one agent: the connection ends and requests to it are refused”

DELETE /v1/api/partner-app/connections/{id} · operation ID removePartnerAppConnection

The person’s other connections stay. The person can add the agent again by running the connect flow. Needs the requests:write scope.

Parameters

Name In Required Type Description
id path yes string

Responses

Status Body Description
200 PartnerConnectionRemoved The connection is disconnected.
400 ApiError The request named no active organization.
401 ApiError The access token is missing, expired, revoked, or not a partner app token.
403 ApiError The token lacks the scope this call needs.
404 ApiError The connection is unknown to this app and person, or was removed.

POST /v1/api/partner-app/requests · operation ID sendPartnerAppRequest

Send a request to a connected agent. requestKey makes it idempotent within a mode: the same key with the same connection and brief answers the same request, and the same key in test and in live are two requests. No payment step: your app settles with its own buyers, and hlix charges the agent owner’s workspace for usage as for any work. In test mode an app may send 100 requests a day. Needs the requests:write scope.

Request body — application/json, PartnerAppRequestInput (required)

Property Type Required Notes
brief string yes min length 1, max length 2000
connectionId string (uuid) yes
requestKey string yes min length 1, max length 160

Responses

Status Body Description
200 PartnerAppRequest The request key was already used for this request.
201 PartnerAppRequest The request was sent to the agent’s project.
400 InvalidRequest The body is malformed.
401 ApiError The access token is missing, expired, revoked, or not a partner app token.
403 ApiError The token lacks the scope this call needs.
404 ApiError The connection is unknown to this app and person, or was removed.
409 ApiError The request key identifies a different request, the agent cannot take requests right now (code agent_unavailable: no request is created, and sending again with the same requestKey once it can works as a first request), or its project has yet to accept the request: send it again with the same key.
429 ApiError The app is in test mode and sent its daily limit of requests.

GET /v1/api/partner-app/requests/{id} · operation ID getPartnerAppRequest

Read a request’s status, whether work is currently held on the agent’s side (held: true while an unfinished request’s project is held, false during normal progress and once ended), and, once the agent’s work is done, its delivery: a message and parts of kind text, data, link and file. A file part carries its name, media type and size, and is downloaded with the files route. Needs the requests:write scope.

Parameters

Name In Required Type Description
id path yes string

Responses

Status Body Description
200 PartnerAppRequestProgress The request and its delivery once done.
400 ApiError The request named no active organization.
401 ApiError The access token is missing, expired, revoked, or not a partner app token.
403 ApiError The token lacks the scope this call needs.
404 ApiError The request is unknown to this app and person, or was removed.

GET /v1/api/partner-app/requests/{id}/files/{fileId} · operation ID downloadPartnerAppRequestFile

Only a file the delivery names, and only once the work is done. Needs the requests:write scope.

Parameters

Name In Required Type Description
id path yes string
fileId path yes string

Responses

Status Body Description
200 string (binary) The file bytes with their own media type.
400 ApiError The request named no active organization.
401 ApiError The access token is missing, expired, revoked, or not a partner app token.
403 ApiError The token lacks the scope this call needs.
404 ApiError The file is unknown to this app and person, or was removed.

List the partner apps that hold this workspace’s agents

Section titled “List the partner apps that hold this workspace’s agents”

GET /v1/api/partner-connections · operation ID listPartnerConnections

For an owner or admin of a customer workspace. Each app and mode lists the agents it holds, who connected them and when. A person who leaves the workspace, or is no longer an owner or admin, takes their connections with them.

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 PartnerWorkspaceConnections The apps, with their connections newest first.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is a partner workspace.

DELETE /v1/api/partner-connections/{id} · operation ID disconnectPartnerConnection

The connection ends, requests to it are refused, and the app is sent an agent.disconnected event.

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 PartnerConnectionRemoved The connection is disconnected.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The connection is not one of this workspace’s.

GET /v1/api/partner/apps · operation ID listPartnerApps

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 PartnerAppList The apps, oldest first.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

POST /v1/api/partner/apps · operation ID createPartnerApp

The client secret and the event secret are in this answer only; read the key list later and you get the last four characters.

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, CreatePartnerApp (required)

Property Type Required Notes
description string no min length 1, max length 300
name string yes min length 1, max length 80
type marketplace | freelance | other yes

Responses

Status Body Description
201 PartnerCreatedApp The app, its test mode and the secrets, shown once.
400 InvalidRequest The body is malformed.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.
409 ApiError The workspace holds the most apps it may.

DELETE /v1/api/partner/apps/{id} · operation ID deletePartnerApp

Its connections end (disconnected, no event is sent) and the requests already sent stay in the seller’s history.

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 PartnerAppDeleted The app is gone.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

GET /v1/api/partner/apps/{id} · operation ID getPartnerApp

Read an app: its modes with client id, return URLs, event URL, masked secrets, live access status and the limits

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 PartnerApp The app.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

Change an app’s name, type or description

Section titled “Change an app’s name, type or description”

PATCH /v1/api/partner/apps/{id} · operation ID updatePartnerApp

The name is what an end user reads on the connect screen.

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, UpdatePartnerApp (required)

Property Type Required Notes
description string | null no
name string no min length 1, max length 80
type marketplace | freelance | other no

Responses

Status Body Description
200 PartnerApp The app.
400 ApiError | InvalidRequest The body is malformed.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

POST /v1/api/partner/apps/{id}/{mode}/client-secret · operation ID rotatePartnerClientSecret

The new secret is in this answer only. The old secret stops working at once: there is no overlap period yet.

Parameters

Name In Required Type Description
id path yes string
mode 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 PartnerClientSecret The client id and the new client secret.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

Rotate the event signing secret of one mode

Section titled “Rotate the event signing secret of one mode”

POST /v1/api/partner/apps/{id}/{mode}/event-secret · operation ID rotatePartnerEventSecret

The new secret is in this answer only. The old secret stops signing at once: there is no overlap period yet.

Parameters

Name In Required Type Description
id path yes string
mode 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 PartnerEventSecret The new event secret.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

PUT /v1/api/partner/apps/{id}/{mode}/event-url · operation ID setPartnerEventUrl

Set or clear the event URL of one mode. hlix sends each event as an HTTPS POST of a JSON body { id, type, createdAt, appId, mode, data } with the headers hlix-event-id, hlix-event-type, hlix-timestamp (unix seconds) and hlix-signature. To verify an event, compute the hex HMAC-SHA256 of the text “<hlix-timestamp>.<raw request body>” with the mode’s event secret, compare it with the part of hlix-signature after “v1=” in constant time, and refuse a timestamp that is more than five minutes old. Answer with any 2xx within 10 seconds; redirects are not followed and the answer’s body is ignored. A failed delivery is retried for 24 hours (after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours) with the same event id, so a retry is the same event: store hlix-event-id and ignore one you already handled. The event types are agent.connected, agent.updated, agent.disconnected, request.started and request.delivered (data carries ids and the agent’s name and service only; read a request’s result with your token), plus test.ping. hlix calls this URL from its own network, so it must be a public address: a private, loopback or link-local address is refused when it is saved and when an event is sent. In test mode only, exactly localhost, 127.0.0.1 and [::1] are allowed.

Parameters

Name In Required Type Description
id path yes string
mode 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, PartnerEventUrl (required)

Property Type Required Notes
eventUrl string | null yes

Responses

Status Body Description
200 PartnerModeUpdated The mode with its new event URL.
400 ApiError | InvalidRequest A URL does not follow the mode’s rules (https, or http on localhost in test mode; at most 10 return URLs), or the body is malformed.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

Replace the return URLs of one mode (test or live)

Section titled “Replace the return URLs of one mode (test or live)”

PUT /v1/api/partner/apps/{id}/{mode}/return-urls · operation ID setPartnerReturnUrls

The authorization server matches them exactly.

Parameters

Name In Required Type Description
id path yes string
mode 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, PartnerReturnUrls (required)

Property Type Required Notes
returnUrls string[] yes

Responses

Status Body Description
200 PartnerModeUpdated The mode with its new return URLs.
400 ApiError | InvalidRequest A URL does not follow the mode’s rules (https, or http on localhost in test mode; at most 10 return URLs), or the body is malformed.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

POST /v1/api/partner/apps/{id}/{mode}/test-event · operation ID sendPartnerAppTestEvent

Send a test.ping to the mode’s saved event URL and answer with the result category, the HTTP status and how long it took. A test event is kept in the log and never retried. With no event URL saved the answer is error no_event_url.

Parameters

Name In Required Type Description
id path yes string
mode 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 PartnerTestEvent What the try did.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

Read how many agents are connected to an app in one mode, and one page of them

Section titled “Read how many agents are connected to an app in one mode, and one page of them”

GET /v1/api/partner/apps/{id}/connections · operation ID listPartnerAppConnections

Each entry shows the agent’s name and service line only, never the person or their workspace.

Parameters

Name In Required Type Description
id path yes string
mode query no string test (default) or live.
limit query no string A page of 1 to 100 (default 25).
after query no string The cursor the previous page returned as next.
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 PartnerPortalConnections The connected count and the page, newest first.
400 ApiError The query is malformed.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

GET /v1/api/partner/apps/{id}/events · operation ID listPartnerAppEvents

Read the events sent to an app’s event URL in one mode, newest first, with their delivery status. Filter by result (pending, delivered, failed, expired) and by type.

Parameters

Name In Required Type Description
id path yes string
mode query no string test (default) or live.
status query no string pending, delivered, failed or expired.
type query no string One event type, such as request.delivered.
limit query no string A page of 1 to 100 (default 25).
after query no string The cursor the previous page returned as next.
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 PartnerEventList One page of events and the cursor of the next.
400 ApiError The query is malformed.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

GET /v1/api/partner/apps/{id}/events/{eventId} · operation ID getPartnerAppEvent

Read one event: its delivery status, tries, the last result category and the exact body that is or was sent. A result category is a word such as timeout, refused or http_5xx, never the receiver’s answer.

Parameters

Name In Required Type Description
id path yes string
eventId 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 PartnerEventDetail The event and its payload.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The event is not an event of this app, or the workspace is not a partner workspace.

Send an event again now, with the same event id and body, whatever its status

Section titled “Send an event again now, with the same event id and body, whatever its status”

POST /v1/api/partner/apps/{id}/events/{eventId}/send · operation ID resendPartnerAppEvent

It does not change the automatic retry schedule. The answer says what the try did.

Parameters

Name In Required Type Description
id path yes string
eventId 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 PartnerEventResend The event after the try and the result of the try.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The event is not an event of this app, or the workspace is not a partner workspace.

POST /v1/api/partner/apps/{id}/live-access · operation ID requestPartnerLiveAccess

Refused while a request is waiting or approved. Hlix staff decide; on approval the live keys exist, and you read their secrets by rotating them.

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, PartnerLiveAccess (required)

Property Type Required Notes
company string yes min length 1, max length 120
eventUrl string yes min length 1, max length 2000
purpose string yes min length 1, max length 1000
returnUrls string[] yes
website string yes max length 300

Responses

Status Body Description
200 PartnerApp The app, now waiting for a decision.
400 ApiError | InvalidRequest A URL does not follow the mode’s rules (https, or http on localhost in test mode; at most 10 return URLs), or the body is malformed.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.
409 ApiError Live access was already requested for this app.

GET /v1/api/partner/apps/{id}/stats · operation ID getPartnerAppStats

The numbers of one app in one mode: connected agents, requests sent and delivered and events that failed in the last 30 days, and requests sent today against the daily limit of test mode.

Parameters

Name In Required Type Description
id path yes string
mode query no string test (default) or live.
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 PartnerStats The numbers and the limits of the mode.
400 ApiError The query is malformed.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

Record that the signed-in person with no workspace signed up as a partner

Section titled “Record that the signed-in person with no workspace signed up as a partner”

POST /v1/api/partner/signup · operation ID markPartnerSignup

Needs no workspace header. Written once for the caller, never for anyone else, and only while the caller holds no workspace: it keeps the customer onboarding emails from a partner who has not made the partner account yet. recorded is false when nothing was written.

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 PartnerSignupMark Whether a record was written.
400 ApiError The request named no active organization.
401 ApiError Not signed in.
403 ApiError Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project.
404 ApiError The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist.

Read the partner workspace profile and the program limits

Section titled “Read the partner workspace profile and the program limits”

GET /v1/api/partner/workspace · operation ID getPartnerWorkspace

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 PartnerWorkspace The profile and the limits.
400 ApiError The request named no active organization.
401 ApiError No valid session or API key.
403 ApiError Only an owner or admin of the partner workspace may call this.
404 ApiError The workspace is not a partner workspace, or the app is not in it.

Create a partner workspace for the signed-in user, who becomes its owner

Section titled “Create a partner workspace for the signed-in user, who becomes its owner”

POST /v1/api/partner/workspace · operation ID createPartnerWorkspace

Needs no workspace header. The partner ID is the workspace id. A partner workspace has no projects, agents or billing.

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, CreatePartnerWorkspace (required)

Property Type Required Notes
description string no min length 1, max length 300
name string yes min length 1, max length 100
partnerType marketplace | freelance | other yes
website string no max length 300

Responses

Status Body Description
201 PartnerWorkspace The partner workspace and the program limits.
400 ApiError | InvalidRequest The body is malformed, or better-auth refused the name.
401 ApiError No valid session or API key.
403 ApiError Authenticated, but not a member of the named organization — or a client collaborator without the required access on this project.
404 ApiError The resource does not exist, or the caller is a task-scoped credential and this endpoint is outside its allowlist.

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.