# Register the domain as an agent

> PUT /v1/agent/domain registers the account's domain from a host or a URL and returns it with the TXT record or file to publish: parameters, examples and errors.

Source: https://esigncomply.com/docs/api/agent/register-the-domain-as-an-agent

Last updated November 26, 2026

In the Esign Comply API, `PUT /v1/agent/domain` registers the account's domain from a host or a URL and returns it with the TXT record or file to publish. An AI agent calls it with an agent token for the `register_domain` step, which going live requires.

`PUT /v1/agent/domain` · API version `2026-11-21`

## Authentication

Send an agent token (`esc_agent_...`) in the `Authorization` header: `Bearer $ESIGNCOMPLY_AGENT_TOKEN`. The token acts as the member who created it, with that member's role. A person creates it under Agent access in the dashboard. An API key is refused with [`invalid_api_key`](https://esigncomply.com/docs/api/errors.md#invalid_api_key). See [Authentication](https://esigncomply.com/docs/api/agent.md#authentication) of the agent account API.

## Request example

### cURL

```bash
curl -X PUT https://esigncomply.com/v1/agent/domain \
  -H "Authorization: Bearer $ESIGNCOMPLY_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "domain": "app.example.com"
  }'
```

This request ran against the API on November 26, 2026, and the response below is what came back. IDs are example values, and long values are shortened with `...`.

## Parameters

### Body fields

| Field | Type | Required | Meaning |
|---|---|---|---|
| `domain` | string | Yes | A host or a URL, for example `app.example.com`. The registrable domain is worked out from it, and one registration covers every subdomain. |

## Response

`200 OK` with a Domain object.

```json
{
  "object": "domain",
  "id": "dom_4Kx9",
  "domain": "example.com",
  "entered_host": "app.example.com",
  "region": "us",
  "status": "pending",
  "verification": {
    "method": "dns",
    "type": "TXT",
    "name": "_esigncomply.example.com",
    "host": "_esigncomply",
    "value": "esc-verify=Z5vdrGwKYnQRXVjM6wo926aomq0yQQwQ"
  },
  "registered_at": "2026-11-26T00:18:10.927Z",
  "verified_at": null,
  "last_checked_at": "2026-11-26T00:18:15.462Z",
  "lapsed_at": null,
  "test_origins": [],
  "conformance_enforcement": "notify",
  "api_url": "https://esigncomply.com/v1",
  "created_at": "2026-11-26T00:15:23.620Z"
}
```

### Response fields

| Field | Type | Description |
|---|---|---|
| `object` | string |  |
| `id` | string |  |
| `domain` | string | The registrable domain. Covers every subdomain. |
| `entered_host` | string |  |
| `region` | string |  |
| `status` | string | not_started, pending, verified, failed or lapsed. |
| `verification` | object | DNS: { method, type, name, host, value }. File: { method, url, content }. |
| `registered_at` | datetime |  |
| `verified_at` | datetime |  |
| `last_checked_at` | datetime |  |
| `lapsed_at` | datetime |  |
| `test_origins` | array of string |  |
| `conformance_enforcement` | string | What a live signature that fails a rule does. notify (the default): it is recorded, and you are told at once which rule failed and what to fix. block: it is refused before it is sealed. |
| `api_url` | string |  |
| `created_at` | datetime |  |

## After registering

Publish the TXT record in `verification` at the DNS provider: `name`, `type` and `value`. An agent with access to the DNS provider adds it. An agent without access gives the person those three values and asks them to add that one record. A host on a platform address such as `myapp.vercel.app` gets `"method": "file"` with a `url` and a `content` instead: a file the agent adds to the app.

[Retrieve the domain as an agent](https://esigncomply.com/docs/api/agent/retrieve-the-domain-as-an-agent.md) returns the same object at any time, with any role. Registering needs a role that allows domain changes: owner or admin. Registering the first domain is an ordinary step. Replacing a registered domain with another is a domain change: it is allowed once in 12 months, and when the member has a second factor it needs the person.

## Errors

| Code | HTTP | When |
|---|---|---|
| [`invalid_request`](https://esigncomply.com/docs/api/errors.md#invalid_request) | 400 | The request is malformed: the body is not valid JSON, a known field has the wrong type, a required field is missing, a value is out of range, or a limit was passed (for example `metadata` over 50 keys, `context.extra` over 16 KB, event `data` over 256 KB, an `Idempotency-Key` over 255 characters, an unknown `Esign-Comply-Version`). |
| [`insufficient_permission`](https://esigncomply.com/docs/api/errors.md#insufficient_permission) | 403 | The key's permission does not allow the call (for example a `recording_access` key asking for an evidence report), a secret key was sent to a browser-only endpoint, a client token was sent to a server-only endpoint, or a secret key tried to send ceremony events or the signing act for a session that was not created with `capture_mode: "server_only"`. |
| [`plan_feature_unavailable`](https://esigncomply.com/docs/api/errors.md#plan_feature_unavailable) | 403 | The feature is not on the domain's plan: signer verification (assurance level L2 or L3) on Free or Starter, more webhook endpoints than the plan includes, a certificate request or quote for a live record on Free, a region the plan does not offer, or a custodian-signed certification on a plan or environment that does not have it. |
| [`domain_already_registered`](https://esigncomply.com/docs/api/errors.md#domain_already_registered) | 409 | The domain is attached to another active subscription. |

Like every call made with an agent token, it can also return [`missing_api_key`](https://esigncomply.com/docs/api/errors.md#missing_api_key), [`invalid_api_key`](https://esigncomply.com/docs/api/errors.md#invalid_api_key), [`not_found`](https://esigncomply.com/docs/api/errors.md#not_found), [`quota_exhausted`](https://esigncomply.com/docs/api/errors.md#quota_exhausted), [`rate_limit_exceeded`](https://esigncomply.com/docs/api/errors.md#rate_limit_exceeded) and [`internal_error`](https://esigncomply.com/docs/api/errors.md#internal_error).

Every error has the same body: `error.type`, `error.code`, `error.message`, `error.doc_url` and `error.request_id`. See [Errors](https://esigncomply.com/docs/api/errors.md).

## Questions about PUT /v1/agent/domain

### Which credential does PUT /v1/agent/domain need?

An agent token, which starts with esc_agent_. Send it as a Bearer token in the Authorization header. An API key is refused with invalid_api_key.

### Does PUT /v1/agent/domain work with a test key?

An agent token has no test or live mode. It acts on the account, and the keys it creates are test keys or live keys.

### Does PUT /v1/agent/domain count as a signature event?

No. A signature event is counted when a live record is written, by completing a session or by submitting a deferred acceptance. This call writes no record.

### Is PUT /v1/agent/domain idempotent?

It takes no Idempotency-Key header. The agent account API does not replay responses.

### What is the rate limit for PUT /v1/agent/domain?

60 calls per minute for each agent token and 120 per minute for each IP address. Past the limit the API answers 429 rate_limit_exceeded with a Retry-After header.

### Does the Node SDK have a method for PUT /v1/agent/domain?

No. The agent account API is called over HTTP with the agent token. The esigncomply package works with API keys.

## Related

- [Agent account API](https://esigncomply.com/docs/api/agent.md): the overview of the resource and all of its operations.
- [Verify the domain as an agent](https://esigncomply.com/docs/api/agent/verify-the-domain-as-an-agent.md): `POST /v1/agent/domain/verify`
- [Go live on the Free plan](https://esigncomply.com/docs/api/agent/go-live-on-the-free-plan.md): `POST /v1/agent/go-live`
- [Get the conformance setting](https://esigncomply.com/docs/api/agent/get-the-conformance-setting.md): `GET /v1/agent/conformance`
- [Set what a failing live signature does](https://esigncomply.com/docs/api/agent/set-what-a-failing-live-signature-does.md): `PUT /v1/agent/conformance`
- [MCP server](https://esigncomply.com/docs/mcp.md)
- [Agent skill](https://esigncomply.com/docs/guides/agent-skill.md)
- [Errors](https://esigncomply.com/docs/api/errors.md): every error code, with what to do.
- [API conventions](https://esigncomply.com/docs/api.md): authentication, idempotency, rate limits and versioning.
