Skip to content

Batch import follows — server token only

POST
/v1/batch/follows
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.

Media typeapplication/json
object
follows
required
Array<object>
>= 1 items <= 100 items
object
source
required
string
Example
timeline:alice
target
required
string
Example
user:bob

Envelope accepted. Per-item results, ordered and same-length as the input; a failed item never rolls back the rest.

Media typeapplication/json
object
results
required
Array<object>
object
index
required
integer
ok
required
boolean
id

Present when ok for users/activities

string
code

§8 error code, present when not ok

string
Examplegenerated
{
"results": [
{
"index": 1,
"ok": true,
"id": "example",
"code": "example"
}
]
}

Envelope invalid (0 items, more than 100 items, or malformed shape).

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: VALIDATION_FAILED UNAUTHENTICATED FORBIDDEN NOT_FOUND CONFLICT RATE_LIMITED INTERNAL
message
required
string
requestId
required
string
fields

Present only for VALIDATION_FAILED.

Array<object>
object
path
string
message
string
Example
{
"error": {
"code": "VALIDATION_FAILED"
}
}

User tokens cannot import — batch routes are server token only.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: VALIDATION_FAILED UNAUTHENTICATED FORBIDDEN NOT_FOUND CONFLICT RATE_LIMITED INTERNAL
message
required
string
requestId
required
string
fields

Present only for VALIDATION_FAILED.

Array<object>
object
path
string
message
string
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.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: VALIDATION_FAILED UNAUTHENTICATED FORBIDDEN NOT_FOUND CONFLICT RATE_LIMITED INTERNAL
message
required
string
requestId
required
string
fields

Present only for VALIDATION_FAILED.

Array<object>
object
path
string
message
string
Example
{
"error": {
"code": "VALIDATION_FAILED"
}
}
Retry-After
integer