attachment_not_found
No pre-uploaded attachment with that id exists in the workspace the key belongs to. Nothing was sent and nothing was charged.
Status: 404
{
"status": 404,
"type": "attachment_not_found",
"message": "Attachment not found",
"request_id": "req_01J8K2P...",
"doc_url": "https://docs.epostix.com/errors/attachment_not_found"
}
Why you got this
- The upload is older than 24 hours and the file has been cleaned up. An expired file still
on record returns
attachment_expiredinstead. - The id belongs to another workspace, which returns
404as well. - The key was issued by a different workspace than the one the file was uploaded to.
- The id came from an earlier run, a fixture or a script, and that upload was never repeated.
How to fix it
Upload the file with POST /attachments and use the id it returns in the same run. Ids are
short-lived by design, so code that uploads once and then sends for days breaks at the 24
hour mark. Treat the upload as part of the send rather than as setup.
If the file has to stay available for longer, host it yourself and pass its URL on the attachment instead of an id.
Is it safe to retry
No, not with the same id. It keeps returning 404. Upload the file again and send a new
request carrying the new id.
Reusing the Idempotency-Key is safe, because a rejected request was never stored.