JSON Format

Bookmarks are represented as JSON objects with the following properties:

Name Type Read-only Mandatory Description
created_at string true false The time the bookmark was created
id integer true false Automatically assigned when the bookmark is created
ticket object true false
url string true false The API url of this bookmark

Example

{  "created_at": "2014-11-20T22:55:29Z",  "id": 35436,  "ticket": {    "description": "The fire is very colorful.",    "id": 60,    "priority": "high",    "requester_id": 156,    "subject": "Help, my printer is on fire!"  },  "url": "https://{subdomain}.zendesk.com/api/v2/bookmarks/35436.json"}

List Bookmarks

  • GET /api/v2/bookmarks

Allowed For

  • Agents

Using curl

curl https://{subdomain}.zendesk.com/api/v2/bookmarks.json \  -v -u {email_address}:{password}

Example Response

Status 200 OK
{  "bookmarks": [    {      "created_at": "2020-10-01T08:33:45Z",      "id": 900000009567,      "ticket": {        "id": 123,        "priority": "high",        "raw_subject": "Chat with Visitor 19785128",        "requester_id": 165,        "subject": "Chat with Visitor 19785128",        "url": "https://{subdomain}.zendesk.com/api/v2/tickets/123.json"      },      "url": "https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001111.json"    },    {      "created_at": "2020-09-11T10:22:45Z",      "id": 900000009568,      "ticket": {        "id": 123,        "priority": "high",        "raw_subject": "Chat with Visitor 19785128",        "requester_id": 156,        "subject": "Chat with Visitor 19785128",        "url": "https://{subdomain}.zendesk.com/api/v2/tickets/123.json"      },      "url": "https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001112.json"    }  ],  "count": 1,  "next_page": null,  "previous_page": null}

Create Bookmark

  • POST /api/v2/bookmarks

Allowed For

  • Agents

Example Body

{  "bookmark": {    "ticket_id": 113  }}

Using curl

curl https://{subdomain}.zendesk.com/api/v2/bookmarks.json \  -H "Content-Type: application/json" -X POST -d '{"bookmark": {"ticket_id": 123}}' \  -v -u {email_address}:{password}

Example Response

Status 200 OK
{  "bookmark": {    "created_at": "2020-10-01T08:33:45Z",    "id": 900000009567,    "ticket": {      "id": 123,      "priority": "high",      "raw_subject": "Chat with Visitor 19785128",      "requester_id": 156,      "subject": "Chat with Visitor 19785128",      "url": "https://{subdomain}.zendesk.com/api/v2/tickets/123.json"    },    "url": "https://{subdomain}.zendesk.com/api/v2/bookmarks/900000001111.json"  }}

Delete Bookmark

  • DELETE /api/v2/bookmarks/{bookmark_id}

Allowed For

  • Agents (own bookmarks only)

If the bookmark already exists with a specified ticket id, the response status will be http Status: 200 OK.

Parameters

Name Type In Required Description
bookmark_id integer Path true The ID of the bookmark

Using curl

curl https://{subdomain}.zendesk.com/api/v2/bookmarks/{bookmark_id}.json \  -X DELETE -v -u {email_address}:{password}

Example Response

Status 204 No Content