IP Allowlist
Manage your workspace's IP allowlist and export its decision log through the API.
Enterprise betaThis is a Beta feature available only to enrolled Enterprise workspaces, and only to workspace admins. Contact Dovetail support to request access.
The IP allowlist restricts which networks can reach a Dovetail workspace. When it is enforced, a request from an IP address outside the allowed ranges is refused, whether it comes from the web app, the API, or the MCP server.
Every request Dovetail evaluates is written to a decision log, which you can export as CSV. Use it to review traffic before you enforce, and to keep an audit trail afterward.
This guide covers the API. For setup in the web app, see IP allowlist in the help center.
Concepts
Modes
The mode applies to the whole workspace. API keys with their own list follow the workspace mode.
| Mode | Label in Settings | Behavior |
|---|---|---|
disabled | Disabled | Nothing is evaluated or recorded. Every IP address is allowed. This is the default. |
report_only | Report only | Every request is evaluated and recorded. Nothing is blocked. A request that would have been blocked is recorded as allowed, with reason denied_ip_not_in_list. |
enforcing | Enforcing | Requests from outside the allowed ranges are refused, and every decision is recorded. |
The web app requires a workspace to pass through Report only before Enforcing. The API accepts any mode change.
Lists
A list is a set of CIDR ranges, each with an optional label.
- User list (All users). Every workspace has one. It governs signed-in users, API and MCP access through OAuth, and every personal API key without a list of its own.
- API key lists. A personal API key can have its own list, for example a CI key that should only work from your build runners. Requests made with that key are checked against its own list instead of the user list.
A new user list contains 0.0.0.0/0 and ::/0, labeled Allow all (default). Enforcing blocks nobody until you replace them.
Changes to the mode or a list take effect in up to one minute.
Coverage
Covered: signed-in browser sessions (including real-time connections), the web app's API, and the public API (v1 and v2), including MCP traffic.
Not covered, and not recorded in the decision log:
- Dovetail support sessions. When Dovetail support opens your workspace to help you, that access is exempt from your allowlist.
- Third-party OAuth integrations such as Zapier, SCIM provisioning tokens, and inbound webhooks.
- Public web links.
- File attachments, media, and export downloads. These are served from time-limited signed URLs, which are only issued to requests that passed the allowlist check. Anyone holding such a URL can use it until it expires.
Authentication and scopes
Every route requires a workspace admin on an enrolled workspace. Authenticate with a personal API key (an API token), created by a workspace admin, in the Authorization header. See Authorization for creating a key.
Authorization: Bearer <DOVETAIL_API_TOKEN>
When you create the key, choose the permissions each task needs:
| Task | Permission | Scope |
|---|---|---|
| Read the mode, lists, keys, and your IP | IP allowlist — Read | ip_allowlist:read |
| Change the mode, replace entries, give a key its own list | IP allowlist — Write | ip_allowlist:write |
| Return a key to the user list | IP allowlist — Delete | ip_allowlist:delete |
| Request and poll decision-log exports | Audit logs — Read | audit_logs:read |
Each route checks one scope. A key that only exports the decision log needs audit_logs:read and nothing else. Keys with Full access, including keys created before access levels existed, pass every scope check, so prefer a key scoped to what it needs. See Scopes for how scopes are checked.
Base URL
https://dovetail.com/api/v2/ip-allowlist
The base URL is the same for every region. The token identifies the workspace, so you don't need the workspace's subdomain.
IDs are 22-character Base62 strings, and path parameters also accept the hyphenated UUID form. Timestamps are ISO 8601 in UTC.
Managing the allowlist
Endpoints
| Method | Path | Scope | Description |
|---|---|---|---|
GET | /v2/ip-allowlist/my-ip | ip_allowlist:read | Your IP address as the allowlist sees it |
GET | /v2/ip-allowlist | ip_allowlist:read | The mode and the user list |
GET | /v2/ip-allowlist/lists/:list_id | ip_allowlist:read | One list, with its metadata |
PUT | /v2/ip-allowlist/lists/:list_id/entries | ip_allowlist:write | Replace a list's entries |
PUT | /v2/ip-allowlist/mode | ip_allowlist:write | Set the mode |
GET | /v2/ip-allowlist/keys | ip_allowlist:read | Every API key and the list governing it |
PUT | /v2/ip-allowlist/keys/:key_id/list | ip_allowlist:write | Give a key its own list |
DELETE | /v2/ip-allowlist/keys/:key_id/list | ip_allowlist:delete | Return a key to the user list |
Calls that change nothing succeed and say so in outcome:
| Route | outcome values |
|---|---|
| Replace entries | updated, unchanged |
| Set mode | updated, unchanged |
| Give a key its own list | created, already_has_dedicated_list (the existing list is returned untouched) |
| Return a key to the user list | reverted, already_on_user_list |
Finding your IP address
Your address as Dovetail sees it can differ from what your machine reports, for example behind a proxy or VPN. Called from a server or CI runner, this returns that machine's egress address.
GET https://dovetail.com/api/v2/ip-allowlist/my-ip
Authorization: Bearer <DOVETAIL_API_TOKEN>{ "ip": "203.0.113.7", "ip_family": "v4" }If the address can't be determined, the response is still 200, with ip set to null and a reason of no_source or unparseable. This route is limited to 30 requests per minute per user.
Replacing a list's entries
Get the user list's ID from the allowlist:
GET https://dovetail.com/api/v2/ip-allowlist
Authorization: Bearer <DOVETAIL_API_TOKEN>{
"mode": "disabled",
"user_list": {
"id": "5Kd3NBUAdUnhyzenEwVLu9",
"team_id": "1pQ7vYz0rS2tU3vW4xY5zA",
"entries": [
{ "cidr": "0.0.0.0/0", "label": "Allow all (default)" },
{ "cidr": "::/0", "label": "Allow all (default)" }
]
}
}Then replace the whole entry set in one call. Send the complete list every time.
PUT https://dovetail.com/api/v2/ip-allowlist/lists/<LIST_ID>/entries
Authorization: Bearer <DOVETAIL_API_TOKEN>
Content-Type: application/json
{
"entries": [
{ "cidr": "203.0.113.0/24", "label": "Sydney office" },
{ "cidr": "198.51.100.10/32", "label": "VPN" },
{ "cidr": "2001:db8:1234::/48", "label": "Sydney office IPv6" }
]
}The response contains the saved list, the outcome, and caller_coverage:
caller_coverage | Meaning |
|---|---|
covered | Your current IP address is inside the new list. |
not_covered | Your address is outside the list. You sent force_exclude_caller_ip. |
unverified | Dovetail couldn't determine your address, so it couldn't check. |
For an API key's list, caller_coverage is always covered, because lockout protection only checks the user list.
Notes:
- CIDRs are stored in canonical form. For example,
10.0.0.1/8is stored as10.0.0.0/8. Blank labels are dropped. - Include IPv6 ranges if your networks use IPv6. Without one, requests from IPv6-only networks are blocked once you enforce.
- Saving an empty list blocks everyone that list governs, so the request must include
"force_empty": true.
Lockout protection
If a new user list doesn't cover the address you're calling from, the save is rejected with 400 and nothing changes:
{
"errors": [
{
"code": "InvalidOperation",
"title": "…",
"reason": "caller_not_covered",
"caller_ip": "203.0.113.7"
}
]
}To save a list that excludes you on purpose, send "force_exclude_caller_ip": true. Only do this if another admin on an allowed network can still get in. An empty user list needs both force_empty and force_exclude_caller_ip, unless Dovetail can't determine your address.
Lockout protection doesn't apply to API key lists, because your own session is governed by the user list. Editing a key's list can still cut off that key.
Setting the mode
PUT https://dovetail.com/api/v2/ip-allowlist/mode
Authorization: Bearer <DOVETAIL_API_TOKEN>
Content-Type: application/json
{
"mode": "report_only"
}The response contains the outcome, the mode, and the user_list.
Changing the mode has no lockout checkBefore you set
enforcing, callGET /v2/ip-allowlist/my-ipand confirm your address is in the user list. If it isn't, your next request is refused.
Giving an API key its own list
List every API key in the workspace and the list governing each. Secrets are never returned.
GET https://dovetail.com/api/v2/ip-allowlist/keys
Authorization: Bearer <DOVETAIL_API_TOKEN>Each key has id, name, owner_user_id, created_at, valid_until (null means the key never expires), and ip_allowlist, which holds the governing list's id and kind.
Give a key its own list. name is optional, up to 200 characters, and a blank name counts as no name.
PUT https://dovetail.com/api/v2/ip-allowlist/keys/<KEY_ID>/list
Authorization: Bearer <DOVETAIL_API_TOKEN>
Content-Type: application/json
{
"name": "CI runners"
}The new list starts as a copy of the user list's entries. After that the two lists are independent. Replace its entries with PUT /v2/ip-allowlist/lists/:list_id/entries, using the list.id from the response.
To return the key to the user list, call DELETE /v2/ip-allowlist/keys/:key_id/list. This deletes the key's own list.
A key's list only applies to requests authenticated with that key. OAuth-based API and MCP access always uses the user list.
List object
| Field | Description |
|---|---|
id | The list ID. |
team_id | The workspace ID. |
kind | USER for the user list, API_KEY for a key's own list. |
name | The list's name, or null when unnamed. The user list is always unnamed. |
entries | Array of { "cidr", "label" }. label is omitted when blank. |
created_by, updated_by | User IDs, or null when the system made the change. |
created_at, updated_at | Timestamps. |
Request bodies
PUT /lists/:list_id/entries:{ "entries": [{ "cidr": string, "label"?: string }], "force_empty"?: boolean, "force_exclude_caller_ip"?: boolean }PUT /mode:{ "mode": "disabled" | "report_only" | "enforcing" }PUT /keys/:key_id/list:{ "name"?: string }
Export the decision log
An export is asynchronous. You request it, poll until it's READY, then download the CSV from a short-lived link. Both routes need the audit_logs:read scope.
| Method | Path | Description |
|---|---|---|
POST | /v2/ip-allowlist/exports | Request an export |
GET | /v2/ip-allowlist/exports/:export_id | Poll an export |
Requesting an export
| Field | Required | Description |
|---|---|---|
since | Yes | Range start, inclusive. ISO 8601 with a UTC offset, such as 2026-11-01T00:00:00Z or 2026-11-01T11:00:00+11:00. |
until | No | Range end, exclusive, in the same format. Defaults to now. |
kind | No | allow, deny, or config. Exports only that kind. Omit it to export everything. |
POST https://dovetail.com/api/v2/ip-allowlist/exports
Authorization: Bearer <DOVETAIL_API_TOKEN>
Content-Type: application/json
{
"since": "2026-11-01T00:00:00Z",
"until": "2026-11-08T00:00:00Z"
}The response is 202:
{
"export_id": "7tB2nQ9xK4mP1sV8cR3wZe",
"since": "2026-11-01T00:00:00.000Z",
"until": "2026-11-08T00:00:00.000Z"
}since, until, and kind (only when you sent one) are the range the export actually covers. They come back unchanged on every poll.
The range rules are checked in this order:
sincemust be beforeuntil. Otherwise the response is400with the titlesince must be before until.- The range can be at most 31 days. Otherwise the response is
400with the titlerange exceeds 31 days. - Records take about 25 minutes to reach the log, so Dovetail only exports up to a completeness watermark,
complete_up_to, about 25 minutes before now.- If
sinceis at or after the watermark, the response is422, withcomplete_up_toin the error. Retry with an earliersince. - If
until, or now whenuntilis omitted, is after the watermark, the export is cut off at the watermark. The response'suntilis the cut-off point.
- If
- One export runs at a time per workspace. If one is still running, the response is
409with that export'sexport_id. It may have been requested by another admin for a different range. Poll it, or wait for it to finish and request again.
{
"errors": [
{
"code": "InvalidOperation",
"title": "An export is already in flight for this workspace",
"export_id": "7tB2nQ9xK4mP1sV8cR3wZe"
}
]
}{
"errors": [
{
"code": "UnprocessableContent",
"title": "The requested range starts beyond the completeness watermark",
"message": "Retry with a since earlier than complete_up_to",
"complete_up_to": "2026-11-11T02:23:00.000Z"
}
]
}Polling an export
GET https://dovetail.com/api/v2/ip-allowlist/exports/<EXPORT_ID>
Authorization: Bearer <DOVETAIL_API_TOKEN>{
"status": "READY",
"since": "2026-11-01T00:00:00.000Z",
"until": "2026-11-08T00:00:00.000Z",
"download_url": "https://…",
"complete_up_to": "2026-11-11T02:23:00.000Z"
}Every response includes since, until, kind when the export was filtered, and complete_up_to. The other fields depend on status:
status | Other fields | Meaning |
|---|---|---|
REQUESTED | None | Still running. Poll again. |
READY | download_url | Done. Download the CSV from download_url. |
FAILED | failure_reason | Failed. Request a new export. |
failure_reason | Meaning |
|---|---|
submission_failed | The export couldn't be started. Retry. |
submission_lost | The export didn't start within 5 minutes. Retry. |
timed_out | The export took longer than 15 minutes. Narrow the range and retry. |
execution_failed | The export failed, including when it was canceled for scanning too much data. Narrow the range and retry. |
Notes:
- Progress is checked when you poll, so keep polling until the export settles.
download_urlis valid for up to 15 minutes, and a new one is issued on every poll. Download it with a plainGETand don't send yourAuthorizationheader. Anyone holding the URL can download the file, so treat it as a secret.- The result is kept for 7 days after the export was requested. After that, polling returns
410 Gone. complete_up_tois the watermark at the time you poll, so it moves forward on every poll. It shows how fresh the log is, not what this export covers. Useuntilfor that.- Export IDs are workspace-scoped. Another workspace's export ID returns
404.
Covering longer periods
The decision log is retained for one year, and each export covers at most 31 days. For a longer period, or for continuous collection into a SIEM, chain exports: use each export's until as the next export's since. Because since is inclusive and until is exclusive, consecutive exports neither overlap nor leave gaps.
Don't chain from complete_up_to. It has usually moved past your export's until, so starting there skips records. If you re-export overlapping windows, de-duplicate on event_id.
Reviewing a Report only period
reasonisdenied_ip_not_in_list. In Report only these rows havekindset toallow. They are the requests enforcing would refuse. Checksrc_ip,user_id,subject_kindandsubject_id(which API key), androute_class, then add the legitimate ones to the right list.reasonisdenied_ip_unavailable. Dovetail couldn't determine the client IP. These would be blocked under enforcing. If you see many, contact Dovetail support.reasonisfail_closed_error. Dovetail couldn't read your allowlist settings. These are always denied, even in Report only. Include theevent_idif you report them.kindisconfig. Each row is an allowlist change made during the period.
Filter on reason, not on kind=deny. Nothing is denied in Report only, so a kind=deny export won't show would-be blocks.
CSV reference
The file has one header row, then one row per record. Rows come in no particular order, so sort by ts if you need them in order. Duplicate deliveries are removed within an export, and event_id is unique per record, so use it as the key when merging files.
IDs in the CSV (team_id, subject_id, user_id, list_id, and the UUID inside configured_by) are hyphenated UUIDs, not the Base62 form the API uses.
Columns
Columns that don't apply to a row are empty.
| # | Column | Present on | Description |
|---|---|---|---|
| 1 | v | All | Record schema version. Currently 1. |
| 2 | event_id | All | Unique record ID. For a blocked request, it equals the decisionId returned to the client. |
| 3 | ts | All | When the decision or change happened, in ISO 8601 UTC with milliseconds. |
| 4 | kind | All | allow (the request went through), deny (the request was refused), or config (an allowlist change). |
| 5 | team_id | All | Your workspace ID. |
| 6 | subject_kind | Decisions | team (checked against the user list) or api_key (the request used a personal API key). |
| 7 | subject_id | Decisions | The workspace ID for team, the API key ID for api_key. |
| 8 | request_id | Decisions | Request correlation ID. |
| 9 | method | Decisions | HTTP method. |
| 10 | route_class | Decisions | graphql or rest (the web app), ws (real-time connections), or public_api (the public API and MCP). |
| 11 | route_template | Decisions, optional | Route pattern or GraphQL operation name. Never a full URL with IDs. |
| 12 | user_agent | Decisions, optional | Client user agent. May be truncated. |
| 13 | user_id | Decisions | The accountable user: the signed-in user, or the owner of the API key. |
| 14 | reason | Decisions | Why the decision was made. See Decision reasons. |
| 15 | mode | Decisions (except fail_closed_error), config | The workspace mode at the time: report_only or enforcing on decisions, and the mode after the change on config rows, which can be disabled. |
| 16 | matched_cidr | allowed_matched_cidr only | The list entry that matched. |
| 17 | src_ip | Decisions, when known | The client IP that was evaluated. |
| 18 | error | fail_closed_error only | Error class. Currently always unexpected_infra. |
| 19 | entries | Config | The affected list's complete entries after the change. See The entries column. |
| 20 | configured_by | Config | Who made the change: user:<uuid> for an admin, system for automatic setup, or support for Dovetail support. |
| 21 | change | Config | entries_updated, mode_changed, key_list_assigned, or key_list_reverted. |
| 22 | list_id | Config, except mode_changed | The list the change applied to. For key_list_reverted, this is the user list now governing the key. |
Decision reasons
reason | kind | Meaning |
|---|---|---|
allowed_matched_cidr | allow | The client IP matched the entry in matched_cidr. |
allowed_not_configured | allow | No list exists yet for this subject, so the request was allowed. Rare. |
denied_ip_not_in_list | allow in report_only, deny in enforcing | The client IP matched no entry. In Report only, this row means the request would have been blocked. |
denied_ip_unavailable | allow in report_only, deny in enforcing | Dovetail couldn't determine the client IP. src_ip is empty. |
fail_closed_error | Always deny | Dovetail couldn't read your allowlist settings, so the request was refused. mode is empty and error is set. |
On config rows, reason is empty. For mode_changed, entries holds the user list's entries at the moment of the change.
The entries column
entries uses bracket notation, not JSON. Values aren't quoted or escaped, and an entry without a label shows label=null:
[{cidr=203.0.113.0/24, label=Sydney office}, {cidr=2001:db8::/32, label=null}]
Errors
Every error body has the shape { "errors": [ { "code", "title", "message"?, … } ] }.
| Status | code | When |
|---|---|---|
400 | InvalidOperation, reason: invalid_cidr | One or more CIDRs don't parse. offenders lists them as you sent them. |
400 | InvalidOperation, reason: caller_not_covered | The new user list wouldn't cover you. caller_ip shows your address. |
400 | InvalidOperation, reason: empty_requires_force | An empty list was sent without force_empty: true. |
400 | InvalidOperation, reason: entries_too_large | The list is too large. Includes actual_bytes and limit_bytes. |
400 | InvalidOperation, reason: name_too_long | A key list's name is over the limit. Includes actual_chars and limit_chars. |
400 | InvalidOperation | An export range is invalid. See Requesting an export. |
400 | ValidationError | Malformed body or ID. Includes message and path. |
401 | Unauthorized | The token is missing, invalid, revoked, or expired. |
403 | Forbidden, title Insufficient scope | The token lacks the route's scope. |
403 | Forbidden, title Workspace admin access required | The token's owner isn't a workspace admin, or the workspace isn't enrolled in the beta. Both return the same response. |
403 | IpNotAllowlisted | The request came from outside the allowlist while it is enforcing. Includes decisionId. |
404 | NotFound | The list, key, or export doesn't exist in this workspace. |
409 | InvalidOperation | An export is already running. Includes export_id. |
410 | Gone | The export result is more than 7 days old. |
422 | UnprocessableContent | The export's since is at or after the watermark. Includes complete_up_to. |
429 | TooManyRequests | Rate limited. See the Retry-After header and Rate Limits. |
500 | InternalError | Unexpected error. Retry later. |
Blocked requests
Once the allowlist is enforcing, a blocked request gets 403:
{
"errors": [
{
"code": "IpNotAllowlisted",
"title": "Access from your current network is restricted by this workspace's IP allowlist. Contact your workspace administrator.",
"decisionId": "<EVENT_ID>"
}
]
}decisionId is the event_id of the matching decision-log row. Quote it when you contact support.
The allowlist and export routes are protected by the allowlist too, so you can only manage the allowlist or export the log from an allowed network.
Other 403 responses
The public API can also return 403 with the title Not available on your current plan, when public API access isn't enabled for the workspace, or Access blocked by your administrator, when the workspace's external tool access setting blocks API or MCP access.
Troubleshooting
The export is empty or missing recent activity
- No decisions are recorded in
disabledmode. - The last 25 minutes or so are never included. The export's
untilshows exactly where it ends. - Records older than one year have been deleted.
kind=denyexcludes Report only would-be blocks, because those havekind=allow. Filter onreasoninstead.
An export failed
Narrow the range, for example by splitting 31 days into weeks, or add a kind filter, then request again.
The download link returns an error
The link is valid for up to 15 minutes. Poll the export again to get a new download_url, and download it without an Authorization header.
A CI job stopped working after enforcing
- Check whether the job uses an API key with its own list. That list doesn't follow the user list.
- Find the request in the decision log by
subject_id(the key ID) andsrc_ip, then add the runner's egress range to the key's list.
Locked out
If a workspace admin can still reach Dovetail from an allowed network, they can fix the list or set the mode back to disabled from that network. Otherwise, contact Dovetail support. To avoid this, confirm your own address is covered before you enforce, and keep at least two admins on different allowed networks.
Limits
| Limit | Value |
|---|---|
| Lists | One user list per workspace, plus at most one list per API key |
| Mode | One per workspace |
| List size | Under 20,000 bytes when stored, roughly several hundred entries depending on label length |
| API key list name | 200 characters |
| Change propagation | Up to one minute |
| Decision-log retention | One year |
| Export range | 31 days per export |
| Export freshness | Records up to about 25 minutes before now (complete_up_to) |
| Concurrent exports | One per workspace |
| Export processing time | Fails as timed_out after 15 minutes |
| Download URL | Valid for up to 15 minutes. A new one is issued on every poll. |
| Export result | Kept for 7 days after the request, then 410 Gone |
GET /v2/ip-allowlist/my-ip | 30 requests per minute per user |
| Public API | 200 requests per minute per workspace, shared with other public API calls |
Updated 10 days ago