Upcoming API changes on 2019-05-13
timestamp1556317620001
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": "[email protected]"
},
"source": {
"type": "email",
"from": {
"name": "Gorgias Support",
"address": "[email protected]"
},
"to": [{
"name": "Your Company",
"address": "[email protected]"
}]
}
}
]
}
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": "[email protected]"
},
"source": {
"type": "email",
"from": {
"name": "Gorgias Support",
"address": "[email protected]"
},
"to": [{
"name": "Your Company",
"address": "[email protected]"
}]
}
}
If you have any further questions about these changes, please don’t hesitate to contact our support.