Upcoming API changes on 2019-05-13
April 26th, 2019 at 10:27 PM
Developers
Changes
Starting from 13th May, 2019:
- The from_agent
attribute of the TicketMessage
object will be required to create a new message or create a ticket containing messages. This attribute accepts 2 values :
true
if the message will be or has been sent by a user (agents, admins)false
if the message has been sent by a customer
Example
Here is a valid payload to create a ticket with a message using the endpoint POST /api/tickets
:
{ "messages": [ { "via": "api", "channel": "email", "body_text": "Upcoming API changes", "from_agent": true, "sender": { "email": "louis@gorgias.io" }, "source": { "type": "email", "from": { "name": "Gorgias Support", "address": "support@gorgias.io" }, "to": [{ "name": "Your Company", "address": "customer@yourcompany.com" }] } } ] }
Here is a valid payload to add a message to a ticket using the endpoint POST /api/tickets/{{ticket-id}}/messages/
:
{ "via": "api", "channel": "email", "body_text": "Upcoming API changes", "from_agent": true, "sender": { "email": "louis@gorgias.io" }, "source": { "type": "email", "from": { "name": "Gorgias Support", "address": "support@gorgias.io" }, "to": [{ "name": "Your Company", "address": "customer@yourcompany.com" }] } }
If you have any further questions about these changes, please don’t hesitate to contact our support.