PATCH /api/v1/resources/{resource_id}
Update a resource's identity, metadata, visibility, or position.
Endpoint
Method: PATCH
Path:
/api/v1/resources/{resource_id}Required scope:
resource:writeBase URL:
https://dokki.one
Supported fields
name— non-empty string.icon— string ornull; use an emoji or alucide:<name>value.metadata— JSON value stored as the resource metadata. This replaces the existing metadata object, so send every key you intend to retain.parent_id— parent resource UUID, ornullfor the workspace root.insert_after_id— sibling UUID, ornullto place the resource first.is_private— boolean. This requires resource manage access; setting it totrueclears public access.public_access—null,view,comment, oredit. This requires resource manage access; a non-null value makes the resource non-private and applies the visibility change to its subtree.
The caller needs current write access to the resource. Moving beneath a parent also requires write access to that parent.
Request example
curl -X PATCH "https://dokki.one/api/v1/resources/$RESOURCE_ID" \
-H "Authorization: Bearer $DOKKI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"icon": "lucide:book-open",
"metadata": { "owner": "product", "reviewed": true }
}'Response
The response returns the updated resource and the caller's resolved access object. Re-read the resource after a hierarchy or visibility change when a workflow depends on the final tree state.
Errors
400— unsupported field, invalid value, invalid parent, or invalid sibling position.401— missing or invalid API key.403— API key lacksresource:write, write access, or manage access for visibility.404— resource is unavailable to the caller.
