A request is an end user's perspective on a ticket. The following actions can be performed with theCreate RequestandUpdate Requestendpoints:

You can alsocreate anonymous requestswhen creating a ticket andadd collaboratorsto an existing ticket.

Setting collaborators

Note: If the account has the CCs and Followers feature enabled, then collaborators can still be set usingcollaboratorsandadditional_collaborators, which will automatically make end users CCs and agents followers. The use of email_ccs and followers is preferred for these accounts. SeeSetting Email CCsandSetting Followersfor more details.

When creating a ticket, you can set collaborators on a ticket using thecollaboratorsparameter.

An email notification is sent to the collaborators when the request is created.

Thecollaboratorsparameter takes an array consisting of a combination of user ids, email addresses, or objects containing anameandemailproperty.

Use an object to create the user on the fly with the appropriate name in your Zendesk Support instance.

Example

             
{"ticket":{"collaborators":[562,"[email protected]",{"name":"Someone Else","email":"[email protected]"}]}}

The new or updated collaborators will be specified in the JSON response by a property namedcollaborator_ids. The response won't have acollaboratorsproperty.

Setting email CCs

When creating or updating a request, you can set email CCs on a request using the parameteremail_ccs.

An email notification is sent to the CCs when the request is created or updated depending on trigger settings.

Theemail_ccsparameter takes an array of objects representing users. Each object must have an identifier, either user ID (user_id) or email address (user_email). If an email address is specified and the user doesn't exist in the account, a new user will be created. Additionally, the keyaction可以设置为“将”或“删除”——印第安纳州吗icates whether the user should be added to or removed from the email CCs list. If theactionkey is not given, the default ofputis used. Optionally, if a new user is created,user_namecan be specified to set the new user's name. If the user will be implicitly created and auser_nameis not given, the user name will be derived from the local part of the email address. If an email address not associated with a user is included (with eg. the intention to implicitly create the user), but the "action" key is valued "delete", that email address will not be created and/or added as an email CC.

Email CCs will not be updated if an internal note is also added to the request in the same update.

Example request

             
{"request":{"email_ccs":[{"user_id":"562624","action":"put"},{"user_id":"243642","action":"delete"},{"user_email":"[email protected]","user_name":"Someone Else","action":"put"}]}}

Creating anonymous requests

匿名的请求必须first be enabled in the Zendesk Admin Center by a Zendesk admin. If you're not an admin, ask an admin to do it for you. To enable anonymous requests, follow the procedure inAnybody can submit tickets, no registration requiredin Zendesk help. Make sure theRequire authentication for request and uploads APIsoption is not selected.

To create anonymous requests

  1. Omit the authorization header.
  2. Include arequesterobject in therequestobject.

Therequesterobject has the following properties. Onlynameis required.

Name Required Description
name yes A real or arbitrary name for the requester
email no An email address
locale no A BCP-47 compliant tag
locale_id no See theLocalesAPI

If bothlocaleandlocale_idare included on create,localeis used andlocale_idis ignored.

Example

             
{"request":{"requester":{"name":"Anonymous customer"},"subject":"Help!","comment":{"body":"My printer is on fire!"}}}

Adding collaborators

When updating a ticket, you can add new collaborators on a ticket using theadditional_collaboratorsparameter.

An email notification is sent to the collaborators when the ticket is updated.

Theadditional_collaboratorstakes an array consisting of a combination of user ids, email addresses, or objects containing anameandemailproperty.

Example

             
{"ticket":{"additional_collaborators":[562,"[email protected]",{"name":"Someone Else","email":"[email protected]"}]}}

The new or updated collaborators will be specified in the JSON response by a property namedcollaborator_ids. The response won't have aadditional_collaboratorsproperty.