Skip to main content

Clients Domain

The Clients domain provides access to client organization details. A client is the top-level organizational unit that all other resources (users, devices, departments, apps) belong to. Every v2 endpoint is scoped under /clients/{client_id}, and this endpoint returns the client itself.

Partners are the tenant level above clients. Partner info is embedded in the Client DTO for display context but has no dedicated endpoints.

For embedding and endpoint design decisions, see the Design Guidelines.

Endpoints

EndpointMethodDescription
Get ClientGETFetch the client organization by ID. Includes partner info and the active enrollment token.

Data Transfer Objects (DTOs)

Partner

Partner embedded inside Client. Partners are the tenant that owns one or more clients. No partner-specific endpoints are exposed -- this DTO exists solely for display context (e.g. showing the managing partner's name in the UI).

{
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "TechPartner Inc."
}
FieldTypeNullableDescription
idstring (uuid)NoStable unique identifier for the partner
namestringNoPartner display name

DB source: partners.id, partners.name

Used in: Embedded inside Client.partner.


EnrollmentToken

The active enrollment token for a client. Enrollment tokens are used to deploy the desktop agent to devices. A client has at most one active token at a time -- generating a new token invalidates the previous one.

The value field contains the plaintext token string that users copy into the agent installer.

{
"id": "e1f2a3b4-c5d6-7890-abcd-ef1234567890",
"value": "enroll_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"description": "Default enrollment token",
"site_id": null,
"status": "active",
"max_uses": null,
"remaining_uses": null,
"expires_at": null,
"created_at": "2026-01-15T10:00:00.000Z"
}
FieldTypeNullableDescription
idstring (uuid)NoStable unique identifier for the enrollment token
valuestringNoPlaintext token value for agent enrollment
descriptionstringNoHuman-readable label for the token
site_idstringYesOptional site identifier the token is scoped to
statusstringNoToken status: active, inactive
max_usesintegerYesMaximum number of times this token can be used. null means unlimited.
remaining_usesintegerYesNumber of uses remaining. null means unlimited.
expires_atstring (ISO 8601)YesWhen this token expires. null means no expiry.
created_atstring (ISO 8601)NoWhen this token was generated

DB source:

DTO FieldDB Column
idenrollment_tokens.id
valuederived from enrollment_tokens.token_hash
descriptionenrollment_tokens.description
site_idenrollment_tokens.site_id
statusenrollment_tokens.status
max_usesenrollment_tokens.max_uses
remaining_usesenrollment_tokens.remaining_uses
expires_atenrollment_tokens.expires_at_utc
created_atenrollment_tokens.created_at

Omitted internal fields: client_id (in URL path), partner_id, created_by, updated_by, updated_at

Used in: Embedded inside Client.enrollment_token.


Client

Full client representation returned by the client detail endpoint. Embeds partner info and the active enrollment token.

{
"id": "aa7cf840-9ca9-46a3-9778-9015d6580d50",
"name": "Acme Corporation",
"status": "active",
"partner": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"name": "TechPartner Inc."
},
"enrollment_token": {
"id": "e1f2a3b4-c5d6-7890-abcd-ef1234567890",
"value": "enroll_a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"description": "Default enrollment token",
"site_id": null,
"status": "active",
"max_uses": null,
"remaining_uses": null,
"expires_at": null,
"created_at": "2026-01-15T10:00:00.000Z"
},
"created_at": "2025-06-01T00:00:00.000Z",
"updated_at": "2026-02-20T12:00:00.000Z"
}
FieldTypeNullableDescription
idstring (uuid)NoStable unique identifier for the client organization
namestringNoClient organization display name
statusstringNoClient status: active
partnerPartnerNoThe partner that manages this client
enrollment_tokenEnrollmentTokenYesThe active enrollment token. null if no token has been generated.
created_atstring (ISO 8601)NoWhen this client record was first created
updated_atstring (ISO 8601)NoWhen this client record was last modified

DB source:

DTO FieldDB Column
idclients.id
nameclients.name
statusclients.status
partnerjoined via clients.partner_idpartners
enrollment_tokenjoined via enrollment_tokens where client_id = ? AND status = 'active'
created_atclients.created_at
updated_atclients.updated_at

Omitted internal fields: partner_id (replaced by embedded partner), config (internal), created_by, updated_by

Used in: Get Client