Pathfix Automation allows you to call and setup any API to the providers supported. You can search for an existing API from the API library or build your own API using the API builder.
Call API Using Connections
Pathfix Automation has a few pre-configured APIs available in the public library ready for use. You can either choose to use one of those or simply add your own API.
On your design page, click on Call API
Give the task a name and click on Select API
Here you can search by provider or description to pull up any API that may match your query
Image: Search API
If an API isnt available, click on APIs from the toolbar and click on New API and then click on the Build
Image: APIs
Add the API endpoint URL and choose the method (POST, GET etc.)
You can add dynamic values in <> in the URL, Header values, Query Param values or anywhere in the Body
There are 3 ways to initialize the call
Initialize (will directly call the API with the headers and params included, ideal for user-facing integrations where authentication is handled by you or to call your own service)
Initialize through Connection (will call the API through your linked Connection - ideal for user-facing integration where the authentication is handled by Pathfix or for internal/self automations)
Manually Initialize (allows you to initialize manually without waiting for a response from the provider)
Image: API Build
Click Initialize through Connection, you will be asked to choose the Connection you have authorized (pick Pathfix if you are using Pathfix as the authentication server)
Setup the Dynamic fields and inputs
User Input Type: There are 2 User Input Types:
Free Text: This will allow you to use the response from any of the previous API calls to the selected field and add ANY text to it as well
Get data from API: You can choose to use data from any of your previously saved APIs
Image: API setup
Click on Continue Initialize to proceed
In the Output screen, you would see the response from the call
Click on Use and make sure you click on Save
Image: Output
Your API is ready for use in your Automation.
Call API Using Pathfix OAuth
Pathfix OAuth handles the entire OAuth integration process on your platform. Pathfix Automation users can link their Pathfix OAuth connection to initiate a call and trigger an automation using the authorized connections on their app.
Note: This method will only work if you have used Pathfix OAuth to authenticate your users on your platform.
Click on Connections on the top
Search for Pathfix and connect your account
Image: Using Pathfix OAuth authentication
When building your API payload, you will have to include the following headers to it and click on Initialize through Connection and choose Pathfix: