Create an API Request action

Beta

API Request action is a beta feature. It’s available for use, but still in active development and may change.

miscEye icon Advanced feature
  • The API Request action requires knowledge of how to send HTTP requests, APIs, and how to read API documentation.
  • Zapier Support can provide basic troubleshooting for the Zapier API Request feature, but they cannot troubleshoot issues with the API you use.
 
The API Request action allows you to make HTTP requests within the Zap editor.  This is helpful if you want to create one-off actions in your Zaps. This article will guide you through how to set up an API Request action in your Zaps.
 

Prerequisites

1. Choose the app and event

In the Zap editor:
  • In the Zap editor, click the Action step. A dialog box will open.
  • In the search box, search for and select the app that will perform the action in your Zap. The right sidebar will open to the Setup tab.
  • Click the Action event field to open the dropdown menu.
  • Select API Request (Beta).

2. Connect your account

  • Click the Account field. A popup window will open.
    • Select an existing account from the list, or click + Connect a new account
    • Learn how to connect a new account.
  • Once the connection is working, click Continue.
miscEye icon Note

API Request actions cannot be used with shared app connections.

3. Set up the API Request action

Continue setting up your action by selecting what the action should do in the Configure tab. 

  • Select the Configure tab.
  • Set up all required fields and any optional fields that you need for your workflow.
    • Required fields have an asterisk after the field name.

Required fields

  • In the Apply standard error handling? boolean field: 
  • Select an HTTP Method from the dropdown menu.
  • In the URL field, enter the full URL of the endpoint. 
ratingStar icon Tip

If you set the Apply standard error handling? field to “Yes”, you can set up custom error handling to define how the Zap should proceed if the API call returns an error.

Optional fields

  • Use the Query String Parameters to refine the request. Any parameters added will be URL-encoded and appended to the URL when making the API request.
  • Use the Additional Request Headers to pass on additional information, if applicable, to your API.
  • Use the Body field to pass a payload in the request. By default, Zapier will pass the body as raw text. If your API expects requests in a certain format, such as JSON, you must ensure the text within the Body is valid.
API Request action configuration example.png
miscEye icon Note
  • If you add a URL containing parameters to the URL field, your request will ignore them. To add parameters, use the Query String Parameters field.
  • You do not need to add an authentication header. They're added automatically when you connect your app account.
After filling in all required fields and any optional fields, click Continue to move to the final step.
 

4. Test the API Request action

  • Click Test step.
  • The Test tab shows whether Zapier can perform the action step successfully. 
  • To view the full response data for your request: 
    • In the Data out tab, find the :mag:Full Response Data:mag_right: field.
    • Copy the URL and paste it into a new browser tab.
miscEye icon Note
  • If the Apply standard error handling? field is set to “Yes” and an error occurs, response data will not be returned. Learn more about API Request error handling.
  • To protect sensitive data, the response logs will automatically redact information such as API keys or authentication tokens.
Once you’ve set up your API Request action, you can either: 
  • Add another action step.
  • Turn your Zap on by clicking Publish.

For additional help, visit the Zapier Community's Code and webhook resources.

Was this article helpful?
0 out of 0 found this helpful