Base URL: https://app.digents.com/api/v1. Every request needs an Authorization: Bearer <key> header. Get a key at /developer — sandbox keys are instant, production keys are reviewed. Machine-readable spec: /api/v1/openapi.json.
Success: { data: ... }. Failure: a non-2xx status with { error: { code, message } }. Rate limits: 30 requests/minute for sandbox keys, 120/minute for production keys — a 429 carries the same error shape.
curl https://app.digents.com/api/v1/pages \ -H "Authorization: Bearer digents_sk_test_..."
/meThe first call any integration should make: confirms the key works and which environment and account it belongs to.
Response
{
"data": {
"environment": "production",
"account_email": "owner@example.com",
"pages_connected": 1
}
}Errors
401 unauthorized — the key is missing, malformed, or revoked/connect-linkReturns a one-time link, valid 15 minutes, that lets the Page owner connect Facebook directly — no dPoster account or login on their part. The Page ends up connected to YOUR account, the one this key belongs to. Hand the link to whoever administers the Facebook Page. Optional body: `{ "return_url": "https://…" }` (https, at most 500 characters) — once Facebook is done the owner is sent back there with `connected=1`, or `connected=0&reason=denied|expired|facebook_failed`, instead of staying on our success page. The return address is signed into the link, so it can't be edited.
Request body
{
"return_url": "https://yourapp.example/settings/facebook"
}Response
{
"data": {
"url": "https://app.digents.com/connect?ct=xxxxxxxx",
"expires_at": "2026-09-13T21:15:00.000Z"
}
}Errors
400 invalid_body — `return_url` is not an https URL of at most 500 characters401 unauthorized — the key is missing, malformed, or revoked/pagesEvery Facebook Page connected to this account, with its posting strategy if one has been set.
Response
{
"data": [
{
"id": "b6f2...",
"page_id": "101587169481464",
"page_name": "Haat Bazaar & Butcher Shop",
"instagram_username": "haatbazaarhalal",
"strategy": {
"mode": "review",
"is_paused": false,
"tone": "casual"
}
}
]
}Errors
401 unauthorized — the key is missing, malformed, or revoked/pages/{pageId}/strategyThe niche, tone, schedule, and posting mode our AI uses for this Page. `null` if none has been set yet.
Response
{
"data": {
"niche": "Grocery",
"tone": "casual",
"mode": "review",
"is_paused": false
}
}Errors
401 unauthorized — the key is missing, malformed, or revoked404 not_found — no Page with that id on this account/pages/{pageId}/strategyPartial updates are fine — only the fields you send change. The first call for a Page must include at least `niche`, `business_description`, and `target_audience`. `posting_frequency`, `preferred_time`, and `timezone` are saved but not applied yet: the daily automation makes at most one post per Page per day, when it runs during the 09:00 UTC hour.
Request body
{
"niche": "Halal grocery & butcher shop",
"business_description": "A neighborhood halal grocery known for fresh-cut meat and weekly specials.",
"target_audience": "Families in the local Muslim community",
"tone": "casual",
"posting_frequency": 1,
"preferred_time": "09:00",
"timezone": "America/New_York",
"mode": "review"
}Response
{
"data": {
"page_id": "b6f2...",
"niche": "Halal grocery & butcher shop",
"mode": "review"
}
}Errors
400 invalid_body — a field fails validation400 missing_fields — this Page has no strategy yet and a required field is missing401 unauthorized — the key is missing, malformed, or revoked404 not_found — no Page with that id on this account/pages/{pageId}/pauseStops the daily automation for this Page until resumed. Creating drafts and publishing through this API still work while a Page is paused — so pausing is how a Page posts only when you ask it to.
Response
{
"data": {
"page_id": "b6f2...",
"is_paused": true
}
}Errors
400 no_strategy — this Page has no strategy yet401 unauthorized — the key is missing, malformed, or revoked404 not_found — no Page with that id on this account/pages/{pageId}/resumeThe inverse of /pause.
Response
{
"data": {
"page_id": "b6f2...",
"is_paused": false
}
}Errors
400 no_strategy — this Page has no strategy yet401 unauthorized — the key is missing, malformed, or revoked404 not_found — no Page with that id on this account/pages/{pageId}/draftsSend `topic` and the AI writes the caption (and an image, if enabled). Or send your own `caption` — and optionally your own `image_url`, e.g. a product photo — to skip AI generation and use your content verbatim. Either way the draft passes the same safety checks as the dashboard. A Page with no strategy works too — it is "on request only": the daily automation never posts for it, and an AI caption is written from the Page's name and category plus your `topic` (no AI image). This does NOT publish — call /posts/{postId}/publish next.
Request body
{
"topic": "this week's fresh catch"
}Response
{
"data": {
"id": "d41c...",
"caption": "Fresh catch just arrived...",
"status": "draft",
"quality_score": 0.82
}
}Errors
400 invalid_body — neither `topic` nor `caption` was sent, or a field fails validation401 unauthorized — the key is missing, malformed, or revoked404 not_found — no Page with that id on this account/pages/{pageId}/mediaAdds an image to this Page's held-media queue instead of posting it immediately. The daily scheduler uses the oldest held image before generating anything fresh — this is how another app hands dPoster a backlog of photos to post over time. `image_url` must already be publicly hosted. Optional `caption` skips AI captioning when this item is used; leave it out and our AI writes one. This does NOT create a post yet — for that, see /pages/{pageId}/drafts.
Request body
{
"image_url": "https://example.com/product-photo.jpg",
"caption": "Fresh batch just arrived!"
}Response
{
"data": {
"id": "m91a...",
"image_url": "https://example.com/product-photo.jpg",
"caption": "Fresh batch just arrived!",
"status": "available"
}
}Errors
400 invalid_body — `image_url` is missing or not a valid URL401 unauthorized — the key is missing, malformed, or revoked404 not_found — no Page with that id on this account/pages/{pageId}/mediaEvery image held for this Page, most recent first, with its status: `available` (waiting), `queued` (claimed by the scheduler this instant), `used` (already placed into a post), or `archived`.
Response
{
"data": [
{
"id": "m91a...",
"image_url": "https://example.com/product-photo.jpg",
"caption": null,
"status": "available"
}
]
}Errors
401 unauthorized — the key is missing, malformed, or revoked404 not_found — no Page with that id on this account/postsOptional query params: `page_id` to filter to one Page, `limit` (1-100, default 20).
Response
{
"data": [
{
"id": "d41c...",
"page_id": "b6f2...",
"status": "published",
"facebook_post_id": "12218...",
"published_at": "2026-09-13T13:00:00.000Z"
}
]
}Errors
401 unauthorized — the key is missing, malformed, or revoked/posts/{postId}/publishOptional body: `{ "target": "facebook" | "instagram" | "both" }`, default `facebook`. A post that is already publishing, published, or failed cannot be published again from here. If two requests for the same post arrive together, only one publishes; the other gets 409.
Request body
{
"target": "facebook"
}Response
{
"data": {
"success": true,
"facebook_post_id": "12218...",
"instagram_post_id": null
}
}Errors
400 invalid_body — `target` is not one of the allowed values401 unauthorized — the key is missing, malformed, or revoked404 not_found — no post with that id on this account409 invalid_state — the post is not draft/approved, or another request is already publishing it502 (none — check `errors` in the response body) — Facebook or Instagram rejected the publish