---
title: "Exchange an embed session"
method: POST
path: "/v1/embed/sessions/{token}/exchange"
tags: ["Embedded Signing"]
---

# Exchange an embed session

`POST /v1/embed/sessions/{token}/exchange`

## Request

- Base URL: `https://api.assinafy.com.br`
- URL: `https://api.assinafy.com.br/v1/embed/sessions/{token}/exchange`
- Auth: none required

Called by Assinafy's embed page, not by integrations. Public: the token is the credential. Trades a session token for the signer's access code, once; the token is spent even when the call is refused with `409`. An unknown, expired or already used token returns `410` with code `embed_session_invalid`. Returns `409` when the signer or document can no longer sign.

[Copy as Markdown](https://api.assinafy.com.br/v1/docs/markdown?method=post&path=%2Fv1%2Fembed%2Fsessions%2F%7Btoken%7D%2Fexchange) [Open in ChatGPT](https://chatgpt.com/?q=Read%20the%20API%20documentation%20at%20https%3A%2F%2Fapi.assinafy.com.br%2Fv1%2Fdocs%2Fmarkdown%3Fmethod%3Dpost%26path%3D%252Fv1%252Fembed%252Fsessions%252F%257Btoken%257D%252Fexchange%20and%20help%20me%20integrate%20this%20endpoint.) [Open in Claude](https://claude.ai/new?q=Read%20the%20API%20documentation%20at%20https%3A%2F%2Fapi.assinafy.com.br%2Fv1%2Fdocs%2Fmarkdown%3Fmethod%3Dpost%26path%3D%252Fv1%252Fembed%252Fsessions%252F%257Btoken%257D%252Fexchange%20and%20help%20me%20integrate%20this%20endpoint.)

## Path parameters

- `token` string, required

## Request body

- object
  - `parent_origin` string: The origin of the page hosting the iframe, recorded for audit.

## Response `200`

The signing session

- object: Standard success wrapper. Operations add their own `data`.
  - `status` integer: HTTP status code, mirrored in the body.
  - `message` string: Human-readable message; empty on success.
  - `data` EmbedSessionExchange: What the embed page gets for a session token.
    - `signer_access_code` string: The signer's access code, used by the embed page only.
    - `signer_id` string
    - `document_id` string
    - `verification_method` string
    - `embed_origins` string[]

## Other responses

- `409`: The signer or document can not sign right now (`already_signed`, `document_not_ready`, `document_unavailable`).
- `410`: Unknown, expired or already used token (`embed_session_invalid`).
- `500`: Unexpected server error.

## Changes

- **2026-11-10** `d1af2d2ca42e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/assinafy/apis/assinafy-api-reference/changes/v1/embed/sessions/:token/exchange/post.md)

---

[API](https://skmtc.dev/assinafy/apis/assinafy-api-reference.md) - [All operations](https://skmtc.dev/assinafy/apis/assinafy-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/assinafy/apis/assinafy-api-reference/revisions/afcdb904d0bf?raw)
