API Reference
The Integry API is organized around REST. Our API has predictable resource-oriented URLs, accepts JSON-encoded and form-encoded request bodies, returns JSON-encoded responses, and uses standard HTTP response codes, authentication, and verbs.
Setting Up
Base URL
https://api.integry.ioServer Libraries
npm install --save integrypip install integryAuthentication
The Integry API requires an App-Key , User-ID and a hash of App-Secret and User-ID in the request headers to authenticate requests.
You can view and copy your App-Key and App-Secret from the Integry app.
User-ID is a unique string identifier for a user in your app. Function Calls and Integrations are associated to a user ID.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
Calculating the hash
Calculate the hash server-side using HMAC SHA256.
Making an authenticated request
Apps
List all apps
POST /apps/list
List all apps available in Integry. If you need more, please reach out!
Sample Call
Parameters
Sample Response
Returns
Returns an object[] of apps that match the criteria, and an optional _cursor to paginate over the results.
Get an app with the user's connected accounts
POST /apps/:app_name/get
Get the details of an individual app and user's connected accounts with the app by passing app_name as a path variable.
Sample Call
Sample Response
Returns
Returns the app object along with an object[] of connected_accounts of the user, if any.
Functions
List all functions
POST /functions/list
List all functions available in Integry. If you need more, make a passthrough request or reach out!
Sample Call
Parameters
Sample Response
Returns
Returns an object[] of functions that match the criteria, and an optional _cursor to paginate over the results.
Predict a function
POST /functions/predict
Use Integry to find the most relevant function based on a prompt. For more details, see Predict Function with Integry AI.
Sample Call
Parameters
Sample Response
Get a function
POST /functions/:function_name/get
Get the JSON schema of an individual function by passing function name as a path variable.
Sample Call
Parameters
Sample Response
Returns
All supported function parameters are returned as keys, along with their type and description as key, value pairs. Required parameters are listed in the required array.
If you include a prompt, Integry AI will predict the arguments and list them in the arguments object.
If you include variables, Integry will auto-map them to the parameters and include reference tags (eg. {first_name}) in the values in the arguments object.
If you include both a prompt and _variables, Integry will predict the arguments using both the prompt and variables, adding tags where appropriate (eg. "message": "{first_name} {last_name} just signed up!")
Call a function
POST /functions/:function_name/call
Call a function by passing function_name as a path variable and the function parameters in the request body. Integry will automatically add the user's authentication credentials (eg. access token, API key) to the call.
Integry will execute the function if the user has already connected their account for the function app, and all required parameters (if any) are provided in the body. These function calls will show in the Functions > Calls Log.
Integry will not execute the function if the user has not connected an account, or the parameters passed are invalid. These function calls will not show in the Function Calls log.
Sample Call
Parameters
Sample Response
Returns
If Integry executes the function, it will respond with a 200 OK with following keys in the response body:
network_code: HTTP response status code of the onwards API call made by Integry.output: HTTP response body of the onwards API call made by Integry._cursor: The cursor for the next page. It will only be present in responses of functions that support paginated calls. If there are no more pages, it will benull.
If Integry does not execute the function, it will respond with a 400 Bad Request with following keys in the response body:
error: Summary of the error.error_details[]: Detailed errors for individual fields (if applicable).
Last updated
Was this helpful?