Skip to content

Remove a post from a collection

DELETE
/collections/{id}/posts/{post_id}

Takes a post out of a collection. The post itself isn’t changed, and other collections that hold it keep it.

You need to be signed in and allowed to edit the collection: you own it, or you hold collections.admin or system.admin granted globally. A sharing grant doesn’t count, whatever its level. A collection that doesn’t exist, is deleted or that you can’t edit answers 404. You don’t need to be able to read the post, so a post whose visibility changed after it was added can still be taken out. Being the post’s author doesn’t let you remove it from someone else’s collection.

The answer is 204 whether or not the post was in the collection, so removing it twice, or naming a post that doesn’t exist, also gets 204. The post is removed whatever its settings in the collection, including when it isn’t listed.

Removing a published post records an activity in the same transaction, naming you, the post and the collection with its name. Each successful request records one, even when the post wasn’t in the collection. Removing a draft, a deleted post or an id with no post records none. Nobody is notified.

id
required
string format: uuid

The collection’s id.

post_id
required
string format: uuid

The post to take out.

The post isn’t in the collection now.

Authentication required, missing, or invalid

object
error
required

Human-readable error summary

string
Example
the request could not be completed
Example
{
"error": "authentication required: sign in and retry with a valid session or API token"
}

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed