Receiving error when using API | The place for Zendesk users to come together and share
Skip to main content
April 5, 2022
Question

Receiving error when using API

Hi.  I'm trying to update users through API using Postman.  I'm using the instructions here https://developer.zendesk.com/api-reference/ticketing/users/users/#update-many-users specifically the batch update part.  I'm updating emails so I'm using the user ids from the user profile web address and the new email.

I'm using the following endpoint: https://{subdomain}.zendesk.com/api/v2/users/update_many.json (I've put the real tenant name in for {subdomain}

Here is the Params I'm passing.  The #'s are replacing the actual data.  I've tried email addresses with ""s and without. 
 
{
  "users": [
    { "id": ########, "email": ####@#####.com},
    { "id": ########, "email": #####@####.com}
  ]
}
 
This is the message I'm getting back
 
{
"error": "ParameterMissing",
"description": "Parameter Both ids/external_ids and users attributes must be present is required"
}
 
I've even tried adding the external_id parameter but still get the same thing.  
 
Anyone have any ideas?
 
Thanks
Chris

 

2 replies

Jack23
April 5, 2022

Rest easy that your request body is fine @chris39, this is a problem with postman and the way you have your request set up and it's very simple to fix:

You're sending the request as text instead of JSON. 

You'll want to select JSON from this dropdown located in the body tab of your request. 

I hope this helps! 

Translate
Chris39Author
April 6, 2022

Awesome. Thanks Jack.  

I got it to work. Unfortunately I'm trying to update primary email address but looks like you can't do that with existing users.  But at least I know how to update users through API now.

 

 

Translate