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

# Generate Customer Document URL

> Generate a document upload URL for a specific customer KYC.



## OpenAPI

````yaml openapi.json put /customers/{id}/documents/url
openapi: 3.1.0
info:
  title: Sudo Sandbox API
  version: '1.0'
servers:
  - url: https://api.sandbox.sudo.cards
security:
  - sec0: []
paths:
  /customers/{id}/documents/url:
    put:
      summary: Generate Customer Document URL
      description: Generate a document upload URL for a specific customer KYC.
      operationId: generate-customer-document-url
      parameters:
        - name: id
          in: path
          description: The `_id` of the customer you wish to upload documents for.
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - fileName
                - fileType
              properties:
                fileName:
                  type: string
                  description: Name of file to be uploaded.
                fileType:
                  type: string
                  description: File MIME type e.g `image/png`
      responses:
        '200':
          description: Pre-signed upload URL generated successfully.
          headers:
            X-Powered-By:
              schema:
                type: string
              example: Express
            Access-Control-Allow-Origin:
              schema:
                type: string
              example: '*'
            X-RateLimit-Limit:
              schema:
                type: integer
              example: '250000'
            X-RateLimit-Remaining:
              schema:
                type: integer
              example: '249999'
            X-RateLimit-Reset:
              schema:
                type: integer
              example: '0'
            Content-Type:
              schema:
                type: string
              example: application/json; charset=utf-8
            ETag:
              schema:
                type: string
              example: W/"2dd-sfRBgLV2BqnKnzwqFCi2UGdBgUQ"
            Connection:
              schema:
                type: string
              example: keep-alive
            Keep-Alive:
              schema:
                type: string
              example: timeout=5
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    type: object
                    description: Response payload.
                    properties:
                      url:
                        type: string
                        description: URL value.
                      key:
                        type: string
                        description: Storage object key for the uploaded file.
              example:
                statusCode: 200
                message: Document upload url generated successfully.
                data:
                  url: >-
                    https://sudo-documents.s3.amazonaws.com/customers/64a1b2c3d4e5f6a7b8c9d0e1/id-front.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIA...%2F20240906%2Feu-west-1%2Fs3%2Faws4_request&X-Amz-Date=20240906T123456Z&X-Amz-Expires=900&X-Amz-SignedHeaders=host&X-Amz-Signature=4f8c1234567890abcdef
                  key: customers/64a1b2c3d4e5f6a7b8c9d0e1/id-front.png
        '400':
          description: Validation error — fileName/fileType missing or invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Always `null` for error responses.
              example:
                statusCode: 400
                message: '"fileType" is required'
                data: null
        '401':
          description: Authentication failed — missing or invalid API key.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Response payload.
              example:
                statusCode: 401
                message: >-
                  Unauthorized. Provide a valid API key in the Authorization
                  header.
                data: null
        '404':
          description: No customer exists with the supplied id.
          content:
            application/json:
              schema:
                type: object
                properties:
                  statusCode:
                    type: integer
                    description: >-
                      Status code of the response. `200` indicates a successful
                      request.
                  message:
                    type: string
                    description: Human-readable description of the result.
                  data:
                    nullable: true
                    description: Always `null` for error responses.
              example:
                statusCode: 404
                message: Customer not found.
                data: null
      deprecated: false
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      x-default: '{{APIKey}}'

````