---
agentTools:
  projectIndex: https://developer.stockal.com/llms.txt
---

# Add Document (Physical Documents - KYC)

Upload documents as part of KYC.  Physical Documents are photos of actual documentation (like a passport or driver's license) that can be used to prove the identity of a customer. Upload only front/back of ID.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "UAT Client API V2",
    "version": "1.0"
  },
  "servers": [
    {
      "url": "https://uatclientapi-v2.stockal.com/client/v2"
    }
  ],
  "security": [
    {}
  ],
  "paths": {
    "/sso/document": {
      "post": {
        "summary": "Add Document (Physical Documents - KYC)",
        "description": "Upload documents as part of KYC.  Physical Documents are photos of actual documentation (like a passport or driver's license) that can be used to prove the identity of a customer. Upload only front/back of ID.",
        "operationId": "add-document-physical-documents-kyc",
        "parameters": [
          {
            "name": "api-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "<apiKey>"
            }
          },
          {
            "name": "auth-key",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string",
              "default": "<accessKey>"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "file"
                ],
                "properties": {
                  "file": {
                    "type": "string",
                    "description": "File upload buffer data. Note: The maximum file size for a document is 10MB. Valid file extension: pdf, jpg, jpeg, png. Valid content type: 'application/pdf', 'image/png', 'image/jpg',  'image/jpeg'.",
                    "format": "binary"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{\n  \"status\":200,\n  \"doc\" : {\n    \"docId\" : \"<doc-id>\"\n  }\n}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 200,
                      "default": 0
                    },
                    "doc": {
                      "type": "object",
                      "properties": {
                        "docId": {
                          "type": "string",
                          "example": "<doc-id>"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Invalid Document Type Error": {
                    "value": "{\n\t\"status\":400,\n  \"error\": \"Bad request. Invalid document type\"\n}"
                  },
                  "Document Type Invalid/Missing Error": {
                    "value": "{\n\t\"status\" : 400,\n  \"error\": \"Bad request. Document type invalid/missing\"\n}"
                  },
                  "File too large": {
                    "value": "{\n    \"status\": 400,\n    \"error\": \"File too large\"\n}"
                  },
                  "File is empty": {
                    "value": "{\n    \"status\": 400,\n    \"error\": \"File is empty\"\n}"
                  }
                },
                "schema": {
                  "oneOf": [
                    {
                      "title": "Invalid Document Type Error",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "error": {
                          "type": "string",
                          "example": "Bad request. Invalid document type"
                        }
                      }
                    },
                    {
                      "title": "Document Type Invalid/Missing Error",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "error": {
                          "type": "string",
                          "example": "Bad request. Document type invalid/missing"
                        }
                      }
                    },
                    {
                      "title": "File too large",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "error": {
                          "type": "string",
                          "example": "File too large"
                        }
                      }
                    },
                    {
                      "title": "File is empty",
                      "type": "object",
                      "properties": {
                        "status": {
                          "type": "integer",
                          "example": 400,
                          "default": 0
                        },
                        "error": {
                          "type": "string",
                          "example": "File is empty"
                        }
                      }
                    }
                  ]
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request POST https://uatapi-v2.stockal.com/client/v2/sso/document \\\n--header 'Accept: application/json' \\\n--header 'api-key: <apiKey>' \\\n--header 'auth-key: <accessKey>' \\\n--form 'file=@'"
            }
          ],
          "samples-languages": [
            "curl"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true,
  "_id": "62cd417f21e9ea0070fcf918:621cc1e214e219002d125ee7"
}
```