Skip to content

Attach an existing asset to a post

POST
/posts/{id}/assets

Two independent gates apply (#922). Write access to the POST — author, posts.admin or system.admin — answers “may you change this container”, and read access to the ASSET answers “may you reach the thing being put in it”. Both are required.

The asset gate is the same two-plane rule createPost applies (ADR 0064) — and the one addCollectionResource applied before #1161 retired it. An asset the caller cannot read answers 404 with the identical body a nonexistent UUID gets.

id
required
string format: uuid
object
asset_id
required
string format: uuid
sort_order
integer
0

Member added

Malformed request

object
error
required

Human-readable error summary

string
Example
the request could not be completed

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"
}

Authenticated but missing required capabilities

object
error
required

Human-readable error summary

string
Example
the request could not be completed

Resource not found

object
error
required

Human-readable error summary

string
Example
the request could not be completed