Tickets vs Requests APIs: How to select the right option for your project

In the Support API, the Tickets and Requests resources may appear to provide much of the same functionality. While there are some similarities, they each have important differences between them.  Choosing the correct endpoint can save you a lot of frustration down the road. This article will shed light on a few of the main differences, helping you select the right option for your project.

Note that when Tickets and Requests are capitalized in this article, they refer to their associated resources in the Support API.

Key differences

The primary differentiator between the two is Requests is intended to be used by or on behalf of end users and Tickets is intended to be used by or on behalf of agents and admins.

When choosing one of these API resources, your first question should be "Is this project being built for agents or end users". Based on that answer, start with the intended resource for your audience.

Here are some of the most important distinctions between the two resources:

On ticket creation

  • Tickets always require agent authentication. Requests can be submitted with authentication by an agent, admin, or end user and without authentication by an anonymous user. To learn more about submitting Requests without authentication, see Creating anonymous requests in the developer docs.
  • Tickets only require the "comment" property. Requests requires both "subject" and "comment". In addition, anonymous Requests also require the "requester" object with the "name" property.

    • Example required Tickets payload:

      • {   "ticket": {      "comment": {"body": "I'm a comment!"}     }  }
    • Example required authenticated Requests payload:

      • {  "request": {    "subject": "I'm a subject!",    "comment": {"body": "I'm a comment!" }  }}
    • Example required anonymous Requests payload:

      • {  "request": {    "requester": {"name": "I'm a requester!"},    "subject": "I'm a subject!",    "comment": {"body": "I'm a comment!" }  }}

On ticket update

  • Tickets allows updates to a wide range of ticket attributes. Requests only allows adding comments, adding CCs, or setting the ticket to a solved status. Anonymous users are not permitted to update tickets via either endpoint.

Other

  • Any bulk or "create many" action can only be performed through Tickets. 

Conclusion

Although there is similar behavior in both of these endpoints, you can now see that they have two different purposes. If you have any additional scenarios where they differentiate or if you have questions, please leave a comment below!