Remove activities by foreign_id
const url = 'http://localhost:3000/v1/feeds/example/example/activities?foreign_id=example';const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”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.
Responses
Section titled “Responses”Removed. removed is empty when nothing matched.
object
Examplegenerated
{ "removed": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ]}foreign_id is missing or empty, or time is not an ISO-8601 date-time.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}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" }}Rate limit exceeded.
object
object
Present only for VALIDATION_FAILED.
object
Example
{ "error": { "code": "VALIDATION_FAILED" }}