Service Account Keys
Manage bearer-token keys for a service account. A key authenticates API requests — create one to get a token, delete it to revoke access. Keys can optionally be single-use or time-limited.
/api/v1/service-accounts/{serviceAccountId}/keys
List all keys for a service account.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. Service account ID. Obtain this from the LucidLink app under Settings → Keys. |
serviceAccountId
Type
stringDescription
Required. Service account ID. Obtain this from the LucidLink app under Settings → Keys.
Responses
Status | Description |
|---|---|
| Keys retrieved successfully. |
| Invalid or missing credentials. |
| Service account does not exist. |
200
Description
Keys 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"}}
/api/v1/service-accounts/{serviceAccountId}/keys
Create a new key for a service account.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. Service account ID. Obtain this from the LucidLink app under Settings → Keys. |
serviceAccountId
Type
stringDescription
Required. Service account ID. Obtain this from the LucidLink app under Settings → Keys.
Request body
Field | Type | Description |
|---|---|---|
|
| When true, the token is invalidated after its first use. |
|
| Expiry date-time for the token (ISO 8601). Omit for a non-expiring token. |
isSingleUse
Type
booleanDescription
When true, the token is invalidated after its first use.
expiresAt
Type
stringDescription
Expiry date-time for the token (ISO 8601). Omit for a non-expiring token.
Responses
Status | Description |
|---|---|
| Key created successfully. The token is returned only once — store it securely. |
| 1. isSingleUse must be a boolean value. 2. expiresAt must be a Date instance. |
| Invalid or missing credentials. |
| Service account does not exist. |
201
Description
Key created successfully. The token is returned only once — store it securely.
400
Description
1. isSingleUse must be a boolean value. 2. expiresAt must be a Date instance.
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"}}
/api/v1/service-accounts/{serviceAccountId}/keys/{keyId}
Delete a key, immediately revoking its token.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| Required. Service account ID. Obtain this from the LucidLink app under Settings → Keys. |
|
| Required. |
serviceAccountId
Type
stringDescription
Required. Service account ID. Obtain this from the LucidLink app under Settings → Keys.
keyId
Type
stringDescription
Required.
Responses
Status | Description |
|---|---|
| Key deleted successfully. |
| Invalid or missing credentials. |
| Service account or key does not exist. |
200
Description
Key deleted successfully.
401
Description
Invalid or missing credentials.
404
Description
Service account or key does not exist.
401 response
{"error": {"message": "Invalid or expired token"}}
404 response
{"error": {"message": "Resource not found or user has no access privilege"}}