API authentication
Every call to the API is made with an access key: a pair of long random strings you create in the app. A key belongs to your organization rather than to a person, so an integration keeps running when the colleague who set it up changes role or leaves.
Sending the key
Section titled “Sending the key”A key has two parts, and every request sends both:
| Header | Value |
|---|---|
X-Api-Key |
The API key: 64 characters. It identifies the key and stays visible in the app. |
X-Api-Secret |
The API secret: 96 characters. It proves you hold the key and is shown only once, when the key is created. |

curl "https://api.doxtly.com/v1/templates" \ -H "X-Api-Key: $DOXTLY_API_KEY" \ -H "X-Api-Secret: $DOXTLY_API_SECRET" \ -H "Accept-Language: en"const response = await fetch('https://api.doxtly.com/v1/templates', { headers: { 'X-Api-Key': process.env.DOXTLY_API_KEY, 'X-Api-Secret': process.env.DOXTLY_API_SECRET, 'Accept-Language': 'en', },});
if (!response.ok) { const problem = await response.json(); throw new Error(`${problem.status}: ${problem.detail}`);}
const { items, meta } = await response.json();import osimport requests
response = requests.get( "https://api.doxtly.com/v1/templates", headers={ "X-Api-Key": os.environ["DOXTLY_API_KEY"], "X-Api-Secret": os.environ["DOXTLY_API_SECRET"], "Accept-Language": "en", }, timeout=60,)response.raise_for_status()data = response.json()There is no sign-in step, no token to fetch and nothing to refresh. The two headers go on every request. If either one is missing, the API takes the request for one with no credentials and answers 401.
One header instead of two
Section titled “One header instead of two”Some clients can send only one header, among them the MCP clients of AI agents. They send the key and its secret together as a bearer token, the two joined by a colon:
curl "https://api.doxtly.com/v1/templates" \ -H "Authorization: Bearer $DOXTLY_API_KEY:$DOXTLY_API_SECRET"It works on every endpoint a key may call, exactly as the two headers do.
The sign-in endpoints under /v1/auth and the people’s sessions behind them belong to the Doxtly app and are not meant for your code.
What happens to a request
Section titled “What happens to a request”Your request passes these checks in order. The first one that fails decides the answer.
| Check | If it fails |
|---|---|
| The address and method exist | 404, or 405 with an Allow header listing the methods the address takes |
| Both headers came with the request | 401 with the title Unauthorized and a WWW-Authenticate header. If both came but one is empty, you get 401 API key and secret are required. |
| The key and secret match | 401 Invalid API credentials. The answer is the same for an unknown key and a wrong secret, so nobody can probe which keys exist. |
| The key is enabled and has not expired | 401 This API key is inactive or expired. You only see this if the secret was right. |
| The address names your organization, if it names one | 404 |
| Your organization is not blocked | 403 with the code organization_blocked |
| The record exists in your organization | 404, which is also what a record of another organization answers |
| The key holds the right permission for this endpoint | 403 |
| The body is valid | 400 for broken JSON, 422 with field-by-field details for invalid data |
The exact bodies are on the errors page.
The order has one effect worth knowing: a key without the right permission usually gets 404 for a record that does not exist and 403 for one that does.
Permissions on a key
Section titled “Permissions on a key”A key can call an endpoint only if you gave it the matching permission, and endpoints are matched one to one, not by area. Holding a stronger one is not enough. A key with List forms can call GET /v1/forms but not GET /v1/forms/{id}, which needs Read form. The full list says what each permission opens.
Within its organization, a key has no further limits. Your people may see only their own department’s records, but departments do not apply to a key: a key with Read form reads every form in the organization. Choose its permissions with that in mind.
Responses that depend on other permissions
Section titled “Responses that depend on other permissions”A few answers change with what else the key holds. The call works either way, but you get less.
| Endpoint | Key holds | Difference |
|---|---|---|
GET /v1/forms/{id} |
Only Read form | The form’s password is left out. It is included if the key also holds a permission that needs Manage forms, such as Update form. |
GET /v1/interactive-documents/{id} |
Only Read interactive document | The password is left out. It is included if the key also holds a permission that needs Manage interactive documents. |
GET /v1/cloud_files/storages/{id}/usages |
Browse cloud files, nothing from View workflows and their runs | You get only a count. The details need a permission such as List workflows as well. |
GET /v1/contacts/{id}/personal_links, GET /v1/companies/{id}/personal_links |
List personal links, without List quiz attempts or List survey responses | Links to quizzes are left out without List quiz attempts, links to surveys without List survey responses. Links to forms and interactive documents always come. |
Who the key acts as
Section titled “Who the key acts as”A request made with a key is made by the key, not by the person who created it. That has a few consequences:
- The creator’s role plays no part while the key works. Changing it, deactivating the account or removing the person changes nothing about the key. See who can give a key what for the one moment their access does count.
- Two-factor authentication is never asked for, even when your organization requires it for people.
- Records show the key where that matters. The Access key column in the generated files list and the Access key field on a webhook request tell you which integration did what.
If your organization is blocked, its keys stop along with everything else, and the API answers 403 with the code organization_blocked.
What a key cannot do
Section titled “What a key cannot do”Only the endpoints in the permission list are open to keys. Everything else answers 403, however many permissions the key holds, because these parts of Doxtly are not offered to keys at all. Personal actions say so in the error: “This action is personal and cannot be performed with an API key. Sign in to the application.”
| Area | Closed to keys |
|---|---|
| Administration | Access keys themselves, so a key can never create or widen one. Roles, users, the organization and its settings, integrations, subscription and invoices. |
| Signing | Signing, approving or declining as a party, signing in person, the sender’s decisions on an identity check, and the screens of the package editor. Everything else about packages is in Document packages. |
| Your profile and dashboard | Anything about a person’s account, notifications and the dashboard. |
| Workflows | The quick on/off switch (a key changes isActive by replacing the workflow) and the helpers the designer uses, such as its lists of options and variables. |
| Forms and interactive documents | Importing a form from a link, editing a submission, and releasing a form submission from spam. |
| Previewing a template. | |
| AI and tools | AI agents, Doxie, the AI buttons of other pages (the accent color from the logo, a form from a link, a template from a Word file and the frequency writer in the workflow designer), and the PDF editor. |
/v1/public is what your visitors’ browsers use on public forms and signing pages, and it is not part of the key API either.
Calling a webhook with a key
Section titled “Calling a webhook with a key”A webhook set to Access key authentication takes the same two headers. It works differently from the rest of the API in three ways:
- The key needs Call webhooks, and it must be enabled, not expired and of the webhook’s organization. Any key that meets this works on every webhook of the organization set to Access key: you don’t tie a key to one webhook.
- Each webhook is set to one HTTP method. Any other method answers
405, with the right one in theAllowheader. - Refusals come from the webhook: a key that fails any of these checks gets
401, and the attempt shows up in the webhook’s requests.
Webhooks set to None or Token do not look at keys at all. Calling a webhook has the full picture.

Keeping keys safe
Section titled “Keeping keys safe”Anyone holding the key and secret can do what the key can do, from anywhere, without a second factor. A few habits keep the damage small if one leaks:
- Keep both values on your server, in environment variables or a secrets manager. Never put them in a web page, a mobile app or a code repository, and don’t pass them around by email or chat.
- Create one key per integration, so you can switch one off without stopping the others, and so Last used means something.
- Give each key only the permissions that integration uses. A key that only generates documents should not be able to delete templates.
- Set an expiry date on keys for short jobs, such as a one-off migration.
- Change keys now and then, and whenever someone who saw a secret leaves. The rotation steps cause no downtime.