Question

I'm creating new users through the Zendesk API. How do I control which brand the welcome email is sent from? 

Answer

There are two methods you can use to set which brand the welcome email comes from when creating new users with the API. 

Method 1: use your brand's subdomain instead of the main account when making your API requests.

Rather than creating users with your main subdomain, example:  https://yoursubdomain.zendesk.com/api/v2/users/, you can use the specific brand subdomain, example: https://yourbrandsubdomain.zendesk.com/api/v2/users. This ensures that users are created under that brand and so will receive that brand's welcome email. 

Method 2: use an attribute called active_brand_id 

In this method, the attribute defines which brand to assign the user when they are created. 

First, locate the brand ID you need. Use https://yoursubdomain.zendesk.com/api/v2/brands to look up the specific brand ID.

Then include this ID in your API call. Example: 

{"user":{"name":"Test User","role":"end-user","email":"testuser@example.com","active_brand_id":YOURBRANDIDHERE}}
Disclaimer: This article is provided for instructional purposes only. Zendesk does not support or guarantee the code. Post any issues you have in the comments section or with the Developer community for Zendesk APIs.
Powered by Zendesk