Get Account ID (Zendesk Instance) Information | Community
Skip to main content

Get Account ID (Zendesk Instance) Information

  • November 17, 2021
  • 8 replies
  • 0 views

Rodrigo13

Hi, 

I'm building a third-party integration to be listed on Marketplace and I need a way to get the unique account ID (the Zendesk instance identification).

Which RESTful API can I get that?

Thanks.

8 replies

  • November 22, 2021
Hi Rodrigo!
 
Unfortunately, for security purposes, we don't have an API to retrieve Zendesk instance id's. However, if you needed account authorization for API purposes you could look into using OAuth or API tokens. Here's some getting started info on that [here](https://developer.zendesk.com/api-reference/ticketing/introduction/#security-and-authentication). 
 
Otherwise, if you're comfortable doing so, feel to share more about the integration and what it is you're trying to accomplish. I'd be more than happy to help you come up with a solution.
 
Best,
 
Erica - Dev Support

Rodrigo13
  • Author
  • November 23, 2021

Hi Erica,

I'm a third-party integration to be listed on Marketplace and installed in any account instance.

I need the account identification because they are tenants, and I need to identify them when I receive a webhook event.

Unfortunately, for security purposes, we don't have an API to retrieve Zendesk instance id's

Actually, you are sending the Account ID via Webhook event header:

X-Zendesk-Account-Id

And, recently, I figured out that the "/api/v2/audit_logs" endpoint contains the account ID info.
So this information is actually accessible but not easy to get.


The standard way to return such info is by querying the oAuth token details or using JWT to encode the token.


  • November 24, 2021
Hi Rodrigo,
 
I'm so sorry! I misunderstood which id you were looking to retrieve. Yes you do have access to the unique account id's for all users. 
 
I'm glad you were able to find the solution you needed. Great catch! We'll definitely take note of needing to make that more easily accessible.
 
Appreciate your contribution to the Community!
 
Best,
 
Erica - Dev Support
 
 

gurdeep
  • January 20, 2023

Hi is there any API availbale in zendesk to get account details by passing Account ID as a parameter?


Greg29
  • January 20, 2023

Hi Gurdeep!

I'm not aware of anything available like that, however we do have the account settings API for your specific instance. Could you tell me more about what you're looking to do so I can see if we can find another solution for you?


Elias13
  • January 27, 2025

Hello, after 4 years I have a similar issue as the initial poster, I would like to handle Zendesk support webhook events, ie https://developer.zendesk.com/api-reference/webhooks/event-types/agent-availability-events/#agent-unified-status-changed, that provide an account id

 

For my use case I want to build an integration to handle such events and need the zendesk account information (e.g. unique account ID and account name) in advance to setup handling for the events, so is there a way now to get this information via API now?

 

I found this API https://developer.zendesk.com/api-reference/sales-crm/resources/account/ however it is in the “Sales CRM” section, so not sure if the account ID from this API will be the same as the account ID from the Zendesk support webhooks? Could you please confirm if I can use this or if there is a different API to get Zendesk Support account details?


  • February 20, 2025

The X-Zendesk-Account-Id header from Zendesk webhook requests is practically useless if there is no reliable way to retrieve it elsewhere.


Hello,
 
Can you share how the Zendesk account admins will be installing the integration/adding the webhook?  There are a couple of ways they can supply the account name to the integration on installation.  And the account ID gets sent as a header on the outgoing request.