---
title: "Upload a document"
method: POST
path: "/documents"
tags: ["Documents"]
---

# Upload a document

`POST /documents`

Upload a file to Razorpay. Returns a document ID that can be used in dispute evidence submissions. Supports JPEG, PNG, and PDF formats.

## Response `200`

Document uploaded.

- Document
  - `id` string — Unique document identifier. Example: doc_EsyWjHrfzb59Re. Always 14 alphanumeric characters.
  - `entity` 'document'
  - `name` string — Filename of the uploaded document.
  - `mime_type` 'image/jpg' | 'image/jpeg' | 'image/png' | 'application/pdf' — MIME type of the uploaded file.
  - `size` integer — File size in bytes.
  - `purpose` string — Upload reason. Example: dispute_evidence.
  - `created_at` integer — Unix timestamp of upload.

## Other responses

- `400` — Bad request. Invalid parameters or missing required fields.
- `401` — Authentication failed. Invalid or missing API key credentials.
- `429` — Rate limit exceeded. Implement exponential backoff with jitter before retrying.

---

[API](https://skmtc.net/curlec/apis/razorpay-api.md) · [All operations](https://skmtc.net/curlec/apis/razorpay-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/curlec/razorpay-api/versions/824ca9e6faef/schema)
