Developer reference
API reference
Programmatically update the link blocks on your space so your latest video, drop, or post can take their place automatically.
What v1 does
Update API-flagged link blocks on your space programmatically. Mark a link as “Available via API” in the editor, copy its block id, generate a token, and PATCH it from your pipeline.
Quickstart
Replace your-slug, <block-id>, and the token with your own values.
curl -X PATCH \
https://www.cntct.space/api/v1/spaces/your-slug/blocks/<block-id> \
-H "Authorization: Bearer cnt_live_..." \
-H "Content-Type: application/json" \
-d '{"url":"https://your-new-link.example/","title":"Latest video"}'Authentication
- Send your token as
Authorization: Bearer cnt_live_…. - Generate tokens at /account-settings/api-tokens.
- Maximum 5 active tokens per user.
- Tokens auto-revoke on downgrade from Pro.
Endpoints
| Method | Path | What |
|---|---|---|
GET | /api/v1/spaces | List your spaces (id, slug, api_block_count) |
GET | /api/v1/spaces/:slug/blocks | List API-flagged link blocks |
GET | /api/v1/spaces/:slug/blocks/:blockId | One block |
PATCH | /api/v1/spaces/:slug/blocks/:blockId | Update an API-flagged link |
GET /api/v1/spaces
{
"data": [
{
"id": "1a8e3f2c-...",
"slug": "your-slug",
"name": "My space",
"is_published": true,
"api_block_count": 1,
"updated_at": "2026-05-22T14:08:11.000Z"
}
]
}GET /api/v1/spaces/:slug/blocks
{
"data": [
{
"id": "9b1d72a4-...",
"type": "link",
"title": "Latest video",
"url": "https://your-new-link.example/",
"icon": "fa-link",
"thumbnailUrl": "",
"featured": false,
"style": "compact",
"description": "",
"apiUpdatable": true
}
],
"meta": {
"space_updated_at": "2026-05-22T14:08:11.000Z"
}
}GET /api/v1/spaces/:slug/blocks/:blockId
{
"data": {
"id": "9b1d72a4-...",
"type": "link",
"title": "Latest video",
"url": "https://your-new-link.example/",
"icon": "fa-link",
"thumbnailUrl": "",
"featured": false,
"style": "compact",
"description": "",
"apiUpdatable": true
},
"meta": {
"space_updated_at": "2026-05-22T14:08:11.000Z"
}
}PATCH /api/v1/spaces/:slug/blocks/:blockId
Accepts any subset of the link block's fields in the JSON body (e.g. url, title, description, thumbnailUrl, icon, badge, schedule). The type and apiUpdatable fields are immutable via the API. Pass If-Match: <space_updated_at> for optimistic concurrency — a mismatch returns 409 stale_write.
{
"data": {
"id": "9b1d72a4-...",
"type": "link",
"title": "Latest video",
"url": "https://your-new-link.example/",
"icon": "fa-link",
"thumbnailUrl": "",
"featured": false,
"style": "compact",
"description": "",
"apiUpdatable": true
},
"meta": {
"space_updated_at": "2026-05-22T14:12:47.000Z"
}
}Error envelope
Every error response uses this shape:
{
"error": {
"code": "validation_failed",
"message": "Block did not validate.",
"fields": { "url": "Must be an http(s) URL." }
}
}The apiUpdatable flag and the empty-slot workflow
- Add a Link block in the editor.
- Toggle “Available via API” on.
- Copy the block id shown.
- Generate an API token at /account-settings/api-tokens.
- PATCH the block from your script.
- (Optional) Leave the URL blank until your pipeline populates it — the block is hidden until then.
Errors
| Code | HTTP | When |
|---|---|---|
unauthenticated | 401 | missing/bad token |
revoked | 401 | token revoked |
plan_required | 403 | user no longer on Pro+ |
not_found | 404 | space missing, or block isn't an API-flagged link |
stale_write | 409 | If-Match header mismatch |
validation_failed | 422 | block payload failed schema |
immutable_field | 422 | body included type or apiUpdatable |
rate_limited | 429 | per-token rate window full |
Rate limits
- 120 reads/min per token.
- 30 writes/min per token.
429response has noRetry-After— wait ~60s and retry.
Versioning
- v1 stays backwards compatible.
- Future breaking changes ship as v2 with ≥6-month overlap.