# Macro

> This is a subset of the full specification, limited to the `macro` schema.
>
> You can find the full specification here: /_bundle/docs/references/@2.16/rest-api/api.intercom.io.yaml

```yaml
openapi: 3.0.1
info:
  title: Intercom API
  version: '2.16'
  description: This is a subset of the full specification, limited to the `macro` schema.
  contact:
    name: Intercom Developer Hub
    url: https://developers.intercom.com
  license:
    name: MIT
    url: https://spdx.org/licenses/MIT
servers:
  - url: https://api.intercom.io
    description: The production API server
  - url: https://api.eu.intercom.io
    description: The european API server
  - url: https://api.au.intercom.io
    description: The australian API server
security:
  - bearerAuth: []
paths: {}
components:
  schemas:
    macro:
      title: Macro
      type: object
      x-tags:
        - Macros
      description: A macro is a pre-defined response template (saved reply) that can be used to quickly reply to conversations.
      nullable: true
      properties:
        type:
          type: string
          description: String representing the object's type. Always has the value `macro`.
          enum:
            - macro
          example: macro
        id:
          type: string
          description: The unique identifier for the macro.
          example: '123'
        name:
          type: string
          description: The name of the macro.
          example: Order Status Update
        body:
          type: string
          description: The body of the macro in HTML format with placeholders transformed to XML-like format.
          example: <p>Hi <attribute key="user.name" default="there"/>, your order is ready!</p>
        body_text:
          type: string
          description: The plain text version of the macro body with original Intercom placeholder format.
          example: Hi {{user.name|fallback:"there"}}, your order is ready!
        created_at:
          type: string
          format: date-time
          description: The time the macro was created in ISO 8601 format.
          example: '2025-07-17T11:18:08.000Z'
        updated_at:
          type: string
          format: date-time
          description: The time the macro was last updated in ISO 8601 format.
          example: '2025-07-17T15:30:24.000Z'
        visible_to:
          type: string
          description: Who can view this macro.
          enum:
            - everyone
            - specific_teams
          example: everyone
        visible_to_team_ids:
          type: array
          description: The team IDs that can view this macro when visible_to is set to specific_teams.
          items:
            type: string
          example:
            - '456'
            - '789'
        available_on:
          type: array
          description: Where the macro is available for use.
          items:
            type: string
            enum:
              - inbox
              - messenger
          example:
            - inbox
            - messenger
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
```
