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

# Upload recipient document

> Upload a KYC document, or set the tax ID, for a worker you created
through `recipients/create`. The worker is identified by the path; leave
out `user_id`. If you send it, it must equal `recipient_id`, otherwise the
request fails with a `422`. The request shape depends on `doc_type`:
- For `tax_id`: provide `tax_id` and `tax_id_type`.
- For image documents: provide `category`, `issuing_country`, and `base64_image`.

Requires an `Idempotency-Key` header.




## OpenAPI

````yaml /api-reference/openapi.yaml post /api/company/{company_id}/recipients/{recipient_id}/documents
openapi: 3.1.0
info:
  title: Bitwage Partner API
  version: '2.0'
  description: |
    The Bitwage Partner API covers two products, and each has its own endpoints.

    Bitwage Business (`/api/company`, `/api/companies`) is a company paying its
    contractors, employees, and vendors.

    Bitwage Individual (`/api/user`) is a person receiving payments from their
    own employers or clients. Do not mix the two for the same person.
  contact:
    name: Development Team
    email: developers@bitwage.com
    url: https://www.bitwage.com/support
  license:
    name: Copyright Bitwage, Inc. All rights reserved.
    url: https://www.bitwage.com/policies/#terms
servers:
  - url: https://api.sandbox.bitwage.com
    description: Sandbox
  - url: https://api2.bitwage.com
    description: Production
security:
  - api_key: []
  - oauth: []
tags:
  - name: Authorization
    description: OAuth 2.0 authorization code flow endpoints.
  - name: Users
    description: Bitwage Individual. Create and manage user accounts.
  - name: User Documents
    description: Bitwage Individual. Upload and manage user KYC documents.
  - name: User Payers
    description: Bitwage Individual. Manage the employers and clients who pay a user.
  - name: User Distributions
    description: Bitwage Individual. Manage where a user is paid.
  - name: User Funding
    description: Bitwage Individual. Manage the virtual bank accounts a user's payers fund.
  - name: Companies
    description: Bitwage Business. Create and manage companies, their owners, and KYB.
  - name: Company Workers
    description: Bitwage Business. Invite workers who sign in themselves.
  - name: Company Recipients
    description: >-
      Bitwage Business. Create and manage recipients (workers and vendors) who
      never sign in.
  - name: Company Payroll
    description: Bitwage Business. Create and manage payrolls.
  - name: Merchant
    description: Crypto pay-in and BTC checkout endpoints.
  - name: Wallets
    description: Request and view wallets for payroll funding.
  - name: Webhooks
    description: Webhook event schemas sent by Bitwage.
paths:
  /api/company/{company_id}/recipients/{recipient_id}/documents:
    post:
      tags:
        - Company Recipients
      summary: Upload recipient document
      description: >
        Upload a KYC document, or set the tax ID, for a worker you created

        through `recipients/create`. The worker is identified by the path; leave

        out `user_id`. If you send it, it must equal `recipient_id`, otherwise
        the

        request fails with a `422`. The request shape depends on `doc_type`:

        - For `tax_id`: provide `tax_id` and `tax_id_type`.

        - For image documents: provide `category`, `issuing_country`, and
        `base64_image`.


        Requires an `Idempotency-Key` header.
      operationId: uploadRecipientDocument
      parameters:
        - $ref: '#/components/parameters/CompanyIdPath'
        - $ref: '#/components/parameters/RecipientIdPath'
        - $ref: '#/components/parameters/IdempotencyKeyRequired'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RecipientDocumentUploadRequest'
      responses:
        '200':
          description: Document stored.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  recipient_id:
                    type: string
                  doc_type:
                    type: string
        '400':
          description: |
            Codes: `recipient-not-found`, `recipient-kyc-worker-only`,
            `user_update_advanced_data_failed`, `idempotency-key-required`,
            `idempotency-key-reused-with-different-payload`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: |
            Codes: `partner-company-not-found`, `recipient-not-partner-managed`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          $ref: '#/components/responses/ValidationFailed'
components:
  parameters:
    CompanyIdPath:
      name: company_id
      in: path
      required: true
      schema:
        type: string
      description: Company ID.
    RecipientIdPath:
      name: recipient_id
      in: path
      required: true
      schema:
        type: string
      description: Recipient ID.
    IdempotencyKeyRequired:
      name: Idempotency-Key
      in: header
      required: true
      schema:
        type: string
      description: Unique key for idempotent write requests.
  schemas:
    RecipientDocumentUploadRequest:
      type: object
      required:
        - doc_type
      properties:
        doc_type:
          type: string
          description: |
            Document type. Use `tax_id` for tax ID submission, or one of the
            image document types for identity verification.
        category:
          type: string
          enum:
            - front
            - back
          description: >-
            Required for image documents. Passport and proof-of-address require
            `front`.
        issuing_country:
          type: string
          description: 2-character ISO country code. Required for image documents.
        base64_image:
          type: string
          description: Base64-encoded image. Required for image documents.
        tax_id:
          type: string
          description: Required when `doc_type` is `tax_id`.
        tax_id_type:
          type: string
          description: Required when `doc_type` is `tax_id`.
    Error:
      type: object
      description: |
        Error body returned by most endpoints. Branch on `code`. See the
        [Errors guide](/guides/errors) for the full list of codes.
      required:
        - request_id
        - message
      properties:
        request_id:
          type: string
          description: Include this when you contact support.
        message:
          type: string
          description: English fallback text. Can change.
        code:
          type: string
          description: Stable kebab-case error code. Omitted when there is none.
          example: recipient-worker-email-already-exists
        data:
          type: object
          description: Extra fields. Most `400` errors include `retryable`.
          properties:
            retryable:
              type: boolean
          additionalProperties: true
    ValidationErrorBody:
      type: object
      required:
        - request_id
        - message
        - schema
      properties:
        request_id:
          type: string
        message:
          type: string
          description: The first error in `schema`.
        code:
          type: string
        schema:
          type: object
          description: Validation errors keyed by field name. Nested fields are nested.
          additionalProperties: true
          example:
            payments:
              - Total amount of payroll must be greater than 10
  responses:
    ValidationFailed:
      description: The request failed validation. Field errors are under `schema`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationErrorBody'
  securitySchemes:
    api_key:
      type: http
      scheme: basic
      description: |
        API key authentication. Include your access token as:
        `Authorization: Basic <ACCESS_TOKEN>`
    oauth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://app.bitwage.com/authorize
          tokenUrl: https://api2.bitwage.com/oauth2/token
          scopes:
            c_company_detail: Company Detail
            c_company_worker_list: Company Worker List
            c_company_worker_invitations_list: Company Worker Invitation List
            c_company_workers_invite: Company Workers Invite
            c_company_workers_pay: Company Workers Pay
            u_user_create: User Create
            u_user_update: User Update
            u_user_update_doc: User Update Document
            u_user_payer_create: User Payer Create
            u_user_payer_update: User Payer Update
            u_user_invoice_create: User Invoice Create
            u_user_invoice_delete: User Invoice Delete
            u_user_detail: User Detail
            u_user_document_list: User Document List
            u_user_payer_detail: User Payer Detail
            u_user_payer_list: User Payer List
            u_user_bank_details: User Bank Details
            u_user_invoice_detail: User Invoice Detail
            u_user_invoice_list: User Invoice List
            u_user_distribution_detail: User Distribution Detail
            u_user_distribution_list: User Distribution List
            u_user_distribution_create: User Distribution Create
            u_user_distribution_update: User Distribution Update
            u_user_kyc_initiate: User Initiate KYC

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.