> ## Documentation Index
> Fetch the complete documentation index at: https://developer.finogates.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mint Embed Token

> Create a short-lived pass (an "embed token") that lets one of your users do
one specific job inside a Finogate-hosted page shown on your website. Right
now that job is adding a card (``add_card``).

The pass lasts about **10 minutes**. Take the ``token`` we return and load
the page inside an iframe on your site, like this:

```
<iframe src="{embed_url}#token={token}&mode={mode}"></iframe>
```

The pass only works for the one user it was created for, and only for that
one job — it can't be used for anything else.



## OpenAPI

````yaml POST /v1/platform/embed-tokens
openapi: 3.1.0
info:
  title: Finogate Platform API v1
  version: 0.1.0
servers:
  - url: https://api-sandbox.finogates.com
    description: Sandbox
  - url: https://api.finogates.com
    description: Production
security: []
tags:
  - name: auth
  - name: users
  - name: payees
  - name: verification
  - name: bank accounts
  - name: card processing
  - name: digital-assets
  - name: international
  - name: onboarding
  - name: pending-applications
  - name: wallets
  - name: payments
  - name: catalog
  - name: webhooks
  - name: phone-numbers
  - name: sms
  - name: calls
  - name: listings
  - name: embed-tokens
paths:
  /v1/platform/embed-tokens:
    post:
      tags:
        - embed-tokens
      summary: Create an Embed Token
      description: >-
        Create a short-lived pass (an "embed token") that lets one of your users
        do

        one specific job inside a Finogate-hosted page shown on your website.
        Right

        now that job is adding a card (``add_card``).


        The pass lasts about **10 minutes**. Take the ``token`` we return and
        load

        the page inside an iframe on your site, like this:


        ```

        <iframe src="{embed_url}#token={token}&mode={mode}"></iframe>

        ```


        The pass only works for the one user it was created for, and only for
        that

        one job — it can't be used for anything else.
      operationId: mint_embed_token_v1_platform_embed_tokens_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbedTokenCreate'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommonResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - _AuthenticatedBearer: []
components:
  schemas:
    EmbedTokenCreate:
      properties:
        user_id:
          type: string
          format: uuid
          title: User Id
          description: >-
            The end-user the iframe will act on behalf of. Must be an
            ``end_user`` belonging to the calling tenant.
        scope:
          type: string
          enum:
            - add_card
            - add_bank
            - card_payment
          title: Scope
          description: >-
            Which embed surface the token authorises. Today the only supported
            scope is ``add_card``.
          default: add_card
        parent_origin:
          type: string
          maxLength: 255
          title: Parent Origin
          description: >-
            The origin of the page that will embed the iframe (e.g.
            ``https://app.example.com``). Used as the postMessage
            ``targetOrigin`` so success payloads cannot leak to other windows.
            Must be a bare origin: scheme + host + optional port, no path.
        card_processing_id:
          anyOf:
            - type: string
              format: uuid
            - type: 'null'
          title: Card Processing Id
          description: >-
            Optional. Only honored when ``scope='add_card'``. Pins the card to a
            specific approved card-processing merchant account (the ``id``
            returned by ``GET /v1/platform/card-processing/users/{user_id}``).
            Omit to use the user's deterministically selected default merchant.
      type: object
      required:
        - user_id
        - parent_origin
      title: EmbedTokenCreate
      description: Request body for ``POST /v1/platform/embed-tokens``.
    CommonResponse:
      properties:
        status_code:
          type: integer
          title: Status Code
          description: HTTP status code for the response.
        data:
          title: Data
          description: Payload or error details.
        query_generated_time:
          type: integer
          title: Query Generated Time
          description: >-
            UTC timestamp (milliseconds since epoch) when response was
            generated.
      type: object
      required:
        - status_code
        - data
        - query_generated_time
      title: CommonResponse
      description: |-
        Standard response wrapper for single-object responses and errors.

        Generic over the payload type. A route that declares
        ``CommonResponse[SomeModel]`` gets the real ``data`` schema rendered in
        OpenAPI/Swagger; a bare ``CommonResponse`` leaves ``data`` untyped.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    _AuthenticatedBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /v1/platform/auth/token

````