Automation API
Blobify can be managed over HTTP from scripts, CLIs, and services.
What automation can do
- read models and blocks
- validate schema bundles before applying them
- import models and blocks
- create and update drafts
- publish and unpublish content
API keys use the same access model as members:
admindevelopereditorviewer
Each key can be limited to specific spaces.
Workflow
- Create an API key in
Settings → Developer → API Keys - Read the current models and blocks
- Generate JSON in your script or service
- Validate before writing
- Save drafts
- Publish when ready
Read schema
bashcode
API_URL="https://api.blobify.io"
ORG_ID="org_..."
API_KEY="bk_live_..."
curl -H "Authorization: Bearer $API_KEY" \
"$API_URL/v1/orgs/$ORG_ID/schemas/models"bashcode
curl -H "Authorization: Bearer $API_KEY" \
"$API_URL/v1/orgs/$ORG_ID/schemas/blocks"Validate a schema bundle
bashcode
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
"$API_URL/v1/orgs/$ORG_ID/schemas/validate-import" \
-d '{
"models": [
{
"model": "article",
"name": "Article",
"displayField": "title",
"summaryFields": ["title", "slug"],
"fields": {
"title": { "type": "text", "required": true, "translatable": true },
"slug": { "type": "slug", "required": true, "sourceField": "title" },
"body": { "type": "richtext", "translatable": true }
}
}
],
"blocks": []
}'Import models and blocks
bashcode
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
"$API_URL/v1/orgs/$ORG_ID/schemas/import" \
-d '{
"models": [
{
"model": "article",
"name": "Article",
"displayField": "title",
"summaryFields": ["title", "slug"],
"fields": {
"title": { "type": "text", "required": true, "translatable": true },
"slug": { "type": "slug", "required": true, "sourceField": "title" },
"body": { "type": "richtext", "translatable": true }
}
}
],
"blocks": []
}'Validate content before saving
bashcode
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
"$API_URL/v1/orgs/$ORG_ID/content/main/article/validate" \
-d '{
"fields": {
"title": { "en": "Hello world" },
"slug": "hello-world",
"body": {
"en": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [{ "type": "text", "value": "Created locally" }]
}
]
}
}
}
}'Create a draft
bashcode
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
"$API_URL/v1/orgs/$ORG_ID/content/main/article" \
-d '{
"fields": {
"title": { "en": "Hello world" },
"slug": "hello-world",
"body": {
"en": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [{ "type": "text", "value": "Created locally" }]
}
]
}
}
}
}'Update a draft
bashcode
CONTENT_ID="cnt_..."
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
"$API_URL/v1/orgs/$ORG_ID/content/main/article/$CONTENT_ID" \
-d '{
"fields": {
"title": { "en": "Hello world, updated" },
"slug": "hello-world",
"body": {
"en": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [{ "type": "text", "value": "Updated locally" }]
}
]
}
}
}
}'Publish
bashcode
curl -X POST \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
"$API_URL/v1/orgs/$ORG_ID/content/main/article/$CONTENT_ID/publish" \
-d '{
"locales": ["en"]
}'Local tool pattern
- Fetch the current schemas.
- Generate JSON on your machine.
- Validate before writing.
- Save drafts first.
- Publish only when explicitly requested.