Cannot set request priority and type for end users requests | Community
Skip to main content

Cannot set request priority and type for end users requests

  • March 2, 2021
  • 3 replies
  • 0 views

 

I have my end users creating requests vía

POST https://{my_app}.zendesk.com/api/v2/requests 

with header

Authorization => Basic [base64({user-email}/API_TOKEN)

and body:

{
"request": {
"subject": "Some subject",
"priority": "high",
"type":"incident",
"requester": {
"name":"Enduser Name",
"email":"enduser@mail.com"
},
"comment": {
"body": "Test - incident / high priority"
}
}
}

Everything works except the priority and type fields return null. If I replace the authorization email by an Agent's email, it works fine.

From the Request API documentation, I understand this is the way to create requests without making the end user to register an account, and all fields in the JSON table -including type and priority- could be set. What am I missing here?

3 replies

  • Author
  • March 2, 2021
 

UPDATE:  It seems to work fine when I use an Agent email for API authorization, instead of the end user's, like:

Authorization => Basic [base64({agent-email}/API_TOKEN)

 

So, is this the correct way to send end-user requests?


  • March 3, 2021

Hello,

You will need to change the permission for Type and Priority system fields from Support -> Admin -> Ticket Fields and set them to "Editable for end-users". You can then use the end-user email to authorize the API request and set the type and priority.

If you use an agent's email to authorize the API request, the agent will become the submitter of the request and a proactive ticket will be created on behalf of the requester.

Hope this helps.

Cheers,

Korak


  • Author
  • March 4, 2021
 

Thank you Korak, that solved the issue!