Skip to content

Authentication

Every request to the DIMARC API carries an API key of your organization.

  • An active DIMARC account with the API option enabled on the subscription.
  • Being an administrator of your organization.
  1. In your dashboard, click your profile icon (top right), then Organization > API.
  2. Click New key and name it after the tool that will use it (e.g. “n8n production”).
  3. Copy the key: it starts with dk_ and will never be shown again.

Send it in the Authorization header (standard form) or in x-api-key:

Fenêtre de terminal
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.

POST /v2/token

Once you have your ClientId and ClientSecret, you can generate an authentication token by following these steps:

  1. Make a POST request to our authentication endpoint https://api.dimarc.ai/v2/token with your credentials in the JSON body
  2. Retrieve the returned JWT token
Fenêtre de terminal
curl --location 'https://api.dimarc.ai/v2/token' \
--header 'Content-Type: application/json' \
--data '{"client_id": "your-client-id", "client_secret": "your-client-secret"}'
{
"access_token": "**************",
"token_type": "x-api-key",
"expires_in": "3600"
}

To use the authentication token in your API requests, include it in the x-api-key header of the request:

Fenêtre de terminal
curl --request GET \
--url https://api.dimarc.ai/v2/endpoint \
--header 'x-api-key: **************'

If you encounter authentication problems, check the following points:

  1. Your credentials (ClientId and ClientSecret) are correctly entered
  2. Your token is not expired
  3. Your account has the necessary permissions for the requested operation

For additional assistance, contact our technical support at: contact@dimarc.fr