Create, update, delete, and query Users in Zendesk.
Table Specific Information
SelectThe following queries are processed server side while other filters are processed client side within the driver.
SELECT * FROM Users SELECT * FROM Users WHERE Id = '123' SELECT * FROM Users WHERE Id IN ('123', '456') SELECT * FROM Users WHERE GroupId = '123' SELECT * FROM Users WHERE OrganizationId = '123' SELECT * FROM Users WHERE Role = 'agent' SELECT * FROM Users WHERE PermissionSet = 'roleid'
You can turn off the client-side execution of the query by setting SupportEnhancedSQL to false in which case any other search criteria will be ignored and an unfiltered response will be returned.
The Name field is required to insert. Allowed for agents, with restrictions on certain actions.
INSERT INTO Users(Name, Email) VALUES('Roger Wilco', 'firstname.lastname@example.org')
To insert multiple users, see Batch Processing for an example.
If you need to create agents with a specific role, the Role parameter only accepts three possible values: "end-user", "agent", and "admin". Therefore, set the Role to "agent" as well as add a new parameter called "custom_role_id" and give it the actual desired role Id from your Zendesk Support account. This applies to the built-in "light-agent" role of Zendesk Support as well.
INSERT INTO Users(Name, Email,Role,CustomRoleId) VALUES('Roger Wilco', 'email@example.com', 'agent', '123456')
The user can also be added to a named organization.
INSERT INTO Users(Name, Email,Organization) VALUES('Roger Wilco', 'firstname.lastname@example.org', 'VIP Customers')
You must specify the Id of the user to update. All fields that are not readonly (readonly="false" in the table) are optional. Allowed for agents, with restrictions on certain actions. Agents can only update end users. Administrators can update end users, agents, and administrators.
UPDATE Users SET Name='Roger Wilco II' WHERE Id='123'
To make the same change to multiple users, use the following SQL statement:
UPDATE Users SET OrganizationId='1' WHERE Id IN ('123','456')
To make different changes to multiple users, see Batch Processing for an example.
You must specify the Id of the user to delete it. Allowed for agents, with restrictions on certain actions.
DELETE FROM Users WHERE Id='123'
You can delete many tickets simultaneously by providing their Ids:
DELETE FROM Users WHERE Id IN ('123','456')
Automatically assigned when the ticket is created.
The primary email address of the user. Writeable on create only. On update, a secondary email is added.
The name of the user.
The role of the user. Possible values are end-user, agent, or admin.
False if the user has been deleted.
The id of the organization the user is associated with.
An alias displayed to end users.
If the identity of the user has been verified or not.
Whether or not the user is a chat-only agent.
The time the user was created.
The time the user was last updated.
A custom role if the user is an agent on the Enterprise plan.
The role id of the user. 0 for custom agents, 1 for light agent and 2 for chat agent.
The id of the default group of the user. Can only be set on create, not on update.
Any details you want to store about the user, such as an address.
A unique identifier from another system.
The last time the user signed in to Zendesk Support.
The locale of the user.
The language identifier of the user.
Designates whether the user has forum moderation capabilities.
Any notes you want to store about the user.
True if the user can only create private comments.
The primary phone number of the user.
If true, the attachment is excluded from the attachment list and the attachment's URL can be referenced within the comment of a ticket. Default is false.
If the agent has any restrictions; false for admins and unrestricted agents, true for other agents.
If the user is shared from a different Zendesk Support instance. Ticket sharing accounts only.
If the user is a shared agent from a different Zendesk Support instance. Ticket sharing accounts only.
The signature of the user. Only agents and admins can have signatures.
If the agent is suspended. Tickets from suspended users are also suspended, and these users cannot sign in to the end user portal.
The tags of the user. Only present if your account has user tagging enabled.
Specifies which tickets the user has access to. Possible values are: organization, groups, assigned, requested, null.
The time zone of the user.
If two factor authentication is enabled.
The API url of the user.
Pseudo column fields are used in the WHERE clause of SELECT statements and offer a more granular control over the tuples that are returned from the data source.
The name of the organization the user is associated with.
The name of the group the user belongs to.
Used for custom roles in the Enterprise plan. You can only filter by one role id per request.