Skip to main content
err:unkey:data:role_already_exists
A role with the same name already exists in your workspace, so permissions.createRole didn’t create one. You get HTTP 409.
Example response

Likely causes

  • You already created this role. Role names are unique per workspace, and separately per .
  • The name differs only in case. Admin clashes with an existing admin.

How to fix

  1. Reuse the existing role (find it with permissions.listRoles), or choose another name.
  2. To change what a role grants, use permissions.setRolePermissions on the existing role instead of creating a second one.
Last modified on October 22, 2026