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

# Request Signature

Initiates the document signing process for a user. Returns a URL where the user can sign required agreements for a specific country.

***

## Important Notes

* Only `INDIVIDUAL` users can request document signatures.
* The user must be KYC-verified before requesting signatures.
* Users who have already signed documents cannot sign again.

***

## Error Codes

### Common Errors

| HTTP Status | Code                   | Message                            |
| ----------- | ---------------------- | ---------------------------------- |
| 401         | `UNAUTHORIZED`         | "API Key is missing"               |
| 401         | `UNAUTHORIZED`         | "Invalid API Key format"           |
| 401         | `UNAUTHORIZED`         | "Invalid API Key"                  |
| 403         | `INVALID_PARTNER_FLOW` | "The partner has an invalid flow." |

### User Ownership Errors

| HTTP Status | Code           | Message                                              |
| ----------- | -------------- | ---------------------------------------------------- |
| 401         | `UNAUTHORIZED` | "Partner information is required for this operation" |
| 401         | `UNAUTHORIZED` | "User is not associated with the partner"            |

### Endpoint-Specific Errors

| HTTP Status | Code                       | Message                                                          |
| ----------- | -------------------------- | ---------------------------------------------------------------- |
| 400         | `INVALID_USER_INPUT_ERROR` | "Invalid User Input"                                             |
| 400         | `BAD_REQUEST`              | "Country not supported"                                          |
| 400         | `BAD_REQUEST`              | "User must be of type INDIVIDUAL to request document signatures" |
| 400         | `BAD_REQUEST`              | "User already has signed documents"                              |
| 400         | `USER_NOT_VERIFIED_ERROR`  | "User identity verification not verified"                        |
| 400         | `BAD_REQUEST`              | "User authentication method is not email"                        |
| 400         | `BAD_REQUEST`              | "User identity verification missing name"                        |
| 404         | `NOT_FOUND_ERROR`          | "Failed to find user identity verification"                      |
| 404         | `NOT_FOUND_ERROR`          | "No active templates found"                                      |
| 404         | `NOT_FOUND_ERROR`          | "Requested User was not found"                                   |
| 500         | `INTERNAL_SERVER_ERROR`    | "Document signature provider failure"                            |


## OpenAPI

````yaml reference/openapi/UserPartnerControllerV2_requestDocumentSignature.json POST /api/partner/v2/users/{userId}/documents/sign
openapi: 3.0.0
info:
  title: Capa Partner API - V2
  description: >-
    Partner API for integrating cryptocurrency on-ramp and off-ramp services
    using Capa's infrastructure. Enable your users to seamlessly convert between
    fiat and crypto.
  version: v2
  contact: {}
servers:
  - url: https://staging-api.capa.fi
  - url: https://production-api.capa.fi
security: []
paths:
  /api/partner/v2/users/{userId}/documents/sign:
    post:
      tags:
        - users
      operationId: UserPartnerControllerV2_requestDocumentSignature
      parameters:
        - name: userId
          required: true
          in: path
          description: The user ID
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                country:
                  description: >-
                    The country code for the document signature request


                    @description The country must be a valid ISO 3166-1 alpha-2
                    country code, see:

                    @link https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
                  example: MX
                  enum:
                    - MX
                    - DO
                    - US
                    - AT
                    - BE
                    - BG
                    - HR
                    - CY
                    - CZ
                    - DK
                    - EE
                    - FI
                    - FR
                    - DE
                    - GR
                    - HU
                    - IE
                    - IT
                    - LV
                    - LT
                    - LU
                    - MT
                    - NL
                    - PL
                    - PT
                    - RO
                    - SK
                    - SI
                    - ES
                    - SE
                    - IS
                    - LI
                    - 'NO'
                    - CH
                    - GB
                    - MC
                    - SM
                    - AD
                    - VA
                  type: string
              required:
                - country
              x-readme-ref-name: RequestDocumentSignatureBody
      responses:
        '201':
          description: >-
            Document signature request created successfully. Returns the
            signature request details.
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        description: The URL of the document signature request.
                    required:
                      - url
                    x-readme-ref-name: RequestDocumentSignatureResponse
              example:
                success: true
                data:
                  url: string
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                INVALID_USER_INPUT_ERROR:
                  value:
                    success: false
                    code: INVALID_USER_INPUT_ERROR
                    message: Invalid User Input
                BAD_REQUEST:
                  value:
                    success: false
                    code: BAD_REQUEST
                    message: Country not supported for document signatures
                BAD_REQUEST_2:
                  value:
                    success: false
                    code: BAD_REQUEST
                    message: User identity verification missing {field}
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                UNAUTHORIZED:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: API Key is missing
                UNAUTHORIZED_2:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Invalid API Key format
                UNAUTHORIZED_3:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Invalid API Key
                UNAUTHORIZED_4:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: Partner information is required for this operation
                UNAUTHORIZED_5:
                  value:
                    success: false
                    code: UNAUTHORIZED
                    message: User is not associated with the partner
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: USER_NOT_VERIFIED_ERROR
                message: User identity verification not verified
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              examples:
                NOT_FOUND_ERROR:
                  value:
                    success: false
                    code: NOT_FOUND_ERROR
                    message: Requested resource was not found
                NOT_FOUND_ERROR_2:
                  value:
                    success: false
                    code: NOT_FOUND_ERROR
                    message: Failed to find user identity verification
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: BAD_REQUEST
                message: User has already signed documents
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                success: false
                code: INTERNAL_SERVER_ERROR
                message: Internal server error
      security:
        - PartnerApiKey: []
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        success:
          type: boolean
          example: false
        code:
          type: string
          description: Machine-readable error code.
        message:
          type: string
          description: Human-readable error message.
        errors:
          type: array
          description: Optional per-field validation details.
          items:
            type: object
            properties:
              field:
                type: string
              message:
                type: string
      required:
        - success
        - code
        - message
  securitySchemes:
    PartnerApiKey:
      type: apiKey
      in: header
      name: partner-api-key
      description: API key for the affiliated partner performing the request.

````