Repository navigation
Document the API template source endpoints in Preview - #766
Merged
kilian-tennyson merged 4 commits intoOct 23, 2026
Conversation
Add the API template source endpoints to the Preview spec:
- POST /ai/api_template_sources creates a source from an API template,
variable values and a vendor token, and starts its first sync (201).
- GET /ai/api_template_sources/{id} returns the source with its template,
variables and latest sync status.
- POST /ai/api_template_sources/{id}/sync starts a sync (202).
New schemas: api_template (the template format, with each field's checks
and the sync limits), api_template_source and
create_api_template_source_request.
Error responses cover the 401 scope errors, the 403 for workspaces that
can't fetch external URLs, 404, the 409 sync conflicts, the 422
source_unauthorized on sync, and the 422 validation errors on create,
whose examples show the field that failed.
Relabel the second sync 409 example: a sync on a source that's already being deleted gets the 'already running' conflict, and 'This source is being deleted' only comes back when a delete starts during the request. Say that Intercom syncs each source automatically about once a day, on the sync endpoint and on latest_sync. Say that a blank node value fails the sync too, not only one with characters outside letters, digits, '.', '_' and '-'.
- Use the Preview Intercom-Version header for the three endpoints. - base_url: an unparseable URL fails not_https; drop the invalid check. - tree.path: a colon in the first segment fails not_relative. - item.node_values: only values filled into the path must be URL-safe. - Document one tree request per sync, no paging, 429 retries, and that a redirect fails the sync. - mapping: content without an id or title isn't imported. - Sync 422: the token can't be replaced and automatic syncs stop. - Create 422: document the tree size and token check messages, and add examples for a large tree, an invalid variable and several errors.
alexpetrash-code
approved these changes
Oct 23, 2026
kilian-tennyson
deleted the
kiliantennyson/parthas/882d83d3-document-the-api-template-source-endpoints-in-preview
branch
October 23, 2026 13:29
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
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.
Why?
The Preview
/ai/api_template_sourcesendpoint family (create, retrieve, sync) was previously undocumented.How?
Add the three endpoints to the Preview spec (
descriptions/0/api.intercom.io.yaml) along with newapi_template,api_template_sourceandcreate_api_template_source_requestschemas, following the structure and conventions of the sibling/ai/content_import_sourcesendpoints.Decisions
errorschema unchanged and surfacedfieldonly in 422 examples and descriptions, matching the existing Articles pattern.intercom_version_preview, since the endpoints answer only to Preview.latest_synccan be a sync the caller didn't start.source_unauthorizedconsequence: the token can't be replaced and auto-sync stops, so a new token means a new source.auth_tokenrejected; any other non-success (404, redirect, 429, 5xx, timeout) →auth_tokencould not be reached; tree over 25 MB →template.tree.",in theAI Contenttag description untouched and flagged it separately rather than mixing an unrelated fix into this change.