Public API and webhooks
Schedule posts, upload media and read your statistics from your own tools.
Create a key in Settings › API and integrations (owners and admins) and send it in the Authorization: Bearer gp_... header. JSON answers, ISO 8601 dates. 60 requests per minute per key.
Endpoints
| Method | Path | |
|---|---|---|
| GET | /api/v1/channels | Connected accounts |
| GET | /api/v1/channel-sets | Sets (use with channelSetId) |
| GET | /api/v1/posts?from=&to=&status= | Posts grouped by publication (92 days max) |
| POST | /api/v1/posts | Create, schedule or publish a post |
| GET / DELETE | /api/v1/posts/{id} | One publication |
| POST | /api/v1/media | File (multipart file) or { "url": "https://…" } |
| GET | /api/v1/campaigns | Campaigns |
| GET | /api/v1/analytics/summary?from=&to= | Key figures of a period (366 days max) |
| GET | /api/v1/analytics/posts?from=&to= | One row per published post |
Create a post
channelIdsand/orchannelSetId,content,mode:schedule|now|draft,scheduledAt(default: in one hour).perChannel: text for some accounts;mediaIdsormediaUrls; per-networksettings;repeat.comments: up to 5{ text, mediaIds (1 image max), delayMinutes (0 to 1440) };thread: reply posts.
curl -X POST https://griotpost.com/api/v1/posts \
-H "Authorization: Bearer gp_..." \
-H "Content-Type: application/json" \
-d '{
"channelIds": ["<id>"],
"content": "Nouvelle collection disponible",
"scheduledAt": "2026-12-01T09:00:00Z",
"mode": "schedule",
"comments": [{ "text": "https://example.com/collection", "delayMinutes": 60 }]
}'Webhooks
Add an https address in Settings › API and integrations and pick events: post.published, post.failed, comment.received. Body: { id, type, createdAt, data }. Retried 6 times on failure.
Each call is signed: check the X-Griotpost-Signature header with the webhook secret.
import { createHmac, timingSafeEqual } from 'node:crypto';
// header "X-Griotpost-Signature: t=<unix>,v1=<hex>"
function verify(rawBody, header, secret) {
const parts = Object.fromEntries(header.split(',').map((p) => p.split('=')));
const expected = createHmac('sha256', secret).update(`${parts.t}.${rawBody}`).digest('hex');
return timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}With your tools
- n8n, Make, Zapier: an “HTTP” module with the
Authorizationheader, and a “Webhook” trigger for events. - Google Sheets: Apps Script
UrlFetchApp.fetch(url, { headers: { Authorization: "Bearer gp_..." } })on/api/v1/analytics/*. - Excel / Power BI: Power Query “From Web” with the
Authorizationheader.