Custom API
Open in CMSThe 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
| Search APIs | Narrows the list to the APIs that match your search. |
| More actions | A menu with Categories, Set authentication and Import OpenAPI schema. |
| Add API | Opens the New API panel. |
| Empty state | "No APIs yet" is shown when there are no APIs. It has an Import OpenAPI schema button and an Add API button. |
| Save all changes | Saves every API and category change after you confirm. |
More actions
| Categories | Opens the Categories dialog to add, rename and delete categories. |
| Set authentication | Opens the Set authentication panel to apply one authentication to many APIs at once. Disabled when there are no APIs. |
| Import OpenAPI schema | Opens the import window to create APIs from an OpenAPI schema. |
API List
| Column headers | Click a header to sort the list. APIs are sorted by name inside each category. |
| Group header | One for each category, and one for Uncategorized, which holds APIs without a category. Click it to collapse or expand the group. A group with no APIs says "No APIs here yet." |
| API row | Shows the API name and description. Click it to open the Edit API panel. |
| On switch | Turns an API on or off for the agent without deleting it. |
| Row menu | Edit API and Remove API. |
| Remove API | Removes the API from the list straight away, with no confirmation. Nothing is saved until you click Save all changes. Cancel brings it back. |
Categories
| New category name | Enter a name and click Add category. A name that already exists cannot be added. |
| Rename | Renames the category. |
| Delete | Deletes the category. Disabled while the category still holds APIs. Move the APIs out first. |
| Done | Closes the dialog. |
New API / Edit API: Basic Information
| Action name | A unique, descriptive name for the API (required), for example retrieve_weather_data. |
| Category | Optional. Groups the API in the list. The agent does not use it. Shown only when categories exist. |
| Description | Explains in detail what the API does. The agent uses it to decide when to call the API. |
| HTTP method | GET, POST, PUT, DELETE or PATCH (required). |
| Target URI | The endpoint the API call goes to (required). |
| Loading text type | What users see while the API runs: None, Fixed, Dynamic or Auto. |
| Loading text / Loading text prompt | Shown for Fixed (the exact text to display, as Loading text) and Dynamic (a prompt the agent uses to write the text, as Loading text prompt). |
| Rules | How to format the result and what to do with the data next. |
| Response prompt | How the agent should present the result. |
| Accept extra parameters | Lets the agent send parameters that are not in the parameters list. |
| Send conversation details | Sends agent, user, message and channel details with each request, as headers and, depending on the HTTP method, in the query string or request body. |
New API / Edit API: Authentication
| Authentication type | None, Basic, Bearer, Custom or Oauth. |
| Token | Bearer: the bearer token the API gives you. |
| Username / Password | Basic authentication credentials. |
| Header name | Custom: the name of the header that carries the key, for example X-API-Key. |
| Key | Custom: the value sent in that header. |
| OAuth provider | Client credentials or Google service account (JWT bearer). |
| Token URL | The address that issues access tokens. |
| Client ID / Client secret / Scopes | Client credentials settings. |
| Google service account JSON | Google service account: upload the JSON key file from Google Cloud Console. On an existing API, a new file replaces the saved one. |
| User to act as / API scopes | Google service account: the user to impersonate (optional, needed for Gmail APIs) and the Google API scopes to request. |
New API / Edit API: Parameters
| Name | The parameter name (required). |
| Type | Boolean, Number or String (required). |
| Location | Where the value is sent: Querystring, Header, Body or Path (required). |
| Required | Marks the parameter as required. The agent must fill it in every time. |
| Allowed values | Optional. Limits the parameter to these values. Type a value and press Enter. Leave empty to allow any. |
| Description | Tells the agent what to put in the parameter. |
| Add parameter | Adds another parameter. The trash icon removes one. |
| Apply / Add API | Applies the panel to the list. Click Save all changes afterwards to save it. |
| Test API | Shown when editing an existing API. Opens the test view. It is disabled while the form has changes you have not applied. |
Test API
| Back to editing | Returns to the API form. |
| API | The HTTP method, authentication, endpoint and description of the API. |
| Parameters | An input for each configured parameter. |
| Conversation details | Shown when Send conversation details is on: Agent ID, User ID, User email, Message ID, Media type, Messenger product and Messenger account code, sent with the request. |
| Call API | Sends the request. |
| Response | The status code and Body. Response headers opens the headers. |
Import OpenAPI Schema
The import window has four steps: Upload, Edit, Review and Done.
| Schema format | JSON or YAML (required). |
| Schema file | Drop a JSON or YAML file on the drop zone, or click it to select one. |
| Authentication | Keep what each API has now, or none for a new API keeps the existing authentication. Use the same authentication for every imported API applies the fields you enter here to all imported APIs. |
| OpenAPI schema | The schema editor (Edit step). Fix anything the import should not read, or paste a schema in place of the file. |
| What the import changes | The Review step. A table of the APIs with a Change of New or Replaced. A replaced API takes the description, method, endpoint and parameters from the schema. Its rules, response prompt, loading text and authentication stay. |
| Import N APIs | Adds the APIs to the list. Nothing is saved until you save the page. |
| Import complete | The Done step. Shows how many APIs were imported. Check their authentication, then save the page. |
Set Authentication
| Authentication fields | The same fields as the Authentication section of an API. |
| Search APIs | Narrows the list of APIs. |
| APIs to update | All APIs grouped by category, with checkboxes. The header shows "N of M selected", with Select all and Clear all. |
| Apply to N APIs | Asks you to confirm Replace authentication?, then overwrites the authentication of the selected APIs. The page is saved at once, and the confirmation says that every other change on the page is saved too. |
| Cancel | Closes the panel without changes. |
Related guide: Connect Your API