Search Macros

GET {{baseUrl}}/api/v2/macros/search?include=<string>&access=<string>&active=<boolean>&category=<integer>&group_id=<integer>&only_viewable=<boolean>&sort_by=<string>&sort_order=<string>&query=<string>

Pagination

  • Offset pagination only

See Using Offset Pagination.

Allowed For

  • Agents

Request Params

KeyDatatypeRequiredDescription
includestringA sideload to include in the response. See Sideloads
accessstringFilter macros by access. Possible values are "personal", "shared", or "account"
activestringFilter by active macros if true or inactive macros if false
categorystringFilter macros by category
group_idstringFilter macros by group
only_viewablestringIf true, returns only macros that can be applied to tickets. If false, returns all macros the current user can manage. Default is false
sort_bystringPossible values are alphabetical, "created_at", "updated_at", "usage_1h", "usage_24h", "usage_7d", or "usage_30d". Defaults to alphabetical
sort_orderstringOne of "asc" or "desc". Defaults to "asc" for alphabetical and position sort, "desc" for all others
querystring(Required) Query string used to find macros with matching titles

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{&quot;count&quot;:2,&quot;macros&quot;:[{&quot;actions&quot;:[],&quot;active&quot;:true,&quot;description&quot;:&quot;Sets the ticket status to `solved`&quot;,&quot;id&quot;:25,&quot;position&quot;:42,&quot;restriction&quot;:{},&quot;title&quot;:&quot;Close and Save&quot;},{&quot;actions&quot;:[],&quot;active&quot;:false,&quot;description&quot;:&quot;Adds a `priority` tag to the ticket&quot;,&quot;id&quot;:26,&quot;restriction&quot;:{},&quot;title&quot;:&quot;Assign priority tag&quot;}],&quot;next_page&quot;:null,&quot;previous_page&quot;:null}