Custom API

Open in CMS

The Custom API screen defines the HTTP APIs your agent can call during a conversation, for example to look up an order or create a ticket. Found in the agent sidebar under Tools β†’ Custom API. Changes you make here are kept on the page until you click Save all changes.

Custom API

Import OpenAPI SchemaOpens the import dialog to create APIs from an OpenAPI schema.
Add New APIOpens the New API panel.
Add CategoryShows a Category name field to create a category. A name that already exists cannot be added.
Set AuthenticationOpens the Set Authentication panel to apply one authentication to many APIs at once.
Empty state"No APIs Configured" is shown when there are no APIs and no categories.
Save all changesSaves every API, category and order change after you confirm.

API List and Categories

API rowShows the API name and description. Click it to open the Edit API panel.
Drag handle"Drag to reorder". Drag an API to change its order or to move it into another category (or out of all categories).
Enable / Disable switchTurns an API on or off for the agent without deleting it.
Delete buttonRemoves the API from the list. Nothing is saved until you click Save all changes.
Rename categoryRenames a category.
Delete categoryDeletes an empty category. Disabled while the category still holds APIs ("Cannot delete: category is not empty").
Empty categoryShows "No APIs in this category. Drag an API here to add it."

New API / Edit API: Basic Information

Action NameA unique, descriptive name for the API (required), for example retrieveWeatherData.
DescriptionExplains in detail what the API does. The agent uses it to decide when to call the API.
HTTP MethodGET, POST, PUT, DELETE or PATCH.
Target URIThe endpoint the API calls.
Loading Text TypeWhat users see while the API runs: None, Fixed, Dynamic or Auto.
Loading Text / Loading Text PromptShown for Fixed (the exact text to display) and Dynamic (a prompt the agent uses to write the text).
RulesInstructions for when and how to use the API, for example "Only provide responses for supported locations".
Response PromptHow the agent should present the result.
Additional PropertiesLets the API accept parameters that are not in the properties list.
Send MetadataSends conversation and user context (agent, user, message and channel info) with each request, as headers and, depending on the HTTP method, in the query string or request body.

New API / Edit API: Authentication

Auth TypeNone, Basic, Bearer, Custom or Oauth.
KeyBearer: the token. Custom: the header value.
Username / PasswordBasic authentication credentials.
Header NameCustom: the name of the header that carries the key.
OAuth ProviderClient Credentials or Google Service Account (JWT Bearer).
Token URLThe OAuth token endpoint.
Client ID / Client Secret / ScopesClient Credentials settings.
Google Service Account JSONGoogle Service Account: upload the JSON key file from Google Cloud Console. On an existing API you can upload a new file to replace it.
User Delegation (Optional) / API ScopesGoogle Service Account: the user to act as, and the Google API scopes to request.

New API / Edit API: Properties

Property NameThe parameter name.
Property TypeBoolean, Number or String.
LocationWhere the value is sent: Querystring, Header, Body or Path.
Required ParameterMarks the parameter as required.
Property EnumOptional list of allowed values.
Property DescriptionTells the agent what to put in the parameter.
Add New PropertyAdds another parameter.
Test APIShown when editing an existing API. Opens the test view.
Add New API / Update APIApplies the panel to the list. Click Save all changes afterwards to save it.

Test API

Back to ConfigurationReturns to the API form.
API DetailsThe HTTP method, authentication, endpoint and description of the API.
ParametersAn input for each configured property.
MetadataShown when Send Metadata is on: Agent ID, User ID, User Email, Inquiry Message ID, Media Type, Messenger Product and Messenger Account Code, sent with the request.
Call APISends the request.
API ResponseThe status code, Response Headers and Response Body, each with a copy button.

Import OpenAPI Schema

Schema FormatJSON or YAML (required).
Schema FileDrag and drop or select a JSON or YAML file.
Override AuthenticationNo keeps the existing or no authentication; Yes applies the authentication you set here to every imported API.
Paste your OpenAPI schema hereThe schema editor (step 2).
Import PreviewLists the New APIs and Updated APIs before importing.
Start ImportAdds the APIs to the list. A summary confirms the result; review authentication and click Save all changes.

Set Authentication

Authentication fieldsThe same fields as the Authentication section of an API.
Select APIs to updateAll APIs grouped by category, with checkboxes, Select All and Clear All.
OKAsks you to confirm, then overwrites the authentication of the selected APIs. Click Save all changes afterwards.
CancelCloses the panel without changes.

Related guide: Connect Your API