Clienvy API documentation

List outbound mails

GET
https://api.clienvy.io/employee/v1
/tickets/{ticket}/items/outbound-mails

Returns all outbound mails of the ticket (concepts, scheduled and sent), newest first.

List outbound mails › path Parameters

ticket
​string · uuid · required

The ticket UUID

List outbound mails › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

List outbound mails › Responses

Array of TicketOutboundMailResource

id
​string · uuid
status
​TicketOutboundMailStatus · enum
Enum values:
concept
queued
sending
scheduled
scheduled_for
​string | null · date-time
subject
​string | null
message
​string | null
full_message
​string
​EmployeeResource
updated_at
​string · date-time
created_at
​string · date-time

Create an outbound mail

POST
https://api.clienvy.io/employee/v1
/tickets/{ticket}/items/outbound-mails

Creates a new outbound mail as a concept for the ticket. When no recipients are given, the ticket's participants are added as to recipients: by their e-mail address, or for a caller or a contact or company linked by hand by the first e-mail address of that relation. Participants taken out of the conversation are left out.

Create an outbound mail › path Parameters

ticket
​string · uuid · required

The ticket UUID

Create an outbound mail › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Create an outbound mail › Request Body

subject
​string · maxLength: 255
message
​string · maxLength: 20000

The e-mail body as HTML, shown without paragraph spacing: put each paragraph in a <p> and an empty <p><br></p> between paragraphs. <strong>, <em>, <a>, <ul>, <ol> and <li> are fine. When the mail is sent, Clienvy adds the personal signature (usually the closing greeting and the sender's name) and quotes the previous mail, so leave both out.

file_ids
​string[]

UUIDs of uploaded files to attach.

​object[]

The mail recipients. Replaces the full recipient set.

Create an outbound mail › Responses

​TicketOutboundMailResource · required
​TicketResource · required

Get an outbound mail

GET
https://api.clienvy.io/employee/v1
/tickets/{ticket}/items/outbound-mails/{ticketOutboundMail}

Returns a single outbound mail of the ticket, including its recipients and file attachments.

Get an outbound mail › path Parameters

ticket
​string · uuid · required

The ticket UUID

ticketOutboundMail
​string · uuid · required

The ticket outbound mail UUID

Get an outbound mail › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Get an outbound mail › Responses

TicketOutboundMailResource

​TicketOutboundMailResource · required
​TicketResource · required

Update an outbound mail

PUT
https://api.clienvy.io/employee/v1
/tickets/{ticket}/items/outbound-mails/{ticketOutboundMail}

Updates a concept outbound mail. Only concepts can be edited. Pass take_over to take over a concept another employee is editing.

Update an outbound mail › path Parameters

ticket
​string · uuid · required

The ticket UUID

ticketOutboundMail
​string · uuid · required

The ticket outbound mail UUID

Update an outbound mail › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Update an outbound mail › Request Body

subject
​string · maxLength: 255
message
​string · maxLength: 20000

The e-mail body as HTML, shown without paragraph spacing: put each paragraph in a <p> and an empty <p><br></p> between paragraphs. <strong>, <em>, <a>, <ul>, <ol> and <li> are fine. When the mail is sent, Clienvy adds the personal signature (usually the closing greeting and the sender's name) and quotes the previous mail, so leave both out.

file_ids
​string[]

UUIDs of uploaded files to attach.

​object[]

The mail recipients. Replaces the full recipient set.

take_over
​boolean

Take over editing from another employee.

Update an outbound mail › Responses

​TicketOutboundMailResource · required
​TicketResource · required

Delete an outbound mail

DELETE
https://api.clienvy.io/employee/v1
/tickets/{ticket}/items/outbound-mails/{ticketOutboundMail}

Deletes a concept outbound mail. Only concepts can be deleted.

Delete an outbound mail › path Parameters

ticket
​string · uuid · required

The ticket UUID

ticketOutboundMail
​string · uuid · required

The ticket outbound mail UUID

Delete an outbound mail › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Delete an outbound mail › Responses

TicketOutboundMailResource

​TicketOutboundMailResource · required
​TicketResource · required

Send an outbound mail

POST
https://api.clienvy.io/employee/v1
/tickets/{ticket}/items/outbound-mails/{ticketOutboundMail}/send

Sends a concept outbound mail, or schedules it when scheduled_for is given. The mail must have a subject, message and at least one recipient. Immediate sends are queued with a short delay so they can still be cancelled.

Send an outbound mail › path Parameters

ticket
​string · uuid · required

The ticket UUID

ticketOutboundMail
​string · uuid · required

The ticket outbound mail UUID

Send an outbound mail › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Send an outbound mail › Request Body

scheduled_for
​string · date-time

Date/time (Y-m-d H:i:s) to send the mail. Omit to send immediately.

Send an outbound mail › Responses

TicketOutboundMailResource

​TicketOutboundMailResource · required
​TicketResource · required

Cancel a scheduled or queued send

POST
https://api.clienvy.io/employee/v1
/tickets/{ticket}/items/outbound-mails/{ticketOutboundMail}/cancel-sending

Returns a scheduled or queued outbound mail to concept status. A mail that is already sending or sent can no longer be cancelled.

Cancel a scheduled or queued send › path Parameters

ticket
​string · uuid · required

The ticket UUID

ticketOutboundMail
​string · uuid · required

The ticket outbound mail UUID

Cancel a scheduled or queued send › Headers

X-Organization-Id
​string · uuid · required

UUID of the organization (tenant) the request operates on.

Cancel a scheduled or queued send › Responses

TicketOutboundMailResource

​TicketOutboundMailResource · required
​TicketResource · required