API Requests

To perform actions on your automations, you'll need to make a request to the Axiom.ai API. All requests use the POST HTTP method.

The API domain to be used is https://lar.axiom.ai/api/v3 followed by the required endpoint, for example, https://lar.axiom.ai/api/v3/trigger.

# Triggering an automation


The /trigger endpoint can be used to trigger an automation. The following parameters are used:

See our API guides for details on triggering from other services such as Apple Shortcuts, Google Apps Script, IFTTT, Airtable and much more.

# Sending data to your automation with the API


To send data to your automation with the API, it will need to be formatted correctly. This must be presented as an array of 2-dimensional arrays, representing rows and columns. For example:

{
	"key": "<API_TOKEN>",
	"name": "<AUTOMATION_NAME>",
	"data": [["A1", "B1", "C1"], ["A2", "B2", "C2"]]
}

💡 See Requests to learn more about what responses you can expect from this call.

# Using data passed into your automation


The Receive data from another app step can be used to use the data that has been sent using the API, or an integration, such as Zapier or Make. We recommend placing this at the beginning of your automation and using the test data option to insert test data for testing purposes.

# Automation status and results


The /run-data endpoint can be used to retrieve the status of an automation, as well as any data that was written to Google Sheets. The following parameters are used:

The payload that should be sent to the endpoint is as follows:

{
  "key": "<API_KEY>",
  "name": "<AUTOMATION_NAME>"
}

An automation may have one of the following states:

  • Running: the automation is still running.
  • Success: the automation ran successfully.
  • Failure: the automation ended with an error, refer to the run reports for more information.

If there was data written to a Google Sheet during the automation, this will be included as a JSON object, keyed by the token name of each Google Sheet. For example:

{
    "status": "Success",
    "data": {"google-sheet-data": [["A1", "B1", "C1"], ["A2", "B2", "C2"]]}
}

# Remaining runtime


The /remaining-runtime endpoint will return your runtime allowance, and usage. The following parameters are used:

The payload that should be sent to the endpoint is as follows:

{
  "key": "<API_KEY>"
}

💡 See Requests to learn more about what responses you can expect from this call.

# List of automations


The /list-automations endpoint will return a list of automations on your account. The following parameters are used:

The payload that should be sent to the endpoint is as follows:

{
  "key": "<API_KEY>"
}

💡 See Requests to learn more about what responses you can expect from this call.

# Run reports


The /run-reports endpoint will return a list of Run Reports from your account. By default, this will return 5 Run Reports. The following parameters are used:

The payload that should be sent to the endpoint is as follows:

{
  "key": "<API_KEY>",
  "count": 10
}

💡 See Requests to learn more about what responses you can expect from this call.

# Stop automation


The /stop endpoint can be used to stop an automation that is running in the cloud. The following parameters are used and required:

  • pid: an internal identifier.
  • pw: the unique password that's used to access the cloud run, this will change for every run.

The payload that should be sent to the endpoint is as follows:

{
  "pid": "<PID>",
  "pw": "<PASSWORD>"
}

To get these values, you will first need to start the cloud run and retrieve the URL of the cloud run either from the browser, or from the API response (when using /trigger). If you are viewing in the browser, this will be at the end of a longer URL.

dev-c-00<PID>-v4-proxy.axiom.ai&port=443&password=<PW>>&taskId=22842

You will only require the last two digits of the PID, for example, "02".