Who is the current user when adding ticket comments using APIs?

Question

We have business rules set up to fire based on the (current user) condition, but it is not firing when tickets are created and updated using the API. Who is the current user when adding ticket comments using APIs?

Answer

The (current user) is the user authenticating the API call. The user authenticating the API call is not always the author of the comment. For more information about the (current user) condition, see the article: User references in business rules.

When using the Tickets API with admin or agent credentials, that admin or agent is the (current user) on the ticket update.

When using the Requests API with an end-user's identity and token, that end user is the (current user) on the ticket update.

For more information on when to use the Tickets API and Requests API, see the article: Tickets vs Requests APIs: How to select the right option for your project.