Skip to content

Retrieve an API template source

Request

You can retrieve an API template source, including its template, its variables and the status of its latest sync. The auth_token is never returned.

OAuth tokens must have the read_write_ai_content scope.

Security
bearerAuth
Path
idstringrequired

The unique identifier for the API template source, given by Intercom.

Example:4182
Headers
Intercom-Versionstring(intercom_version_preview)

Preview Intercom API version. Used for closed beta endpoints or other features under managed availability.

Default:"Preview"
Value:"Preview"
Example:Preview
curl -i -X GET \
  https://api.intercom.io/ai/api_template_sources/4182 \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Intercom-Version: Preview'

Responses

API template source found

Bodyapplication/json
typestringrequired

Always api_template_source.

Value:"api_template_source"
Example:"api_template_source"
idstringrequired

The unique identifier for the source, given by Intercom.

Example:"4182"
templateobject(API Template)required

The source's template, as saved. Top-level keys that aren't template fields are removed.

Example:
{ "name": "Example Docs", "base_url": "https://api.example.com/v1", "variables": [ "space_id" ], "auth": { "header": "Authorization", "value": "Bearer {token}" }, "tree": { "path": "/spaces/{space_id}/pages", "query": { … }, "nodes": [ … ], "children": "pages", "folder_if": [ … ], "folder_if_has_children": true, "content_if": [ … ] }, "item": { "path": "/spaces/{space_id}/pages/{page_id}", "node_values": { … } }, "mapping": { "id": [ … ], "title": [ … ], "body": [ … ], "updated_at": [ … ] }, "body_format": "html" }
variablesobjectrequired

The values of the template's variables, as strings. Values for names the template doesn't declare are removed.

Example:
{ "space_id": "help-center" }
created_atinteger, (date-time)required

The time the source was created.

Example:1792713600
latest_syncobject or nullrequired

The source's most recent sync, or null if no sync has started.

Example:
{ "id": "90817", "status": "in_progress", "created_at": 1792713601, "updated_at": 1792713601 }
Response
{ "type": "api_template_source", "id": "4182", "template": { "name": "Example Docs", "base_url": "https://api.example.com/v1", "variables": [ … ], "auth": { … }, "tree": { … }, "item": { … }, "mapping": { … }, "body_format": "html" }, "variables": { "space_id": "help-center" }, "created_at": 1792713600, "latest_sync": { "id": "90817", "status": "success", "created_at": 1792713601, "updated_at": 1792713958 } }