Add an activity to a feed
const url = 'http://localhost:3000/v1/feeds/example/example/activities';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"actor":"example","verb":"example","object":"example","target":"example","foreign_id":"example","time":"2026-04-15T12:00:00Z","custom":{}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:3000/v1/feeds/example/example/activities \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "actor": "example", "verb": "example", "object": "example", "target": "example", "foreign_id": "example", "time": "2026-04-15T12:00:00Z", "custom": {} }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”object
Ignored and overwritten for user tokens (spec §5).
For user tokens, clamped to [now - 10 min, now] (spec §5): retries with the same (foreign_id, time) dedupe; future-pinning is impossible. Server tokens pass it through unclamped.
object
Examplegenerated
{ "actor": "example", "verb": "example", "object": "example", "target": "example", "foreign_id": "example", "time": "2026-04-15T12:00:00Z", "custom": {}}Responses
Section titled “Responses”Created — or, on a (foreign_id, time) duplicate of a live activity, the existing row unchanged (idempotent, no second fan-out).
object
object
object
Enriched from users.custom when actor parses as user:
Omitted for server tokens — no caller identity.
Example
{ "actor": "user:alice", "verb": "post", "object": "workout:123", "origin_feed": "user:alice", "reaction_counts": { "like": 3 }, "own_reactions": [ "like" ]}Invalid, expired, revoked, or absent token.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}Authenticated but not permitted.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}The (foreign_id, time) identity belongs to a soft-deleted activity. The identity is burned — pick a new one (spec §6).
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}Rate limit exceeded.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}