Organization and keys
The signed-in member, organizations, API keys and who can act, the activity log, exports, deletion, MCP grants and command line sign-in.
30 operations, 28 need an API key. Read the concepts first.
Keys are made and revoked only by a person signed in to the app; see Authentication.
Every call goes to https://app.postbroad.com; see Authentication and the error catalogue.
| Endpoint | What it does | Scope |
|---|---|---|
GET /v1/me | The signed-in member, organizations, role bindings and preferences | any key |
PATCH /v1/me | Change the signed-in member's name in this organization | any key |
PATCH /v1/me/preferences | Change theme, time display or prompt dismissals | any key |
POST /v1/auth/reauthenticate | Confirm the signed-in member's password to unlock sensitive changes | any key |
POST /v1/orgs | Create another organization for the signed-in account | any key |
POST /v1/me/deletion | Delete the signed-in person's own login in every organization | any key |
GET /v1/orgs/{org} | An organization: kind, limits and registered modules | any key |
PATCH /v1/orgs/{org} | Rename the organization or change its kind (labels and sidebar only) | org.manage |
POST /v1/orgs/{org}/ownership | The Owner hands the organization to another member and becomes an Admin | org.delete |
GET /v1/audit-integrity | Check a bounded snapshot of the organization audit chain | audit.read |
GET /v1/audit-events | The activity log, newest first | audit.read |
POST /v1/audit-exports | Queue a CSV export of the filtered activity log | audit.read |
GET /v1/audit-exports/{id} | Read the caller's audit export and its short-lived download link | audit.read |
GET /v1/audit-exports/{id}/content | Download the CSV after rechecking the requester, scope and its signature | audit.read |
GET /v1/principals | People, agents, API tokens and connected apps that can act in the organization | any key |
POST /v1/principals/{id}/revoke | End the access of an agent, an API token or a connected app | any key |
GET /v1/tokens | API keys, newest first, without secrets | any key |
POST /v1/tokens | Create an API key; the secret is in this answer only | token.manage |
POST /v1/tokens/{tokenId}/revoke | Revoke an API key; the next call with it fails | any key |
POST /v1/device/code | Start a command line sign-in; returns a device code and a user code | no key |
POST /v1/device/token | Exchange an approved device code for an API key, once | no key |
GET /v1/device/requests/{userCode} | What a command line tool asks for, by its user code | any key |
POST /v1/device/requests/{userCode}/decision | Approve or refuse a command line sign-in | any key |
GET /v1/mcp/grants | List the signed-in member's MCP grants | content.read |
DELETE /v1/mcp/grants/{grantId} | Revoke the signed-in member's own MCP grant | content.read |
POST /v1/exports | Queue an export of the interactive member's current visible account data | content.read |
GET /v1/exports/{requestId} | Read the caller's export and its short-lived download link | any key |
GET /v1/exports/{requestId}/content | Download an export after rechecking membership, scope and its principal-bound signature | any key |
POST /v1/orgs/{org}/deletion | Queue organization deletion and receive a durable receipt reference | org.delete |
GET /v1/deletions/{requestId} | Read the signed-in requester's deletion receipt even after organization erasure | any key |
#Operations
#The signed-in member, organizations, role bindings and preferences
GET/v1/me
Operation getMe. Any API key of the organization may call it.
Response 200: Me. The member
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/me" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/me", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"member": {
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"name": "string",
"avatarUrl": "string"
},
"orgs": [
{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"slug": "northwind",
"name": "string",
"kind": "creator"
}
],
"bindings": [
{
"orgId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"role": "owner",
"scopeType": "org",
"scopeId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
}
],
"preferences": {
"theme": "dark",
"timeDisplay": "brand",
"timezone": "Europe/Riga",
"dismissedPrompts": {}
}
}#Change the signed-in member's name in this organization
PATCH/v1/me
Operation updateMe. Any API key of the organization may call it.
Only an interactive member session; a key, an agent or a connected app gets 403. The name is the one people see on Team, on reviews and in the activity log of this organization. The email address does not change here.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: UpdateMeInput
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes |
Response 200: MyProfile. The stored name
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X PATCH "https://app.postbroad.com/v1/me" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'const res = await fetch("https://app.postbroad.com/v1/me", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "string"
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"name": "string"
}#Change theme, time display or prompt dismissals
PATCH/v1/me/preferences
Operation updateMyPreferences. Any API key of the organization may call it.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: UpdatePreferencesInput
| Field | Type | Required | Description |
|---|---|---|---|
theme | "dark" or "light" or "system" | no | |
timeDisplay | "brand" or "viewer" | no | |
timezone | string or null | no | |
dismissedPrompts | map of string (date-time) or null | no |
Response 200: Preferences. The stored preferences
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X PATCH "https://app.postbroad.com/v1/me/preferences" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"theme": "dark",
"timeDisplay": "brand",
"timezone": "Europe/Riga",
"dismissedPrompts": {}
}'const res = await fetch("https://app.postbroad.com/v1/me/preferences", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"theme": "dark",
"timeDisplay": "brand",
"timezone": "Europe/Riga",
"dismissedPrompts": {}
}),
});
const data = await res.json();{
"theme": "dark",
"timeDisplay": "brand",
"timezone": "Europe/Riga",
"dismissedPrompts": {}
}#Confirm the signed-in member's password to unlock sensitive changes
POST/v1/auth/reauthenticate
Operation reauthenticate. Any API key of the organization may call it.
Only an interactive member session can call this; tokens, agents and connected apps get 403. A right password marks the session as freshly signed in for ten minutes, so routes that answer reauth_required work again. A wrong password is 400 invalid_credentials. After five wrong attempts in fifteen minutes the member is locked out of this route and gets 429 rate_limited until the oldest attempt ages out. Wrong and right attempts are recorded in the audit log without the password.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: ReauthenticateInput
| Field | Type | Required | Description |
|---|---|---|---|
password | string | yes |
Response 200: Reauthenticated. The session is fresh
Errors: 400 bad_request, 400 invalid_credentials, 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/auth/reauthenticate" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"password": "string"
}'const res = await fetch("https://app.postbroad.com/v1/auth/reauthenticate", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"password": "string"
}),
});
const data = await res.json();{
"reauthenticatedAt": "2026-10-21T09:00:00Z",
"expiresAt": "2026-10-21T09:00:00Z"
}#Create another organization for the signed-in account
POST/v1/orgs
Operation createOrganization. Any API key of the organization may call it.
The caller must be a person signed in with a fresh sign-in and a verified email; a key, an agent or a connected app is refused. The caller becomes the Owner of the new organization, which has its own default workspace, its own limits (limits(org)) and its own audit log. An account can belong to at most 50 organizations. Safe to repeat with the same Idempotency-Key.
Requires an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: CreateOrgInput
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes |
Response 201: CreatedOrg. The new organization
Errors: 400 bad_request, 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 403 reauth_required, 403 limit_reached, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/orgs" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string"
}'const res = await fetch("https://app.postbroad.com/v1/orgs", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "string"
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"slug": "northwind",
"name": "string",
"kind": "creator"
}#Delete the signed-in person's own login in every organization
POST/v1/me/deletion
Operation deleteMyLogin. Any API key of the organization may call it.
Only an interactive member session that signed in within ten minutes; tokens, agents and connected apps get 403. The person types the login's email to confirm. Refused with 409 conflict (and organizations) while they are the last Owner of any organization: nothing is changed. Otherwise every membership is erased (bindings, tokens, grants and agents stop working, name and email are removed, one audit event per organization) and then the login with its sessions, linked accounts, second factor and passkeys. The login stops working first, so an interrupted deletion never leaves a login that signs in to nothing. The email address becomes free to sign up with again as a new, unlinked login; service keys, connected accounts and everything else the organization owns stay with it.
Requires an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: DeleteLoginInput
| Field | Type | Required | Description |
|---|---|---|---|
confirmEmail | string | yes |
Response 200: LoginDeleted. The login is gone
Errors: 400 bad_request, 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 403 reauth_required, 404 not_found, 409 request_in_progress, 409 conflict, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/me/deletion" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"confirmEmail": "string"
}'const res = await fetch("https://app.postbroad.com/v1/me/deletion", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"confirmEmail": "string"
}),
});
const data = await res.json();{
"organizations": 0
}#An organization: kind, limits and registered modules
GET/v1/orgs/{org}
Operation getOrg. Any API key of the organization may call it.
org is the id or the slug. An org the caller is not a member of is 404.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
org | path | yes | string |
Response 200: OrgView. The organization
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/orgs/<org>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/orgs/<org>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"slug": "northwind",
"name": "string",
"kind": "creator",
"kindChosen": false,
"limits": {
"brands": 0,
"accounts": 0,
"accountsPerNetwork": 0,
"members": 0,
"analyticsDays": 0,
"tokenKinds": 0,
"requestLogDays": 0,
"postsPerMonth": 0
},
"posts": {
"used": 0,
"limit": 0,
"monthStart": "2026-10-21T09:00:00Z",
"resetsAt": "2026-10-21T09:00:00Z"
},
"modules": [
"agent"
],
"capabilities": [
"string"
],
"readsContent": false,
"readsAnalytics": false,
"postingGuard": "off",
"createdAt": "2026-10-21T09:00:00Z",
"revision": 0
}#Rename the organization or change its kind (labels and sidebar only)
PATCH/v1/orgs/{org}
Operation updateOrg. Needs a key with the scope org.manage.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
org | path | yes | string |
Request body: UpdateOrgInput
| Field | Type | Required | Description |
|---|---|---|---|
expectedRevision | integer | yes | |
name | string | no | |
kind | OrgKind | no | |
postingGuard | "off" or "alert" or "pause" | no |
Response 200: OrgView. The organization
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 409 revision_mismatch, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X PATCH "https://app.postbroad.com/v1/orgs/<org>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"expectedRevision": 0,
"name": "string",
"kind": "creator",
"postingGuard": "off"
}'const res = await fetch("https://app.postbroad.com/v1/orgs/<org>", {
method: "PATCH",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"expectedRevision": 0,
"name": "string",
"kind": "creator",
"postingGuard": "off"
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"slug": "northwind",
"name": "string",
"kind": "creator",
"kindChosen": false,
"limits": {
"brands": 0,
"accounts": 0,
"accountsPerNetwork": 0,
"members": 0,
"analyticsDays": 0,
"tokenKinds": 0,
"requestLogDays": 0,
"postsPerMonth": 0
},
"posts": {
"used": 0,
"limit": 0,
"monthStart": "2026-10-21T09:00:00Z",
"resetsAt": "2026-10-21T09:00:00Z"
},
"modules": [
"agent"
],
"capabilities": [
"string"
],
"readsContent": false,
"readsAnalytics": false,
"postingGuard": "off",
"createdAt": "2026-10-21T09:00:00Z",
"revision": 0
}#The Owner hands the organization to another member and becomes an Admin
POST/v1/orgs/{org}/ownership
Operation transferOrgOwnership. Needs a key with the scope org.delete.
Only an Owner's interactive session that signed in within ten minutes; tokens, agents and connected apps get 403. The member must be active, someone else, and able to sign in. Audited as org.transfer_ownership.
Requires an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
org | path | yes | string |
Request body: TransferOwnershipInput
| Field | Type | Required | Description |
|---|---|---|---|
memberId | string (uuid) | yes | |
stepDown | boolean | no |
Response 200: OwnershipTransferred. The member is the Owner
Errors: 400 bad_request, 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 403 reauth_required, 403 limit_reached, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/orgs/<org>/ownership" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"memberId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"stepDown": false
}'const res = await fetch("https://app.postbroad.com/v1/orgs/<org>/ownership", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"memberId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"stepDown": false
}),
});
const data = await res.json();{
"memberId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"steppedDown": false
}#Check a bounded snapshot of the organization audit chain
GET/v1/audit-integrity
Operation getAuditIntegrity. Needs a key with the scope audit.read.
Requires organization-wide audit access. Checks database history through the captured head; this does not establish external checkpoint completeness.
Response 200: AuditIntegrity. Verification status
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/audit-integrity" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/audit-integrity", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"status": "ok",
"upTo": "string",
"events": 0,
"checkpointsChecked": 0,
"signaturesVerified": 0,
"checkpoint": {
"day": "2026-10-21",
"lastId": "string",
"headHash": "string",
"keyId": "string"
},
"problems": [
{
"kind": "string"
}
]
}#The activity log, newest first
GET/v1/audit-events
Operation listAuditEvents. Needs a key with the scope audit.read.
Needs audit.read across the organization. A caller limited to some brands gets 403 or 404, never a partial log.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
actorKind | query | no | "member" or "agent" or "token" or "mcp" or "guest" or "app" or "system" | |
q | query | no | string | |
from | query | no | string (date) | |
to | query | no | string (date) | |
cursor | query | no | string | |
limit | query | no | integer |
Response 200: AuditPage. A page of events
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/audit-events" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/audit-events", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"id": "string",
"at": "2026-10-21T09:00:00Z",
"actor": {
"id": "string",
"kind": "member",
"name": "string"
},
"action": "string",
"subject": {
"type": "string",
"id": "string",
"label": "string"
},
"beforeHash": "string",
"afterHash": "string"
}
],
"nextCursor": "string"
}#Queue a CSV export of the filtered activity log
POST/v1/audit-exports
Operation createAuditExport. Needs a key with the scope audit.read.
Needs audit.read and a fresh sign-in. The file holds the events that matched at the moment of the request, newest first, with the same columns as the list and nothing else. More than 10000 matching events is 422: narrow the filters.
Requires an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: AuditExportInput
| Field | Type | Required | Description |
|---|---|---|---|
actorKind | "member" or "agent" or "token" or "mcp" or "guest" or "app" or "system" | no | |
q | string | no | |
from | string (date) | no | |
to | string (date) | no |
Response 202: AuditExportView. The durable export request
Errors: 400 bad_request, 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 403 reauth_required, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal, 503 unavailable.
curl -X POST "https://app.postbroad.com/v1/audit-exports" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"actorKind": "member",
"q": "string",
"from": "2026-10-21",
"to": "2026-10-21"
}'const res = await fetch("https://app.postbroad.com/v1/audit-exports", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"actorKind": "member",
"q": "string",
"from": "2026-10-21",
"to": "2026-10-21"
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"rows": 0,
"downloadUrl": "https://example.com"
}#Read the caller's audit export and its short-lived download link
GET/v1/audit-exports/{id}
Operation getAuditExport. Needs a key with the scope audit.read.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) |
Response 200: AuditExportView. The export
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal, 503 unavailable.
curl -X GET "https://app.postbroad.com/v1/audit-exports/<id>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/audit-exports/<id>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"rows": 0,
"downloadUrl": "https://example.com"
}#Download the CSV after rechecking the requester, scope and its signature
GET/v1/audit-exports/{id}/content
Operation downloadAuditExport. Needs a key with the scope audit.read.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) | |
org | query | yes | string (uuid) | |
expires | query | yes | string | |
signature | query | yes | string |
Response 200. A private CSV file
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/audit-exports/<id>/content?org=<org>&expires=<expires>&signature=<signature>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/audit-exports/<id>/content?org=<org>&expires=<expires>&signature=<signature>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();#People, agents, API tokens and connected apps that can act in the organization
GET/v1/principals
Operation listPrincipals. Any API key of the organization may call it.
A caller who holds members.manage or audit.read across the organization sees everyone. Any other caller sees only themselves and the agents, keys and connected apps that act for them, so the list never exposes other people's emails.
Response 200: PrincipalList. The principals
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/principals" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/principals", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"kind": "member",
"name": "string",
"detail": "string",
"role": "string",
"actsFor": "string",
"status": "active",
"lastActiveAt": "2026-10-21T09:00:00Z",
"mode": "approve",
"postsPerDay": 0,
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
]
}
]
}#End the access of an agent, an API token or a connected app
POST/v1/principals/{id}/revoke
Operation revokePrincipal. Any API key of the organization may call it.
Agents are disabled, API tokens and MCP grants are revoked; every later call with them is refused. Needs a fresh sign-in. The caller must own the agent, key or grant, or hold agent.manage, token.manage or members.manage respectively where it works. A person's id is 422: people are managed on the team page. Revoking something already revoked succeeds. The action is recorded in the audit log.
Requires an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
id | path | yes | string (uuid) |
Response 200: PrincipalRevoked. The principal is revoked
Errors: 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 403 reauth_required, 404 not_found, 409 request_in_progress, 422 idempotency_key_reused, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/principals/<id>/revoke" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://app.postbroad.com/v1/principals/<id>/revoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"status": "revoked"
}#API keys, newest first, without secrets
GET/v1/tokens
Operation listApiTokens. Any API key of the organization may call it.
Needs a signed-in person; a key, an agent or a connected app is refused. A caller who holds token.manage sees every key of the organization, anyone else sees only the keys they own.
Response 200: ApiTokenList. The API keys
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/tokens" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/tokens", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"name": "string",
"kind": "personal",
"prefix": "string",
"scopes": [
"string"
],
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"readOnly": false,
"ipAllowlist": [
"string"
],
"ownerType": "member",
"ownerId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"expiresAt": "2026-10-21T09:00:00Z",
"lastUsedAt": "2026-10-21T09:00:00Z",
"revokedAt": "2026-10-21T09:00:00Z",
"createdAt": "2026-10-21T09:00:00Z"
}
]
}#Create an API key; the secret is in this answer only
POST/v1/tokens
Operation createApiToken. Needs a key with the scope token.manage.
Needs a fresh sign-in and token.manage where the key will work. A key never carries a capability its creator lacks there, and a service key needs explicit scopes. The secret is returned once and stored only as a hash. The action is recorded in the audit log.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: CreateApiTokenInput
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
kind | ApiTokenKind | yes | |
scopes | string[] | no | |
brandIds | string (uuid)[] | no | |
readOnly | boolean | no | |
ipAllowlist | string[] | no | |
expiresAt | string (date-time) or null | no |
Response 201: CreatedApiToken. The key and its secret
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 403 reauth_required, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/tokens" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"kind": "personal",
"scopes": [
"string"
],
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"readOnly": false,
"ipAllowlist": [
"string"
],
"expiresAt": "2026-10-21T09:00:00Z"
}'const res = await fetch("https://app.postbroad.com/v1/tokens", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "string",
"kind": "personal",
"scopes": [
"string"
],
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"readOnly": false,
"ipAllowlist": [
"string"
],
"expiresAt": "2026-10-21T09:00:00Z"
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"name": "string",
"kind": "personal",
"prefix": "string",
"scopes": [
"string"
],
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"readOnly": false,
"ipAllowlist": [
"string"
],
"ownerType": "member",
"ownerId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"expiresAt": "2026-10-21T09:00:00Z",
"lastUsedAt": "2026-10-21T09:00:00Z",
"revokedAt": "2026-10-21T09:00:00Z",
"createdAt": "2026-10-21T09:00:00Z",
"browser": {
"name": "string",
"version": "string",
"paused": false,
"firstSeenAt": "2026-10-21T09:00:00Z",
"lastSeenAt": "2026-10-21T09:00:00Z",
"boundAccounts": 0,
"selfTest": {
"checkedAt": "2026-10-21T09:00:00Z",
"results": [
{
"network": null,
"ok": false
}
]
}
},
"secret": "string"
}#Revoke an API key; the next call with it fails
POST/v1/tokens/{tokenId}/revoke
Operation revokeApiToken. Any API key of the organization may call it.
The owner of a key can always revoke it; anyone else needs token.manage where it works. Needs a signed-in person. Revoking a key that is already revoked succeeds. The action is recorded in the audit log.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
tokenId | path | yes | string (uuid) |
Request body: RevokeApiTokenInput
Response 200: ApiToken. The key, now revoked
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/tokens/<tokenId>/revoke" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{}'const res = await fetch("https://app.postbroad.com/v1/tokens/<tokenId>/revoke", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"name": "string",
"kind": "personal",
"prefix": "string",
"scopes": [
"string"
],
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"readOnly": false,
"ipAllowlist": [
"string"
],
"ownerType": "member",
"ownerId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"expiresAt": "2026-10-21T09:00:00Z",
"lastUsedAt": "2026-10-21T09:00:00Z",
"revokedAt": "2026-10-21T09:00:00Z",
"createdAt": "2026-10-21T09:00:00Z",
"browser": {
"name": "string",
"version": "string",
"paused": false,
"firstSeenAt": "2026-10-21T09:00:00Z",
"lastSeenAt": "2026-10-21T09:00:00Z",
"boundAccounts": 0,
"selfTest": {
"checkedAt": "2026-10-21T09:00:00Z",
"results": [
{
"network": null,
"ok": false
}
]
}
}
}#Start a command line sign-in; returns a device code and a user code
POST/v1/device/code
Operation deviceAuthorize. No key needed.
Public. Follows RFC 8628: the body is form or JSON with client_id, an optional scope and name. Answers 200 with the codes, 400 {"error": "invalid_client"} or invalid_scope, and 429 with Retry-After when an address asks too often (10 per 10 minutes) or the installation is flooded. A code lives for ten minutes and works once.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: DeviceAuthorizationRequest
| Field | Type | Required | Description |
|---|---|---|---|
client_id | string | yes | |
scope | string | no | |
name | string | no |
Response 200: DeviceAuthorization. The device code and the user code
Errors: 400 bad_request, 429 rate_limited.
curl -X POST "https://app.postbroad.com/v1/device/code" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"client_id": "string",
"scope": "string",
"name": "string"
}'const res = await fetch("https://app.postbroad.com/v1/device/code", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"client_id": "string",
"scope": "string",
"name": "string"
}),
});
const data = await res.json();{
"device_code": "string",
"user_code": "string",
"verification_uri": "string",
"verification_uri_complete": "string",
"expires_in": 0,
"interval": 0
}#Exchange an approved device code for an API key, once
POST/v1/device/token
Operation deviceToken. No key needed.
Public. Follows RFC 8628 3.4: the body is form or JSON with grant_type, device_code and client_id. Answers 200 with the key once the request is approved. Until then 400 authorization_pending; polled sooner than interval seconds, 400 slow_down with a longer interval; refused, 400 access_denied; late, 400 expired_token; unknown or already collected, 400 invalid_grant. The key is made at this call, so it never sits in the database.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Request body: DeviceTokenRequest
| Field | Type | Required | Description |
|---|---|---|---|
grant_type | "urn:ietf:params:oauth:grant-type:device_code" | yes | |
device_code | string | yes | |
client_id | string | yes |
Response 200: DeviceToken. The API key
Errors: 400 bad_request, 429 rate_limited.
curl -X POST "https://app.postbroad.com/v1/device/token" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"grant_type": "urn:ietf:params:oauth:grant-type:device_code",
"device_code": "string",
"client_id": "string"
}'const res = await fetch("https://app.postbroad.com/v1/device/token", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"grant_type": "urn:ietf:params:oauth:grant-type:device_code",
"device_code": "string",
"client_id": "string"
}),
});
const data = await res.json();{
"access_token": "string",
"token_type": "Bearer",
"expires_in": 0,
"scope": "string"
}#What a command line tool asks for, by its user code
GET/v1/device/requests/{userCode}
Operation getDeviceRequest. Any API key of the organization may call it.
Needs a signed-in person; a key, an agent or a connected app is refused. 404 for a code that is unknown, decided, collected or late; five wrong codes in 15 minutes answer 429.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
userCode | path | yes | string |
Response 200: DeviceRequest. The waiting request
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/device/requests/<userCode>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/device/requests/<userCode>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"userCode": "string",
"clientId": "string",
"clientName": "string",
"scopes": [
"string"
],
"deviceName": "string",
"userAgent": "string",
"requestedAt": "2026-10-21T09:00:00Z",
"expiresAt": "2026-10-21T09:00:00Z"
}#Approve or refuse a command line sign-in
POST/v1/device/requests/{userCode}/decision
Operation decideDeviceRequest. Any API key of the organization may call it.
Needs a fresh sign-in by a person. Approving also needs token.manage where the key will work, and the key can carry only some of what the tool asked for and only what the approver holds there. Refusing needs only the sign-in. Both are recorded in the audit log; the key itself is made when the tool collects it, in the name of the approver.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
userCode | path | yes | string |
Request body: DeviceDecisionInput
| Field | Type | Required | Description |
|---|---|---|---|
decision | "approve" or "deny" | yes | |
scopes | string[] | no | |
brandIds | string (uuid)[] | no | |
readOnly | boolean | no | |
expiresInDays | integer | no |
Response 200: DeviceDecision. The decision was recorded
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 403 reauth_required, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/device/requests/<userCode>/decision" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"decision": "approve",
"scopes": [
"string"
],
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"readOnly": false,
"expiresInDays": 1
}'const res = await fetch("https://app.postbroad.com/v1/device/requests/<userCode>/decision", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"decision": "approve",
"scopes": [
"string"
],
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"readOnly": false,
"expiresInDays": 1
}),
});
const data = await res.json();{
"status": "approved"
}#List the signed-in member's MCP grants
GET/v1/mcp/grants
Operation listMyMcpGrants. Needs a key with the scope content.read.
Requires a genuine interactive member session. Does not return token material.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
cursor | query | no | string | |
limit | query | no | integer |
Response 200: McpGrantPage. Own grants
Errors: 400 bad_request, 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/mcp/grants" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/mcp/grants", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"data": [
{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"clientId": "string",
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"scopes": [
"string"
],
"mode": "approve",
"budget": {},
"createdAt": "2026-10-21T09:00:00Z",
"revokedAt": "2026-10-21T09:00:00Z"
}
],
"nextCursor": "string"
}#Revoke the signed-in member's own MCP grant
DELETE/v1/mcp/grants/{grantId}
Operation revokeMyMcpGrant. Needs a key with the scope content.read.
Requires a genuine interactive member session. Cannot manage another person's grant, even as an organization administrator.
Requires an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
grantId | path | yes | string (uuid) |
Response 200: McpGrantView. Revoked own grant
Errors: 400 bad_request, 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X DELETE "https://app.postbroad.com/v1/mcp/grants/<grantId>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://app.postbroad.com/v1/mcp/grants/<grantId>", {
method: "DELETE",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"clientId": "string",
"brandIds": [
"0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
],
"scopes": [
"string"
],
"mode": "approve",
"budget": {},
"createdAt": "2026-10-21T09:00:00Z",
"revokedAt": "2026-10-21T09:00:00Z"
}#Queue an export of the interactive member's current visible account data
POST/v1/exports
Operation createAccountExport. Needs a key with the scope content.read.
Needs a signed-in member session with a fresh sign-in. No API key, agent or MCP client can ask for, read or download an account export.
Requires an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Response 202: ExportRequestView. The durable export request
Errors: 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 403 reauth_required, 404 not_found, 409 request_in_progress, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/exports" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)"const res = await fetch("https://app.postbroad.com/v1/exports", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"createdAt": "2026-10-21T09:00:00Z",
"finishedAt": "2026-10-21T09:00:00Z",
"expiresAt": "2026-10-21T09:00:00Z",
"errorCode": "string",
"downloadUrl": "https://example.com"
}#Read the caller's export and its short-lived download link
GET/v1/exports/{requestId}
Operation getAccountExport. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
requestId | path | yes | string (uuid) |
Response 200: ExportRequestView. The caller's export request
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/exports/<requestId>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/exports/<requestId>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"createdAt": "2026-10-21T09:00:00Z",
"finishedAt": "2026-10-21T09:00:00Z",
"expiresAt": "2026-10-21T09:00:00Z",
"errorCode": "string",
"downloadUrl": "https://example.com"
}#Download an export after rechecking membership, scope and its principal-bound signature
GET/v1/exports/{requestId}/content
Operation downloadAccountExport. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
requestId | path | yes | string (uuid) | |
org | query | yes | string (uuid) | |
expires | query | yes | string | |
signature | query | yes | string |
Response 200. An NDJSON account export
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/exports/<requestId>/content?org=<org>&expires=<expires>&signature=<signature>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/exports/<requestId>/content?org=<org>&expires=<expires>&signature=<signature>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();#Queue organization deletion and receive a durable receipt reference
POST/v1/orgs/{org}/deletion
Operation requestOrgDeletion. Needs a key with the scope org.delete.
Accepts an Idempotency-Key header.
Add ?dry_run=true where the operation supports it to get a preview and write nothing.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
org | path | yes | string |
Request body: DeletionRequestInput
| Field | Type | Required | Description |
|---|---|---|---|
requestId | string (uuid) | no |
Response 202: DeletionRequestView. The durable deletion request
Errors: 400 idempotency_key_required, 401 unauthenticated, 403 forbidden, 403 reauth_required, 404 not_found, 409 request_in_progress, 422 validation_failed, 422 idempotency_key_reused, 429 rate_limited, 500 internal.
curl -X POST "https://app.postbroad.com/v1/orgs/<org>/deletion" \
-H "Authorization: Bearer $POSTBROAD_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"requestId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
}'const res = await fetch("https://app.postbroad.com/v1/orgs/<org>/deletion", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
"Idempotency-Key": crypto.randomUUID(),
"Content-Type": "application/json",
},
body: JSON.stringify({
"requestId": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01"
}),
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"createdAt": "2026-10-21T09:00:00Z",
"finishedAt": "2026-10-21T09:00:00Z",
"errorCode": "string",
"receipt": {}
}#Read the signed-in requester's deletion receipt even after organization erasure
GET/v1/deletions/{requestId}
Operation getOrgDeletion. Any API key of the organization may call it.
Parameters
| Name | In | Required | Type | Description |
|---|---|---|---|---|
requestId | path | yes | string (uuid) |
Response 200: DeletionRequestView. The caller's deletion status and receipt
Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.
curl -X GET "https://app.postbroad.com/v1/deletions/<requestId>" \
-H "Authorization: Bearer $POSTBROAD_TOKEN"const res = await fetch("https://app.postbroad.com/v1/deletions/<requestId>", {
headers: {
Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
},
});
const data = await res.json();{
"id": "0b7e8f8e-5a4c-4d0e-9f53-0c8f2a6d1e01",
"state": "queued",
"createdAt": "2026-10-21T09:00:00Z",
"finishedAt": "2026-10-21T09:00:00Z",
"errorCode": "string",
"receipt": {}
}Schemas
Every type the operations above use
#AccountExportDocument
Type: string
#ApiToken
An API key as listed. The secret is never part of it.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
name | string | yes | |
kind | ApiTokenKind | yes | |
prefix | string | yes | |
scopes | string[] | yes | |
brandIds | string (uuid)[] | yes | |
readOnly | boolean | yes | |
ipAllowlist | string[] | yes | |
ownerType | "member" or "agent" | yes | |
ownerId | string (uuid) | yes | |
expiresAt | string (date-time) or null | yes | |
lastUsedAt | string (date-time) or null | yes | |
revokedAt | string (date-time) or null | yes | |
createdAt | string (date-time) | yes | |
browser | PairedBrowser or null | no |
#ApiTokenKind
Type: "personal" or "service"
#ApiTokenList
API keys, newest first. A caller who holds token.manage sees every key of the organization, anyone else sees only their own. At most 500.
| Field | Type | Required | Description |
|---|---|---|---|
data | ApiToken[] | yes |
#AuditEvent
| Field | Type | Required | Description |
|---|---|---|---|
id | string | yes | |
at | string (date-time) | yes | |
actor | object | yes | |
action | string | yes | |
subject | object | yes | |
beforeHash | string or null | yes | |
afterHash | string or null | yes |
#AuditExportDocument
Type: string
#AuditExportInput
| Field | Type | Required | Description |
|---|---|---|---|
actorKind | "member" or "agent" or "token" or "mcp" or "guest" or "app" or "system" | no | |
q | string | no | |
from | string (date) | no | |
to | string (date) | no |
#AuditExportView
A CSV export of the filtered activity log: queued, built by the export worker, then downloadable for an hour.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
state | "queued" or "running" or "done" or "failed" | yes | |
rows | integer or null | yes | |
downloadUrl | string (uri) or null | yes |
#AuditIntegrity
| Field | Type | Required | Description |
|---|---|---|---|
status | "ok" or "failed" or "unverified" or "incomplete" | yes | |
upTo | string | yes | |
events | integer | yes | |
checkpointsChecked | integer | yes | |
signaturesVerified | integer | yes | |
checkpoint | object or null | yes | |
problems | object[] | yes |
#AuditPage
| Field | Type | Required | Description |
|---|---|---|---|
data | AuditEvent[] | yes | |
nextCursor | string or null | yes |
#BrowserNetwork
A network the extension posts to (BROWSER_CAPABLE_NETWORKS).
Type: "facebook_groups" or "facebook_profile" or "substack_notes" or "skool" or "linkedin" or "threads" or "pinterest" or "instagram" or "facebook"
#BrowserSelfTest
| Field | Type | Required | Description |
|---|---|---|---|
checkedAt | string (date-time) | yes | |
results | object[] | yes |
#CostEstimate
| Field | Type | Required | Description |
|---|---|---|---|
unit | string | yes | |
amountMicros | integer | yes | |
currency | "USD" | yes | |
billedBy | "postbroad" or "third_party" | yes |
#CreateApiTokenInput
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
kind | ApiTokenKind | yes | |
scopes | string[] | no | |
brandIds | string (uuid)[] | no | |
readOnly | boolean | no | |
ipAllowlist | string[] | no | |
expiresAt | string (date-time) or null | no |
#CreateOrgInput
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes |
#CreatedApiToken
A new API key with its secret. This answer is the only time the secret exists.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
name | string | yes | |
kind | ApiTokenKind | yes | |
prefix | string | yes | |
scopes | string[] | yes | |
brandIds | string (uuid)[] | yes | |
readOnly | boolean | yes | |
ipAllowlist | string[] | yes | |
ownerType | "member" or "agent" | yes | |
ownerId | string (uuid) | yes | |
expiresAt | string (date-time) or null | yes | |
lastUsedAt | string (date-time) or null | yes | |
revokedAt | string (date-time) or null | yes | |
createdAt | string (date-time) | yes | |
browser | PairedBrowser or null | no | |
secret | string | yes |
#CreatedOrg
The new organization. Its creator is its Owner; select it with the Postbroad-Org header.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
slug | string | yes | |
name | string | yes | |
kind | OrgKind | yes |
#DeleteLoginInput
| Field | Type | Required | Description |
|---|---|---|---|
confirmEmail | string | yes |
#DeletionPreview
| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string (uuid) | yes | |
inventory | object | yes | |
deliveries | object[] | yes | |
irreversible | true | yes | |
completionRequiresDrain | true | yes | |
publishedRemotePostsAreNotDeleted | true | yes | |
financialEvidenceRetained | true | yes | |
effect | "freeze_drain_archive_erase" | yes |
#DeletionRequestInput
| Field | Type | Required | Description |
|---|---|---|---|
requestId | string (uuid) | no |
#DeletionRequestView
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
state | "queued" or "running" or "done" or "failed" | yes | |
createdAt | string (date-time) | yes | |
finishedAt | string (date-time) or null | yes | |
errorCode | string or null | yes | |
receipt | map of any or null | yes |
#DestinationKind
Type: "feed" or "board" or "subreddit" or "chat" or "channel" or "community" or "group" or "forum" or "list" or "publication" or "organization" or "playlist"
#DeviceAuthorization
A pending sign-in. The device code is shown here once.
| Field | Type | Required | Description |
|---|---|---|---|
device_code | string | yes | |
user_code | string | yes | |
verification_uri | string | yes | |
verification_uri_complete | string | yes | |
expires_in | integer | yes | |
interval | integer | yes |
#DeviceAuthorizationRequest
| Field | Type | Required | Description |
|---|---|---|---|
client_id | string | yes | |
scope | string | no | |
name | string | no |
#DeviceDecision
| Field | Type | Required | Description |
|---|---|---|---|
status | "approved" or "denied" | yes |
#DeviceDecisionInput
| Field | Type | Required | Description |
|---|---|---|---|
decision | "approve" or "deny" | yes | |
scopes | string[] | no | |
brandIds | string (uuid)[] | no | |
readOnly | boolean | no | |
expiresInDays | integer | no |
#DeviceRequest
A sign-in waiting for a decision.
| Field | Type | Required | Description |
|---|---|---|---|
userCode | string | yes | |
clientId | string | yes | |
clientName | string | yes | |
scopes | string[] | yes | |
deviceName | string or null | yes | |
userAgent | string or null | yes | |
requestedAt | string (date-time) | yes | |
expiresAt | string (date-time) | yes |
#DeviceToken
The API key a person approved. This answer is the only time the secret exists.
| Field | Type | Required | Description |
|---|---|---|---|
access_token | string | yes | |
token_type | "Bearer" | yes | |
expires_in | integer | yes | |
scope | string | yes |
#DeviceTokenRequest
| Field | Type | Required | Description |
|---|---|---|---|
grant_type | "urn:ietf:params:oauth:grant-type:device_code" | yes | |
device_code | string | yes | |
client_id | string | yes |
#DispatchingRef
A delivery that had already started (or gone live) when the change committed; it may still publish.
| Field | Type | Required | Description |
|---|---|---|---|
deliveryId | string (uuid) | yes | |
channelId | string (uuid) | yes | |
state | "sending" or "accepted" or "processing" or "published" or "unknown" | yes | |
claimedAt | string (date-time) or null | yes | |
versionNo | integer | yes |
#ErrorCode
Type: "bad_request" or "org_required" or "unauthenticated" or "reauth_required" or "invalid_credentials" or "forbidden" or "not_found" or "method_not_allowed" or "idempotency_key_required" or "idempotency_key_reused" or "request_in_progress" or "revision_mismatch" or "preview_required" or "preview_stale" or "dispatch_started" or "duplicate_risk_unacknowledged" or "conflict" or "validation_failed" or "rule_violation" or "budget_exhausted" or "limit_reached" or "organization_frozen" or "approval_required" or "unsupported_media_type" or "payload_too_large" or "rate_limited" or "internal" or "unavailable" or "busy" or "timeout"
#ExportRequestView
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
state | "queued" or "running" or "done" or "failed" | yes | |
createdAt | string (date-time) | yes | |
finishedAt | string (date-time) or null | yes | |
expiresAt | string (date-time) or null | yes | |
errorCode | string or null | yes | |
downloadUrl | string (uri) or null | yes |
#Limits
| Field | Type | Required | Description |
|---|---|---|---|
brands | integer or null | yes | |
accounts | integer or null | yes | |
accountsPerNetwork | integer or null | yes | |
members | integer or null | yes | |
analyticsDays | integer or null | yes | |
tokenKinds | integer or null | yes | |
requestLogDays | integer or null | yes | |
postsPerMonth | integer or null | yes |
#LoginDeleted
| Field | Type | Required | Description |
|---|---|---|---|
organizations | integer | yes |
#McpGrantPage
| Field | Type | Required | Description |
|---|---|---|---|
data | McpGrantView[] | yes | |
nextCursor | string or null | yes |
#McpGrantView
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
clientId | string | yes | |
brandIds | string (uuid)[] | yes | |
scopes | string[] | yes | |
mode | "approve" or "autopilot" | yes | |
budget | object or null | yes | |
createdAt | string (date-time) | yes | |
revokedAt | string (date-time) or null | yes |
#Me
The signed-in member, the organizations they belong to, their role bindings and preferences.
| Field | Type | Required | Description |
|---|---|---|---|
member | object | yes | |
orgs | object[] | yes | |
bindings | RoleBindingView[] | yes | |
preferences | Preferences | yes |
#MyProfile
The signed-in member's name as stored in this organization.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
name | string | yes |
#Network
Type: "facebook" or "instagram" or "threads" or "linkedin" or "bluesky" or "x" or "tiktok" or "youtube" or "google_business_profile" or "reddit" or "telegram" or "discord" or "slack" or "pinterest" or "dribbble" or "mastodon" or "whop" or "twitch" or "kick" or "farcaster" or "vk" or "lemmy" or "mewe" or "nostr" or "listmonk" or "wordpress" or "medium" or "hashnode" or "devto" or "ghost" or "snapchat" or "odnoklassniki" or "tumblr" or "flickr" or "vimeo" or "dailymotion" or "soundcloud" or "beehiiv" or "discourse" or "circle" or "mighty_networks" or "viber" or "line" or "hatena_blog" or "wechat" or "kuaishou" or "zalo" or "band" or "pixelfed" or "misskey" or "peertube" or "hive" or "lens" or "moltbook" or "facebook_groups" or "facebook_profile" or "substack_notes" or "skool"
#OrgKind
Type: "creator" or "agency" or "developer"
#OrgView
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
slug | string | yes | |
name | string | yes | |
kind | OrgKind | yes | |
kindChosen | boolean | yes | |
limits | Limits | yes | |
posts | PostAllowance | yes | |
modules | "agent" or "generation"[] | yes | |
capabilities | string[] | yes | |
readsContent | boolean | no | |
readsAnalytics | boolean | no | |
postingGuard | "off" or "alert" or "pause" | yes | |
createdAt | string (date-time) | yes | |
revision | integer | yes |
#OwnershipTransferred
| Field | Type | Required | Description |
|---|---|---|---|
memberId | string (uuid) | yes | |
steppedDown | boolean | yes |
#PairedBrowser
| Field | Type | Required | Description |
|---|---|---|---|
name | string or null | yes | |
version | string or null | yes | |
paused | boolean | yes | |
firstSeenAt | string (date-time) | yes | |
lastSeenAt | string (date-time) | yes | |
boundAccounts | integer | yes | |
selfTest | BrowserSelfTest or null | yes |
#PostAllowance
| Field | Type | Required | Description |
|---|---|---|---|
used | integer | yes | |
limit | integer or null | yes | |
monthStart | string (date-time) | yes | |
resetsAt | string (date-time) | yes |
#Preferences
| Field | Type | Required | Description |
|---|---|---|---|
theme | "dark" or "light" or "system" | yes | |
timeDisplay | "brand" or "viewer" | yes | |
timezone | string or null | yes | |
dismissedPrompts | map of string (date-time) | yes |
#PreflightResult
Type: object
#PreviewDestination
| Field | Type | Required | Description |
|---|---|---|---|
channelId | string (uuid) | yes | |
network | Network | yes | |
handle | string or null | yes | |
scheduledAt | string (date-time) or null | yes | |
payloadHash | string | yes | |
payload | PreviewPayload | yes | What will be sent to one destination, from the frozen payload model. |
manualHandoff | object | no | |
preflight | PreflightResult | yes | |
pendingChecks | string[] | yes | |
cost | CostEstimate[] | yes | |
verificationLevel | VerificationLevel | yes |
#PreviewPayload
What will be sent to one destination, from the frozen payload model.
| Field | Type | Required | Description |
|---|---|---|---|
v | 1 | yes | |
orgId | string (uuid) | yes | |
brandId | string (uuid) | yes | |
postVersionId | string (uuid) | yes | |
contentHash | string | yes | |
variantId | string (uuid) | yes | |
channelId | string (uuid) | yes | |
network | string | yes | |
connectorVersion | string | yes | |
destination | object | yes | |
intendedVisibility | "public" or "followers" or "private" or "draft" or "inbox" or "scheduled_native" | yes | |
aiLabel | boolean | yes | |
utm | map of string | yes | |
parts | object[] | yes |
#PreviewResult
| Field | Type | Required | Description |
|---|---|---|---|
receipt | string | yes | |
expiresAt | string (date-time) | yes | |
postId | string (uuid) | yes | |
versionNo | integer | yes | |
contentHash | string | yes | |
mode | "schedule" or "publish_now" | yes | |
blocked | boolean | yes | |
requiresReview | boolean | yes | |
destinations | PreviewDestination[] | yes | |
totalCost | CostEstimate[] | yes |
#Principal
One person, agent, API token or connected app that can act in the organization.
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
kind | "member" or "guest" or "client" or "agent" or "token" or "mcp" | yes | |
name | string | yes | |
detail | string or null | yes | |
role | string or null | yes | |
actsFor | string or null | yes | |
status | "active" or "invited" or "revoked" | yes | |
lastActiveAt | string (date-time) or null | yes | |
mode | "approve" or "autopilot" or null | yes | |
postsPerDay | integer or null | yes | |
brandIds | string (uuid)[] or null | yes |
#PrincipalList
Principals, people first and then agents, keys and connected apps. At most 1000 per kind.
| Field | Type | Required | Description |
|---|---|---|---|
data | Principal[] | yes |
#PrincipalRevoked
| Field | Type | Required | Description |
|---|---|---|---|
id | string (uuid) | yes | |
status | "revoked" | yes |
#Problem
The one error body of every route (RFC 9457 problem details with a stable code). Another organization's resource, a Postbroad-Org the member does not belong to and a resource outside a token's brand allowlist all answer 404 not_found, never 403.
| Field | Type | Required | Description |
|---|---|---|---|
type | string | yes | |
title | string | yes | |
status | integer | yes | |
code | ErrorCode | yes | |
detail | string | yes | |
requestId | string | yes | |
retryable | boolean | yes | |
errors | ProblemItem[] | no | |
preview | PreviewResult | no | |
currentRevision | integer | no | |
alreadyDispatching | DispatchingRef[] | no | |
limit | object | no | |
retryAfterSeconds | integer | no |
#ProblemItem
| Field | Type | Required | Description |
|---|---|---|---|
path | string | yes | |
rule | string | yes | |
message | string | yes | |
channelId | string (uuid) or null | no |
#ReauthenticateInput
Proof of identity for sensitive changes: the signed-in member's password.
| Field | Type | Required | Description |
|---|---|---|---|
password | string | yes |
#Reauthenticated
The session now counts as freshly signed in until expiresAt.
| Field | Type | Required | Description |
|---|---|---|---|
reauthenticatedAt | string (date-time) | yes | |
expiresAt | string (date-time) | yes |
#RevokeApiTokenInput
Type: object
#RoleBindingView
| Field | Type | Required | Description |
|---|---|---|---|
orgId | string (uuid) | yes | |
role | "owner" or "admin" or "editor" or "approver" or "viewer" | yes | |
scopeType | "org" or "workspace" or "brand" | yes | |
scopeId | string (uuid) | yes |
#TransferOwnershipInput
| Field | Type | Required | Description |
|---|---|---|---|
memberId | string (uuid) | yes | |
stepDown | boolean | no |
#UpdateMeInput
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes |
#UpdateOrgInput
| Field | Type | Required | Description |
|---|---|---|---|
expectedRevision | integer | yes | |
name | string | no | |
kind | OrgKind | no | |
postingGuard | "off" or "alert" or "pause" | no |
#UpdatePreferencesInput
| Field | Type | Required | Description |
|---|---|---|---|
theme | "dark" or "light" or "system" | no | |
timeDisplay | "brand" or "viewer" | no | |
timezone | string or null | no | |
dismissedPrompts | map of string (date-time) or null | no |
#VerificationLevel
Type: "full" or "url_only" or "accepted_no_readback" or "manual"
Last generated 23 Nov 2026, from the contracts the API runs on.