helpful-purple•16mo ago
test POST request API block
How to test a POST request in an API block ?
4 Replies
To test a POST request in an API block on Voiceflow, follow these steps:
1. Select the POST Option:
- In the API block, choose the
POST
request type.
2. Add Headers:
- Click on the +
next to the Headers section.
- Add necessary headers such as Authorization
if required by your API. For example:
3. Configure the Endpoint:
- Enter the endpoint URL where the POST request will be sent. This URL is provided by the API documentation.
4. Set Up the Body:
- Click on the +
next to the Body section and select Raw
.
- Paste the JSON body content required by the API. For example:
5. Capture Response:
- If you need to capture the response, use the Capture Response
section to map the response data to variables. For example:
6. Send Request:
- Click on Send Request
to test the API call. If the request is successful, you will see a Success
message.
7. Troubleshooting:
- If the request fails, double-check the API documentation for the correct endpoint, headers, and body format.
- Use tools like Postman or Insomnia to validate the request outside of Voiceflow.
By following these steps, you can effectively test a POST request in an API block on Voiceflow.Just click the Send Request button
helpful-purpleOP•16mo ago
in the API Block, in the Body tab we can select "form body" field.
- what data should we enter ?
- same question for the field "variable" ?
I responded to this already. You need to provide us with a bit more info about the API you are trying to post to.