---
updatedAt: 2026-04-20T20:28:13.000Z
agentTools:
  projectIndex: https://developers.muralpay.com/llms.txt
---

# Get an upload URL for a document

Returns a one-time upload URL plus the form fields you need to attach. Send a `multipart/form-data` POST to the URL with each `uploadUrlFormFields` entry as a form field, then the file field last. The URL is valid for 60 minutes. Maximum file size is 10 MB.

# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "GenerateUploadUrlRequest": {
        "properties": {
          "contentType": {
            "description": "The MIME type of the document",
            "enum": [
              "image/jpeg",
              "image/jpg",
              "image/png",
              "application/pdf"
            ],
            "example": "application/pdf",
            "type": "string"
          },
          "filename": {
            "description": "Human-readable filename for the document. Surrounding whitespace is trimmed. Must not contain path separators, and its extension must match `contentType`.",
            "example": "passport_scan.pdf",
            "type": "string"
          }
        },
        "required": [
          "filename",
          "contentType"
        ],
        "type": "object"
      },
      "GenerateUploadUrlResponse": {
        "properties": {
          "documentId": {
            "description": "Unique identifier for the document. Use this ID to reference the document in subsequent API calls.",
            "format": "uuid",
            "type": "string"
          },
          "expiresAt": {
            "description": "Timestamp when the presigned upload URL expires.",
            "format": "date-time",
            "type": "string"
          },
          "uploadUrl": {
            "description": "The URL to send the multipart/form-data POST request to.",
            "type": "string"
          },
          "uploadUrlFormFields": {
            "description": "Key-value pairs that must be included as form fields in the multipart POST request. The file field must be the last field in the request. These fields carry the upload signature and policy.",
            "example": {
              "Content-Type": "application/pdf",
              "Policy": "<base64-encoded policy>",
              "X-Amz-Algorithm": "AWS4-HMAC-SHA256",
              "X-Amz-Credential": "AKIA.../us-east-1/s3/aws4_request",
              "X-Amz-Date": "20260409T120000Z",
              "X-Amz-Signature": "<signature>",
              "bucket": "my-bucket",
              "key": "documents/org-id/doc-id/filename.pdf"
            },
            "type": "object"
          }
        },
        "required": [
          "documentId",
          "uploadUrl",
          "uploadUrlFormFields",
          "expiresAt"
        ],
        "type": "object"
      },
      "RateLimitExceededErrorBody": {
        "properties": {
          "errorInstanceId": {
            "description": "Unique error instance ID",
            "format": "uuid",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "enum": [
              "RateLimitExceededError"
            ],
            "example": "RateLimitExceededError",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/RateLimitExceededErrorBodyParams"
          }
        },
        "required": [
          "errorInstanceId",
          "name",
          "message",
          "params"
        ],
        "type": "object"
      },
      "RateLimitExceededErrorBodyParams": {
        "properties": {
          "retryAfterSeconds": {
            "description": "Seconds to wait before retrying. The same value is sent in the Retry-After header.",
            "type": "number"
          }
        },
        "required": [
          "retryAfterSeconds"
        ],
        "type": "object"
      },
      "SignedAgreementRequiredErrorBodyParams": {
        "properties": {
          "organizationId": {
            "description": "Organization ID that must accept the agreement",
            "format": "uuid",
            "type": "string"
          }
        },
        "required": [
          "organizationId"
        ],
        "type": "object"
      },
      "SignedAgreementRequiredExceptionBody": {
        "properties": {
          "errorInstanceId": {
            "description": "Unique error instance ID",
            "format": "uuid",
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "name": {
            "enum": [
              "SignedAgreementRequiredException"
            ],
            "example": "SignedAgreementRequiredException",
            "type": "string"
          },
          "params": {
            "$ref": "#/components/schemas/SignedAgreementRequiredErrorBodyParams"
          }
        },
        "required": [
          "errorInstanceId",
          "name",
          "message",
          "params"
        ],
        "type": "object"
      }
    },
    "securitySchemes": {
      "bearer": {
        "bearerFormat": "API key",
        "description": "Your API key from the Developers page, for example `mural_live_<64 hex characters>`. Send it as `Authorization: Bearer <API key>`. The Transfer API key goes in the `transfer-api-key` header, never here.",
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "contact": {},
    "description": "Mural's API for programmatic global payments.",
    "title": "Mural API",
    "version": "1.0"
  },
  "openapi": "3.0.0",
  "paths": {
    "/api/documents/generate-upload-url": {
      "post": {
        "description": "Returns a one-time upload URL plus the form fields you need to attach. Send a `multipart/form-data` POST to the URL with each `uploadUrlFormFields` entry as a form field, then the file field last. The URL is valid for 60 minutes. Maximum file size is 10 MB.",
        "operationId": "generateUploadUrl",
        "parameters": [
          {
            "description": "Organization ID to act on behalf of",
            "in": "header",
            "name": "on-behalf-of",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "description": "Required UUID to safely retry requests without creating duplicate operations. Subsequent requests with the same key and identical body return the original cached response with an `idempotency-replayed: true` response header. Keys expire after 24 hours.",
            "in": "header",
            "name": "idempotency-key",
            "required": true,
            "schema": {
              "format": "uuid",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateUploadUrlRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerateUploadUrlResponse"
                }
              }
            },
            "description": "Upload URL generated."
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SignedAgreementRequiredExceptionBody"
                }
              }
            },
            "description": "SignedAgreementRequiredException"
          },
          "409": {
            "description": "IdempotencyConflictError"
          },
          "422": {
            "description": "IdempotencyKeyExpiredError"
          },
          "429": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RateLimitExceededErrorBody"
                }
              }
            },
            "description": "RateLimitExceededError"
          }
        },
        "security": [
          {
            "bearer": []
          }
        ],
        "summary": "Get an upload URL for a document",
        "tags": [
          "Documents"
        ]
      }
    }
  },
  "servers": [
    {
      "description": "Production",
      "url": "https://api.muralpay.com"
    },
    {
      "description": "Sandbox",
      "url": "https://api-staging.muralpay.com"
    }
  ]
}
```