Zendesk Support accounts on the Enterprise plan or above can provide more granular access to their agents by defining custom agent roles. For more information, see Creating custom roles and assigning agents in the Support Help Center.

JSON format

Custom Agent Roles are represented as JSON objects with the following properties:

NameTypeRead-onlyMandatoryDescription
configurationobjectfalsefalseConfiguration settings for the role. See Configuration
created_atstringtruefalseThe time the record was created
descriptionstringfalsefalseA description of the role
idintegertruefalseAutomatically assigned on creation
namestringfalsetrueName of the custom role
role_typeintegertruetrueThe user's role. 0 stands for a custom agent, 1 for a light agent, 2 for a chat agent, 3 for a contributor, 4 for an admin and 5 for a billing admin. See Understanding standard agent roles in Zendesk Support in Zendesk help
team_member_countintegertruefalseThe number of team members assigned to this role
updated_atstringtruefalseThe time the record was last updated

Configuration

The configuration object has the following properties, which are all optional.

NameTypeRead-onlyComment
assign_tickets_to_any_groupbooleannoWhether or not the agent can assign tickets to any group
chat_accessbooleanyesWhether or not the agent has access to Chat
custom_objectsobjectnoA list of custom object keys mapped to JSON objects that define the agent's permissions (scopes) for each object. Allowed values: "read", "update", "delete", "create". The "read" permission is required if any other scopes are specified. Example: { "shipment": { "scopes": ["read", "update"] } }
end_user_list_accessstringnoWhether or not the agent can view lists of user profiles. Allowed values: "full", "none"
end_user_profile_accessstringnoWhat the agent can do with end-user profiles. Allowed values: "edit", "edit-within-org", "full", "readonly"
explore_accessstringnoAllowed values: "edit", "full", "none", "readonly"
forum_accessstringnoThe kind of access the agent has to Guide. Allowed values: "edit-topics", "full", "readonly"
forum_access_restricted_contentbooleanno
group_accessbooleanyesWhether or not the agent can add or modify groups
light_agentbooleanyes
macro_accessstringnoWhat the agent can do with macros. Allowed values: "full", "manage-group", "manage-personal", "readonly"
manage_automationsbooleannoWhether or not the agent can create and manage automations
manage_business_rulesbooleannoWhether or not the agent can create and manage schedules and view rules analysis
manage_contextual_workspacesbooleannoWhether or not the agent can view, add, and edit contextual workspaces
manage_dynamic_contentbooleannoWhether or not the agent can access dynamic content
manage_extensions_and_channelsbooleannoWhether or not the agent can manage channels and extensions
manage_facebookbooleannoWhether or not the agent can manage facebook pages
manage_group_membershipsbooleannoWhether or not the agent can create and manage group memberships
manage_groupsbooleannoWhether or not the agent can create and modify groups
manage_organization_fieldsbooleannoWhether or not the agent can create and manage organization fields
manage_organizationsbooleannoWhether or not the agent can create and modify organizations
manage_rolesstringnoWhether or not the agent can create and manage custom roles with the exception of the role they're currently assigned. Doesn't allow agents to update role assignments for other agents. Allowed values: "all-except-self", "none"
manage_skillsbooleannoWhether or not the agent can create and manage skills
manage_slasbooleannoWhether or not the agent can create and manage SLAs
manage_suspended_ticketsbooleannoWhether or not the agent can manage suspended tickets
manage_team_membersstringnoWhether or not the agent can manage team members. Allows agents to update role assignments for other agents. Allowed values: "all-with-self-restriction", "readonly", "none"
manage_ticket_fieldsbooleannoWhether or not the agent can create and manage ticket fields
manage_ticket_formsbooleannoWhether or not the agent can create and manage ticket forms
manage_triggersbooleannoWhether or not the agent can create and manage triggers
manage_user_fieldsbooleannoWhether or not the agent can create and manage user fields
moderate_forumsbooleanyes
organization_editingbooleannoWhether or not the agent can add or modify organizations
organization_notes_editingbooleanyesWhether or not the agent can add or modify organization notes
report_accessstringnoWhat the agent can do with reports. Allowed values: "full", "none", "readonly"
side_conversation_createbooleannoWhether or not the agent can contribute to side conversations
ticket_accessstringnoWhat kind of tickets the agent can access. Allowed values: "all", "assigned-only", "within-groups", "within-groups-and-public-groups", "within-organization"
ticket_comment_accessstringnoWhat type of comments the agent can make. Allowed values: "public", "none"
ticket_deletionbooleannoWhether or not the agent can delete tickets
ticket_editingbooleannoWhether or not the agent can edit ticket properties
ticket_mergebooleannoWhether or not the agent can merge tickets
ticket_redactionbooleannoWhether or not the agent can redact content from tickets. Only applicable to tickets permitted by ticket_access
ticket_tag_editingbooleannoWhether or not the agent can edit ticket tags
twitter_search_accessbooleanno
user_view_accessstringnoWhat the agent can do with customer lists. Allowed values: "full", "manage-group", "manage-personal", "none", "readonly"
view_accessstringnoWhat the agent can do with views. Allowed values: "full", "manage-group", "manage-personal", "playonly", "readonly"
view_deleted_ticketsbooleannoWhether or not the agent can view deleted tickets
voice_accessbooleannoWhether or not the agent can answer and place calls to end users
voice_dashboard_accessbooleannoWhether or not the agent can view details about calls on the Talk dashboard

Example

{  "id":           35436,  "name":         "Partner",  "description":  "Can only make private comments on assigned tickets",  "created_at":   "2012-02-20T22:55:29Z",  "updated_at":   "2012-02-20T22:55:29Z",  "configuration": {    "assign_tickets_to_any_group":     false,    "chat_access":                     true,    "custom_objects": {      "shipment": {        "scopes": ["read", "update", "delete", "create"]      },      "product": {        "scopes": ["read"]      }    },    "end_user_profile_access":         "readonly",    "explore_access":                  "edit",    "forum_access":                    "readonly",    "forum_access_restricted_content": false,    "light_agent":                     false,    "macro_access":                    "full",    "manage_automations":              true,    "manage_business_rules":           true,    "manage_contextual_workspaces":    false,    "manage_dynamic_content":          false,    "manage_extensions_and_channels":  true,    "manage_facebook":                 false,    "manage_group_memberships":        false,    "manage_groups":                   false,    "manage_organization_fields":      false,    "manage_organizations":            false,    "manage_roles":                    "none",    "manage_skills":                   false,    "manage_slas":                     false,    "manage_suspended_tickets":        false,    "manage_team_members":             "none",    "manage_ticket_fields":            false,    "manage_ticket_forms":             false,    "manage_triggers":                 true,    "manage_user_fields":              false,    "organization_editing":            false,    "organization_notes_editing":      false,    "report_access":                   "none",    "side_conversation_create":        true,    "ticket_access":                   "within-groups",    "ticket_comment_access":           "none",    "ticket_deletion":                 false,    "ticket_redaction":                true,    "view_deleted_tickets":            false,    "ticket_editing":                  true,    "ticket_merge":                    false,    "ticket_tag_editing":              true,    "twitter_search_access":           true,    "view_access":                     "full",    "voice_access":                    true,    "voice_dashboard_access":          false  }}

List Custom Roles

  • GET /api/v2/custom_roles

Availability

  • Accounts on the Enterprise plan or above

Allowed For

  • Agents

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/custom_roles.json \  -v -u {email_address}:{password}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_roles"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_roles")		.newBuilder();
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://example.zendesk.com/api/v2/custom_roles',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_roles"headers = {	"Content-Type": "application/json",}
response = requests.request(	"GET",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_roles")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "custom_roles": [    {      "configuration": {        "assign_tickets_to_any_group": false,        "chat_access": true,        "end_user_list_access": "full",        "end_user_profile_access": "readonly",        "explore_access": "edit",        "forum_access": "readonly",        "forum_access_restricted_content": false,        "group_access": true,        "light_agent": false,        "macro_access": "full",        "manage_business_rules": true,        "manage_contextual_workspaces": false,        "manage_dynamic_content": false,        "manage_extensions_and_channels": true,        "manage_facebook": false,        "manage_organization_fields": false,        "manage_ticket_fields": false,        "manage_ticket_forms": false,        "manage_user_fields": false,        "moderate_forums": false,        "organization_editing": false,        "organization_notes_editing": false,        "report_access": "none",        "side_conversation_create": true,        "ticket_access": "within-groups",        "ticket_comment_access": "none",        "ticket_deletion": false,        "ticket_editing": true,        "ticket_merge": false,        "ticket_tag_editing": true,        "twitter_search_access": true,        "user_view_access": "readonly",        "view_access": "full",        "view_deleted_tickets": false,        "voice_access": true,        "voice_dashboard_access": false      },      "created_at": "2012-03-12T16:32:22Z",      "description": "Advisors manage the workflow and configure the help desk. They create or manage automations, macros, triggers, views, and SLA targets. They also set up channels and extensions. Advisors don't solve tickets, they can only make private comments.",      "id": 16,      "name": "Advisor",      "role_type": 0,      "team_member_count": 10,      "updated_at": "2012-03-12T16:32:22Z"    },    {      "configuration": {        "assign_tickets_to_any_group": false,        "chat_access": true,        "end_user_list_access": "full",        "end_user_profile_access": "readonly",        "explore_access": "edit",        "forum_access": "readonly",        "forum_access_restricted_content": false,        "group_access": true,        "light_agent": false,        "macro_access": "full",        "manage_business_rules": true,        "manage_contextual_workspaces": false,        "manage_dynamic_content": false,        "manage_extensions_and_channels": true,        "manage_facebook": false,        "manage_organization_fields": false,        "manage_ticket_fields": false,        "manage_ticket_forms": false,        "manage_user_fields": false,        "moderate_forums": false,        "organization_editing": false,        "organization_notes_editing": false,        "report_access": "none",        "side_conversation_create": true,        "ticket_access": "within-groups",        "ticket_comment_access": "none",        "ticket_deletion": false,        "ticket_editing": true,        "ticket_merge": false,        "ticket_tag_editing": true,        "twitter_search_access": true,        "user_view_access": "readonly",        "view_access": "full",        "view_deleted_tickets": false,        "voice_access": true,        "voice_dashboard_access": false      },      "created_at": "2011-07-20T04:31:29Z",      "description": "A Staff agent's primary role is to solve tickets. They can edit tickets within their groups, view reports, and add or edit personal views and macros.",      "id": 6,      "name": "Staff",      "role_type": 0,      "team_member_count": 10,      "updated_at": "2012-02-02T10:32:59Z"    }  ]}

Show Custom Role

  • GET /api/v2/custom_roles/{custom_role_id}

Availability

  • Accounts on the Enterprise plan or above

Allowed for

  • Administrators
  • Agents with the manage_roles permission

Parameters

NameTypeInRequiredDescription
custom_role_idintegerPathtrueThe ID of the custom agent role

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/custom_roles/{custom_role_id}.json \  -v -u {email_address}:{password}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_roles/10127"	method := "GET"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_roles/10127")		.newBuilder();
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("GET", null)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'GET',  url: 'https://example.zendesk.com/api/v2/custom_roles/10127',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_roles/10127"headers = {	"Content-Type": "application/json",}
response = requests.request(	"GET",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_roles/10127")request = Net::HTTP::Get.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "custom_role": {    "configuration": {      "assign_tickets_to_any_group": false,      "chat_access": true,      "end_user_list_access": "full",      "end_user_profile_access": "readonly",      "explore_access": "edit",      "forum_access": "readonly",      "forum_access_restricted_content": false,      "group_access": true,      "light_agent": false,      "macro_access": "full",      "manage_business_rules": true,      "manage_contextual_workspaces": false,      "manage_dynamic_content": false,      "manage_extensions_and_channels": true,      "manage_facebook": false,      "manage_organization_fields": false,      "manage_ticket_fields": false,      "manage_ticket_forms": false,      "manage_user_fields": false,      "moderate_forums": false,      "organization_editing": false,      "organization_notes_editing": false,      "report_access": "none",      "side_conversation_create": true,      "ticket_access": "within-groups",      "ticket_comment_access": "none",      "ticket_deletion": false,      "ticket_editing": true,      "ticket_merge": false,      "ticket_tag_editing": true,      "twitter_search_access": true,      "user_view_access": "readonly",      "view_access": "full",      "view_deleted_tickets": false,      "voice_access": true,      "voice_dashboard_access": false    },    "created_at": "2012-03-12T16:32:22Z",    "description": "sample description",    "id": 10127,    "name": "sample role",    "role_type": 0,    "team_member_count": 10,    "updated_at": "2012-03-12T16:32:22Z"  }}

Create Custom Role

  • POST /api/v2/custom_roles

Availability

  • Accounts on the Enterprise plan or above

Allowed for

  • Administrators
  • Agents with the manage_roles permission

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/custom_roles.json \  -v -u {email_address}:{password}
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_roles"	method := "POST"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_roles")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""""");
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("POST", body)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'POST',  url: 'https://example.zendesk.com/api/v2/custom_roles',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_roles"headers = {	"Content-Type": "application/json",}
response = requests.request(	"POST",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_roles")request = Net::HTTP::Post.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "custom_role": {    "configuration": {      "assign_tickets_to_any_group": false,      "chat_access": true,      "end_user_list_access": "full",      "end_user_profile_access": "readonly",      "explore_access": "edit",      "forum_access": "readonly",      "forum_access_restricted_content": false,      "group_access": true,      "light_agent": false,      "macro_access": "full",      "manage_business_rules": true,      "manage_contextual_workspaces": false,      "manage_dynamic_content": false,      "manage_extensions_and_channels": true,      "manage_facebook": false,      "manage_organization_fields": false,      "manage_ticket_fields": false,      "manage_ticket_forms": false,      "manage_user_fields": false,      "moderate_forums": false,      "organization_editing": false,      "organization_notes_editing": false,      "report_access": "none",      "side_conversation_create": true,      "ticket_access": "within-groups",      "ticket_comment_access": "none",      "ticket_deletion": false,      "ticket_editing": true,      "ticket_merge": false,      "ticket_tag_editing": true,      "twitter_search_access": true,      "user_view_access": "readonly",      "view_access": "full",      "view_deleted_tickets": false,      "voice_access": true,      "voice_dashboard_access": false    },    "created_at": "2012-03-12T16:32:22Z",    "description": "sample description",    "id": 10127,    "name": "sample role",    "role_type": 0,    "team_member_count": 10,    "updated_at": "2012-03-12T16:32:22Z"  }}

Update Custom Role

  • PUT /api/v2/custom_roles/{custom_role_id}

Availability

  • Accounts on the Enterprise plan or above

Allowed for

  • Administrators

Agents with the manage_roles permission

Parameters

NameTypeInRequiredDescription
custom_role_idintegerPathtrueThe ID of the custom agent role

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/custom_roles/{custom_role_id}.json \  -v -u {email_address}:{password} \  -H "Content-Type: application/json" \  -X PUT \  -d '{ "custom_role": {    "name": "updated sample role",    "description": "sample description",    "configuration": {      "chat_access": true,      "user_view_access": "readonly"    }  }}'
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_roles/10127"	method := "PUT"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println(err)		return	}	fmt.Println(string(body))}
Java
import com.squareup.okhttp.*;OkHttpClient client = new OkHttpClient();HttpUrl.Builder urlBuilder = HttpUrl.parse("https://example.zendesk.com/api/v2/custom_roles/10127")		.newBuilder();RequestBody body = RequestBody.create(MediaType.parse("application/json"),		"""""");
Request request = new Request.Builder()		.url(urlBuilder.build())		.method("PUT", body)		.addHeader("Content-Type", "application/json")		.addHeader("Authorization", Credentials.basic("your-email", "your-password"))		.build();Response response = client.newCall(request).execute();
Nodejs
var axios = require('axios');
var config = {  method: 'PUT',  url: 'https://example.zendesk.com/api/v2/custom_roles/10127',  headers: {	'Content-Type': 'application/json',	'Authorization': 'Basic <auth-value>', // Base64 encoded "username:password"  },};
axios(config).then(function (response) {  console.log(JSON.stringify(response.data));}).catch(function (error) {  console.log(error);});
Python
import requests
url = "https://example.zendesk.com/api/v2/custom_roles/10127"headers = {	"Content-Type": "application/json",}
response = requests.request(	"PUT",	url,	auth=('<username>', '<password>'),	headers=headers)
print(response.text)
Ruby
require "net/http"uri = URI("https://example.zendesk.com/api/v2/custom_roles/10127")request = Net::HTTP::Put.new(uri, "Content-Type": "application/json")request.basic_auth "username", "password"response = Net::HTTP.start uri.hostname, uri.port, use_ssl: true do |http|	http.request(request)end

Example response(s)

200 OK
// Status 200 OK
{  "custom_role": {    "configuration": {      "assign_tickets_to_any_group": false,      "chat_access": true,      "end_user_list_access": "full",      "end_user_profile_access": "readonly",      "explore_access": "edit",      "forum_access": "readonly",      "forum_access_restricted_content": false,      "group_access": true,      "light_agent": false,      "macro_access": "full",      "manage_business_rules": true,      "manage_contextual_workspaces": false,      "manage_dynamic_content": false,      "manage_extensions_and_channels": true,      "manage_facebook": false,      "manage_organization_fields": false,      "manage_ticket_fields": false,      "manage_ticket_forms": false,      "manage_user_fields": false,      "moderate_forums": false,      "organization_editing": false,      "organization_notes_editing": false,      "report_access": "none",      "side_conversation_create": true,      "ticket_access": "within-groups",      "ticket_comment_access": "none",      "ticket_deletion": false,      "ticket_editing": true,      "ticket_merge": false,      "ticket_tag_editing": true,      "twitter_search_access": true,      "user_view_access": "readonly",      "view_access": "full",      "view_deleted_tickets": false,      "voice_access": true,      "voice_dashboard_access": false    },    "created_at": "2012-03-12T16:32:22Z",    "description": "sample description",    "id": 10127,    "name": "sample role",    "role_type": 0,    "team_member_count": 10,    "updated_at": "2012-03-12T16:32:22Z"  }}

Delete Custom Role

  • DELETE /api/v2/custom_roles/{custom_role_id}

Availability

  • Accounts on the Enterprise plan or above

Allowed for

  • Administrators
  • Agents with the manage_roles permission

Parameters

NameTypeInRequiredDescription
custom_role_idintegerPathtrueThe ID of the custom agent role

Code Samples

curl
curl https://{subdomain}.zendesk.com/api/v2/custom_roles/{custom_role_id}.json \  -v -u {email_address}:{password} \  -X DELETE
Go
import (	"fmt"	"io"	"net/http")
func main() {	url := "https://example.zendesk.com/api/v2/custom_roles/10127"	method := "DELETE"	req, err := http.NewRequest(method, url, nil)
	if err != nil {		fmt.Println(err)		return	}	req.Header.Add("Content-Type", "application/json")	req.Header.Add("Authorization", "Basic <auth-value>") // Base64 encoded "username:password"
	client := &http.Client {}	res, err := client.Do(req)	if err != nil {		fmt.Println(err)		return	}	defer res.Body.Close()
	body, err := io.ReadAll(res.Body)	if err != nil {		fmt.Println