Batch import follows — server token only
const url = 'http://localhost:3000/v1/batch/follows';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"follows":[{"source":"timeline:alice","target":"user:bob"}]}'};
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/batch/follows \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "follows": [ { "source": "timeline:alice", "target": "user:bob" } ] }'Cold-start import: create up to 100 follow edges in one call. Each item carries the source feed ref inline (the single-op route’s URL part) plus the existing target field. Quiet — no follow notifications or webhooks are fired. Idempotent: a duplicate edge is ok, not an error. Partial failure still returns 200 — inspect per-item results.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”object
object
Example
timeline:aliceExample
user:bobResponses
Section titled “Responses”Envelope accepted. Per-item results, ordered and same-length as the input; a failed item never rolls back the rest.
object
object
Present when ok for users/activities
§8 error code, present when not ok
Examplegenerated
{ "results": [ { "index": 1, "ok": true, "id": "example", "code": "example" } ]}Envelope invalid (0 items, more than 100 items, or malformed shape).
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}User tokens cannot import — batch routes are server token only.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}Batch rate limit exceeded. Batch routes charge a separate 600 requests/min window per tenant — never the normal tenant limit.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}