Get Document by id

get/v1/documents/{document_id}

Fetches a single document by id, optionally including a signed download link. Read-only; no side effects. 404 when not found in the caller's workspace.

Requires a bearer token: Authorization: Bearer <token>.

Path parameters

NameTypeRequiredDescription
document_idstring <uuid>YesPublic UUID of the document.e.g. 4e5f6071-8293-4a4b-95c6-d7e8f9a0b1c2

Query parameters

NameTypeRequiredDescription
fields[links]stringNoComma-separated link fields to materialize; pass download to receive a signed URL.e.g. download

Headers

NameTypeRequiredDescription
AcceptstringNoStandard content negotiation. JSON is always returned for these resources.e.g. application/json

Request

cURL
curl -X GET https://api.wellapp.ai/v1/documents/{document_id} \
  -H "Authorization: Bearer $WELL_API_TOKEN"

Responses

200The document, with a signed download link when requested.

{
  "data": {
    "type": "document",
    "document_id": "4e5f6071-8293-4a4b-95c6-d7e8f9a0b1c2",
    "id": "4e5f6071-8293-4a4b-95c6-d7e8f9a0b1c2",
    "attributes": {
      "filename": "anthropic-invoice-2026-05.pdf",
      "local_file_name": "doc_4e5f6071.pdf",
      "type": "application/pdf",
      "size": 84213,
      "workspace_id": "8f6b2c10-4a1e-4d2b-9c3a-1f0e7a5b6c21",
      "uploaded_at": "2026-05-04T18:20:00.000Z",
      "document_type": "380"
    },
    "links": {
      "download": "https://storage.wellapp.ai/signed/doc_4e5f6071?sig=abc123"
    },
    "relationships": {
      "collect": {
        "data": {
          "type": "collect",
          "id": "00000000-0000-4000-8000-000000000001"
        }
      },
      "invoices": {
        "data": [
          {
            "type": "invoice",
            "id": "00000000-0000-4000-8000-000000000001"
          }
        ]
      },
      "transaction_documents": {
        "data": [
          {
            "type": "transaction_document",
            "id": "00000000-0000-4000-8000-000000000001"
          }
        ]
      }
    }
  }
}

401Unauthorized

{
  "code": "UNAUTHORIZED",
  "status": 401,
  "title": "Unauthorized",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

403Forbidden

{
  "code": "FORBIDDEN",
  "status": 403,
  "title": "Forbidden",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}

404Not Found

{
  "code": "NOT_FOUND",
  "status": 404,
  "title": "Not Found",
  "message": "See title.",
  "meta": {
    "trace_id": "a1b2c3",
    "log_id": "a1b2c3"
  }
}