Zendesk Macros API

The Macros API from Zendesk — 15 operation(s) for macros.

Business capability
Customer Service Management BC-430

Operations 19

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /api/v2/macros/{macro_id}/attachments List the attachments on a macro · Zendesk Get Api V2 Macros Macro_id Attachments #
Ask an LLM
“Which files are attached to one of my Zendesk macros?”
“Can I see the attachments a specific macro sends with its reply?”
Tell an agent
Show me the files attached to this macro.
List every attachment linked to the macro I'm editing.
POST /api/v2/macros/{macro_id}/attachments Upload an attachment directly to a macro · Zendesk Post Api V2 Macros Macro_id Attachments #
Ask an LLM
“Can I upload a file and attach it to an existing macro in one step?”
“What's the limit on how many attachments one macro can carry?”
Tell an agent
Upload this file and attach it straight to the macro I'm working on.
Add a new attachment to an existing macro in a single upload.
POST /api/v2/macros/attachments Upload a macro attachment to link later · Zendesk Post Api V2 Macros Attachments #
Ask an LLM
“Can I upload a macro attachment now and link it to a macro later?”
“What happens to uploaded macro attachments that never get linked to a macro?”
Tell an agent
Upload this file as a standalone macro attachment I'll link to a macro afterwards.
Stage an unlinked macro attachment upload for a macro I haven't created yet.
GET /api/v2/macros/attachments/{attachment_id} Get details of a macro attachment · Zendesk Get Api V2 Macros Attachments Attachment_id #
Ask an LLM
“What properties does a single macro attachment have, like its file name and size?”
“How can I look up one macro attachment by its id?”
Tell an agent
Show the details of this macro attachment.
Get the file name, size and URL of one specific macro attachment.
GET /api/v2/macros List all macros available to me · Zendesk Get Api V2 Macros #
Ask an LLM
“How do I get every shared and personal macro in my Zendesk account?”
“Do admins see other agents' personal macros when listing macros?”
Tell an agent
List all the macros I have access to, active or not.
Pull the full macro list for the account, including personal macros.
POST /api/v2/macros Create a macro · Zendesk Post Api V2 Macros #
Ask an LLM
“Can I create a new canned-response macro through the API?”
“What goes into a macro definition when I create one?”
Tell an agent
Create a new macro from this definition: {macro}.
Add a macro that sets status to pending and posts a reply.
GET /api/v2/macros/{macro_id} Get a single macro · Zendesk Get Api V2 Macros Macro_id #
Ask an LLM
“How can I see the actions and settings of one specific macro?”
“Where do I find a macro's title, actions and restrictions by id?”
Tell an agent
Show me the macro with this id and its actions.
Fetch the full definition of one macro.
PUT /api/v2/macros/{macro_id} Update a macro · Zendesk Put Api V2 Macros Macro_id #
Ask an LLM
“Can I change the actions or title of a macro I already created?”
“Is it possible to deactivate one existing macro via the API?”
Tell an agent
Update this existing macro with {macro}.
Rename one of my macros and change what it does.
DELETE /api/v2/macros/{macro_id} Delete a macro · Zendesk Delete Api V2 Macros Macro_id #
Ask an LLM
“Can I permanently remove a single macro I no longer use?”
“Are there restrictions on which agents can delete a macro?”
Tell an agent destructive · confirm first
Delete this one macro.
Remove the outdated macro from the account.
GET /api/v2/macros/{macro_id}/apply Preview the field changes a macro makes · Zendesk Get Api V2 Macros Macro_id Apply #
Ask an LLM
“What would a macro change on a ticket, without actually applying it?”
“Can I get just the ticket fields a macro would set?”
Tell an agent
Show me the changes this macro would make, without touching any ticket.
Preview only the field updates a macro produces.
GET /api/v2/macros/actions List the actions macros support · Zendesk Get Api V2 Macros Actions #
Ask an LLM
“Which actions are available to use inside Zendesk macros?”
“What kinds of things can a macro do to a ticket?”
Tell an agent
List the supported macro actions.
Show all the action types I can put in a macro.
GET /api/v2/macros/active List active macros · Zendesk Get Api V2 Macros Active #
Ask an LLM
“How do I see only the macros that are currently active?”
“Which of my shared and personal macros are switched on right now?”
Tell an agent
List only the active macros available to me.
Show the macros agents can currently apply, skipping inactive ones.
GET /api/v2/macros/categories List macro categories · Zendesk Get Api V2 Macros Categories #
Ask an LLM
“What categories are my macros organized into?”
“Can I get the list of macro categories I have access to?”
Tell an agent
List all macro categories.
Show the categories used to group macros.
GET /api/v2/macros/definitions Get definitions of macro actions · Zendesk Get Api V2 Macros Definitions #
Ask an LLM
“What values can each macro action take, like the options for setting status?”
“Where do I find the title, type and allowed values of each macro action?”
Tell an agent
Get the definitions of every action a macro can perform.
Show the allowed values for each macro action type.
DELETE /api/v2/macros/destroy_many Delete several macros at once · Zendesk Delete Api V2 Macros Destroy_many #
Ask an LLM
“Can I bulk delete a batch of macros in a single request?”
“Is there a way to remove many macros by id at the same time?”
Tell an agent destructive · confirm first
Delete the macros with ids {ids}.
Bulk remove these macros: {ids}.
GET /api/v2/macros/new Build an unsaved macro from a ticket · Zendesk Get Api V2 Macros New #
Ask an LLM
“Can I generate a macro draft based on an existing ticket?”
“How can I turn what's on a ticket into a macro replica without saving it?”
Tell an agent
Build an unsaved macro replica from ticket {ticket_id}.
Derive a draft macro from the fields on ticket {ticket_id}.
GET /api/v2/macros/search Search macros · Zendesk Get Api V2 Macros Search #
Ask an LLM
“Can I search my macros by title to find the right one?”
“Is macro search paginated by offset only?”
Tell an agent
Search my macros for ones about refunds.
Find macros whose title matches a keyword.
PUT /api/v2/macros/update_many Update several macros at once · Zendesk Put Api V2 Macros Update_many #
Ask an LLM
“Can I change the position or active state of many macros in one call?”
“Is there a bulk update for macros?”
Tell an agent
Bulk update these macros with the changes I list.
Deactivate a batch of macros in a single request.
GET /api/v2/tickets/{ticket_id}/macros/{macro_id}/apply Preview a ticket after applying a macro · Zendesk Get Api V2 Tickets Ticket_id Macros Macro_id Apply #
Ask an LLM
“What would the whole ticket look like after a macro is applied to it?”
“Can I preview a macro on a real ticket without changing it?”
Tell an agent
Show ticket {ticket_id} as it would look after applying this macro.
Preview the full ticket object for {ticket_id} with the macro applied, without saving.

Documentation

📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/introduction/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/targets/targets/
📖
Documentation
https://developer.zendesk.com/api-reference/sales-crm/resources/account/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/activity_stream/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/channel_framework/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/audit_logs/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organizations/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/automations/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/bookmarks/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/brand_agents/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/brands/
📖
Documentation
https://developer.zendesk.com/api-reference/live-chat/chat-api/chats/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/
📖
Documentation
https://developer.zendesk.com/api-reference/custom-data/introduction/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/custom_roles/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/custom_ticket_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/users/users/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/deletion_schedules/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/dynamic_content/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/email_notifications/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/groups/group_memberships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/group_sla_policies/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/groups/groups/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_import/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/incremental_exports/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/job_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/locales/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/macros/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/oauth/oauth_tokens/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_fields/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_memberships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/organizations/organization_subscriptions/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/push_notification_devices/
📖
Documentation
https://developer.zendesk.com/api-reference/agent-availability/omnichannel_routing_queues/omnichannel_routing_queues/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/support_addresses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/lookup_relationships/lookup_relationships/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket-requests/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/resource_collections/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/skill_based_routing/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_ratings/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/satisfaction_reasons/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/account-configuration/sessions/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/sharing_agreements/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_skips/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/sla_policies/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/suspended_tickets/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/tags/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_audits/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_fields/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_form_statuses/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_forms/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_metrics/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/triggers/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/business-rules/views/
📖
Documentation
https://developer.zendesk.com/api-reference/ticketing/ticket-management/workspaces/

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/zendesk:zendesk-macros-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

zendesk-macros-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Zendesk Macros API
  version: '1.0'
  description: 'Operations tagged Macros across 4 of this provider''s published API definitions: attachments-openapi-original.yml, macros-openapi-original.yml, search-openapi-original.yml, tickets-openapi-original.yml. Each path carries the servers of the definition it was published in.'
tags:
- name: Macros
paths:
  /api/v2/macros/{macro_id}/attachments:
    parameters:
    - $ref: '#/components/parameters/MacroId'
    get:
      operationId: ListMacroAttachments
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Macro_id Attachments
      description: 'Lists the attachments associated with a macro.


        #### Allowed For

        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroAttachmentsResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroAttachmentsResponseExample'
    post:
      operationId: CreateAssociatedMacroAttachment
      tags:
      - Macros
      summary: Zendesk Post Api V2 Macros Macro_id Attachments
      description: 'Allows an attachment to be uploaded and associated with a macro at the same time.


        **Note:** A macro can be associated with up to five attachments.


        #### Allowed For


        * Agents'
      responses:
        '201':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroAttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroAttachmentResponseExample'
  /api/v2/macros/attachments:
    post:
      operationId: CreateMacroAttachment
      tags:
      - Macros
      summary: Zendesk Post Api V2 Macros Attachments
      description: 'Allows an attachment to be uploaded that can be associated with a macro at a later time.


        **Note:** To ensure an uploaded attachment is not lost, associate it with a macro as soon as possible. From time to time, old attachments that are not not associated with any macro are purged.


        #### Allowed For


        * Agents'
      responses:
        '201':
          description: Created Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroAttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroAttachmentResponseExample'
  /api/v2/macros/attachments/{attachment_id}:
    parameters:
    - $ref: '#/components/parameters/AttachmentId'
    get:
      operationId: ShowMacroAttachment
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Attachments Attachment_id
      description: 'Shows the properties of the specified macro attachment.


        #### Allowed For

        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroAttachmentResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroAttachmentResponseExample'
  /api/v2/macros:
    get:
      operationId: ListMacros
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros
      description: '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'
      parameters:
      - $ref: '#/components/parameters/MacroInclude'
      - $ref: '#/components/parameters/MacroAccess'
      - $ref: '#/components/parameters/MacroActive'
      - $ref: '#/components/parameters/MacroCategory'
      - $ref: '#/components/parameters/MacroGroupId'
      - $ref: '#/components/parameters/MacroOnlyViewable'
      - $ref: '#/components/parameters/MacroSortBy'
      - $ref: '#/components/parameters/MacroSortOrder'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacrosResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacrosResponseExample'
    post:
      operationId: CreateMacro
      tags:
      - Macros
      summary: Zendesk Post Api V2 Macros
      description: '#### Allowed For

        * Agents'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                macro:
                  $ref: '#/components/schemas/MacroInput'
            examples:
              default:
                value:
                  macro:
                    actions:
                    - field: status
                      value: solved
                    title: Roger Wilco
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  macro:
                    $ref: '#/components/schemas/MacroObject'
              examples:
                default:
                  $ref: '#/components/examples/CreateMacroResponseExample'
  /api/v2/macros/{macro_id}:
    parameters:
    - $ref: '#/components/parameters/MacroId'
    get:
      operationId: ShowMacro
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Macro_id
      description: '#### Allowed For

        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroResponseExample'
    put:
      operationId: UpdateMacro
      tags:
      - Macros
      summary: Zendesk Put Api V2 Macros Macro_id
      description: '#### Allowed For

        * Agents'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                macro:
                  $ref: '#/components/schemas/MacroInput'
            examples:
              default:
                value:
                  macro:
                    actions:
                    - field: status
                      value: solved
                    title: Sets the ticket status to `solved`
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  macro:
                    $ref: '#/components/schemas/MacroObject'
              examples:
                default:
                  $ref: '#/components/examples/UpdateMacroResponseExample'
    delete:
      operationId: DeleteMacro
      tags:
      - Macros
      summary: Zendesk Delete Api V2 Macros Macro_id
      description: '#### Allowed For

        * Agents, with restrictions applying on certain actions'
      responses:
        '204':
          description: No Content
  /api/v2/macros/{macro_id}/apply:
    parameters:
    - $ref: '#/components/parameters/MacroId'
    get:
      operationId: ShowChangesToTicket
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Macro_id Apply
      description: 'Returns the changes the macro would make to a ticket. It doesn''t actually

        change a ticket. You can use the response data in a subsequent API call

        to the Tickets endpoint to update the ticket.


        The response includes only the ticket fields that would be changed by the

        macro. To get the full ticket object after the macro is applied,

        see Show Ticket After Changes.


        #### Allowed For

        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroApplyTicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroChangesToTicketsResponseExample'
  /api/v2/macros/actions:
    get:
      operationId: ListMacrosActions
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Actions
      description: '#### Allowed For

        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  actions:
                    type: array
                    items:
                      type: object
                      additionalProperties: true
              examples:
                default:
                  $ref: '#/components/examples/MacroActionsResponseExample'
  /api/v2/macros/active:
    get:
      operationId: ListActiveMacros
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Active
      description: 'Lists all active shared and personal macros available to the current user.


        #### Allowed For

        * Agents'
      parameters:
      - $ref: '#/components/parameters/MacroInclude'
      - $ref: '#/components/parameters/MacroAccess'
      - $ref: '#/components/parameters/MacroCategory'
      - $ref: '#/components/parameters/MacroGroupId'
      - $ref: '#/components/parameters/MacroSortBy'
      - $ref: '#/components/parameters/MacroSortOrder'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacrosResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacrosResponseExample'
  /api/v2/macros/categories:
    get:
      operationId: ListMacroCategories
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Categories
      description: 'Lists all macro categories available to the current user.


        #### Allowed For

        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroCategoriesResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroCategoriesResponseExample'
  /api/v2/macros/definitions:
    get:
      operationId: ListMacroActionDefinitions
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Definitions
      description: 'Returns the definitions of the actions a macro can perform. For example,

        one action can set the status of a ticket. The definition of the action

        includes a title ("Status"), a type ("list"), and possible values. For a

        list of support actions, see Actions reference.


        #### Allowed For


        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  definitions:
                    type: object
                    properties:
                      actions:
                        type: array
                        items:
                          type: object
                          additionalProperties: true
              examples:
                default:
                  $ref: '#/components/examples/ShowDerivedMacroResponseExample'
  /api/v2/macros/destroy_many:
    delete:
      operationId: DeleteManyMacros
      tags:
      - Macros
      summary: Zendesk Delete Api V2 Macros Destroy_many
      description: 'Deletes the macros corresponding to the provided comma-separated list of IDs.


        #### Allowed For

        * Agents'
      parameters:
      - name: ids
        in: query
        description: The IDs of the macros to delete
        required: true
        schema:
          type: array
          items:
            type: integer
        example:
        - 1
        - 2
        - 3
      responses:
        '204':
          description: No Content
  /api/v2/macros/new:
    parameters:
    - $ref: '#/components/parameters/MacroIdQuery'
    - name: ticket_id
      in: query
      description: The ID of the ticket from which to build a macro replica
      required: true
      schema:
        type: integer
      example: 35436
    get:
      operationId: ShowDerivedMacro
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros New
      description: 'Returns an unpersisted macro representation derived from a ticket or macro.


        The endpoint takes one of the following query parameters: `macro_id` or `ticket_id`. If you include both, `macro_id` is used.


        #### Allowed For

        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroResponseExample'
  /api/v2/macros/search:
    parameters:
    - $ref: '#/components/parameters/MacroInclude'
    - $ref: '#/components/parameters/MacroAccess'
    - $ref: '#/components/parameters/MacroActive'
    - $ref: '#/components/parameters/MacroCategory'
    - $ref: '#/components/parameters/MacroGroupId'
    - $ref: '#/components/parameters/MacroOnlyViewable'
    - $ref: '#/components/parameters/MacroSearchSortBy'
    - $ref: '#/components/parameters/MacroSortOrder'
    - $ref: '#/components/parameters/MacroQuery'
    get:
      operationId: SearchMacro
      tags:
      - Macros
      summary: Zendesk Get Api V2 Macros Search
      description: '#### Pagination


        * Offset pagination only


        See Using Offset Pagination.


        #### Allowed For

        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacrosResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacrosResponseExample'
  /api/v2/macros/update_many:
    put:
      operationId: UpdateManyMacros
      tags:
      - Macros
      summary: Zendesk Put Api V2 Macros Update_many
      description: 'Updates the provided macros with the specified changes.


        #### Allowed For

        * Agents'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MacroUpdateManyInput'
            examples:
              default:
                value:
                  macros:
                  - active: false
                    id: 25
                  - id: 23
                    position: 5
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacrosResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacrosResponseExample'
  /api/v2/tickets/{ticket_id}/macros/{macro_id}/apply:
    parameters:
    - $ref: '#/components/parameters/MacroId'
    - name: ticket_id
      in: path
      description: The ID of the ticket
      required: true
      schema:
        type: integer
      example: 35436
    get:
      operationId: ShowTicketAfterChanges
      tags:
      - Macros
      summary: Zendesk Get Api V2 Tickets Ticket_id Macros Macro_id Apply
      description: 'Returns the full ticket object as it would be after applying the macro to the ticket.

        It doesn''t actually change the ticket.


        To get only the ticket fields that would be changed by the macro,

        see Show Changes to Ticket.


        #### Allowed For


        * Agents'
      responses:
        '200':
          description: Success Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MacroApplyTicketResponse'
              examples:
                default:
                  $ref: '#/components/examples/MacroChangesToTicketsResponseExample'
components:
  schemas:
    MacroAttachmentsResponse:
      type: object
      properties:
        macro_attachments:
          type: array
          items:
            $ref: '#/components/schemas/MacroAttachmentObject'
    MacroAttachmentResponse:
      type: object
      properties:
        macro_attachment:
          $ref: '#/components/schemas/MacroAttachmentObject'
    MacrosResponse:
      type: object
      allOf:
      - type: object
        properties:
          macros:
            type: array
            items:
              $ref: '#/components/schemas/MacroObject'
      - $ref: '#/components/schemas/OffsetPaginationObject'
    MacroCategoriesResponse:
      type: object
      properties:
        categories:
          type: array
          items:
            type: string
    MacroApplyTicketResponse:
      type: object
      properties:
        result:
          type: object
          properties:
            ticket:
              type: object
              properties:
                assignee_id:
                  type: integer
                comment:
                  type: object
                  properties:
                    body:
                      type: string
                    public:
                      type: boolean
                    scoped_body:
                      type: array
                      items:
                        type: array
                        items:
                          type: string
                fields:
                  type: object
                  properties:
                    id:
                      type: integer
                    value:
                      type: string
                group_id:
                  type: integer
                id:
                  type: integer
                url:
                  type: string
    MacroResponse:
      type: object
      properties:
        macro:
          $ref: '#/components/schemas/MacroObject'
x-refined-from:
- attachments-openapi-original.yml
- macros-openapi-original.yml
- search-openapi-original.yml
- tickets-openapi-original.yml