API and automation
API authentication and scopes
Create an organization API key and understand authentication, scopes, limits, and envelopes.
Availability
The public REST API is available to active Teams and Enterprise workspaces. Owners or administrators with member-management authority create keys in workspace settings. Each plaintext key is displayed once; TrigCode stores only its hash.
Authenticate requests
- Send the key in the Authorization header using the Bearer scheme.
- Never put it in a query string, browser bundle, prompt, repository, or log.
- Keys can expire or be revoked and stop working immediately.
- An organization can keep up to 20 active keys.
Requestbash
curl https://trigcode.com/api/v1/org \
+ -H 'Authorization: Bearer tck_live_REPLACE_WITH_YOUR_KEY'Available scopes
| Scope | Allows |
|---|---|
| tasks:read | List and read organization tasks and generated files. |
| tasks:write | Create and start organization-funded builds. |
| tasks:export | Download a task source archive. |
| projects:read | List organization projects. |
| usage:read | Read organization profile and credit usage. |
| members:read | List organization members and roles. |
Rate limits, pagination, and errors
- Each key is limited to 120 requests per minute on the current single-instance service.
- List endpoints accept page (1-based) and per_page (1–100, default 25).
- Successful JSON responses use { data, meta? }.
- JSON errors use { error: { code, message } }.
- A 429 response can include Retry-After in seconds.
Error envelopejson
{
"error": {
"code": "insufficient_scope",
"message": "This key is missing the required scope: tasks:write"
}
}