Skip to content

Commit c9788dd

Browse files
committed
feat(api): Add Macro schema definition to OpenAPI spec (intercom/intercom#420117)
Add the Macro object schema to the Unstable API specification. This schema represents saved replies (macros) that can be used for quick responses in conversations. Schema includes: - Basic fields: type, id, name - Content fields: body (HTML with transformed placeholders), body_text - Timestamps: created_at, updated_at (Unix timestamps) - Visibility controls: visible_to, visible_to_team_ids - Availability: available_on array for inbox/messenger The schema follows the implementation in MacroPresenter and includes the placeholder transformation feature where mustache-style placeholders are converted to XML-like attribute tags. Part of: intercom/intercom#420117
1 parent 33da172 commit c9788dd

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

descriptions/0/api.intercom.io.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18702,6 +18702,77 @@ components:
1870218702
description: An array containing the linked conversations and linked tickets.
1870318703
items:
1870418704
"$ref": "#/components/schemas/linked_object"
18705+
macro:
18706+
title: Macro
18707+
type: object
18708+
x-tags:
18709+
- Unstable
18710+
description: A macro is a pre-defined response template (saved reply) that can be used to quickly reply to conversations.
18711+
nullable: true
18712+
properties:
18713+
type:
18714+
type: string
18715+
description: String representing the object's type. Always has the value `macro`.
18716+
enum:
18717+
- macro
18718+
example: macro
18719+
id:
18720+
type: string
18721+
description: The unique identifier for the macro.
18722+
example: "123"
18723+
name:
18724+
type: string
18725+
description: The name of the macro.
18726+
example: "Order Status Update"
18727+
body:
18728+
type: string
18729+
description: The body of the macro in HTML format with placeholders transformed to XML-like format.
18730+
example: "<p>Hi <attribute key=\"user.name\" default=\"there\"/>, your order is ready!</p>"
18731+
body_text:
18732+
type: string
18733+
description: The plain text version of the macro body.
18734+
example: "Hi there, your order is ready!"
18735+
created_at:
18736+
type: integer
18737+
format: int64
18738+
description: The time the macro was created as a Unix timestamp.
18739+
example: 1719474966
18740+
updated_at:
18741+
type: integer
18742+
format: int64
18743+
description: The time the macro was last updated as a Unix timestamp.
18744+
example: 1719493757
18745+
visible_to:
18746+
type: string
18747+
description: Who can view this macro.
18748+
enum:
18749+
- everyone
18750+
- specific_teams
18751+
example: everyone
18752+
visible_to_team_ids:
18753+
type: array
18754+
description: The team IDs that can view this macro when visible_to is set to specific_teams.
18755+
items:
18756+
type: string
18757+
example: ["456", "789"]
18758+
available_on:
18759+
type: array
18760+
description: Where the macro is available for use.
18761+
items:
18762+
type: string
18763+
enum:
18764+
- inbox
18765+
- messenger
18766+
example: ["inbox", "messenger"]
18767+
required:
18768+
- type
18769+
- id
18770+
- name
18771+
- body
18772+
- created_at
18773+
- updated_at
18774+
- visible_to
18775+
- available_on
1870518776
merge_contacts_request:
1870618777
description: Merge contact data.
1870718778
type: object

0 commit comments

Comments
 (0)