Reference examples use
api.example.com; replace it with the API host for your own Towbar installation. Your control plane shows its MCP endpoint in My Settings → MCP Guide.
1
Create a key
Open Manage → My Settings → API Keys and create an API key. Name it for its consumer, choose its permissions and expiry, then copy it. Towbar only shows the secret once.
2
Send a request
Set A successful list request contains
TOWBAR_API_KEY through your shell or secret manager and replace YOUR_API_HOST below."apps": [...] and "localization": {...}. An empty inventory contains "apps": [].3
Connect your automation
Use the route reference in this section for REST, or follow MCP setup for an AI client.
Route design
The dashboard calls Git connections Repositories. API paths retain the identifiersources. Collections use plural nouns: /sources, /apps, /resources, /servers, and /deployments. Item routes use UUIDs. Related records live under their parent, such as /apps/{appId}/releases. Commands use POST on an /actions/ route, such as /apps/{appId}/actions/deploy.
Apps and resources are defined in your Git manifest. To create or change them, update the manifest and sync its repository. The API does not invent a separate configuration model. Read the sync result to inspect validation issues and imported changes.
All documented paths are relative to /v1/api. Browser-only login, logout, initial setup, provider webhooks, and signed worker endpoints are separate protocols. They are not exposed as MCP tools. API key management, profile editing, password changes, browser-session management, GitHub installation, and GitLab OAuth handoff are available only in the control plane. Provider credentials and notification routes come only from the API process environment. GET /identity identifies the current actor and team.
REST provides individual routes; MCP offers a separate task-oriented tool catalogue, including combined inspections and shared app/resource actions.
Find an operation
The reference is grouped by the thing you manage, with smaller sections for each task:
For common tasks, start with the automation workflows. Expand only the relevant reference section when you need a schema or an individual operation.
Requests and responses
- Send JSON with
Content-Type: application/jsonwhere a request body is documented. Empty-body actions do not need{}. 200indicates a completed request or replay.201indicates a newly created record.202accepts asynchronous work.204has no response body.- Timestamps use ISO 8601 UTC strings. IDs are UUIDs. Unknown or inaccessible workspace records return
404. - Lists return named arrays; detailed records return named objects. Deployment history and server checks accept
pageandlimitand include pagination metadata. Other inventories are not paginated. - Request bodies are limited to 1 MiB unless a route imposes a smaller bound. Secret and credential mutations allow 300 KiB.
- Responses carry
X-Request-Id; include it when reporting a failure. API/MCP responses are markedCache-Control: no-store.
Date and time localization
JSON operation responses preserve their original timestamps and include alocalization object. Personal API keys use the current preferences of their owner. Team API keys use the default date and time formats in UTC. MCP tool results include the same object under result.localization, and each deployment stream event includes it alongside deployment, logs, and steps.
The timestamps map is keyed by each original ISO timestamp (or calendar date) found in the response. A client can look up a value directly and display the server-rendered label without formatting the timestamp again:
date follows the selected calendar format. time and dateTime follow the selected clock format. timeZone is the effective IANA zone; zoneLabel is the offset or abbreviation at that instant, including daylight-saving changes. epochMilliseconds supports ordering and calculations. inputDateTime is a machine-readable local wall-clock value, not a display label.
Calendar-date values retain their original date and have null for time, dateTime, and inputDateTime; changing time zone does not move a daily calendar bucket to a different day. Responses without timestamps have an empty map. A 204 response still has no body.
Use the original timestamps for requests, sorting, scheduling, and relative-time calculations. Change account preferences from My Settings → Preferences; API keys cannot edit account settings.
Asynchronous actions and retries
Deployment, rollback, runtime operations, preparation, checks, and sync actions may queue background work. Acceptance is not completion. Poll the returned deployment, operation, check, or sync ID until its state becomes terminal. The workflows guide includes examples. Where shown in the route reference, supplyIdempotency-Key. Use one unique value per intended action and reuse it only when retrying that same action. Replays return the existing result; a conflicting payload can return 409. Do not automatically retry a mutation with a new key after an ambiguous timeout.
Errors and limits
The default is 60 requests per minute per IP, shared between REST and MCP. Unauthenticated attempts count too. MCP initialization, discovery, and tool calls each count as requests. Limits are stored in PostgreSQL and remain consistent across API processes.
Responses expose
X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset (Unix seconds). A blocked request adds Retry-After in seconds. See authentication and rate limits for operator settings.