Macros

List Macros

Lists all shared and personal macros available to the current user. For admins, the API returns all macros for the account, including the personal macros of agents and other admins.

Pagination

  • Cursor pagination (recommended)
  • Offset pagination

See Pagination.

Returns a maximum of 100 records per page.

Allowed For

  • Agents
get/api/v2/macros

Query parameters

includestring

A sideload to include in the response. See Sideloads

accessstring

Filter macros by access. Possible values are "personal", "agents", "shared", or "account". The "agents" value returns all personal macros for the account's agents and is only available to admins.

activeboolean

Filter by active macros if true or inactive macros if false

categoryinteger

Filter macros by category

group_idinteger

Filter macros by group

only_viewableboolean

If true, returns only macros that can be applied to tickets. If false, returns all macros the current user can manage. Default is false

sort_bystring

Possible values are "alphabetical", "created_at", "updated_at", "usage_1h", "usage_24h", "usage_7d", or "usage_30d". Defaults to alphabetical

sort_orderstring

One of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others

Response

Success Response

countinteger

the total record count

next_pagestring url nullable

the URL of the next page

previous_pagestring url nullable

the URL of the previous page

Example response

{
  "macros": [
    {
      "actions": [],
      "active": true,
      "description": "Sets the ticket status to `solved`",
      "id": 25,
      "position": 42,
      "restriction": {
        "id": 4,
        "type": "User"
      },
      "title": "Close and Save"
    }
  ]
}

Changes