Skip to main content

Service Accounts

Manage service accounts — the non-human identities used to authenticate API calls. Create a service account (optionally with an initial key), list them, and delete them to revoke all of their keys.

GET

/api/v1/service-accounts

List all service accounts in the workspace.

Responses

Status

Description

200

Service accounts retrieved successfully.

401

Invalid or missing credentials.

200

Description

Service accounts retrieved successfully.

401

Description

Invalid or missing credentials.

401 response

{    "error": {        "message": "Invalid or expired token"    }}
POST

/api/v1/service-accounts

Create a service account, optionally with an initial key.

Request body

Field

Type

Description

name

string

Required. Display name for the service account.

serviceIdentity

ServiceAccountIdentityCreateDto

When provided, an initial key is created for the service account.

name

Type

string

Description

Required. Display name for the service account.

serviceIdentity

Type

ServiceAccountIdentityCreateDto

Description

When provided, an initial key is created for the service account.

Responses

Status

Description

201

Service account created successfully. When an initial key is requested, its token is returned only once — store it securely.

400

1. Service account name is required. 2. Service account name must be a string. 3. Service account name cannot be empty. 4. serviceIdentity must be an object. 5. serviceIdentity.isSingleUse must be a boolean value. 6. serviceIdentity.expiresAt must be a Date instance.

401

Invalid or missing credentials.

201

Description

Service account created successfully. When an initial key is requested, its token is returned only once — store it securely.

400

Description

1. Service account name is required. 2. Service account name must be a string. 3. Service account name cannot be empty. 4. serviceIdentity must be an object. 5. serviceIdentity.isSingleUse must be a boolean value. 6. serviceIdentity.expiresAt must be a Date instance.

401

Description

Invalid or missing credentials.

401 response

{    "error": {        "message": "Invalid or expired token"    }}
GET

/api/v1/service-accounts/{serviceAccountId}

Get a service account by ID.

Parameters

Parameter

Type

Description

serviceAccountId

string

Required. Service account ID. Obtain this from the list endpoint or the LucidLink app under Settings → Keys.

serviceAccountId

Type

string

Description

Required. Service account ID. Obtain this from the list endpoint or the LucidLink app under Settings → Keys.

Responses

Status

Description

200

Service account retrieved successfully.

401

Invalid or missing credentials.

404

Service account does not exist.

200

Description

Service account retrieved successfully.

401

Description

Invalid or missing credentials.

404

Description

Service account does not exist.

401 response

{    "error": {        "message": "Invalid or expired token"    }}

404 response

{    "error": {        "message": "Resource not found or user has no access privilege"    }}
DELETE

/api/v1/service-accounts/{serviceAccountId}

Delete a service account, revoking all of its keys.

Parameters

Parameter

Type

Description

serviceAccountId

string

Required. Service account ID. Obtain this from the list endpoint or the LucidLink app under Settings → Keys.

serviceAccountId

Type

string

Description

Required. Service account ID. Obtain this from the list endpoint or the LucidLink app under Settings → Keys.

Responses

Status

Description

200

Service account deleted successfully.

401

Invalid or missing credentials.

404

Service account does not exist.

200

Description

Service account deleted successfully.

401

Description

Invalid or missing credentials.

404

Description

Service account does not exist.

401 response

{    "error": {        "message": "Invalid or expired token"    }}

404 response

{    "error": {        "message": "Resource not found or user has no access privilege"    }}