For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Get API Key
GuidesAPI Reference
GuidesAPI Reference
  • Overview
    • API Reference
  • Endpoint Reference
    • Organizations
    • Projects
    • Documents
    • Agent
    • Check
  • API Explorer
      • GETGet a document by ID
      • POSTTrigger processing for uploaded documents
      • GETList documents
      • POSTReserve a document upload slot
      • DELDelete documents by ID
Get API Key
LogoLogo
API ExplorerDocuments

Reserve a document upload slot

POST
/api/v2/documents
POST
/api/v2/documents
$curl -X POST https://api-staging.pyramid-ai.com/api/v2/documents \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "file_name": "Safety-Management-Plan-2026.pdf",
> "content_type": "application/pdf",
> "size_bytes": 2048576,
> "project_id": "7f9c8d2a-1b3e-4c5d-8e9f-0a1b2c3d4e5f"
>}'
1{
2 "request_id": "req_9f8e7d6c-5b4a-3210-fedc-ba9876543210",
3 "success": true,
4 "data": {
5 "chunk_count": 4,
6 "content_type": "application/pdf",
7 "created_at": "2024-04-20T14:22:00Z",
8 "error_message": "",
9 "file_name": "Safety-Management-Plan-2026.pdf",
10 "id": "d4f1a2b3-c5e6-7f89-0a1b-2c3d4e5f6789",
11 "org_id": "org_ais",
12 "project_id": "7f9c8d2a-1b3e-4c5d-8e9f-0a1b2c3d4e5f",
13 "size_bytes": 2048576,
14 "status": "awaiting_upload",
15 "updated_at": "2024-04-20T14:22:00Z",
16 "upload": {
17 "url": "https://storage.pyramid-ai.com/uploads/d4f1a2b3-c5e6-7f89-0a1b-2c3d4e5f6789",
18 "method": "PUT",
19 "recommended_content_type": "application/pdf",
20 "expires_at": "2024-04-20T15:22:00Z"
21 }
22 },
23 "pagination": {
24 "total": 127,
25 "offset": 0,
26 "limit": 50
27 }
28}

Step 1 of the two-step upload flow. Returns a presigned URL for direct PUT to storage. After uploading, call POST /documents/process to kick off processing.

Was this page helpful?
Previous

Delete documents by ID

Next
Built with

Authentication

AuthorizationBearer

Pyramid API key (prefix with “Bearer ”)

Request

This endpoint expects an object.
file_namestringRequiredformat: "^[^/\\\\]+$"1-500 characters
File name only. Path separators are forbidden.
content_typestringRequired

MIME type. Must be in the allowed set (application/pdf, application/msword, text/plain, etc.).

size_bytesintegerRequired1-524288000
File size in bytes. Used for upload verification.
project_idstringOptionalformat: "uuid"

Which project this document belongs to. Optional — omit for organization-level documents.

Response

Document reserved with upload URL
request_idstringformat: "uuid"

Server-generated per-request UUID. Also sent as X-Request-Id response header. Include in support tickets.

successany
dataobject
paginationobject

Present only on list endpoints. Top-level (not nested inside data).

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error