---
updatedAt: 2026-04-20T21:43:36.000Z
agentTools:
  projectIndex: https://docs.dinari.com/llms.txt
---

# Upload KYC Documents


Upload KYC-related documentation for partners that are provisioned to provide their own KYC data.


# OpenAPI definition

```json
{
  "info": {
    "description": "**Dinari API for enterprise usage.**\n\nDinari's dShares let businesses offer tokenized access to stocks to their customers through an easy-to-use API.\nIntegrate Dinari's API and offer over a hundred stocks and ETFs to your customers.\n",
    "contact": {
      "email": "hello@dinari.com"
    },
    "license": {
      "name": "Contact us"
    },
    "termsOfService": "https://dinari.com/terms",
    "title": "Dinari Enterprise API",
    "version": "v20261112-5d6c9df"
  },
  "servers": [
    {
      "url": "https://api-enterprise.sbt.dinari.com",
      "description": "Production"
    },
    {
      "url": "https://api-enterprise.sandbox.dinari.com",
      "description": "Sandbox"
    }
  ],
  "components": {
    "securitySchemes": {
      "ApiKeyId": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key-Id",
        "description": "The API key ID provided on the [Partners Dashboard](https://partners.dinari.com)."
      },
      "ApiSecretKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Secret-Key",
        "description": "API Secret Key that is only shown once at API Key creation."
      }
    },
    "schemas": {
      "BaseOpenApiError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "HTTP status code"
          },
          "message": {
            "type": "string",
            "description": "Human-readable message"
          },
          "error_id": {
            "type": "string",
            "description": "Reference Id for Dinari support"
          },
          "error": {
            "description": "Additional context and information"
          }
        },
        "required": [
          "error_id",
          "message",
          "status"
        ],
        "additionalProperties": false
      },
      "BaseOpenApiFieldError": {
        "type": "object",
        "properties": {
          "field_name": {
            "type": "string",
            "description": "Name of field with error"
          },
          "field_error": {
            "type": "string",
            "description": "Description of error"
          }
        },
        "required": [
          "field_error",
          "field_name"
        ],
        "additionalProperties": false
      },
      "BaseOpenApiBodyError": {
        "type": "object",
        "properties": {
          "field_errors": {
            "type": "array",
            "description": "Contains list of field-specific errors",
            "items": {
              "$ref": "#/components/schemas/BaseOpenApiFieldError"
            }
          },
          "body_error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of body-specific error (ex. JSON issues)"
          }
        },
        "required": [
          "field_errors"
        ],
        "additionalProperties": false
      },
      "BaseOpenApi422Error": {
        "type": "object",
        "properties": {
          "status": {
            "default": 422,
            "enum": [
              422
            ],
            "description": "HTTP status code"
          },
          "message": {
            "default": "Unprocessable Entity",
            "enum": [
              "Unprocessable Entity"
            ],
            "description": "Human-readable message"
          },
          "error_id": {
            "type": "string",
            "description": "Reference Id for Dinari support"
          },
          "error": {
            "description": "Additional context and information",
            "$ref": "#/components/schemas/BaseOpenApiBodyError"
          }
        },
        "required": [
          "error",
          "error_id"
        ],
        "additionalProperties": false
      },
      "KycDocumentType": {
        "type": "string",
        "enum": [
          "GOVERNMENT_ID",
          "SELFIE",
          "RESIDENCY",
          "UNKNOWN"
        ]
      },
      "KycDocument": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "ID of the document."
          },
          "document_type": {
            "description": "Type of document.",
            "$ref": "#/components/schemas/KycDocumentType"
          },
          "filename": {
            "type": "string",
            "description": "Filename of document."
          },
          "url": {
            "type": "string",
            "description": "Temporary URL to access the document. Expires in 1 hour."
          }
        },
        "required": [
          "document_type",
          "filename",
          "id",
          "url"
        ],
        "description": "A document associated with KYC for an `Entity`."
      },
      "CreateKycDocumentFileInput": {
        "type": "object",
        "properties": {
          "file": {
            "description": "File to be uploaded. Must be a valid image or PDF file (jpg, jpeg, png, pdf) less than 10MB in size.",
            "type": "string",
            "format": "binary"
          }
        },
        "required": [
          "file"
        ],
        "description": "File input for uploading a `KYCDocument`."
      }
    },
    "responses": {
      "UNPROCESSABLE_ENTITY": {
        "description": "Unprocessable Entity",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BaseOpenApi422Error"
            }
          }
        }
      },
      "DEFAULT_ERROR": {
        "description": "Default error response",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/BaseOpenApiError"
            }
          }
        }
      }
    }
  },
  "paths": {
    "/api/v2/entities/{entity_id}/kyc/{kyc_id}/document": {
      "post": {
        "parameters": [
          {
            "in": "query",
            "name": "document_type",
            "description": "Type of `KYCDocument` to be uploaded.",
            "schema": {
              "$ref": "#/components/schemas/KycDocumentType"
            },
            "required": true
          }
        ],
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/KycDocument"
                }
              }
            }
          },
          "422": {
            "$ref": "#/components/responses/UNPROCESSABLE_ENTITY"
          },
          "default": {
            "$ref": "#/components/responses/DEFAULT_ERROR"
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "multipart/form-data": {
              "schema": {
                "$ref": "#/components/schemas/CreateKycDocumentFileInput"
              }
            }
          }
        },
        "tags": [
          "KYC"
        ],
        "summary": "Upload KYC Documents",
        "description": "\nUpload KYC-related documentation for partners that are provisioned to provide their own KYC data.\n",
        "operationId": "createEntityKycDocument",
        "security": [
          {
            "ApiKeyId": [],
            "ApiSecretKey": []
          }
        ]
      },
      "parameters": [
        {
          "in": "path",
          "name": "entity_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        },
        {
          "in": "path",
          "name": "kyc_id",
          "required": true,
          "schema": {
            "type": "string",
            "format": "uuid"
          }
        }
      ]
    }
  },
  "tags": [
    {
      "name": "KYC",
      "description": "**KYC (Know Your Customer) is a process of verifying the identity of customer `Entities`.**\n\nKYC is required for all customer `Entities` that transact on Dinari's platform.\n\nDinari provides a managed KYC process for its Partners, which provides a convenient KYC flow URL to present to the end customer.\n\nFor Dinari Partners that supply their own KYC data, the API provides a way to record a customer's KYC information using the Partner's KYC data. This requires an existing KYC agreement between Dinari and the Partner.\n"
    }
  ],
  "openapi": "3.1.0"
}
```