Easymailing
Email sequences

Upload an attachment for a sequence

PUT /email_sequences/{uuid}/assets/{assetUuid}

PUT/email_sequences/{uuid}/assets/{assetUuid}

Uploads a file to a sequence under an assetUuid you choose, so that an email of the draft can attach it. The request body is the raw file, not JSON.

When to use: Before referencing the file in a step: upload it here, then put its assetUuid as asset_uuid in attachments of that step with update_email_sequence_draft. Repeating the same request with the same bytes is safe: you get the same asset.

When not to use: A file that is not an attachment of a sequence goes elsewhere: a document of a contact, company or opportunity through create_file, an attachment of a one-off email through upload_email_attachment. There is no multipart or base64 form, and an uploaded file cannot be changed or deleted: an asset no draft or version references is purged after 24 hours.

Side effects: The file is stored in the private storage of the account before the answer and counts in the CRM Files storage of the account from that moment (unreferenced assets are purged after 24 hours and the space returned). A file is at most 20 MiB through the public API, and the attachments of one email at most 25 MB together (checked when the sequence is published). Each file is checked by its name and its real content: executables and the extensions Gmail blocks are refused. Nothing is sent and the draft is not changed until a step references the asset.

Permissions: Requires the automations.work and contacts.read capabilities. The account must also have the CRM Pro plan.

Authorization

X-Auth-Token<token>

Value for the X-Auth-Token header parameter.

In: header

Path Parameters

uuid*string

UUID of the email sequence. Get it from list_email_sequences.

Formatuuid
assetUuid*string

UUID you choose for the file; use it as asset_uuid in the step that attaches it. Generate a new UUID per file.

Formatuuid

Header Parameters

Content-Type*"application/octet-stream"

Always application/octet-stream. Any other value is refused with 415 before the body is read.

Value in

  • "application/octet-stream"
X-Attachment-Name*string

Name of the file, UTF-8 percent-encoded, up to 1,024 characters. Its extension decides the media type.

Lengthlength <= 1024

Request Body

application/octet-stream

The raw bytes of the file.

TypeScript Definitions

Use the request body type in TypeScript.

body*file
Formatbinary

Response Body

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X PUT "https://api.easymailing.com/email_sequences/b3f1c8a2-5d47-4e90-9a16-7c2e0d4f8b35/assets/7d2a9e4c-1f68-4b35-a8e0-3c5b7f1d9a62" \  -H "X-Auth-Token: YOUR_API_KEY" \  -H "Content-Type: application/octet-stream" \  -H "X-Attachment-Name: Price%20sheet%202026.pdf" \  -H "Content-Type: application/octet-stream" \  -d 'string'
{  "sequence": "/entity/1",  "asset_uuid": "76807d23-a41c-4ee1-a173-773f47fc22c8",  "filename": "string",  "size_bytes": 1,  "mime_type": "string"}