REST API

Programmatic access to configs and files with API Key authentication.

Authentication

All API requests require a valid API key in the Authorization header:

Authorization: Bearer sk-xxx

Create API keys in Workspace Settings > API Keys. Keys are scoped to a single workspace.

Base URL

All endpoints are relative to your deployment URL:

https://co.tlyboy.com/api/v1

Configs

List Configs

GET /api/v1/configs
ParamTypeDefaultDescription
namespacestringFilter by namespace name
groupstringFilter by group name
searchstringSearch config names
formatstringFilter by format
pagenumber1Page number
limitnumber50Items per page (max 100)
bash
curl https://co.tlyboy.com/api/v1/configs?namespace=production&page=1 \  -H "Authorization: Bearer sk-xxx"
json
{  "data": {    "configs": [      {        "id": "uuid",        "name": "db-url",        "format": "string",        "content": "postgres://...",        "description": null,        "group_name": "database",        "namespace_name": "production",        "created_at": "2025-01-01T00:00:00Z",        "updated_at": "2025-01-01T00:00:00Z"      }    ],    "total": 1,    "page": 1,    "limit": 50  }}

Create Config

POST /api/v1/configs
FieldTypeRequiredDescription
namestringYesConfig name
groupIdstringYesTarget group ID
formatstringNoFormat: string, json, yaml, toml, env (default: string)
contentstringNoConfig content
descriptionstringNoDescription
bash
curl -X POST https://co.tlyboy.com/api/v1/configs \  -H "Authorization: Bearer sk-xxx" \  -H "Content-Type: application/json" \  -d '{"name": "db-url", "groupId": "GROUP_ID", "format": "string", "content": "postgres://..."}'

Get Config

GET /api/v1/configs/:id
bash
curl https://co.tlyboy.com/api/v1/configs/CONFIG_ID \  -H "Authorization: Bearer sk-xxx"

Update Config

PATCH /api/v1/configs/:id

Only provided fields are changed.

FieldTypeDescription
namestringNew name
formatstringNew format
contentstringNew content
descriptionstringNew description
bash
curl -X PATCH https://co.tlyboy.com/api/v1/configs/CONFIG_ID \  -H "Authorization: Bearer sk-xxx" \  -H "Content-Type: application/json" \  -d '{"content": "postgres://user:pass@host:5432/db"}'

Delete Config

DELETE /api/v1/configs/:id
bash
curl -X DELETE https://co.tlyboy.com/api/v1/configs/CONFIG_ID \  -H "Authorization: Bearer sk-xxx"

Resolve Config

Resolve a config by namespace, group, and name path.

GET /api/v1/configs/resolve
ParamTypeRequiredDescription
namespacestringYesNamespace name
groupstringYesGroup name
namestringYesConfig name
bash
curl "https://co.tlyboy.com/api/v1/configs/resolve?namespace=production&group=database&name=connection-string" \  -H "Authorization: Bearer sk-xxx"

Namespaces

List Namespaces

GET /api/v1/namespaces
bash
curl https://co.tlyboy.com/api/v1/namespaces \  -H "Authorization: Bearer sk-xxx"

List Groups

GET /api/v1/namespaces/:id/groups
bash
curl https://co.tlyboy.com/api/v1/namespaces/NS_ID/groups \  -H "Authorization: Bearer sk-xxx"

Files

List Connections / Browse Files

GET /api/v1/files

Without connectionId, lists all S3 connections. With connectionId, browses files.

ParamTypeDescription
connectionIdstringS3 connection ID (browse mode)
prefixstringPath prefix for browsing
bash
curl "https://co.tlyboy.com/api/v1/files?connectionId=CONN_ID&prefix=images/" \  -H "Authorization: Bearer sk-xxx"

Get File URL

GET /api/v1/files/url

Returns a public URL (if public domain is set) or a presigned download URL.

ParamTypeRequiredDescription
connectionIdstringYesS3 connection ID
keystringYesFile key/path
bash
curl "https://co.tlyboy.com/api/v1/files/url?connectionId=CONN_ID&key=images/hero.jpg" \  -H "Authorization: Bearer sk-xxx"

Get Upload URL

POST /api/v1/files/upload-url

Returns a presigned URL for uploading a file.

FieldTypeRequiredDescription
connectionIdstringYesS3 connection ID
keystringYesTarget file key/path
contentTypestringNoMIME type
bash
curl -X POST https://co.tlyboy.com/api/v1/files/upload-url \  -H "Authorization: Bearer sk-xxx" \  -H "Content-Type: application/json" \  -d '{"connectionId": "CONN_ID", "key": "uploads/file.pdf", "contentType": "application/pdf"}'

Error Format

All errors follow a consistent format:

json
{  "error": {    "code": "error_code",    "message": "Human-readable description"  }}
CodeHTTP StatusDescription
unauthorized401Invalid or missing API key
not_found404Resource not found
bad_request400Invalid request parameters
conflict409Name already exists
internal500Internal server error