Finish an attachment upload
Previewpost
https://api.expiryedge.com/v2/expiries/{id}/attachments/completeeditor or admin, and the user who started the upload60/minIdempotency-Key
Request
curl -X POST 'https://api.expiryedge.com/v2/expiries/exp_4Tq9sLm2/attachments/complete' \
-H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"upload_id": "up_5Nq2rT"
}'Response
{
"index": 1,
"name": "Gas Safety Certificate 2026.pdf",
"url": "https://example.com"
}Verifies the uploaded file and adds it to the expiry. The upload must have been started for this expiry
(404 otherwise). Returns 201 with the new attachment and Location: /v2/expiries/{id}/attachments.
idstringrequired
Idempotency-KeystringOptional client-generated key (1-255 characters of letters, digits,- _ : .).pattern: ^[A-Za-z0-9_\-:.]{1,255}$
upload_idstringrequired
201
Attached.
indexintegerrequiredread-onlyPosition in the expiry's file list (changes when earlier files are removed).min: 0namestringrequiredDisplay name - the original file name.urlstringrequiredread-onlyDownload URL. Anyone with this URL can download the file - keep it private.format: uri
400 | Invalid parameters or body ( VALIDATION_FAILED; details names the fields). |
401 | Missing, invalid or expired token ( UNAUTHORIZED). |
403 | Your role can't do this, or your account has no organization ( FORBIDDEN). |
404 | No such record in your organization (records in other organizations are also 404). |
405 | Wrong HTTP method for this path; the Allow header lists the valid ones. |
409 | State or uniqueness conflict: EMAIL_EXISTS (contacts), GROUP_EXISTS (contact groups), CONFLICT (folder name taken), FOLDER_NOT_EMPTY, CLIENT_HAS_PROJECTS, TOO_MANY_ATTACHMENTS, INVALID_STATE (collection request cancel/resend), or IDEMPOTENCY_IN_PROGRESS (same Idempotency-Key still running; see Retry-After). |
410 | UPLOAD_EXPIRED - start a new upload. |
422 | UPLOAD_MISSING (nothing was PUT), UPLOAD_MISMATCH (size or type differs) or IDEMPOTENCY_KEY_REUSED. |
429 | Too many requests for this endpoint from your IP. Wait Retry-After seconds. |
