Toggle a fixed email attachment's mandatory flag
PATCH
/v1/tenants/me/settings/email-attachments/{attachmentId}
const url = 'https://api.emite.cr/v1/tenants/me/settings/email-attachments/example';const options = { method: 'PATCH', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"isMandatory":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.emite.cr/v1/tenants/me/settings/email-attachments/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "isMandatory": true }'Sets isMandatory. A mandatory fixed attachment is always sent and cannot be omitted from an individual invoice. Requires Feature.EMAIL_ATTACHMENTS.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”attachmentId
required
string
Attachment UUID
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
isMandatory
required
When true, this fixed attachment is always sent and cannot be omitted from an individual invoice.
boolean
Examplegenerated
{ "isMandatory": true}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}Missing or invalid JWT / API key.
Requires the settings:write scope.
Attachment not found.