Requests and activity
Recover durable mutation receipts by request ID and read the scoped activity feed.
Updated
On this page
These two endpoints answer what happened and who did it. GET /api/v1/requests/{requestId} recovers the stored receipt of a mutation you already submitted - the safe way to resolve a lost or ambiguous response. GET /api/v1/activity lists the social activity feed for your scope, including sanitized failure codes. Receipt lookup semantics (when to reuse a key, when a 404 means stop) live in Idempotency; this page documents the wire shapes.
Look up a request receipt
GET /api/v1/requests/{requestId}
Recovers the durable receipt of an accepted mutation for the authenticated principal. Every accepted mutation that runs through the durable boundary stores a receipt: post create/update/delete, publish/schedule/cancel/retry/cover-retry, schedule-settings updates, media mutations, thread state updates, and comment reply acceptances. Scopes: any authenticated key or session; a key that holds none of the draft, publishing, schedule, or media actions is denied 403 before any receipt is read. CLI: postkub requests get. MCP: requests_get.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| requestId | path | string | Yes | UUID request identifier (the value you sent as Idempotency-Key) |
Request example
curl -sS https://postkub.com/api/v1/requests/5c2e8f90-1a34-4e67-b2a9-0d8c7b6a5f4e \
-H "Authorization: Bearer <API_KEY>"
Response 200 OK
{
"requestId": "5c2e8f90-1a34-4e67-b2a9-0d8c7b6a5f4e",
"status": "accepted",
"statusCode": 202,
"operation": "v1:comments:replies:create",
"path": "/api/v1/comments/:id/replies",
"createdAt": "2026-12-04T08:00:08.000Z",
"result": {
"requestId": "5c2e8f90-1a34-4e67-b2a9-0d8c7b6a5f4e",
"replyId": "reply_example123",
"commentId": "comment_example123",
"threadId": "thread_example123",
"socialAccountId": "acc_example1",
"revision": 1,
"state": "pending",
"statusUrl": "/api/v1/replies/reply_example123",
"replayed": false
}
}
Envelope fields:
| Name | Type | Description |
|---|---|---|
| requestId | string | The UUID you looked up |
| status | string | Always accepted - only accepted mutations store receipts |
| statusCode | integer | The HTTP status code of the original response |
| operation | string | Internal operation name, for example v1:posts:publish or v1:comments:replies:create |
| path | string | The route template the mutation ran on |
| createdAt | string | When the mutation was accepted (UTC) |
| result | object | The stored response body of the original operation |
result mirrors the original operation's response body. Exactly one variant applies, and it is re-projected through your current authority before being returned:
- The full original envelope, when you still hold full authority over the stored snapshot's Brand and accounts (post create/update envelopes, publication receipts, thread and reply receipts, schedule-settings receipts, media receipts, key and connection receipts).
- A sanitized draft receipt
{ "requestId": ..., "post": { "id": ..., "revision": ... } }, when partial authority remains. - A
404when the stored result is outside your current resource or action authority.
Receipts are principal-namespaced: a key never sees another key's receipt or the owner session's receipt, and vice versa, and a receipt is never returned under a revoked or expired key.
| Status | Meaning |
|---|---|
| 200 | Receipt returned, re-projected through current authority |
| 400 | requestId is not a valid UUID (see Errors) |
| 401 | Authentication required, or the key was revoked or expired after the mutation |
| 403 | The key holds none of the draft, publishing, schedule, or media actions |
| 404 | No receipt for this principal and request ID, or the stored result is outside your current authority |
List activity
GET /api/v1/activity
Lists the scoped social activity feed, newest first: publication lifecycle events, thread state updates, comment reply outcomes, media actions, and sanitized failure codes. Scopes: activity:read. CLI: postkub activity list. MCP: activity_list.
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
| limit | integer | No | Page size, 1-100, default 50 |
| cursor | string | No | Opaque cursor from nextCursor, max 512 characters |
| brandId | string | No | Restrict to one Brand ID |
| accountId | string | No | Restrict to items involving one social account |
| postId | string | No | Restrict to items involving one post |
| from | string | No | ISO instant, window start |
| to | string | No | ISO instant, window end |
from must not be after to. See Pagination for cursor rules.
Request example
curl -sS "https://postkub.com/api/v1/activity?brandId=brand_example1&limit=50" \
-H "Authorization: Bearer <API_KEY>"
Response 200 OK
{
"items": [
{
"id": "audit_example123",
"action": "post:publish",
"actorType": "agent",
"targetType": "post",
"targetId": "post_example123",
"brandId": "brand_example1",
"socialAccountIds": ["acc_example1"],
"postId": "post_example123",
"publicationId": "pub_example123",
"revision": 2,
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"sourceKeyId": "key_example1",
"code": null,
"createdAt": "2026-12-04T09:00:00.000Z"
}
],
"nextCursor": null
}
Item fields:
| Name | Type | Description |
|---|---|---|
| id | string | Audit record ID |
| action | string | What happened, for example post:publish, post:publication_blocked, thread.update, comment.reply.sent, or media:ready |
| actorType | string | user, agent, or system |
| targetType | string | Record type acted on, for example post or publication; null when none applies |
| targetId | string | Record ID acted on; null when none applies |
| brandId | string | Brand the item belongs to; null when unknown |
| socialAccountIds | array | Sorted account IDs involved |
| postId | string | Related post; null when none applies |
| publicationId | string | Related publication; null when none applies |
| revision | integer | Related revision number; null when none applies |
| requestId | string | Mutation request ID when the item came from an API mutation |
| sourceKeyId | string | API key that caused the item; keys see this only for their own actions, sessions see the originating key ID |
| code | string | Sanitized failure code, for example PROVIDER_RATE_LIMITED; null when the item is not a failure |
| createdAt | string | When the item happened (UTC) |
Feeds include post lifecycle and reconciliation actions (post:create through post:publication_recovery_required), account:schedule, thread.update, the comment.reply.* outcome family, insights.sync.failed, and the media:* action family.
For a scoped key, only items inside its Brands and accounts are returned - an out-of-scope brandId or accountId filter yields an empty page, and socialAccountIds is narrowed to the key's visible accounts. An item from another key keeps sourceKeyId: null.
| Status | Meaning |
|---|---|
| 200 | Activity page returned |
| 400 | Invalid query (see Errors) |
| 401 | Authentication required |
| 403 | Key lacks activity:read |
