# Tempocast API

> Schedule posts, upload media, follow results and answer comments on YouTube, Instagram, Facebook and TikTok from your own code. Keys, scopes, limits and every route.

Source: https://tempocast.app/docs/api

Help · Last updated 1 December 2026

The Tempocast API does from your own code what you do in the app: read brands and accounts, upload media, create and schedule posts, follow how they did, and answer comments. It runs the same rules as the app, so roles, approvals and posting limits apply in the same way.

## Getting started

- In Tempocast, open [Settings > API](https://app.tempocast.app/settings?s=api) and choose **New key**. Owners and admins can make keys.
- Pick what the key can do, and optionally limit it to some brands or give it an end date. The key is shown once: keep it in your app's secrets.
- Check it works:

curl https://api.tempocast.app/v1/me \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" The machine-readable reference is at [https://api.tempocast.app/v1/openapi.json](https://api.tempocast.app/v1/openapi.json) (OpenAPI 3.0). Import it into Postman, Insomnia or a code generator.

## Keys and scopes

A key acts as the person who made it, with their role, cut down to the key's scopes. If that person leaves the workspace or stops being an owner or admin, the key stops working until another owner or admin takes it over in Settings > API.

| Scope | Lets the key |
| --- | --- |
| read | Read brands, accounts, posts, media, comments, analytics and brand kits. |
| write | Create and change drafts, upload and import media, leave team notes, use the board and update brand kits. Posts it schedules wait for approval. |
| publish | Let posts go out: schedule without waiting for approval, approve posts and retry failed ones. |
| comments | Reply to comments, hide them and mark conversations done. |
| webhooks | Add, change, test and remove webhooks, and read their deliveries. |

Adding or removing brands, connecting accounts and managing the team stay in the app.

## Requests and errors

- Send JSON with Content-Type: application/json. Times are ISO 8601, like 2026-12-05T09:00:00+01:00.
- Lists return { "data": [...], "nextCursor": "…" }. Pass cursor to get the next page, and limit (up to 200, default 50).
- Errors look like { "error": { "code": "invalid", "message": "…", "details": ["…"], "requestId": "…" } }. The message is written for a person, so you can show it as is.

| Status | Code | Means |
| --- | --- | --- |
| 400 | invalid | Something in the request isn't valid. details lists each problem. |
| 401 | unauthorized | No key, or an unknown, revoked or expired key. |
| 403 | forbidden | The key doesn't have the scope, its maker's role can't do this, or its maker lost access. |
| 404 | not_found | No such route, or the item doesn't exist or isn't in the key's brands. |
| 405 | method_not_allowed | The route exists with another method. Allow lists them. |
| 409 | conflict | The item isn't in a state that allows this, such as editing a post that is publishing, or a request with the same Idempotency-Key is still running. |
| 413 | too_large | The body is over 1 MB. Send files through an upload instead. |
| 422 | unprocessable | An Idempotency-Key was reused for a different request. |
| 429 | rate_limited | Too many requests, or a platform's own limit. Wait for Retry-After seconds. |
| 500 | internal | Something went wrong on our side. Retrying is safe with an Idempotency-Key; quote the requestId if it keeps happening. |
| 503 | not_configured | That part of Tempocast isn't set up yet. |

## Retries and limits

POSTs that create or send something accept an Idempotency-Key header (the reference marks them). Send a new random value with each request, and the same value when you retry it: you get the first result back, marked Idempotent-Replayed: true, instead of a second post or reply. Keys are kept for 24 hours. Answers that can change on a retry (409, 429 and 5xx) aren't kept, so the retry runs again.

A comment reply sent without a key is still sent once: the same text to the same conversation from the same API key within the hour counts as one reply.

Times in a query string need their + encoded as %2B, or use Z for UTC. A plain + is read back as one where it can only mean a time offset.

A key can make 120 requests a minute, and a workspace 600 across all its keys. Each response carries RateLimit-Limit, RateLimit-Remaining and RateLimit-Reset. Uploads, imports and AI also count toward the app's own daily limits.

The API runs in the EU, like the rest of Tempocast.

## Receiving webhooks

Instead of asking every few minutes, let Tempocast tell your server when something happens. Add an endpoint in [Settings > API](https://app.tempocast.app/settings?s=api) or with POST /v1/webhooks, choose its events, and optionally one brand. A workspace can have 10.

| Event | Sent when, and what data holds |
| --- | --- |
| post.published | A post went out on every account, or only some. It's sent again if a retry later gets it out on the rest. post, campaigns (each with id and name), and results with each account's status, link and error. |
| post.failed | A post couldn't go out on any account. The same fields, with each account's reason. |
| comment.received | Someone commented on Instagram, Facebook or YouTube (comments from before Tempocast started reading the account's comments aren't sent). conversationId, accountId, platform, isReply and comment. Answer with POST /v1/comments/{conversationId}/reply. |
| account.disconnected | A connection expired or needs reconnecting. account and reason. |

Each one is a POST with a JSON body:

{ "id": "evt_3kQ9…", "type": "post.published", "created": "2026-12-05T08:00:04.120Z", "organizationId": "…", "brandId": "…", "data": { "post": { "id": "…", "status": "partially_published", … }, "campaigns": [ { "id": "…", "name": "Black Friday" } ], "results": [ … ] } } **Check the signature.** The Tempocast-Signature header looks like t=1764921604,v1=5257a8…. Compute HMAC-SHA256 of t + "." + the raw body, using the endpoint's whole secret as the key (the whsec_… string, shown once when you add it), and compare it with v1. Refuse requests whose t is more than 5 minutes off. For 24 hours after you rotate the secret there are two v1 values, one per secret: accept either.

import { createHmac, timingSafeEqual } from "node:crypto"; // rawBody: the request body exactly as received, before JSON parsing. const header = req.headers["tempocast-signature"] ?? ""; const t = Number(header.match(/t=(\d+)/)?.[1]); const expected = Buffer.from( createHmac("sha256", process.env.TEMPOCAST_WEBHOOK_SECRET) .update(`${t}.${rawBody}`).digest("hex"), ); const ok = Math.abs(Date.now() / 1000 - t) < 300 && [...header.matchAll(/v1=([0-9a-f]+)/g)].some(([, sig]) => { const got = Buffer.from(sig); return got.length === expected.length && timingSafeEqual(got, expected); }); **Answer quickly.** A 2xx within 10 seconds counts as delivered; do slow work afterwards. Redirects aren't followed. A failed delivery is tried again after 1 minute, 5 minutes, 30 minutes, 2 hours, 6 hours and 12 hours, then given up. Events can arrive more than once or out of order: use id to skip ones you've handled, and created to order them.

An endpoint that fails for 3 days in a row is turned off, and owners and admins get an email. Turn it back on in Settings or with PATCH /v1/webhooks/{id} and "active": true; events from while it was off aren't sent. Settings shows each endpoint's last 50 deliveries, and any of them can be sent again.

### Slack, Microsoft Teams, Discord and Google Chat

Paste a chat app's incoming-webhook URL and each event is posted to that channel as a readable message, with a button back to Tempocast, instead of the JSON above. Retries and turning off work the same way. To get the JSON at one of these URLs anyway, for instance at your own Power Automate flow, choose &ldquo;Send the event as JSON&rdquo; in Settings or set "format": "json".

| App | Where to get the URL |
| --- | --- |
| Slack | An app with Incoming Webhooks turned on (https://hooks.slack.com/services/…). Workflow Builder URLs get the JSON. |
| Microsoft Teams | The channel's Workflows: &ldquo;Post to a channel when a webhook request is received&rdquo;. The message is an Adaptive Card, and the event rides along in an event field. Teams answers before the flow runs, so a delivered message can still fail inside the flow; its run history in Power Automate shows why. |
| Discord | Channel settings > Integrations > Webhooks (https://discord.com/api/webhooks/…). Mentions in captions and comments don't ping anyone. |
| Google Chat | The space's Apps & integrations > Webhooks (https://chat.googleapis.com/v1/spaces/…). |

Endpoints must be https on a public host name. Each request has Tempocast-Event and Tempocast-Delivery headers, and a User-Agent starting with Tempocast-Webhooks.

## Account

### GET /me

**Who this key is.** The workspace, the key's scopes and brands, who it acts as, and its rate limits. Works with any scope.

Scope: readReturns 200

#### Returns

Me

curl https://api.tempocast.app/v1/me \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@115@@ @@116@@ **List brands.** The brands this key can see, by name.

Scope: readList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: Brand[], nextCursor } · Brand

curl https://api.tempocast.app/v1/brands \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@119@@ **List a brand's accounts.** Connected YouTube channels, Instagram accounts, Facebook Pages and TikTok accounts. Use an account's id as socialAccountId when creating a post.

Scope: readList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The brand's id |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: Account[], nextCursor } · Account

curl https://api.tempocast.app/v1/brands/ID/accounts \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@122@@ **Get a brand kit.** Voice, example captions, language, words to avoid, audience, hashtag sets, caption templates and links, with each platform's best recent posts.

Scope: readReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The brand's id |

#### Returns

BrandKit

curl https://api.tempocast.app/v1/brands/ID/kit \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@125@@ **Update a brand kit.** Send only the sections to change. Each section sent replaces that section whole; send "" or [] to clear one. Owners and admins only.

Scope: writeReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The brand's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| voice | string optional | How the brand writes, in a few sentences. |
| examples | string[] optional | Up to 5 captions that sound right. |
| language | string optional | The language the brand writes in, as a BCP 47 tag such as "fr-FR", "fr-CA", "es-419", "de" or "en-GB". Tempocast writes in about 40 languages; an unknown one is refused. |
| formality | "informal" \| "formal" optional | How to address readers, for languages that have both: "informal" (tu, du, tú) or "formal" (vous, Sie, usted). Leave it out to follow the example captions. |
| alsoIn | string[] optional | Up to 2 other languages the brand also posts in, as BCP 47 tags; offered first when translating. |
| dialect | "egyptian" \| "gulf" \| "levantine" \| "maghrebi" \| "msa" optional | For Arabic: the dialect to write in. |
| avoid | string[] optional | Words and phrases to avoid (the composer warns, never blocks). |
| audience | string optional | Who the brand talks to. |
| hashtagSets | object[] optional | Named sets of hashtags, up to 12. |
| hashtagSets[].name | string |  |
| hashtagSets[].tags | string[] |  |
| templates | object[] optional | Named caption templates; {slot} marks a placeholder. |
| templates[].name | string |  |
| templates[].text | string |  |
| links | object[] optional | Named links; utm adds UTM tags with the platform filled in. |
| links[].label | string |  |
| links[].url | string |  |
| links[].utm | boolean optional | Default true. |

#### Returns

BrandKitChange

curl -X PATCH https://api.tempocast.app/v1/brands/ID/kit \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{}' @@129@@ @@130@@ **Describe platform options.** Per platform: post formats, caption limits, media rules and the options each target accepts, as JSON Schema.

Scope: readReturns 200

#### Returns

PlatformOptions

curl https://api.tempocast.app/v1/platform-options \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@132@@ **List a YouTube channel's playlists.** To pass as options.playlistIds on a YouTube target.

Scope: readList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The YouTube account's id |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: object[], nextCursor }

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| title | string |  |

curl https://api.tempocast.app/v1/accounts/ID/youtube-playlists \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@135@@ **Get TikTok creator info.** TikTok requires showing the creator's nickname and only the privacy levels their account allows before posting.

Scope: readReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The TikTok account's id |

#### Returns

TikTokCreatorInfo

curl https://api.tempocast.app/v1/accounts/ID/tiktok-creator-info \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@138@@ @@139@@ **List campaigns.** The campaigns this key can see, by name: every-brand ones and those of its brands. With brand, only the campaigns that brand's posts can take.

Scope: readList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string optional | Only this brand |
| includeArchived | query · "true" \| "false" optional | Include archived campaigns |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: Campaign[], nextCursor } · Campaign

curl https://api.tempocast.app/v1/campaigns \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@142@@ **Create a campaign.** For one brand, or for every brand when brandId is left out (keys that see every brand, made by an owner or admin). Starts hidden from client reports. Names are unique per brand, ignoring case.

Scope: writeIdempotency-KeyReturns 201

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| name | string |  |
| brandId | string optional | The brand it's for; null or left out for every brand. |
| color | "teal" \| "rust" \| "olive" \| "plum" \| "indigo" \| "pine" \| "berry" \| "ochre" optional |  |

#### Returns

Campaign

curl -X POST https://api.tempocast.app/v1/campaigns \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "name": "Black Friday", "brandId": "b_123", "color": "rust" }' @@145@@ @@146@@ **List posts.** Scheduled and published posts between two times, earliest first. Defaults to 30 days back and 90 days ahead; at most a year at a time. Drafts are under /v1/posts/drafts.

Scope: readList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string optional | Only this brand |
| from | query · time optional | Start, inclusive (ISO 8601 with offset) |
| to | query · time optional | End, exclusive (ISO 8601 with offset) |
| status | query · "pending_approval" \| "scheduled" \| "publishing" \| "published" \| "partially_published" \| "failed" \| "awaiting_user" \| "waiting_limit" optional |  |
| campaign | query · string optional | Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns) |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: PostSummary[], nextCursor } · PostSummary

curl https://api.tempocast.app/v1/posts \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@149@@ **Create a post.** schedule.mode: "draft", "now", "queue" (the brand's next free slot) or "at" with an ISO 8601 time. Each target needs socialAccountId, format and options (see /v1/platform-options). A post that would go out needs the publish scope; without it, the post waits for approval.

Scope: writeIdempotency-KeyReturns 201

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| brandId | string | The brand the post belongs to. |
| caption | string optional | Each platform's own limit applies too. Default "". |
| mediaIds | string[] optional | Uploaded media, in order. |
| targets | object[] | Where it goes: one entry per account. |
| targets[].socialAccountId | string | An account of the brand. |
| targets[].format | "video" \| "short" \| "reel" \| "feed" \| "carousel" \| "story" | Which formats each platform takes: see platform options. |
| targets[].options | object optional | Per platform, such as a YouTube title or TikTok privacy level. |
| schedule | { mode: "draft" } or { mode: "now" } or { mode: "queue" } or { mode: "at" } | draft saves it, now posts at once, queue takes the brand's next free slot, at posts at a time. |
| schedule.at | time | When mode is at: the time, ISO 8601 with offset. |
| campaignIds | string[] optional | Campaign ids (see list_campaigns). Left out on an edit: the post keeps its campaigns. Empty list: no campaigns. |
| confirmRepeat | "instagram" \| "tiktok"[] optional | Only after the person said yes: post again to Instagram or TikTok accounts that already published one of these files. They may show a repeated post to fewer people. |
| paidPartnership | boolean optional | true for a paid partnership, sponsorship or gifted product: turns on Instagram's Paid partnership label, YouTube's "Includes paid promotion" and, once TikTok has approved Tempocast, TikTok's Branded content on a direct post. Facebook has no label apps can set. |

#### Returns

Post

curl -X POST https://api.tempocast.app/v1/posts \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "brandId": "b_123", "caption": "Autumn blend is back.", "mediaIds": [ "m_456" ], "targets": [ { "socialAccountId": "a_789", "format": "reel", "options": {} } ], "schedule": { "mode": "at", "at": "2026-12-05T09:00:00+01:00" } }' @@152@@ **List drafts and posts waiting for approval.** Scope: read.

Scope: readList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string optional | Only this brand |
| campaign | query · string optional | Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns) |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: PostSummary[], nextCursor } · PostSummary

curl https://api.tempocast.app/v1/posts/drafts \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@155@@ **Get a post.** With each account's status, error and link, and the latest numbers once published.

Scope: readReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Returns

Post

curl https://api.tempocast.app/v1/posts/ID \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@158@@ **Update a post.** Send only the fields to change; targets and mediaIds are replaced whole. Only for posts that haven't started publishing.

Scope: writeReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| caption | string optional | Each platform's own limit applies too. |
| mediaIds | string[] optional | Uploaded media, in order. Replaces the list. |
| targets | object[] optional | Where it goes: one entry per account. Replaces the list. |
| targets[].socialAccountId | string |  |
| targets[].format | "video" \| "short" \| "reel" \| "feed" \| "carousel" \| "story" |  |
| targets[].options | object optional |  |
| schedule | { mode: "draft" } or { mode: "now" } or { mode: "queue" } or { mode: "at" } optional | draft saves it, now posts at once, queue takes the brand's next free slot, at posts at a time. |
| schedule.at | time | When mode is at: the time, ISO 8601 with offset. |
| campaignIds | string[] optional | Campaign ids (see /v1/campaigns). Replaces the list; an empty list removes every campaign. |

#### Returns

Post

curl -X PATCH https://api.tempocast.app/v1/posts/ID \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{}' @@162@@ **Delete a post.** Published posts stay on the platforms.

Scope: writeReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| deleted | "true" |  |

curl -X DELETE https://api.tempocast.app/v1/posts/ID \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@165@@ **Approve a post.** A post waiting for approval goes out at its time. Owners and admins only. While its brandCheck has needs_a_look warnings nobody checked, it answers 409 with them: show them to the person, then approve again with acknowledge set to the keys they chose to approve anyway.

Scope: publishIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| acknowledge | string[] optional | Keys of brandCheck warnings the person saw and approved anyway. |

#### Returns

Post

curl -X POST https://api.tempocast.app/v1/posts/ID/approve \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{}' @@169@@ **Ask for changes.** Send a post waiting for approval back to its author as a draft, with a note.

Scope: publishIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| note | string |  |

#### Returns

Post

curl -X POST https://api.tempocast.app/v1/posts/ID/request-changes \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "note": "…" }' @@173@@ **Reschedule a post.** Without the publish scope, a rescheduled post waits for approval again.

Scope: writeIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| at | time | ISO 8601 time with offset. |

#### Returns

Post

curl -X POST https://api.tempocast.app/v1/posts/ID/reschedule \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "at": "2026-12-05T09:00:00+01:00" }' @@177@@ **Unschedule a post.** Turns a scheduled or waiting post back into a draft.

Scope: writeIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Returns

Post

curl -X POST https://api.tempocast.app/v1/posts/ID/unschedule \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@180@@ **Retry a failed post.** Publishes the failed accounts of a failed or partly published post again, now.

Scope: publishIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Returns

Post

curl -X POST https://api.tempocast.app/v1/posts/ID/retry \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@183@@ **Share a post with a client.** A private link a client opens without an account to approve the post or ask for changes. Emailed when clientEmail is given.

Scope: writeIdempotency-KeyReturns 201

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| clientName | string |  |
| clientEmail | string optional |  |
| expiresInDays | integer optional |  |
| onTimeout | "hold" \| "post" optional | hold (default): it doesn't go out until approved. |

#### Returns

ClientLink

curl -X POST https://api.tempocast.app/v1/posts/ID/share \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "clientName": "…" }' @@187@@ **List a post's team notes.** Team notes never reach the platforms or a client. Needs the write scope, like the team.

Scope: writeList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: NoteThread[], nextCursor } · NoteThread

curl https://api.tempocast.app/v1/posts/ID/notes \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@190@@ **Add a team note.** Start a thread, or reply in one with threadId. Write @ and a teammate's name to mention them.

Scope: writeIdempotency-KeyReturns 201

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The post's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| text | string |  |
| threadId | string optional |  |
| topic | "general" \| "caption" \| "media" \| "time" \| "accounts" optional |  |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| threadId | string |  |
| mentioned | integer |  |

curl -X POST https://api.tempocast.app/v1/posts/ID/notes \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "text": "…" }' @@194@@ @@195@@ **List media.** A brand's uploaded files, newest first. Files are removed from storage 10 days after every post using them has published, unless a post is kept as evergreen.

Scope: readList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string | The brand's id |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: Media[], nextCursor } · Media

curl https://api.tempocast.app/v1/media \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@198@@ **Start an upload.** Returns the media item and where to send the file. single: PUT the whole file to upload.url with upload.headers. multipart (over 100 MB): PUT each partSize slice to its part's URL, keep each response's ETag, then complete with them. The URLs last 2 hours.

Scope: writeIdempotency-KeyReturns 201

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| brandId | string |  |
| filename | string |  |
| mimeType | string |  |
| sizeBytes | integer |  |
| width | integer optional |  |
| height | integer optional |  |
| durationMs | integer optional |  |
| tags | string[] optional |  |

#### Returns

Upload

curl -X POST https://api.tempocast.app/v1/media/uploads \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "brandId": "…", "filename": "…", "mimeType": "…", "sizeBytes": 0 }' @@201@@ **Complete an upload.** After the file is sent. For multipart uploads, send uploadId and every part's ETag. Checks the whole file arrived.

Scope: writeIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The media item's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| uploadId | string optional |  |
| parts | object[] optional |  |
| parts[].partNumber | integer |  |
| parts[].etag | string |  |

#### Returns

Media

curl -X POST https://api.tempocast.app/v1/media/uploads/ID/complete \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{}' @@205@@ **Import media from a link.** Copies an image or video from a public https link (Google Drive and Dropbox share links work) into a brand's library. Waits until it's copied.

Scope: writeIdempotency-KeyReturns 201

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| brandId | string |  |
| url | string |  |
| filename | string optional |  |
| tags | string[] optional |  |

#### Returns

Media

curl -X POST https://api.tempocast.app/v1/media/import \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "brandId": "…", "url": "…" }' @@208@@ @@209@@ **List comment conversations.** Instagram, Facebook, YouTube and Threads comments on the brands' posts, newest activity first. TikTok isn't included.

Scope: readList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string optional | Only this brand |
| platform | query · "instagram" \| "facebook" \| "youtube" \| "threads" optional |  |
| status | query · "open" \| "done" optional |  |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: Conversation[], nextCursor } · Conversation

curl https://api.tempocast.app/v1/comments \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@212@@ **Reply to a conversation.** Replies publicly as the brand, under the conversation's first comment. On Instagram and YouTube, start with the person's @handle.

Scope: commentsIdempotency-KeyReturns 201

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The conversation's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| text | string |  |
| markDone | boolean optional | Default true. |

#### Returns

Reply

curl -X POST https://api.tempocast.app/v1/comments/ID/reply \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "text": "…" }' @@216@@ **Hide or show a comment.** Instagram: only the writer still sees it. Facebook: the writer and their friends. YouTube: held for review.

Scope: commentsIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The comment's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| hidden | boolean optional | Default true. |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| hidden | boolean |  |

curl -X POST https://api.tempocast.app/v1/comments/ID/hide \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{}' @@220@@ **Mark a conversation done.** Or open again with done: false. For everyone in the workspace.

Scope: commentsIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The conversation's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| done | boolean optional | Default true. |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| status | "open" \| "done" |  |

curl -X POST https://api.tempocast.app/v1/comments/ID/done \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{}' @@224@@ @@225@@ **Get performance.** Views, engagement rate, posts and followers gained over a rolling period, each with the period before, per platform and per brand, and the top posts. When posts are in campaigns, campaigns has each campaign's totals and first-7-day numbers against the period before. With campaign, the numbers are for those campaigns' posts only, and followers are left out. The same numbers as the Analytics page.

Scope: readReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string optional | Only this brand |
| period | query · "7d" \| "28d" \| "90d" optional |  |
| platform | query · "youtube" \| "instagram" \| "facebook" \| "tiktok" \| "threads" \| "linkedin" \| "bluesky" optional |  |
| campaign | query · string optional | Only posts in any of these campaigns: ids, comma-separated (see /v1/campaigns) |

#### Returns

Performance

curl https://api.tempocast.app/v1/analytics/performance \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@228@@ **Get insights.** What has worked on each account over 90 days, and what to post next. The same patterns as "What's working" on the Analytics page.

Scope: readReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string optional | Only this brand |
| platform | query · "youtube" \| "instagram" \| "facebook" \| "tiktok" \| "threads" \| "linkedin" \| "bluesky" optional |  |

#### Returns

Insights

curl https://api.tempocast.app/v1/analytics/insights \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@231@@ @@232@@ **List a brand's content board.** Ideas before they're posts, in the columns idea, production, ready, scheduled and published. The board is for the team, so it needs the write scope.

Scope: writeList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string | The brand's id |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: Card[], nextCursor } · Card

curl https://api.tempocast.app/v1/board \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@235@@ **Add a card.** Goes to the top of its column (idea unless set).

Scope: writeIdempotency-KeyReturns 201

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| brandId | string |  |
| title | string |  |
| brief | string optional |  |
| ownerId | string optional | A teammate's user id. |
| dueOn | string optional | YYYY-MM-DD. |
| platforms | "youtube" \| "instagram" \| "facebook" \| "tiktok" \| "threads" \| "linkedin" \| "bluesky"[] optional |  |
| column | "idea" \| "production" \| "ready" optional |  |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| column | string |  |

curl -X POST https://api.tempocast.app/v1/board/cards \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "brandId": "…", "title": "…" }' @@238@@ **Move a card.** To the bottom of idea, production or ready. Scheduled and published follow the card's post.

Scope: writeIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The card's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| column | "idea" \| "production" \| "ready" |  |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| column | string |  |

curl -X POST https://api.tempocast.app/v1/board/cards/ID/move \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "column": "idea" }' @@242@@ @@243@@ **Get the brand's week plan.** Plan my week: the drafted posts for the coming week, with accounts, times, captions and what each item still needs. Team only, so it needs the write scope. Paid plans.

Scope: writeReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| brand | query · string | The brand's id |

#### Returns

WeekPlan

curl https://api.tempocast.app/v1/plans/current \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@246@@ **Draft this week's plan.** Starts drafting now; it takes a minute or two, then read it with GET /v1/plans/current. Spends the brand's plan AI actions. At most 3 runs per brand per week.

Scope: writeIdempotency-KeyReturns 201

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| brandId | string |  |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| planId | string |  |
| status | string |  |

curl -X POST https://api.tempocast.app/v1/plans \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "brandId": "…" }' @@249@@ **Change a planned item.** Captions per account, the YouTube title, the time, a platform choice (TikTok privacy, made for kids) or remove. Only before the item is approved.

Scope: writeReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The plan item's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| captions | object[] optional |  |
| captions[].socialAccountId | string |  |
| captions[].caption | string |  |
| youtubeTitle | string optional |  |
| at | time optional | New time, ISO 8601 with offset. |
| privacyLevel | "PUBLIC_TO_EVERYONE" \| "MUTUAL_FOLLOW_FRIENDS" \| "FOLLOWER_OF_CREATOR" \| "SELF_ONLY" optional |  |
| tiktokInboxOk | boolean optional |  |
| madeForKids | boolean optional |  |
| captionChecked | boolean optional |  |
| remove | boolean optional |  |
| restore | boolean optional | Put back a removed item. |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| itemId | string |  |
| kind | string |  |
| state | string |  |
| at | string |  |

curl -X PATCH https://api.tempocast.app/v1/plans/items/ID \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{}' @@253@@ **Approve the week plan.** Schedules the ready posts and puts ideas on the board. Without the publish scope, posts wait for a person to approve them. Items that would repeat a file on Instagram or TikTok are skipped unless listed in repeatOk.

Scope: writeIdempotency-KeyReturns 200

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| brandId | string | Brand id. |
| itemIds | string[] optional |  |
| repeatOk | string[] optional | Item ids the person said may post again. |
| clientLink | boolean optional |  |

#### Returns

WeekPlanApproval

curl -X POST https://api.tempocast.app/v1/plans/approve \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{ "brandId": "…" }' @@256@@ @@257@@ **List webhooks.** Scope: webhooks.

Scope: webhooksList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: Webhook[], nextCursor } · Webhook

curl https://api.tempocast.app/v1/webhooks \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@260@@ **Add a webhook.** The URL must be https on a public host name; redirects aren't followed. secret signs every delivery and is returned only here, so store it now. Not idempotent: a retry adds a second endpoint (a workspace can have 10).

Scope: webhooksReturns 201

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| url | string | https only, a public host name, the standard port. |
| events | "post.published" \| "post.failed" \| "comment.received" \| "account.disconnected"[] | Which events to send. |
| brandId | string optional | Only this brand's events. Keys limited to some brands must set it. |
| description | string optional | A note for your team, shown in Settings. |
| format | "auto" \| "json" optional | "auto" (default): a Slack, Microsoft Teams, Discord or Google Chat webhook URL gets a readable message. "json": always the event, for your own Power Automate or Logic Apps flow. |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| webhook | Webhook |  |
| secret | string | whsec_…, shown once. |

curl -X POST https://api.tempocast.app/v1/webhooks \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "url": "https://hooks.example.com/tempocast", "events": [ "post.published", "post.failed" ], "description": "Posting log" }' @@263@@ **Get a webhook.** Scope: webhooks.

Scope: webhooksReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The webhook's id |

#### Returns

Webhook

curl https://api.tempocast.app/v1/webhooks/ID \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@266@@ **Change a webhook.** Send only the fields to change. active: true turns back on an endpoint that was turned off; events from while it was off aren't sent.

Scope: webhooksIdempotency-KeyReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The webhook's id |

#### Body

| Field | Type | Notes |
| --- | --- | --- |
| url | string optional |  |
| events | "post.published" \| "post.failed" \| "comment.received" \| "account.disconnected"[] optional |  |
| brandId | string optional | null for every brand. |
| description | string optional |  |
| format | "auto" \| "json" optional | "auto" (default): a Slack, Microsoft Teams, Discord or Google Chat webhook URL gets a readable message. "json": always the event, for your own Power Automate or Logic Apps flow. |
| active | boolean optional |  |

#### Returns

Webhook

curl -X PATCH https://api.tempocast.app/v1/webhooks/ID \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" \ -H "Content-Type: application/json" \ -H "Idempotency-Key: $(uuidgen)" \ -d '{}' @@270@@ **Remove a webhook.** Deliveries still waiting are dropped.

Scope: webhooksReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The webhook's id |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| deleted | "true" |  |

curl -X DELETE https://api.tempocast.app/v1/webhooks/ID \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@273@@ **Rotate the signing secret.** Returns a new secret, shown once. For 24 hours each delivery carries two v1 signatures, one with each secret, so you can switch without missing events.

Scope: webhooksReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The webhook's id |

#### Returns

object

| Field | Type | Notes |
| --- | --- | --- |
| webhook | Webhook |  |
| secret | string |  |

curl -X POST https://api.tempocast.app/v1/webhooks/ID/rotate-secret \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@276@@ **Send a test event.** Sends a signed webhook.test event now and returns what the endpoint answered. Tests are tried once and don't count towards turning an endpoint off.

Scope: webhooksReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The webhook's id |

#### Returns

WebhookTestResult

curl -X POST https://api.tempocast.app/v1/webhooks/ID/test \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@279@@ **List deliveries.** The last 100, newest first. Deliveries are kept for 30 days.

Scope: webhooksList

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The webhook's id |
| limit | query · integer optional |  |
| cursor | query · string optional | nextCursor from the previous page |

#### Returns

{ data: WebhookDelivery[], nextCursor } · WebhookDelivery

curl https://api.tempocast.app/v1/webhooks/ID/deliveries \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@282@@ **Send a delivery again.** Sends the same event (same id) now, once, and returns what the endpoint answered.

Scope: webhooksReturns 200

#### Parameters

| Name | In | Notes |
| --- | --- | --- |
| id | path · string | The delivery's id |

#### Returns

WebhookTestResult

curl -X POST https://api.tempocast.app/v1/webhook-deliveries/ID/resend \ -H "Authorization: Bearer $TEMPOCAST_API_KEY" @@285@@ @@286@@ @@78@@ @@287@@ @@79@@ @@288@@ @@80@@ @@289@@ @@81@@ @@290@@ @@82@@ @@291@@ @@292@@ @@293@@ @@83@@ @@294@@ @@84@@ @@295@@ @@85@@ @@296@@ @@86@@ @@297@@ @@87@@ @@298@@ Brand check (rules only, never blocks a post): words to avoid, missing disclosure labels, made for kids, alt text

| Field | Type | Notes |
| --- | --- | --- |
| summary | string | "All clear", "2 to look at" or "1 suggestion". |
| open | integer | needs_a_look warnings nobody checked. |
| suggestions | integer |  |
| savedAt | string optional | Publishing started: the check as it stood then, never recomputed. |
| items | object[] |  |
| items[].key | string | Pass it in acknowledge when approving. |
| items[].kind | "avoid" \| "paid_label" \| "ai_label" \| "kids_mismatch" \| "kids_paid" \| "alt_text" |  |
| items[].level | "needs_a_look" \| "suggestion" \| "note" |  |
| items[].message | string |  |
| items[].fix | string optional |  |
| items[].checked | object |  |

### ClientLink

| Field | Type | Notes |
| --- | --- | --- |
| url | string |  |
| posts | integer |  |
| expiresAt | time |  |
| emailed | boolean |  |

### NoteThread

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| topic | string |  |
| resolvedAt | time |  |
| notes | object[] |  |
| notes[].id | string |  |
| notes[].by | string |  |
| notes[].text | string |  |
| notes[].at | time |  |

### Media

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| brandId | string |  |
| kind | "image" \| "video" \| "audio" | audio: a voiceover made with ElevenLabs. It can't be posted on its own. |
| filename | string |  |
| mimeType | string |  |
| sizeBytes | integer |  |
| width | integer |  |
| height | integer |  |
| durationMs | integer |  |
| tags | string[] |  |
| uploaded | boolean | False until the upload is completed. |
| aiGenerated | boolean | Made with HeyGen or ElevenLabs from Tempocast. |
| draft | boolean | A generated file nobody has marked as reviewed yet. Watch or listen to it before posting. |
| url | string | Public URL. Null once the file is removed from storage (10 days after publishing, unless kept as evergreen). |
| createdAt | time |  |

### Upload

| Field | Type | Notes |
| --- | --- | --- |
| media | Media |  |
| upload | UploadPlan |  |

### UploadPlan

| Field | Type | Notes |
| --- | --- | --- |
| mode | "single" \| "multipart" \| "proxy" | single: one PUT. multipart: one PUT per part, then complete with each part's ETag. |
| method | "PUT" |  |
| url | string optional | single and proxy: where to PUT the whole file. |
| headers | object optional | Headers to send with the PUT. |
| uploadId | string optional | multipart: pass back to complete. |
| partSize | integer optional | multipart: bytes per part (the last part is shorter). |
| parts | object[] optional |  |
| parts[].partNumber | integer |  |
| parts[].url | string |  |
| expiresAt | time | The URLs stop working after this. |

### Conversation

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| brandId | string |  |
| platform | "instagram" \| "facebook" \| "youtube" \| "threads" |  |
| accountHandle | string |  |
| post | object |  |
| post.title | string |  |
| post.link | string |  |
| status | "open" \| "done" |  |
| canReply | boolean | False until the account is reconnected in the app. |
| comment | Comment |  |
| replies | Comment[] |  |
| lastActivityAt | time |  |

### Comment

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| author | object |  |
| author.name | string |  |
| author.handle | string |  |
| author.isBrand | boolean |  |
| text | string | Null when the comment was deleted on the platform. |
| at | time |  |
| hidden | boolean |  |
| replyState | "sending" \| "sent" \| "failed" | Replies sent from Tempocast. |
| error | string |  |

### Reply

| Field | Type | Notes |
| --- | --- | --- |
| commentId | string |  |
| state | "sending" \| "sent" \| "failed" |  |
| error | string |  |

### Performance

| Field | Type | Notes |
| --- | --- | --- |
| period | object |  |
| period.from | string |  |
| period.to | string |  |
| period.days | number |  |
| period.timezone | string |  |
| updatedAt | any |  |

### Insights

| Field | Type | Notes |
| --- | --- | --- |
| insights | object[] |  |
| suggestions | object[] |  |

### Card

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| brandId | string |  |
| title | string |  |
| brief | string |  |
| column | "idea" \| "production" \| "ready" \| "scheduled" \| "published" |  |
| owner | object |  |
| owner.id | string |  |
| owner.name | string |  |
| dueOn | string | YYYY-MM-DD in the brand's time zone. |
| platforms | "youtube" \| "instagram" \| "facebook" \| "tiktok" \| "threads" \| "linkedin" \| "bluesky"[] |  |
| mediaIds | string[] |  |
| post | object |  |
| post.id | string |  |
| post.status | string |  |
| post.scheduledAt | time |  |
| openNotes | integer |  |

### WeekPlan

| Field | Type | Notes |
| --- | --- | --- |
| settings | object |  |
| plan | object |  |
| items | object[] |  |

### WeekPlanApproval

| Field | Type | Notes |
| --- | --- | --- |
| results | object[] |  |
| results[].itemId | string |  |
| results[].result | string |  |

### Webhook

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| url | string |  |
| description | string |  |
| events | "post.published" \| "post.failed" \| "comment.received" \| "account.disconnected"[] |  |
| brandId | string | Only this brand's events, or null for every brand. |
| format | "auto" \| "json" | "auto": chat apps' webhook URLs get a readable message; "json": always the event. |
| chatApp | "slack" \| "teams" \| "discord" \| "google_chat" | The chat app a message is sent to, or null when the event JSON is sent. |
| active | boolean | False once turned off, by hand or after 3 days of failed deliveries. |
| disabledReason | string |  |
| failingSince | time | When deliveries started failing, if they still are. |
| rotating | boolean | True for 24 hours after a secret rotation, while the old secret also signs. |
| createdAt | time |  |

### WebhookTestResult

| Field | Type | Notes |
| --- | --- | --- |
| deliveryId | string |  |
| ok | boolean | True when the endpoint answered 2xx within 10 seconds. |
| status | integer | The endpoint's HTTP status. |
| error | string |  |
| ms | integer | How long it took to answer. |

### WebhookDelivery

| Field | Type | Notes |
| --- | --- | --- |
| id | string |  |
| eventId | string | The same for every endpoint and every resend of one event: deduplicate on it. |
| type | "post.published" \| "post.failed" \| "comment.received" \| "account.disconnected" \| "webhook.test" |  |
| status | "pending" \| "sent" \| "failed" | pending: waiting for its next try; sent: answered 2xx; failed: gave up. |
| attempts | integer |  |
| responseStatus | integer |  |
| error | string |  |
| nextAttemptAt | time |  |
| deliveredAt | time |  |
| createdAt | time |  |
