Users

User administration and API keys.

9 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors

Set the password of a user

PUT /api/v1/account/organizations/{id}/users/{user_id}/password
Badge

Path parameters

  • id string<uuid> required
    Organization ID, at or below the caller’s.
  • user_id string required

Request body application/json required

  • password string required

Response 200 OK application/json

  • token string
  • updated_at string<date-time>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X PUT 'https://pcp.example.com/api/v1/account/organizations/{id}/users/{user_id}/password' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "password": "string"
}'

Response 200

{
  "token": "string",
  "updated_at": "2026-01-01T00:00:00Z"
}

List the users

GET /api/v1/users
Badge

Query parameters

  • offset integer
    Number of items to skip.
    Default: 0
  • limit integer
    Maximum number of items to return.
    Default: 100 Min: 1 Max: 100
  • search string
    Free-text search on users.
  • isService boolean
    Only service accounts, or only people.

Response 200 OK application/json

  • items array[object]
    • email string
    • id string<uuid>
    • is_service boolean
    • memberships array[object] nullable
      • organization_id string<uuid>
      • organization_name string
    • name string
  • total integer

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/users' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "items": [
    {
      "email": "string",
      "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "is_service": true,
      "memberships": [
        {
          "organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
          "organization_name": "string"
        }
      ],
      "name": "string"
    }
  ],
  "total": 0
}

Create a user

POST /api/v1/users
Badge

This endpoint is deprecated.

Deprecated: use POST /account/organizations/{id}/invitations with auto_accept.

Request body application/json required

  • email string nullable
  • is_service boolean
  • name string
  • password string nullable

Response 200 OK application/json

  • email string
  • id string<uuid>
  • is_service boolean
  • name string
  • password string nullable

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/users' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "email": "string",
  "is_service": true,
  "name": "string",
  "password": "string"
}'

Response 200

{
  "email": "string",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "is_service": true,
  "name": "string",
  "password": "string"
}

Get a user

GET /api/v1/users/{user_id}
Badge

Path parameters

  • user_id string required

Response 200 OK application/json

  • email string
  • id string<uuid>
  • is_service boolean
  • memberships array[object] nullable
    • organization_id string<uuid>
    • organization_name string
  • name string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/users/{user_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "email": "string",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "is_service": true,
  "memberships": [
    {
      "organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "organization_name": "string"
    }
  ],
  "name": "string"
}

Update a user

PUT /api/v1/users/{user_id}
Badge

Path parameters

  • user_id string required

Request body application/json required

  • name string required

Response 200 OK application/json

  • email string
  • id string<uuid>
  • is_service boolean
  • memberships array[object] nullable
    • organization_id string<uuid>
    • organization_name string
  • name string

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X PUT 'https://pcp.example.com/api/v1/users/{user_id}' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string"
}'

Response 200

{
  "email": "string",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "is_service": true,
  "memberships": [
    {
      "organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
      "organization_name": "string"
    }
  ],
  "name": "string"
}

Delete a user

DELETE /api/v1/users/{user_id}
Badge

This endpoint is deprecated.

Deprecated: use DELETE /account/organizations/{id}/members/{user_id}.

Path parameters

  • user_id string required

Response 200 OK application/json

  • deleted_at string<date-time>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X DELETE 'https://pcp.example.com/api/v1/users/{user_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "deleted_at": "2026-01-01T00:00:00Z"
}

List the API keys of a user

GET /api/v1/users/{user_id}/api-keys
Badge

Path parameters

  • user_id string required

Response 200 OK application/json

  • api_keys array[object]
    • created_at string<date-time>
    • description string
    • expires_at string<date-time> nullable
    • id string<uuid>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl 'https://pcp.example.com/api/v1/users/{user_id}/api-keys' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "api_keys": [
    {
      "created_at": "2026-01-01T00:00:00Z",
      "description": "string",
      "expires_at": "2026-01-01T00:00:00Z",
      "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
    }
  ]
}

Create an API key

POST /api/v1/users/{user_id}/api-keys
Badge

Path parameters

  • user_id string required

Request body application/json required

  • description string nullable

Response 200 OK application/json

  • api_key string
  • id string<uuid>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/users/{user_id}/api-keys' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "description": "string"
}'

Response 200

{
  "api_key": "string",
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}

Revoke an API key

DELETE /api/v1/users/{user_id}/api-keys/{key_id}
Badge

Path parameters

  • user_id string required
  • key_id string required

Response 200 OK application/json

  • id string<uuid>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 401 Missing, invalid or expired credentials
  • 403 The caller may not do this
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X DELETE 'https://pcp.example.com/api/v1/users/{user_id}/api-keys/{key_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{
  "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}