Finish attaching a file to a Docs page

posthttps://api.expiryedge.com/v1/completeKnowledgeDocAttachmentUpload
editor or admin (the same user who started the upload)60/minIdempotency-Key
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/completeKnowledgeDocAttachmentUpload' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "upload_id": "pUp7x1"
}'
Antwort
{
  "attachment": {
    "id": "att_3Fq8",
    "doc_id": "kd_7Hn2qLx",
    "name": "food-hygiene-renewal-checklist.pdf",
    "size": 184022,
    "type": "application/pdf",
    "url": "https://firebasestorage.googleapis.com/v0/b/expiryedge.appspot.com/o/organizations%2Forg_northwind%2Fdocs%2Fkd_7Hn2qLx%2Fattachments%2F1790000000000_food-hygiene-renewal-checklist.pdf?alt=media&token=2b9c6f0e-7a1d-4c4e-9d3b-5f1a8e2c7b10",
    "storage_path": "organizations/org_northwind/docs/kd_7Hn2qLx/attachments/1790000000000_food-hygiene-renewal-checklist.pdf",
    "uploaded_at": "2026-09-27T14:20:00.000Z",
    "uploaded_by": "u_71bXq",
    "uploaded_by_name": "Priya Shah"
  }
}

Step 3 of 3. Checks the uploaded file and saves it as an attachment of the page. If the page was deleted in the meantime the file is removed and 404 is returned.

Header

  • Idempotency-Keystring
    Optional client-generated key (1-255 characters of letters, digits, - _ : .).
    pattern: ^[A-Za-z0-9_\-:.]{1,255}$

Body-Parameter

application/json
  • upload_idstringerforderlich

Rückgabe

201
Attachment saved.
  • attachmentobjecterforderlich
    A file attached to a Docs page.

Fehler

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Authenticated, but your role or organization does not allow this action.
404
The record does not exist or is not in your organization.
405
The endpoint does not accept this HTTP method.
409
This upload was already completed.; or a request with the same Idempotency-Key is still being processed (code IDEMPOTENCY_IN_PROGRESS).
410
The upload link expired (15 minutes). Start a new upload.
422
No file was uploaded (UPLOAD_MISSING), or it does not match the declared size or type (UPLOAD_MISMATCH).
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
Unexpected server error. Retry later; quote requestId to support.