Use the API / Webhook (REST API) action to call any HTTP endpoint from your Noem.AI chatbot. Configure the request method, URL, headers, and a JSON payload built from Data Properties. The bot can then send/receive data during a conversation based on natural-language instructions.
What this action does #
- Issues an HTTP POST/GET/PUT/DELETE to your REST endpoint.
- Sends a JSON body (or query string) composed from Data Properties captured in chat.
- Includes custom Headers (e.g., Authorization, Content-Type).
- Can surface the API’s response (IDs, links, messages) back to the user.
Create the REST API action #
- Open: Actions → Add → REST API to open API / Webhook Integration.
- Name (required)
The function name the bot will use in your Instructions.
Example: create_support_ticket_api. - Description (required)
Explain when to call this API and what the bot must collect.
Example:
“Call create_support_ticket_api when a user reports an issue. Gather: title, detailed description, priority, product/module, reporter email. Confirm before sending.” - End Point(required)
- Method: Choose POST (recommended for JSON), GET, PUT, or DELETE.
- URL: Paste your REST endpoint, e.g., https://api.example.com/v1/tickets.
- Method: Choose POST (recommended for JSON), GET, PUT, or DELETE.
Headers (JSON)
Provide headers as a JSON object. Common examples:
{
“Content-Type”: “application/json”,
“Authorization”: “Bearer {{secrets.apiToken}}”
}
-
- Use placeholders or stored secrets as appropriate.
- Add any custom headers your API requires (e.g., X-Signature, X-Client-Id).
- Use placeholders or stored secrets as appropriate.
- Data Properties
Define the fields the bot will send in the request body (for POST/PUT) or as query params (for GET). For each property set:
- Name – key in the JSON or query string (e.g., emailContent).
- Type – String, Number, Boolean, Array, Object.
- Description – precise guidance so the AI knows what to extract.
- Required – mark fields that must be present before the call.
- Name – key in the JSON or query string (e.g., emailContent).
- Use Add New Property to add more. AI Assistance can suggest properties from your Description.
- Hide Function Log in Chat (optional)
Toggle on if you don’t want request logs displayed in the transcript. - Save
Click Save to store the action.
Tip (debugging): During setup, point End Point to https://webhook.site/ to see the exact payload your bot sends. Switch to your real API after verification.
Example configuration #
- Name: create_support_ticket_api
- Description:
“Use when a user reports a bug or asks for help. Collect: title, emailContent (detailed description with steps), priority (low|medium|high), productArea, and reporterEmail (use user.email if available). Confirm before sending.” - End Point: POST https://api.example.com/v1/tickets
Headers (JSON):
{
“Content-Type”: “application/json”,
“Authorization”: “Bearer {{secrets.supportApiToken}}”
}
- Data Properties:
| Name | Type | Description | Required |
| title | String | Short issue title (≤100 chars). | ✓ |
| emailContent | String | Detailed description including steps, expected vs. actual, and context. | ✓ |
| priority | String | One of low, medium, high. | |
| productArea | String | Module/feature where the issue occurred. | |
| reporterEmail | String | User’s email; default to {{user.email}} if present. | |
| attachments | Array | URLs to screenshots/files the user provided. |
Sample request body (POST/JSON):
{
“title”: “Checkout 500 error”,
“description”: “{{emailContent}}”,
“priority”: “high”,
“productArea”: “Checkout”,
“reporter”: { “email”: “{{reporterEmail}}” },
“attachments”: [“https://files.noem.ai/f/abc123.png”]
}
Sample success response (from your API):
{ “status”: “created”, “ticketId”: “SUP-4821”, “portalUrl”: “https://support.example.com/tickets/SUP-4821” }
Configure your bot (see below) to read these fields and present them to the user.
Add decision rules in your bot’s Instructions #
Provide explicit logic so the AI knows when and how to invoke this function:
When the user reports a bug or requests support, call function `create_support_ticket_api`.
Collect: title, detailed description (steps to reproduce), priority, product area, reporter email (use user.email if available), attachments (URLs).
Before calling, confirm the summary: “Create the support ticket now?” If confirmed, call the function.
If a required field is missing after one follow-up, proceed and mark it as TBD.
Handle the response by echoing ticketId and portalUrl when available.