---
title: "Give a person a role directly"
method: PUT
path: "/v1/members/{memberId}/permission-set"
tags: ["Permissions"]
---

# Give a person a role directly

`PUT /v1/members/{memberId}/permission-set`

## Request

- Base URL: `https://api.openworklabs.com`
- URL: `https://api.openworklabs.com/v1/members/{memberId}/permission-set`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Gives one person a custom role or Billing manager directly, without a team, replacing the role they were given directly before, or none with permissionSetId null. Pending invitations can be given a role too; it applies once they join. Their organization role (Member, Admin, Super admin) is changed separately (POST /v1/members/:memberId/role). You can't change your own, and you can only give a role whose permissions you all have yourself. Requires members.update.

## Path parameters

- `memberId` string, typeid, required

## Request body

- MemberPermissionSetBody
  - `permissionSetId` string, typeid, nullable, required: Den TypeID with 'pms_' prefix and a 26-character base32 suffix.

## Response `200`

The person's directly given role was set; the role's current state is returned, or null when they have none.

- MemberPermissionSetResponse
  - `set` PermissionSetDetail, nullable, required
    - `id` string, required
    - `name` string, required
    - `kind` 'member_default' | 'admin_default' | 'billing_manager_default' | 'super_admin_default' | 'team', required
    - `team` PermissionSetTeam, nullable, required
      - `id` string, required
      - `name` string, nullable, required: Null when the team no longer exists.
    - `teams` PermissionSetTeam[], required: Every team the set applies to now. More than one only with Shared roles.
      - `id` string, required
      - `name` string, nullable, required: Null when the team no longer exists.
    - `directMemberIds` string[], required: People given this set directly, without a team (a custom role or Billing manager). Member ids only; pending invitations included.
    - `allowedCount` integer, required
    - `createdAt` string, date-time, required
    - `archivedAt` string, date-time, nullable, required
    - `permissions` PermissionSetKeyState[], required
      - `key` string, required
      - `status` 'allow' | 'deny', required
      - `locked` boolean, required: Always on in this set; it can't be turned off.
      - `lastChangedAt` string, date-time, nullable, required
      - `lastChangedBy` PermissionChangedBy, nullable, required
        - `memberId` string, required
        - `name` string, nullable, required
        - `email` string, nullable, required: Null unless the caller holds teams.view, or when the member has no email.
      - `lastChangeSource` 'user' | 'seed' | 'reconcile' | 'migration', nullable, required
    - `appliesTo` union, required
      - object
        - `kind` 'everyone', required
        - `memberCount` integer, required
      - object
        - `kind` 'admins', required
        - `directAdminCount` integer, required
        - `directAdmins` PermissionPerson[], nullable, required: Names and emails of members with the admin role. Null unless the caller holds teams.view; directAdminCount is always returned.
          - `memberId` string, required
          - `name` string, required
          - `email` string, required
        - `adminTeams` object[], required
          - `id` string, required
          - `name` string, required
          - `memberCount` integer, required
      - object
        - `kind` 'super_admins', required
        - `superAdminCount` integer, required
        - `superAdmins` PermissionPerson[], nullable, required: Names and emails of members with the super-admin role. Null unless the caller holds teams.view; superAdminCount is always returned.
          - `memberId` string, required
          - `name` string, required
          - `email` string, required
      - object
        - `kind` 'team', required
        - `team` PermissionSetTeam, nullable, required
          - `id` string, required
          - `name` string, nullable, required: Null when the team no longer exists.
        - `teams` PermissionSetTeam[], required
          - `id` string, required
          - `name` string, nullable, required: Null when the team no longer exists.
        - `memberCount` integer, required: People in any of the set's teams, each counted once.
        - `members` PermissionPerson[], nullable, required: Names and emails of the people in the set's teams. Null unless the caller holds teams.view; memberCount is always returned.
          - `memberId` string, required
          - `name` string, required
          - `email` string, required

## Other responses

- `400`: The body or id was invalid, the person is the owner, or the set is Member, Admin or Super admin permissions.
- `401`: The caller must be signed in.
- `403`: The caller lacks members.update, tried to change their own role, or tried to give a role with permissions they don't have.
- `404`: The person, permission set or organization was not found.
- `409`: The permission set is archived.

## Changes

- **2026-11-10** `7caa32d85ccc`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/openworklabs/apis/den-api/changes/v1/members/:memberId/permission-set/put.md)

---

[API](https://skmtc.dev/openworklabs/apis/den-api.md) - [All operations](https://skmtc.dev/openworklabs/apis/den-api/llms.txt) - [OpenAPI document](https://skmtc.dev/openworklabs/apis/den-api/revisions/84fb0f99fb95?raw)
