APIUpdate Admin

Update Admin

Update an existing administrator's permissions within a project.

PUT/v2/projects/{project_id}/admins/{user_id}

Authorization

Bearer TokenRequired

Path Parameters

project_idstringRequired

The unique identifier of the project.

user_idstringRequired

The unique identifier of the admin user.

Request Body

permissionsarrayRequired

Array of permission strings to grant.

Request
curl -X PUT "https://api.botsubscription.com/v2/projects/f47ac10b-58cc-4372-a567-0e02b2c3d479/admins/user_123456789" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "permissions": ["users:read", "users:write", "plans:read", "plans:write", "memberships:read", "memberships:write"]
  }'
Admin updatedapplication/json
{
  "ok": true,
  "request_id": "11111111-1111-1111-1111-111111111111",
  "method": "PUT",
  "path": "/v2/projects/YOUR_PROJECT_ID/admins/123456789012345678",
  "code": 200,
  "message": "Admin updated successfully",
  "data": {
    "user_id": "123456789012345678",
    "user_name": {
      "first_name": "John",
      "username": "john_admin"
    },
    "permissions": [
      "users:read",
      "users:update",
      "plans:read",
      "plans:add",
      "memberships:read",
      "memberships:update"
    ]
  }
}

Last updated: