Dokki API logo
PATCH
/api/v1/resources/{resource_id}

Update {resource_id}

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:write

  • Base URL: https://dokki.one

Supported fields

  • name — non-empty string.

  • icon — string or null; use an emoji or a lucide:<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, or null for the workspace root.

  • insert_after_id — sibling UUID, or null to place the resource first.

  • is_private — boolean. This requires resource manage access; setting it to true clears public access.

  • public_accessnull, view, comment, or edit. 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 lacks resource:write, write access, or manage access for visibility.

  • 404 — resource is unavailable to the caller.