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

MethodPath
GET/api/v1/channelsConnected accounts
GET/api/v1/channel-setsSets (use with channelSetId)
GET/api/v1/posts?from=&to=&status=Posts grouped by publication (92 days max)
POST/api/v1/postsCreate, schedule or publish a post
GET / DELETE/api/v1/posts/{id}One publication
POST/api/v1/mediaFile (multipart file) or { "url": "https://…" }
GET/api/v1/campaignsCampaigns
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

  • channelIds and/or channelSetId, content, mode: schedule | now | draft, scheduledAt (default: in one hour).
  • perChannel: text for some accounts; mediaIds or mediaUrls; per-network settings; 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 Authorization header, 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 Authorization header.