Authentication
Every request to the DIMARC API carries an API key of your organization.
Prerequisites
Section titled “Prerequisites”- An active DIMARC account with the API option enabled on the subscription.
- Being an administrator of your organization.
Create an API key
Section titled “Create an API key”- In your dashboard, click your profile icon (top right), then Organization > API.
- Click New key and name it after the tool that will use it (e.g. “n8n production”).
- Copy the key: it starts with
dk_and will never be shown again.
Use the key
Section titled “Use the key”Send it in the Authorization header (standard form) or in x-api-key:
curl 'https://api.dimarc.ai/v2/agents' \ --header 'Authorization: Bearer dk_your_key'Both forms are equivalent across the /v2 API and the OpenAI-compatible API.
Existing integrations: authentication token
Section titled “Existing integrations: authentication token”Integrations built before API keys authenticate with a ClientId and a ClientSecret, exchanged for a one-hour token. This flow is still served; it is no longer offered to new integrations. Your credentials are no longer displayed in the application: contact us if you need them.
Retrieving Your Authentication Token
Section titled “Retrieving Your Authentication Token”POST /v2/tokenOnce you have your ClientId and ClientSecret, you can generate an authentication token by following these steps:
- Make a POST request to our authentication endpoint
https://api.dimarc.ai/v2/tokenwith your credentials in the JSON body - Retrieve the returned JWT token
Request
Section titled “Request”curl --location 'https://api.dimarc.ai/v2/token' \ --header 'Content-Type: application/json' \ --data '{"client_id": "your-client-id", "client_secret": "your-client-secret"}'Response
Section titled “Response”{ "access_token": "**************", "token_type": "x-api-key", "expires_in": "3600"}Using the authentication token
Section titled “Using the authentication token”To use the authentication token in your API requests, include it in the x-api-key header of the request:
curl --request GET \ --url https://api.dimarc.ai/v2/endpoint \ --header 'x-api-key: **************'Troubleshooting
Section titled “Troubleshooting”If you encounter authentication problems, check the following points:
- Your credentials (ClientId and ClientSecret) are correctly entered
- Your token is not expired
- Your account has the necessary permissions for the requested operation
For additional assistance, contact our technical support at: contact@dimarc.fr