Skip to content

Remove activities by foreign_id

DELETE
/v1/feeds/{group}/{id}/activities
curl --request DELETE \
--url 'http://localhost:3000/v1/feeds/example/example/activities?foreign_id=example' \
--header 'Authorization: Bearer <token>'

Soft-deletes every live activity in this feed whose foreign_id matches — and, when time is given, whose time is the same instant. Each is removed exactly as DELETE /v1/activities/{id} removes one: soft delete (its (foreign_id, time) identity stays burned), gone from every timeline, one activity.removed webhook per id. Zero matches is success, so a retry or a redelivered event is safe.

A user token may use it only on its own user feed; a server token on any feed. Unknown query parameters are ignored. (Spec: 2026-09-13-remove-by-foreign-id-design.md.)

group
required
string
id
required
string
foreign_id
required
string
>= 1 characters
time
string format: date-time

Match only this instant (compared as a timestamp, so …:00Z equals …:00.000Z). UTC only: the value must end in Z; an offset such as +02:00 is a 400. Pass the stored time — on a user-token write, the value the add returned.

Removed. removed is empty when nothing matched.

Media typeapplication/json
object
removed
required
Array<string>
Examplegenerated
{
"removed": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}

foreign_id is missing or empty, or time is not an ISO-8601 date-time.

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

Present only for VALIDATION_FAILED.

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

Invalid, expired, revoked, or absent token.

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

Present only for VALIDATION_FAILED.

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

Authenticated but not permitted.

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

Present only for VALIDATION_FAILED.

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

Rate limit exceeded.

Media typeapplication/json
object
error
required
object
code
required
string
Allowed values: VALIDATION_FAILED UNAUTHENTICATED FORBIDDEN NOT_FOUND CONFLICT RATE_LIMITED INTERNAL CONTENT_REJECTED
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