API Client | Baack docs
API Client
Endpoints
CreatePOST/n/v1/apiclient/
Endpoint for managing API clients. Clients provide context for API integrations including bearer token access to Baack APIs as well as for OAuth clients integrated with your company.
Baack allocates the URN and returns it in the response.
Request body: API Client
Responses
- 201 Created
- returns API Client
CREATE_SUCCESS - 400 Bad request
- returns Error
INVALID_REPRESENTATION
ReadGET/n/v1/apiclient/{urn}
Endpoint for managing API clients. Clients provide context for API integrations including bearer token access to Baack APIs as well as for OAuth clients integrated with your company.
Notes
- API clients should be separated by their purpose with permissions set for eachof the use cases.
- When your API access is enabled your company starts with a root API client which has an associated bearer token. The main admin client should be used to create API keys for specific use cases.
- Do not distribute default API client bearer tokens to devices or the browser as they by default have all permissions on the company.
Parameters
urn(path, required)String representation of a Unique Resource Name. Typically a UUID with 36 characters.
Responses
- 200 OK
- returns API Client
READ_SUCCESS - 404 Not found
- returns Error
NOT_FOUND
curl -H "Authorization: Bearer $BAACK_API_TOKEN" \ https://api.baack.co/n/v1/apiclient/{urn}UpdatePUT/n/v1/apiclient/{urn}
Endpoint for managing API clients. Clients provide context for API integrations including bearer token access to Baack APIs as well as for OAuth clients integrated with your company.
Parameters
urn(path, required)String representation of a Unique Resource Name. Typically a UUID with 36 characters.
Request body: API Client
Responses
- 202
- returns API Client
UPDATE_SUCCESS
DeleteDELETE/n/v1/apiclient/{urn}
Endpoint for managing API clients. Clients provide context for API integrations including bearer token access to Baack APIs as well as for OAuth clients integrated with your company.
Parameters
urn(path, required)String representation of a Unique Resource Name. Typically a UUID with 36 characters.
Responses
- 202
DELETE_SUCCESS
Webhook
POSTyour destination URL
Subject: API_CLIENT
API client webhook allows your integration to monitor when clients are created or updated
Webhook events for API client creation are critical for implementing automations around scenarios like auditing API client usage. Using the API client creation event your integration can also automate tasks like assigning API client permission roles or scheduling key rotation tasks.
Body: Webhook Event
Your response
- 200
- Return 200 status to indicate that data was received successfully
Fields
| Field | Type | Description |
|---|---|---|
| urn | string (uuid) | |
| owner | Company | Required on create.Ignored on update. . |
| bearerTokens | array of API Client Bearer Token | Ignored on update. |
| clientID | string | Required on create. . |
| scope | string | Required on create. . |
Used by: API Client Bearer Token, Client Context, Role, Search Item, Webhook Subscription