Skip to content
DocsOrganization and keys

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.

EndpointWhat it doesScope
GET /v1/meThe signed-in member, organizations, role bindings and preferencesany key
PATCH /v1/meChange the signed-in member's name in this organizationany key
PATCH /v1/me/preferencesChange theme, time display or prompt dismissalsany key
POST /v1/auth/reauthenticateConfirm the signed-in member's password to unlock sensitive changesany key
POST /v1/orgsCreate another organization for the signed-in accountany key
POST /v1/me/deletionDelete the signed-in person's own login in every organizationany key
GET /v1/orgs/{org}An organization: kind, limits and registered modulesany key
PATCH /v1/orgs/{org}Rename the organization or change its kind (labels and sidebar only)org.manage
POST /v1/orgs/{org}/ownershipThe Owner hands the organization to another member and becomes an Adminorg.delete
GET /v1/audit-integrityCheck a bounded snapshot of the organization audit chainaudit.read
GET /v1/audit-eventsThe activity log, newest firstaudit.read
POST /v1/audit-exportsQueue a CSV export of the filtered activity logaudit.read
GET /v1/audit-exports/{id}Read the caller's audit export and its short-lived download linkaudit.read
GET /v1/audit-exports/{id}/contentDownload the CSV after rechecking the requester, scope and its signatureaudit.read
GET /v1/principalsPeople, agents, API tokens and connected apps that can act in the organizationany key
POST /v1/principals/{id}/revokeEnd the access of an agent, an API token or a connected appany key
GET /v1/tokensAPI keys, newest first, without secretsany key
POST /v1/tokensCreate an API key; the secret is in this answer onlytoken.manage
POST /v1/tokens/{tokenId}/revokeRevoke an API key; the next call with it failsany key
POST /v1/device/codeStart a command line sign-in; returns a device code and a user codeno key
POST /v1/device/tokenExchange an approved device code for an API key, onceno key
GET /v1/device/requests/{userCode}What a command line tool asks for, by its user codeany key
POST /v1/device/requests/{userCode}/decisionApprove or refuse a command line sign-inany key
GET /v1/mcp/grantsList the signed-in member's MCP grantscontent.read
DELETE /v1/mcp/grants/{grantId}Revoke the signed-in member's own MCP grantcontent.read
POST /v1/exportsQueue an export of the interactive member's current visible account datacontent.read
GET /v1/exports/{requestId}Read the caller's export and its short-lived download linkany key
GET /v1/exports/{requestId}/contentDownload an export after rechecking membership, scope and its principal-bound signatureany key
POST /v1/orgs/{org}/deletionQueue organization deletion and receive a durable receipt referenceorg.delete
GET /v1/deletions/{requestId}Read the signed-in requester's deletion receipt even after organization erasureany 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
curl -X GET "https://app.postbroad.com/v1/me" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/me", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

FieldTypeRequiredDescription
namestringyes

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
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"
}'
TypeScript
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();
Response 200
{
  "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

FieldTypeRequiredDescription
theme"dark" or "light" or "system"no
timeDisplay"brand" or "viewer"no
timezonestring or nullno
dismissedPromptsmap of string (date-time) or nullno

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
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": {}
}'
TypeScript
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();
Response 200
{
  "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

FieldTypeRequiredDescription
passwordstringyes

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
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"
}'
TypeScript
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();
Response 200
{
  "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

FieldTypeRequiredDescription
namestringyes

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
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"
}'
TypeScript
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();
Response 201
{
  "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

FieldTypeRequiredDescription
confirmEmailstringyes

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
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"
}'
TypeScript
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();
Response 200
{
  "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

NameInRequiredTypeDescription
orgpathyesstring

Response 200: OrgView. The organization

Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.

curl
curl -X GET "https://app.postbroad.com/v1/orgs/<org>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/orgs/<org>", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
orgpathyesstring

Request body: UpdateOrgInput

FieldTypeRequiredDescription
expectedRevisionintegeryes
namestringno
kindOrgKindno
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
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"
}'
TypeScript
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();
Response 200
{
  "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

NameInRequiredTypeDescription
orgpathyesstring

Request body: TransferOwnershipInput

FieldTypeRequiredDescription
memberIdstring (uuid)yes
stepDownbooleanno

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
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
}'
TypeScript
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();
Response 200
{
  "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
curl -X GET "https://app.postbroad.com/v1/audit-integrity" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/audit-integrity", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
actorKindqueryno"member" or "agent" or "token" or "mcp" or "guest" or "app" or "system"
qquerynostring
fromquerynostring (date)
toquerynostring (date)
cursorquerynostring
limitquerynointeger

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
curl -X GET "https://app.postbroad.com/v1/audit-events" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/audit-events", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

FieldTypeRequiredDescription
actorKind"member" or "agent" or "token" or "mcp" or "guest" or "app" or "system"no
qstringno
fromstring (date)no
tostring (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
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"
}'
TypeScript
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();
Response 202
{
  "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

NameInRequiredTypeDescription
idpathyesstring (uuid)

Response 200: AuditExportView. The export

Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal, 503 unavailable.

curl
curl -X GET "https://app.postbroad.com/v1/audit-exports/<id>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/audit-exports/<id>", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
idpathyesstring (uuid)
orgqueryyesstring (uuid)
expiresqueryyesstring
signaturequeryyesstring

Response 200. A private CSV file

Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.

curl
curl -X GET "https://app.postbroad.com/v1/audit-exports/<id>/content?org=<org>&expires=<expires>&signature=<signature>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
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
curl -X GET "https://app.postbroad.com/v1/principals" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/principals", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
idpathyesstring (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
curl -X POST "https://app.postbroad.com/v1/principals/<id>/revoke" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
TypeScript
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();
Response 200
{
  "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
curl -X GET "https://app.postbroad.com/v1/tokens" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/tokens", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

FieldTypeRequiredDescription
namestringyes
kindApiTokenKindyes
scopesstring[]no
brandIdsstring (uuid)[]no
readOnlybooleanno
ipAllowliststring[]no
expiresAtstring (date-time) or nullno

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
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"
}'
TypeScript
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();
Response 201
{
  "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

NameInRequiredTypeDescription
tokenIdpathyesstring (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
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 '{}'
TypeScript
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();
Response 200
{
  "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

FieldTypeRequiredDescription
client_idstringyes
scopestringno
namestringno

Response 200: DeviceAuthorization. The device code and the user code

Errors: 400 bad_request, 429 rate_limited.

curl
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"
}'
TypeScript
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();
Response 200
{
  "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

FieldTypeRequiredDescription
grant_type"urn:ietf:params:oauth:grant-type:device_code"yes
device_codestringyes
client_idstringyes

Response 200: DeviceToken. The API key

Errors: 400 bad_request, 429 rate_limited.

curl
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"
}'
TypeScript
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();
Response 200
{
  "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

NameInRequiredTypeDescription
userCodepathyesstring

Response 200: DeviceRequest. The waiting request

Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.

curl
curl -X GET "https://app.postbroad.com/v1/device/requests/<userCode>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/device/requests/<userCode>", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
userCodepathyesstring

Request body: DeviceDecisionInput

FieldTypeRequiredDescription
decision"approve" or "deny"yes
scopesstring[]no
brandIdsstring (uuid)[]no
readOnlybooleanno
expiresInDaysintegerno

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
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
}'
TypeScript
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();
Response 200
{
  "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

NameInRequiredTypeDescription
cursorquerynostring
limitquerynointeger

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
curl -X GET "https://app.postbroad.com/v1/mcp/grants" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/mcp/grants", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
grantIdpathyesstring (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
curl -X DELETE "https://app.postbroad.com/v1/mcp/grants/<grantId>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
TypeScript
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();
Response 200
{
  "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
curl -X POST "https://app.postbroad.com/v1/exports" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
TypeScript
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();
Response 202
{
  "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

NameInRequiredTypeDescription
requestIdpathyesstring (uuid)

Response 200: ExportRequestView. The caller's export request

Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 429 rate_limited, 500 internal.

curl
curl -X GET "https://app.postbroad.com/v1/exports/<requestId>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/exports/<requestId>", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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

NameInRequiredTypeDescription
requestIdpathyesstring (uuid)
orgqueryyesstring (uuid)
expiresqueryyesstring
signaturequeryyesstring

Response 200. An NDJSON account export

Errors: 401 unauthenticated, 403 forbidden, 404 not_found, 422 validation_failed, 429 rate_limited, 500 internal.

curl
curl -X GET "https://app.postbroad.com/v1/exports/<requestId>/content?org=<org>&expires=<expires>&signature=<signature>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
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

NameInRequiredTypeDescription
orgpathyesstring

Request body: DeletionRequestInput

FieldTypeRequiredDescription
requestIdstring (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
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"
}'
TypeScript
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();
Response 202
{
  "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

NameInRequiredTypeDescription
requestIdpathyesstring (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
curl -X GET "https://app.postbroad.com/v1/deletions/<requestId>" \
  -H "Authorization: Bearer $POSTBROAD_TOKEN"
TypeScript
const res = await fetch("https://app.postbroad.com/v1/deletions/<requestId>", {
  headers: {
    Authorization: `Bearer ${process.env.POSTBROAD_TOKEN}`,
  },
});
const data = await res.json();
Response 200
{
  "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.

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes
kindApiTokenKindyes
prefixstringyes
scopesstring[]yes
brandIdsstring (uuid)[]yes
readOnlybooleanyes
ipAllowliststring[]yes
ownerType"member" or "agent"yes
ownerIdstring (uuid)yes
expiresAtstring (date-time) or nullyes
lastUsedAtstring (date-time) or nullyes
revokedAtstring (date-time) or nullyes
createdAtstring (date-time)yes
browserPairedBrowser or nullno

#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.

FieldTypeRequiredDescription
dataApiToken[]yes

#AuditEvent

FieldTypeRequiredDescription
idstringyes
atstring (date-time)yes
actorobjectyes
actionstringyes
subjectobjectyes
beforeHashstring or nullyes
afterHashstring or nullyes

#AuditExportDocument

Type: string

#AuditExportInput

FieldTypeRequiredDescription
actorKind"member" or "agent" or "token" or "mcp" or "guest" or "app" or "system"no
qstringno
fromstring (date)no
tostring (date)no

#AuditExportView

A CSV export of the filtered activity log: queued, built by the export worker, then downloadable for an hour.

FieldTypeRequiredDescription
idstring (uuid)yes
state"queued" or "running" or "done" or "failed"yes
rowsinteger or nullyes
downloadUrlstring (uri) or nullyes

#AuditIntegrity

FieldTypeRequiredDescription
status"ok" or "failed" or "unverified" or "incomplete"yes
upTostringyes
eventsintegeryes
checkpointsCheckedintegeryes
signaturesVerifiedintegeryes
checkpointobject or nullyes
problemsobject[]yes

#AuditPage

FieldTypeRequiredDescription
dataAuditEvent[]yes
nextCursorstring or nullyes

#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

FieldTypeRequiredDescription
checkedAtstring (date-time)yes
resultsobject[]yes

#CostEstimate

FieldTypeRequiredDescription
unitstringyes
amountMicrosintegeryes
currency"USD"yes
billedBy"postbroad" or "third_party"yes

#CreateApiTokenInput

FieldTypeRequiredDescription
namestringyes
kindApiTokenKindyes
scopesstring[]no
brandIdsstring (uuid)[]no
readOnlybooleanno
ipAllowliststring[]no
expiresAtstring (date-time) or nullno

#CreateOrgInput

FieldTypeRequiredDescription
namestringyes

#CreatedApiToken

A new API key with its secret. This answer is the only time the secret exists.

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes
kindApiTokenKindyes
prefixstringyes
scopesstring[]yes
brandIdsstring (uuid)[]yes
readOnlybooleanyes
ipAllowliststring[]yes
ownerType"member" or "agent"yes
ownerIdstring (uuid)yes
expiresAtstring (date-time) or nullyes
lastUsedAtstring (date-time) or nullyes
revokedAtstring (date-time) or nullyes
createdAtstring (date-time)yes
browserPairedBrowser or nullno
secretstringyes

#CreatedOrg

The new organization. Its creator is its Owner; select it with the Postbroad-Org header.

FieldTypeRequiredDescription
idstring (uuid)yes
slugstringyes
namestringyes
kindOrgKindyes

#DeleteLoginInput

FieldTypeRequiredDescription
confirmEmailstringyes

#DeletionPreview

FieldTypeRequiredDescription
organizationIdstring (uuid)yes
inventoryobjectyes
deliveriesobject[]yes
irreversibletrueyes
completionRequiresDraintrueyes
publishedRemotePostsAreNotDeletedtrueyes
financialEvidenceRetainedtrueyes
effect"freeze_drain_archive_erase"yes

#DeletionRequestInput

FieldTypeRequiredDescription
requestIdstring (uuid)no

#DeletionRequestView

FieldTypeRequiredDescription
idstring (uuid)yes
state"queued" or "running" or "done" or "failed"yes
createdAtstring (date-time)yes
finishedAtstring (date-time) or nullyes
errorCodestring or nullyes
receiptmap of any or nullyes

#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.

FieldTypeRequiredDescription
device_codestringyes
user_codestringyes
verification_uristringyes
verification_uri_completestringyes
expires_inintegeryes
intervalintegeryes

#DeviceAuthorizationRequest

FieldTypeRequiredDescription
client_idstringyes
scopestringno
namestringno

#DeviceDecision

FieldTypeRequiredDescription
status"approved" or "denied"yes

#DeviceDecisionInput

FieldTypeRequiredDescription
decision"approve" or "deny"yes
scopesstring[]no
brandIdsstring (uuid)[]no
readOnlybooleanno
expiresInDaysintegerno

#DeviceRequest

A sign-in waiting for a decision.

FieldTypeRequiredDescription
userCodestringyes
clientIdstringyes
clientNamestringyes
scopesstring[]yes
deviceNamestring or nullyes
userAgentstring or nullyes
requestedAtstring (date-time)yes
expiresAtstring (date-time)yes

#DeviceToken

The API key a person approved. This answer is the only time the secret exists.

FieldTypeRequiredDescription
access_tokenstringyes
token_type"Bearer"yes
expires_inintegeryes
scopestringyes

#DeviceTokenRequest

FieldTypeRequiredDescription
grant_type"urn:ietf:params:oauth:grant-type:device_code"yes
device_codestringyes
client_idstringyes

#DispatchingRef

A delivery that had already started (or gone live) when the change committed; it may still publish.

FieldTypeRequiredDescription
deliveryIdstring (uuid)yes
channelIdstring (uuid)yes
state"sending" or "accepted" or "processing" or "published" or "unknown"yes
claimedAtstring (date-time) or nullyes
versionNointegeryes

#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

FieldTypeRequiredDescription
idstring (uuid)yes
state"queued" or "running" or "done" or "failed"yes
createdAtstring (date-time)yes
finishedAtstring (date-time) or nullyes
expiresAtstring (date-time) or nullyes
errorCodestring or nullyes
downloadUrlstring (uri) or nullyes

#Limits

FieldTypeRequiredDescription
brandsinteger or nullyes
accountsinteger or nullyes
accountsPerNetworkinteger or nullyes
membersinteger or nullyes
analyticsDaysinteger or nullyes
tokenKindsinteger or nullyes
requestLogDaysinteger or nullyes
postsPerMonthinteger or nullyes

#LoginDeleted

FieldTypeRequiredDescription
organizationsintegeryes

#McpGrantPage

FieldTypeRequiredDescription
dataMcpGrantView[]yes
nextCursorstring or nullyes

#McpGrantView

FieldTypeRequiredDescription
idstring (uuid)yes
clientIdstringyes
brandIdsstring (uuid)[]yes
scopesstring[]yes
mode"approve" or "autopilot"yes
budgetobject or nullyes
createdAtstring (date-time)yes
revokedAtstring (date-time) or nullyes

#Me

The signed-in member, the organizations they belong to, their role bindings and preferences.

FieldTypeRequiredDescription
memberobjectyes
orgsobject[]yes
bindingsRoleBindingView[]yes
preferencesPreferencesyes

#MyProfile

The signed-in member's name as stored in this organization.

FieldTypeRequiredDescription
idstring (uuid)yes
namestringyes

#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

FieldTypeRequiredDescription
idstring (uuid)yes
slugstringyes
namestringyes
kindOrgKindyes
kindChosenbooleanyes
limitsLimitsyes
postsPostAllowanceyes
modules"agent" or "generation"[]yes
capabilitiesstring[]yes
readsContentbooleanno
readsAnalyticsbooleanno
postingGuard"off" or "alert" or "pause"yes
createdAtstring (date-time)yes
revisionintegeryes

#OwnershipTransferred

FieldTypeRequiredDescription
memberIdstring (uuid)yes
steppedDownbooleanyes

#PairedBrowser

FieldTypeRequiredDescription
namestring or nullyes
versionstring or nullyes
pausedbooleanyes
firstSeenAtstring (date-time)yes
lastSeenAtstring (date-time)yes
boundAccountsintegeryes
selfTestBrowserSelfTest or nullyes

#PostAllowance

FieldTypeRequiredDescription
usedintegeryes
limitinteger or nullyes
monthStartstring (date-time)yes
resetsAtstring (date-time)yes

#Preferences

FieldTypeRequiredDescription
theme"dark" or "light" or "system"yes
timeDisplay"brand" or "viewer"yes
timezonestring or nullyes
dismissedPromptsmap of string (date-time)yes

#PreflightResult

Type: object

#PreviewDestination

FieldTypeRequiredDescription
channelIdstring (uuid)yes
networkNetworkyes
handlestring or nullyes
scheduledAtstring (date-time) or nullyes
payloadHashstringyes
payloadPreviewPayloadyesWhat will be sent to one destination, from the frozen payload model.
manualHandoffobjectno
preflightPreflightResultyes
pendingChecksstring[]yes
costCostEstimate[]yes
verificationLevelVerificationLevelyes

#PreviewPayload

What will be sent to one destination, from the frozen payload model.

FieldTypeRequiredDescription
v1yes
orgIdstring (uuid)yes
brandIdstring (uuid)yes
postVersionIdstring (uuid)yes
contentHashstringyes
variantIdstring (uuid)yes
channelIdstring (uuid)yes
networkstringyes
connectorVersionstringyes
destinationobjectyes
intendedVisibility"public" or "followers" or "private" or "draft" or "inbox" or "scheduled_native"yes
aiLabelbooleanyes
utmmap of stringyes
partsobject[]yes

#PreviewResult

FieldTypeRequiredDescription
receiptstringyes
expiresAtstring (date-time)yes
postIdstring (uuid)yes
versionNointegeryes
contentHashstringyes
mode"schedule" or "publish_now"yes
blockedbooleanyes
requiresReviewbooleanyes
destinationsPreviewDestination[]yes
totalCostCostEstimate[]yes

#Principal

One person, agent, API token or connected app that can act in the organization.

FieldTypeRequiredDescription
idstring (uuid)yes
kind"member" or "guest" or "client" or "agent" or "token" or "mcp"yes
namestringyes
detailstring or nullyes
rolestring or nullyes
actsForstring or nullyes
status"active" or "invited" or "revoked"yes
lastActiveAtstring (date-time) or nullyes
mode"approve" or "autopilot" or nullyes
postsPerDayinteger or nullyes
brandIdsstring (uuid)[] or nullyes

#PrincipalList

Principals, people first and then agents, keys and connected apps. At most 1000 per kind.

FieldTypeRequiredDescription
dataPrincipal[]yes

#PrincipalRevoked

FieldTypeRequiredDescription
idstring (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.

FieldTypeRequiredDescription
typestringyes
titlestringyes
statusintegeryes
codeErrorCodeyes
detailstringyes
requestIdstringyes
retryablebooleanyes
errorsProblemItem[]no
previewPreviewResultno
currentRevisionintegerno
alreadyDispatchingDispatchingRef[]no
limitobjectno
retryAfterSecondsintegerno

#ProblemItem

FieldTypeRequiredDescription
pathstringyes
rulestringyes
messagestringyes
channelIdstring (uuid) or nullno

#ReauthenticateInput

Proof of identity for sensitive changes: the signed-in member's password.

FieldTypeRequiredDescription
passwordstringyes

#Reauthenticated

The session now counts as freshly signed in until expiresAt.

FieldTypeRequiredDescription
reauthenticatedAtstring (date-time)yes
expiresAtstring (date-time)yes

#RevokeApiTokenInput

Type: object

#RoleBindingView

FieldTypeRequiredDescription
orgIdstring (uuid)yes
role"owner" or "admin" or "editor" or "approver" or "viewer"yes
scopeType"org" or "workspace" or "brand"yes
scopeIdstring (uuid)yes

#TransferOwnershipInput

FieldTypeRequiredDescription
memberIdstring (uuid)yes
stepDownbooleanno

#UpdateMeInput

FieldTypeRequiredDescription
namestringyes

#UpdateOrgInput

FieldTypeRequiredDescription
expectedRevisionintegeryes
namestringno
kindOrgKindno
postingGuard"off" or "alert" or "pause"no

#UpdatePreferencesInput

FieldTypeRequiredDescription
theme"dark" or "light" or "system"no
timeDisplay"brand" or "viewer"no
timezonestring or nullno
dismissedPromptsmap of string (date-time) or nullno

#VerificationLevel

Type: "full" or "url_only" or "accepted_no_readback" or "manual"

Last generated 23 Nov 2026, from the contracts the API runs on.