Skip to content

Add a fixed email attachment

POST
/v1/tenants/me/settings/email-attachments
curl --request POST \
--url https://api.emite.cr/v1/tenants/me/settings/email-attachments \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form file=@file

Multipart upload (file field). Validates MIME (by signature) + size, caps the set, and requires Feature.EMAIL_ATTACHMENTS — every sold plan includes it, so the 402 FEATURE_NOT_IN_PLAN only answers a company without a plan.

Media typemultipart/form-data
object
file
string format: binary
Media typeapplication/json
object
id
required

Attachment id.

string
filename
required

Original (sanitized) filename, shown in the list and used in the email.

string
contentType
required

MIME type.

string
sizeBytes
required

Size in bytes.

number
createdAt
required

When the file was uploaded (ISO 8601).

string
isMandatory

Tenant-fixed only: when true the attachment cannot be omitted from an individual invoice.

boolean
Examplegenerated
{
"id": "example",
"filename": "example",
"contentType": "example",
"sizeBytes": 1,
"createdAt": "example",
"isMandatory": true
}

No file, disallowed MIME, too large, corrupt content, or over the limit (ATTACHMENT_LIMIT_REACHED).

Missing or invalid JWT / API key.

Requires the settings:write scope.