This action allows you to make a custom, authenticated HTTP request to the Twilio API.
NOTE: This is not like any of the other Twilio cards; this card shows some of what goes on behind the scenes on other cards. If you have no experience working with API calls this may be a challenge, however this card is highly customizable. Good luck, and it may help if you refer to the Twilio API documentation!
- Request Type (dropdown): your available HTTP request methods. There are 5 supported HTTP request methods (sometimes called verbs) in custom API calls:
- GET: retrieves data from a web server based on your parameters. GET requests a representation of the specified resource, and if successful will receive a 200 OK response message with the requested content. Additional documentation here.
- POST: sends data to a web server based on your parameters. POST requests include actions like uploading a file. Multiple POST’s may result in a different outcome than a single POST, so you should be cautious about unintentionally sending multiple POST’s. If a POST is successful, you will receive a 200 OK response message. Additional documentation here.
- PUT: sends data to a location in the web server based on your parameters. PUT requests include actions like uploading a file. The difference between a PUT and POST is that PUT is idempotent, meaning that the result of a single successful PUT is the same as many identical PUT’s. If a PUT is successful, you will receive a 200 response message (usually 201 or 204). Additional documentation here.
- PATCH: applies partial modifications to a resource on a web server based on your parameters. PATCH is not idempotent, meaning that the result of multiple PATCH’s could have unintended consequences. If a PUT is successful, you will receive a 200 response message (usually 204). Additional documentation here.
- DELETE: deletes the specified resource from the web server based on your parameters (if the resource exists). If a DELETE is successful, you will receive a 200 OK response message. Additional documentation here.
Relative URL (text): Relative request URL. The relative URL structure for this action follows the
https://api.twilio.com/2010-04-01/route. E.g. - If the full API URL is
https://api.twilio.com/2010-04-01/Accounts.json, then the Relative URL would be
Query (object or text): JSON object that determines the action taken at the URL.
Headers (object): JSON that determines the content type of the request. This will usually be a replica of the example below.
- Status Code (Number): the success or failure of your HTTP request. Here is a list of all status codes.
- Headers (object): a more detailed context for the response/status code that doesn’t relate to the output body. Not all headers that appear in a response header are response headers, meaning that some are unlikely to be useful to you. The response headers are dependent on the HTTP request you choose in options.
- Body (object): depending on the HTTP request you chose in Options, you may receive some data back. That data, such as the data from a GET request, will be contained in this Body object.