Delete a role
Cascade-deletes the role with its version history. Irreversible. Owner-scoped: an admin may delete any role, a contributor only their own; a key needs write:roles.
apiKeyAuthorizationBearer <token>Workspace API key (SKA_...).
roleId*stringRole id
1 <= lengthDeleted
curl -X DELETE 'https://app.skilder.ai/api/v1/roles/0x3c4d'Update a role (into its draft) PATCH
Requires the Contributor or Admin role; a key needs `write:roles`. Content edits (including `skillIds` membership, set semantics) land on the caller’s draft, which is opened automatically when none exists; the published state is untouched until an explicit publish. 409 when another user holds the open draft. `disabled` is operational and applied to the published state directly. `ownerId` transfers ownership (owner-scoped) as part of the draft.
Publish a role’s draft POST
Promotes the role’s currently open draft to the published state (the version agents run) — nothing else. It takes no edits: make them with `PATCH /roles/{roleId}` first, an ownership transfer included, and the publish carries them. Requires the owner-scoped `publish` ability (a workspace admin or the role’s owner), which is also what lets the caller promote a draft authored by someone else without taking it over. The body is optional: empty publishes the open draft as-is. Errors: **409 with `reason: NO_OPEN_DRAFT`** when nothing is open to publish (edit it first with PATCH), **403** when the caller is not the role’s owner or a workspace admin, or the key lacks `publish:roles`.

