Attachments

Complete an attachment upload session

Finalize an attachment upload session after the file has been uploaded to the pre-signed URL. Nylas verifies that the upload succeeded in storage and, if size was declared on session creation, that the uploaded byte count matches the declared size.

After completion, reference the attachment in a send or draft request by passing { "id": "<attachment_id>" } in the attachments array.

Retention note: By default, the uploaded file is deleted from storage when expires_at passes (one hour after session creation). Plan your send to occur inside this window. The attachment metadata row is retained for 60 days for observability.

For the full upload flow, see Send large attachments.

post/v3/grants/{grant_id}/attachment-uploads/{attachment_id}/complete

Path parameters

grant_idstring required

The ID of the grant the upload session belongs to.

attachment_idstring required

The ID of the attachment upload session to complete.

Response

Upload session completed successfully. The attachment is now ready to use in a send or draft.

request_idstring

Example response

{
  "data": {
    "attachment_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "status": "ready"
  }
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.