# Add embed origin

`POST /v1/accounts/{accountId}/embed-origins`

Allow one more origin to embed the workspace's signing pages. An origin is an exact `scheme://host[:port]`: `https` (or `http` for `localhost` and `127.0.0.1` only), with no path, query, fragment, credentials or wildcard. The host is lowercased and a trailing `/` and the default port are dropped. Returns `400` when the origin is invalid, already registered, or the workspace already has 10 origins. Returns `403` with code `PlanRestricted` when the workspace's plan does not include embedded signing. Not available to OAuth applications.

**Authentication:** Bearer access token (`Authorization: Bearer ...`) or API key (`X-Api-Key` header).

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `accountId` | path | string | yes | Workspace account ID. |

## Request Body (required)

Fields (`application/json`):

- `origin` (string, required)

Example:

```json
{
    "origin": "https://app.example.com"
}
```

## Responses

### 200 — The origin added

```json
{
    "data": {
        "id": "6f1c2a9e0b",
        "origin": "https://app.example.com",
        "created_at": "2026-11-04T12:05:00Z"
    },
    "status": 200,
    "message": ""
}
```

### 400 — One or more fields failed validation.

```json
{
    "status": 400,
    "message": "Bad request.",
    "data": null,
    "code": "PlanRestricted",
    "errors": [
        {
            "field": "full_name",
            "code": "Required",
            "message": "Full Name cannot be blank."
        }
    ]
}
```

### 403 — Authenticated but not allowed to perform this action.

```json
{
    "status": 400,
    "message": "Bad request.",
    "data": null,
    "code": "PlanRestricted",
    "errors": [
        {
            "field": "full_name",
            "code": "Required",
            "message": "Full Name cannot be blank."
        }
    ]
}
```

### 401 — Missing or invalid credentials.

```json
{
    "status": 400,
    "message": "Bad request.",
    "data": null,
    "code": "PlanRestricted",
    "errors": [
        {
            "field": "full_name",
            "code": "Required",
            "message": "Full Name cannot be blank."
        }
    ]
}
```

### 500 — Unexpected server error.

```json
{
    "status": 400,
    "message": "Bad request.",
    "data": null,
    "code": "PlanRestricted",
    "errors": [
        {
            "field": "full_name",
            "code": "Required",
            "message": "Full Name cannot be blank."
        }
    ]
}
```
