# Create an embed session

`POST /v1/documents/{documentId}/assignments/{assignmentId}/signers/{signerId}/embed-sessions`

Mint a single-use embed URL for a signer created with `embedded: true`. Load the URL in an iframe on one of the workspace's embed origins within 5 minutes; opening it spends the token, so mint a fresh one each time the signer opens the page. The signer's access code is never returned. Refused with `400` (`embed_not_enabled_for_signer`) for a signer that is not embedded, `409` when the signer already finished (`already_signed`), the document is still being uploaded or processed (`document_not_ready`: retry in a moment), the document can no longer be signed or the signer's step has not started (`document_unavailable`), or the workspace has no embed origin (`embed_origins_missing`), `403` with code `PlanRestricted` when the plan does not include embedded signing, and `429` after 30 sessions for one signer in an hour.

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

## Parameters

| Name | In | Type | Required | Description |
|---|---|---|---|---|
| `documentId` | path | string | yes | Document ID. |
| `assignmentId` | path | string | yes | The assignment ID. |
| `signerId` | path | string | yes | The signer ID. |

## Responses

### 200 — The embed session

```json
{
    "data": {
        "url": "https://app.assinafy.com.br/embed/3f2c9a1e5b7d4c68a0e1f2b3c4d5e6f708192a3b4c5d6e7f8091a2b3c4d5e6f7",
        "expires_at": "2026-11-04T12:05:00Z"
    },
    "status": 200,
    "message": ""
}
```

### 400 — The request was rejected because of its current state or invalid input.

```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."
        }
    ]
}
```

### 404 — The document, assignment or signer was not found.

### 409 — The signer can not sign right now (`already_signed`, `document_not_ready`, `document_unavailable`), or the workspace has no embed origin (`embed_origins_missing`).

### 429 — More than 30 sessions for this signer in the last hour.

### 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."
        }
    ]
}
```
