Loopfour
API reference

API reference

Reference for the Loopfour API: the base URL, authentication with API keys, pagination, error responses and rate limits for each endpoint.

The Loopfour API is a JSON REST API. Use it to create and run workflows, read run records, decide approvals, and keep tables in sync with your other systems. Endpoints are grouped by the resource they manage.

The machine-readable OpenAPI specification and the API catalog describe the same surface. Every /api/v1 response, including authentication errors, links to them in its Link header.

Base URL

https://workflow.loopfour.ai/api/v1

Authentication

Send an API key in the x-api-key header. Keys start with wfk_live_ or wfk_test_ and are created under Settings > API keys in Studio.

curl 'https://workflow.loopfour.ai/api/v1/workflows' \
  -H 'x-api-key: wfk_live_your_api_key'

Each key carries scopes, and each endpoint names the scope it needs. A key belongs to one company and sees only that company's data. See Authentication and API keys for the scope list and key management.

Response format

A successful response has success: true and the result in data:

{ "success": true, "data": { "id": "c3a1f7d2-58e4-4b9a-8f21-6d0e9b7c4a15" } }

An error response has success: false and an error object:

{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "Workflow not found",
    "requestId": "req_123"
  }
}

error.details is present on some errors. A request body or query that fails validation returns 400 with error.name set to ZodError and an error.issues array that names each field. Quote requestId when you contact support. See Errors, retries and timeouts for more.

Status codes

StatusMeaning
200Success
201Created
202Accepted; the work continues in the background (for example a queued run)
400Invalid request (BAD_REQUEST, VALIDATION_ERROR or a resource-specific code)
401Missing, invalid or expired API key (UNAUTHORIZED)
403The key lacks the scope (FORBIDDEN)
404Not found in your company (NOT_FOUND)
409Conflict with the current state (CONFLICT or a resource-specific code)
429Rate limit exceeded (RATE_LIMITED)
500Server error (INTERNAL_ERROR)
502Another system could not be reached (UPSTREAM_ERROR)
503Temporarily unavailable (SERVICE_UNAVAILABLE)

Pagination

List endpoints that page use a cursor. Pass limit (usually default 20, maximum 100) and, for the next page, the cursor from the previous response:

{
  "success": true,
  "data": [],
  "meta": { "cursor": "MTcwNjc3NDQwMDAwMDpjM2ExZjdkMi4uLg", "hasMore": true }
}

When meta.hasMore is false, there are no more pages. Table rows and approvals page with limit and offset instead. Some lists, such as blocks and tables, return everything at once. Each endpoint says which it uses.

Rate limits

Limits apply per API key, per minute, by kind of request:

KindRequests per minute
Read1,000
Write100
Execute (runs and run controls)500

Each response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset (Unix time in seconds). A 429 response also has Retry-After in seconds. Wait that long before you retry.

Resources

New to the API? Start with the API quickstart.

On this page