Publicar e editar
POST /v1/posts cria e publica; PATCH /v1/posts/{id} edita ou muda a data. Veja o guia de publicação.
A API Pública da Canverly permite que qualquer sistema externo leia e gerencie um site Canverly por HTTPS + JSON simples: publicar e editar posts, enviar mídia, definir SEO, alterar configurações do site, ler números de audiência e envios de formulário, e mover conteúdo para dentro e para fora em lote. Autoposters no-code, pontes com CMS próprios, pipelines de CI e agentes de IA usam todos a mesma superfície. O Chimpee é apenas a primeira integração que documentamos; nada aqui é específico dele.
https://api.canverly.comAuthorization: Bearer ck_… (uma chave por site); o arquivo público
também é lido com uma chave pk_… segura para o navegador. Veja chaves e escopos/openapi.json · llms.txtPublicar e editar
POST /v1/posts cria e publica; PATCH /v1/posts/{id} edita ou muda a data. Veja o guia de publicação.
Ler o arquivo
GET /v1/posts é um feed público com paginação por keyset, filtros e since para sincronização incremental.
Mídia, SEO e configurações
Envie arquivos de mídia, defina o SEO por post e por site, altere as configurações do site.
Audiência e lote
Leia analytics e leads; exporte ou importe em NDJSON/CSV.
Vinte e duas operações. O detalhe completo (parâmetros, corpos, respostas, erros) está na referência da API.
| Área | Operações | Escopos |
|---|---|---|
| Posts | GET /v1/posts · POST /v1/posts · GET /v1/posts/{reference} · PATCH /v1/posts/{id} |
posts:read, posts:write |
| Tipos de post | GET /v1/post-types |
post_types:read |
| SEO | GET/PATCH /v1/posts/{reference}/seo · GET/PATCH /v1/sites/me/seo |
seo:read, seo:write |
| Mídia | GET/POST /v1/media · GET/DELETE /v1/media/{id} |
media:read, media:write |
| Site | GET /v1/sites/me · GET/PATCH /v1/sites/me/settings |
sites:read, site:read, site:write |
| Analytics | GET /v1/analytics/summary · GET /v1/analytics/posts |
analytics:read |
| Leads | GET /v1/leads · GET /v1/leads/{id} |
leads:read |
| Lote | GET /v1/export · POST /v1/import |
export, import |
1. Obtenha uma chave. No admin, abra Configurações → Integrações API e gere uma chave para o seu site. Copie o segredo ck_…; ele é exibido uma única vez. Veja Autenticação.
2. Publique um post. Envie um POST /v1/posts com um título, um corpo em blocos e status: "published":
curl -X POST https://api.canverly.com/v1/posts \ -H "Authorization: Bearer ck_live_xxx" \ -H "Content-Type: application/json" \ -d '{ "title": "Hello from the API", "status": "published", "category_slugs": ["news"], "blocks_json": { "v": 1, "blocks": [ { "id": "p1", "type": "paragraph", "text": "Published straight from the <strong>Canverly API</strong>." } ] } }'import requests
r = requests.post( "https://api.canverly.com/v1/posts", headers={"Authorization": "Bearer ck_live_xxx"}, json={ "title": "Hello from the API", "status": "published", "category_slugs": ["news"], "blocks_json": { "v": 1, "blocks": [ {"id": "p1", "type": "paragraph", "text": "Published straight from the <strong>Canverly API</strong>."}, ], }, }, timeout=20,)r.raise_for_status()print(r.json()) # {'id': '01K…', 'slug': 'hello-from-the-api', 'status': 'published', ...}const res = await fetch("https://api.canverly.com/v1/posts", { method: "POST", headers: { Authorization: "Bearer ck_live_xxx", "Content-Type": "application/json", }, body: JSON.stringify({ title: "Hello from the API", status: "published", category_slugs: ["news"], blocks_json: { v: 1, blocks: [ { id: "p1", type: "paragraph", text: "Published straight from the <strong>Canverly API</strong>." }, ], }, }),});if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);console.log(await res.json());<?php$ch = curl_init("https://api.canverly.com/v1/posts");curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_RETURNTRANSFER => true, CURLOPT_HTTPHEADER => [ "Authorization: Bearer ck_live_xxx", "Content-Type: application/json", ], CURLOPT_POSTFIELDS => json_encode([ "title" => "Hello from the API", "status" => "published", "category_slugs" => ["news"], "blocks_json" => [ "v" => 1, "blocks" => [ ["id" => "p1", "type" => "paragraph", "text" => "Published straight from the <strong>Canverly API</strong>."], ], ], ]),]);$body = curl_exec($ch);echo $body, "\n";require "net/http"require "json"
uri = URI("https://api.canverly.com/v1/posts")res = Net::HTTP.post( uri, { title: "Hello from the API", status: "published", category_slugs: ["news"], blocks_json: { v: 1, blocks: [ { id: "p1", type: "paragraph", text: "Published straight from the <strong>Canverly API</strong>." }, ], }, }.to_json, "Authorization" => "Bearer ck_live_xxx", "Content-Type" => "application/json",)puts res.bodypackage main
import ( "bytes" "fmt" "io" "net/http")
func main() { body := []byte(`{ "title": "Hello from the API", "status": "published", "category_slugs": ["news"], "blocks_json": {"v":1,"blocks":[ {"id":"p1","type":"paragraph","text":"Published straight from the <strong>Canverly API</strong>."} ]} }`) req, _ := http.NewRequest("POST", "https://api.canverly.com/v1/posts", bytes.NewReader(body)) req.Header.Set("Authorization", "Bearer ck_live_xxx") req.Header.Set("Content-Type", "application/json") res, err := http.DefaultClient.Do(req) if err != nil { panic(err) } defer res.Body.Close() out, _ := io.ReadAll(res.Body) fmt.Println(res.Status, string(out))}3. Você recebe o post de volta. Um 201 Created com o id, o slug e o status:
{ "id": "01K…", "slug": "hello-from-the-api", "status": "published", "public_url": null }O post agora está no ar em https://<your-site-domain>/<slug>.