Contact forms
If you have a contact form on your website, it can use these requests to create a new ticket with content in Omnidesk
Create an empty ticket
POST
https://{{account}}.omnidesk.com/api/v2/ticket
With this endpoint you create a new empty ticket with the data required. Below you can find an example of how this request can be made. All the values in the double brackets are variables you can adjust for your own purposes.
Additionally, you can also add these optional parameters if needed:
fromName
- The name of the customerassignedGroupID
- The group this ticket will be assigned toformID
- The form this ticket will have on it
The response will return the ticket ID in it as well. Make sure you save this, as you need it in the next request.
Create content for the ticket (a message)
POST
https://{{account}}.omnidesk.com/api/v2/message
With this endpoint you create a message in the newly created ticket, containing the contact form data itself. For the message parameter, HTML is accepted.
If this request returns a HTTP code of 200, everything successfully came through and the contact form is now created within Omnidesk.
Multiple files can also be sent by simply adding the attachments[] parameter multiple times.
Last updated