v1

latestOpenAPI 3.1.02026-07-24111290748.0 KB
Macros

List macros

get/api/macros

Query parameters

tagsstring[]
languagesstring[]
cursorstring
Example:cHJldl9fNl9fMjAyMS0wMy0wMyAwNjowMDowMA==

Value indicating your position in the list of all tags. If omitted, the first tags of the list will be returned.

limitinteger

Maximum number of tags to return.

message_idinteger nullable
Example:35893

Order macros by the most relevant ones to reply to the given message. When specified, order_by must be set to relevance and ticket_id is required.

order_by'name' | 'created_datetime' | 'updated_datetime' | 'usage' | 'relevance' | 'language' | 'name:asc' | 'name:desc' | 'created_datetime:asc' | 'created_datetime:desc' | 'updated_datetime:asc' | 'updated_datetime:desc' | 'usage:asc' | 'usage:desc' | 'relevance:asc' | 'relevance:desc' | 'language:asc' | 'language:desc'
Example:usage

Order macros by the given attribute. If relevance is specified, ticket_id parameter is required and macros will be ordered by the most relevant macros to reply to the given ticket. In this case, order_dir parameter will be ignored.<br>Values <span style={{color: 'red'}}>name, created_datetime, update_datetime, usage, relevance have been deprecated</span>. Use values with :asc or :desc instead.

searchstring nullable
Example:order

Filter macros containing the given search query.

ticket_idinteger nullable
Example:1482

Order macros by the most relevant ones to reply to the given ticket. When specified, order_by must be set to relevance.

number_predictionsinteger
Example:3

Number of relevant macros to return on top of the list.

archivedboolean nullable
Example:true

Filter macros that are archived. If True, only archived macros will be returned.

Response

A list of macros.

idinteger

ID of the macro.

external_idstring nullable

External ID of the macro in a foreign system. This field is not used by Gorgias, feel free to set it to your own value.

namestring

The name of the Macro. Tips: choose a name that can be easily searched.

intent'discount/request' | 'exchange/request' | 'exchange/status' | 'feedback' | 'order/damaged' | 'order/cancel' | 'order/change' | 'order/wrong' | 'other/no_reply' | 'other/question' | 'other/thanks' | 'product/recommendation' | 'product/question' | 'refund/request' | 'refund/status' | 'return/request' | 'return/status' | 'shipping/change' | 'shipping/delivery-issue' | 'shipping/policy' | 'shipping/status' | 'stock/request' | 'subscription/cancel' | 'subscription/change' nullable

The intention of the macro should be used for.

languagestring nullable

The language of the macro in ISO 639-1 format.

usageinteger

How many times the macro was applied on a ticket.

created_datetimestring date-time nullable

When the macro was created.

updated_datetimestring date-time nullable

When the macro was last updated.

archived_datetimestring date-time nullable

When the macro was archived.

uristring

URI of the macro

Example response

[
  {
    "id": 23453,
    "external_id": "CUS-324512",
    "name": "Order status inquiry",
    "intent": "discount/request",
    "language": "en",
    "usage": 58392,
    "actions": [
      {
        "arguments": {
          "tags": "question, order-status"
        },
        "name": "addTags",
        "title": "add tags",
        "type": "user"
      },
      {
        "arguments": {
          "body_html": "<div>Hi {{ticket.customer.firstname}},</div><br><div>Your order has been delivered.</div>",
          "body_text": "Hi {{ticket.customer.firstname}},\n\nYour order has been delivered."
        },
        "name": "setResponseText",
        "title": "add tags",
        "type": "user"
      }
    ],
    "created_datetime": "2019-11-23T15:59:41.966927",
    "updated_datetime": "2020-01-30T11:04:34.345123",
    "archived_datetime": "2019-11-23T15:59:41.966927"
  }
]