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

# Authorize a deposit

> Return the signed authorization the hosted deposit flow requires.

The short-lived authorization the hosted deposit flow requires before it will
accept a deposit. Request it after reading
[Get the deposit-rail runtime config](/api/blink/config), and request
a fresh one per attempt.


## OpenAPI

````yaml api/openapi.json POST /v1/blink/signature
openapi: 3.1.0
info:
  description: Fiat-to-USDC onramp API. The URL prefix (`/v1`) is the version contract.
  license:
    identifier: LicenseRef-Proprietary
    name: Proprietary
  title: Calm API
  version: v1
servers:
  - description: Production
    url: https://api.calmtreasury.xyz
  - description: Sandbox
    url: https://api.sandbox.calmtreasury.xyz
security: []
paths:
  /v1/blink/signature:
    post:
      summary: Authorize a deposit
      description: >-
        Returns the signed authorization the hosted deposit flow requires before
        it will accept a deposit. The destination is the `wallet` in the body
        and the destination chain's payout token — USDC on most chains, USDm on
        MegaETH (`4326`). The authorization is short-lived.
      operationId: createBlinkSignature
      requestBody:
        content:
          application/json:
            schema:
              properties:
                amount_usd:
                  pattern: ^\d+(\.\d{1,2})?$
                  type: string
                destination_chain:
                  enum:
                    - 1
                    - 8453
                    - 999
                    - 1337
                    - 4326
                    - 143
                    - 137
                    - 42161
                  type: number
                destination_token:
                  enum:
                    - USDC
                    - USDm
                    - AUSD
                    - USDC.e
                  type: string
                wallet:
                  pattern: ^0x[a-fA-F0-9]{40}$
                  type: string
              required:
                - wallet
                - destination_chain
                - destination_token
              type: object
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  merchant_id:
                    type: string
                  payload:
                    type: string
                  preview:
                    properties:
                      address:
                        type: string
                      amount:
                        type:
                          - number
                          - 'null'
                      chain_id:
                        description: >-
                          Chain id. Currently 1, 8453, 999, 1337, 4326, 143,
                          137, 42161 — additive; tolerate unknown values.
                        maximum: 9007199254740991
                        minimum: -9007199254740991
                        type: integer
                      idempotency_key:
                        type: string
                      token:
                        type: string
                    required:
                      - amount
                      - chain_id
                      - address
                      - token
                      - idempotency_key
                    type: object
                  signature:
                    type: string
                required:
                  - merchant_id
                  - payload
                  - signature
                  - preview
                type: object
          description: The signed deposit authorization.
          headers:
            Cache-Control:
              description: >-
                Always `no-store` — the authorization is short-lived and
                single-use, so no cache may hold a copy.
              schema:
                type: string
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: >-
            Bad Request — `error.code` includes: publishable_key_missing,
            validation_error.
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Unauthorized — `error.code` includes: invalid_publishable_key.'
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Forbidden — `error.code` includes: origin_not_allowed.'
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: 'Too Many Requests — `error.code` includes: rate_limited.'
      security:
        - publishableKey: []
components:
  schemas:
    Error:
      properties:
        error:
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          type: object
      required:
        - error
      type: object
  securitySchemes:
    publishableKey:
      description: Publishable key identifying the calling app.
      in: header
      name: x-calm-publishable-key
      type: apiKey

````