Add a fixed email attachment
POST
/v1/tenants/me/settings/email-attachments
const url = 'https://api.emite.cr/v1/tenants/me/settings/email-attachments';const form = new FormData();form.append('file', 'file');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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=@fileMultipart 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.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typemultipart/form-data
object
file
string format: binary
Responses
Section titled “Responses”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.