API Overview

Overview of the Squadbase API — authentication and the Automation run endpoints.

The Squadbase API lets you run the Automations you built in Squadbase from your own systems, and read their status and results programmatically. Send all requests to the following base URL.

https://api.squadbase.dev/v0

Authentication

Every request is authenticated with a user-issued API key passed in the x-api-key header. See Authentication for how to create a key and the authorization rules.

Running an Automation

Running an Automation via the API is asynchronous (fire-and-poll):

  1. Run an Automation — start a run; returns an executionId with status: RUNNING.
  2. Get Execution Status — poll with the executionId to track progress.
  3. Get Execution Result — fetch the result once the run is COMPLETED.
MethodEndpointDescription
POST/automation/{projectId}/{automationName}/triggerRun an Automation
GET/automation/{projectId}/{automationName}/executions/{executionId}Get Execution Status
GET/automation/{projectId}/{automationName}/executions/{executionId}/resultGet Execution Result

For a conceptual overview and use cases, see Run via the API.

Execution object

The run and status endpoints return the same execution object.

Prop

Type

The API never returns internal identifiers (sandbox, team, and so on). Your only handles are projectId, automationName, and executionId.

status values

ValueMeaning
RUNNINGWaiting to start, or running
LEASEDRunning
CANCEL_REQUESTEDA stop was requested and the run is stopping
COMPLETEDSucceeded
FAILEDFailed
TIMED_OUTFailed after exceeding the time limit (3 hours)
CANCELLEDStopped

COMPLETED, FAILED, TIMED_OUT, and CANCELLED are final states.

Errors

All endpoints return errors with a common envelope: { error, errorCode, message, detail }.

HTTPCondition
400Request body validation failed, or Idempotency-Key is longer than 128 characters (run)
401x-api-key missing/invalid, IP not allowed, system key used, or the project is outside the key's scope
402AI credit balance is 0 (run)
422Automation not found; executionId does not exist or does not belong to the Automation in the path; Viewer permission (viewerCannotEdit); or the same Automation is already running (runAlreadyActive)
429API run rate limit exceeded (run). Wait for the number of seconds in the Retry-After header, then retry
500The run environment could not be started, etc.

API runs are limited to 60 per hour per team (the limit varies by plan).

API Overview | Squadbase Docs