-
Notifications
You must be signed in to change notification settings - Fork 2
Add Macros API endpoints to OpenAPI spec #286
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…rcom#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
…tercom#420117) - Add MacroList schema to support paginated list responses for macros - Follow established pattern with type "list" and data array - Implement cursor-based pagination with starting_after parameter - Include Base64-encoded cursor for stable pagination ([updated_at, id] tuples) - Reference existing macro schema for data items - Add x-tags: Unstable to match macro visibility This schema will be used by the GET /macros endpoint to return paginated lists of saved reply templates. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…m#420117) Add GET /macros and GET /macros/{id} endpoint definitions to the Unstable OpenAPI specification for the new Macros API. Changes: - Add GET /macros endpoint with cursor-based pagination - Query parameters: per_page (1-150, default 50), starting_after (Base64 cursor), updated_since (Unix timestamp) - Returns paginated list of macros with MacroList schema - Documents placeholder transformation from Intercom to XML-like format - Add GET /macros/{id} endpoint for single macro retrieval - Path parameter: id (macro identifier) - Returns single macro with Macro schema - Add Macros tag to tags section in alphabetical order - Include comprehensive examples and error responses (400, 401, 403, 404) - Document OAuth scope requirement (read_conversations) The endpoints follow existing patterns in the OpenAPI spec and accurately reflect the implementation in PR #419604. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…ntercom#420117) - Clarify macro visibility rules and team-based access control - Add detailed explanation of when macros are accessible vs return 404 - Expand examples to show team-restricted and complex placeholder scenarios - Document HTML escaping behavior for placeholder default values - Improve parameter description for clarity 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…ntercom/intercom#420117) Add complete Postman collection for the new Macros API endpoints including: - List all macros endpoint with basic pagination - List macros with cursor-based pagination example - List macros filtered by update timestamp - Complex example combining multiple query parameters - Get single macro by ID with error responses Each request includes: - Proper Bearer token authentication setup - Required Intercom-Version header for Unstable API - Detailed parameter descriptions and usage notes - Example responses showcasing placeholder transformation - Test scripts for response validation and cursor handling The collection provides developers with executable examples to quickly test and integrate the Macros API without writing code first. 🤖 Generated with Claude Code Co-Authored-By: Claude <[email protected]>
…ntercom/intercom#420117) - Changed timestamp fields from integer/int64 to string/date-time format - Updated all timestamp examples to ISO 8601 format - Added body_text and visible_to_team_ids to required fields - Clarified placeholder transformation behavior in documentation - Regenerated Postman collection with corrected schema 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
…endpoints (intercom/intercom#420117) - Add code samples in cURL, Node.js, Python, and Ruby for both endpoints - Expand response examples with multiple scenarios including pagination, filtering, and various macro types - Improve error response examples with clearer messaging - Fix tags from 'Unstable' to 'Macros' for proper categorization - Enhance tag description for better API documentation navigation 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
… schemas (intercom/intercom#420117) - Remove overly restrictive required field definitions from macro and macro_list schemas - Update Postman collection timestamps - Simplify placeholder transformation descriptions 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
davymalone
approved these changes
Aug 1, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Towards https://github.com/intercom/intercom/issues/420117
Macros API v1 PR: https://github.com/intercom/intercom/pull/419604
Summary
/macros
GET/macros/{id}
) to OpenAPI specChanges
descriptions/0/api.intercom.io.yaml
: Added Macros API endpoint and schemaspostman/Unstable/intercom-api.postman_collection.json
: Generated collection with examplesTest plan
🤖 Generated with Claude Code