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

# Mint a signed document upload URL

> Mint a one-shot signed PUT URL for a single KYC/KYB document, scoped to this connected account. PUT the file to `uploadUrl` with the returned `uploadHeaders`, then reference `publicUrl` in the `/submit` body. Optional — you may instead pass your own pre-hosted HTTPS URLs in the submit body. Returns 503 if file storage is not configured.



## OpenAPI

````yaml https://api.caratuva.com/docs-json post /v1/accounts/{id}/upload-url
openapi: 3.0.0
info:
  title: Caratuva API
  description: >-
    Cross-border B2B payments. Fiat on-ramp → USDC → PIX off-ramp.


    Every request runs in **test** or **live** mode on this single host — there
    is no separate sandbox URL. API keys carry the mode in their prefix
    (`pk_test_…` / `pk_live_…`); dashboard JWTs start in test and re-mint via
    `POST /v1/auth/switch-mode`. Test mode runs the full pipeline against a
    sandbox payment instance (KYB/KYC auto-approve, no real money); live runs on
    real rails and requires approved KYB. Test and live data are fully isolated.
    Check readiness with `GET /v1/onboarding/status`.
  version: 1.0.0
  contact: {}
servers: []
security: []
tags:
  - name: Invoices
    description: Create and manage invoices that collect for one of your sellers.
  - name: Payments
    description: Create a payment (keep your own checkout), fetch it, or cancel it.
  - name: Accounts
    description: >-
      Onboard and manage your sellers, buyers, and your own (self) account at
      the settlement partner.
  - name: Webhooks
    description: Subscribe to outbound event notifications and manage signing secrets.
  - name: API keys
    description: Issue, list, and revoke the API keys that authenticate your integration.
  - name: Access
    description: Request and check production (live-mode) access for your organization.
  - name: Reports
    description: Pull settlement and transfer-pricing reports.
paths:
  /v1/accounts/{id}/upload-url:
    post:
      tags:
        - Accounts
      summary: Mint a signed document upload URL
      description: >-
        Mint a one-shot signed PUT URL for a single KYC/KYB document, scoped to
        this connected account. PUT the file to `uploadUrl` with the returned
        `uploadHeaders`, then reference `publicUrl` in the `/submit` body.
        Optional — you may instead pass your own pre-hosted HTTPS URLs in the
        submit body. Returns 503 if file storage is not configured.
      operationId: ConnectedAccountsController_uploadUrl
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  type: string
                  enum:
                    - selfie
                    - id_doc_front
                    - id_doc_back
                    - proof_of_address
                    - incorporation_doc
                    - proof_of_ownership_doc
                contentType:
                  type: string
                  enum:
                    - image/jpeg
                    - image/png
                    - image/webp
                    - application/pdf
                ownerIndex:
                  type: integer
                  minimum: 0
                  maximum: 20
              required:
                - kind
                - contentType
              additionalProperties: false
            examples:
              default:
                value:
                  kind: incorporation_doc
                  contentType: application/pdf
      responses:
        '201':
          description: Signed upload URL minted
          content:
            application/json:
              schema:
                type: object
                properties:
                  uploadUrl:
                    type: string
                    format: uri
                  publicUrl:
                    type: string
                    format: uri
                  uploadHeaders:
                    type: object
                    additionalProperties:
                      type: string
                  uploadMethod:
                    type: string
                    enum:
                      - PUT
                      - POST
                  expiresAt:
                    type: string
                required:
                  - uploadUrl
                  - publicUrl
                  - uploadMethod
                  - expiresAt
                additionalProperties: false
              examples:
                default:
                  value:
                    uploadUrl: >-
                      https://storage.googleapis.com/caratuva-kyc/ckacc042/incorporation_doc?X-Goog-Signature=...
                    publicUrl: >-
                      https://storage.googleapis.com/caratuva-kyc/ckacc042/incorporation_doc
                    uploadHeaders:
                      Content-Type: application/pdf
                    uploadMethod: PUT
                    expiresAt: '2026-06-30T12:15:00.000Z'
        '503':
          description: >-
            KycStorageDisabled — KYC file storage is not configured. Set
            KYC_GCS_BUCKET to enable signed uploads, or pass pre-hosted HTTPS
            URLs in the submit body.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    example: 503
                  error:
                    type: string
                    example: KycStorageDisabled
                  message:
                    type: string
                    example: >-
                      KYC file storage is not configured. Set KYC_GCS_BUCKET to
                      enable signed uploads, or pass pre-hosted HTTPS URLs in
                      the submit body.
      security:
        - apiKey: []
        - bearer: []
components:
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: X-API-Key
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````