Invitations

Invitations to join an organization.

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

List the pending invitations

GET /api/v1/account/organizations/{id}/invitations
Badge

Path parameters

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

Response 200 OK application/json

  • account string
  • created_at string<date-time>
  • email string
  • expires_at string<date-time>
  • id string<uuid>
  • token 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/account/organizations/{id}/invitations' \
  -H 'Authorization: Bearer <badge>'

Response 200

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

Invite someone into the organization

POST /api/v1/account/organizations/{id}/invitations
Badge
With auto_accept, the invitation is spent in the same call and the user is created.

Path parameters

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

Request body application/json required

  • auto_accept boolean
  • email string nullable
  • is_service boolean
  • name string

Response 200 OK application/json

  • accepted object nullable
    • account string
    • account_created boolean
    • email string
    • generated_password string nullable
    • organization_id string<uuid>
    • user_id string<uuid>
  • invitation object
    • account string
    • created_at string<date-time>
    • email string
    • expires_at string<date-time>
    • id string<uuid>
    • token string
  • is_service boolean

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/account/organizations/{id}/invitations' \
  -H 'Authorization: Bearer <badge>' \
  -H 'Content-Type: application/json' \
  -d '{
  "auto_accept": true,
  "email": "string",
  "is_service": true,
  "name": "string"
}'

Response 200

{
  "accepted": {
    "account": "string",
    "account_created": true,
    "email": "string",
    "generated_password": "string",
    "organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
    "user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
  },
  "invitation": {
    "account": "string",
    "created_at": "2026-01-01T00:00:00Z",
    "email": "string",
    "expires_at": "2026-01-01T00:00:00Z",
    "id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
    "token": "string"
  },
  "is_service": true
}

Revoke an invitation

DELETE /api/v1/account/organizations/{id}/invitations/{invitation_id}
Badge

Path parameters

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

Response 200 OK application/json

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/account/organizations/{id}/invitations/{invitation_id}' \
  -H 'Authorization: Bearer <badge>'

Response 200

{}

Accept an invitation

POST /api/v1/invitations/accept
No authentication
The invitation token is the credential. The invitee may have no account yet.

Request body application/json required

  • name string
  • password string
  • token string required

Response 200 OK application/json

  • account string
  • account_created boolean
  • email string
  • generated_password string nullable
  • organization_id string<uuid>
  • user_id string<uuid>

Errors

  • 400 Bad Request (validation or deserialization error)
  • 500 Internal Server Error (panics)

Every error returns the standard error body.

Request

curl -X POST 'https://pcp.example.com/api/v1/invitations/accept' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "password": "string",
  "token": "string"
}'

Response 200

{
  "account": "string",
  "account_created": true,
  "email": "string",
  "generated_password": "string",
  "organization_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90",
  "user_id": "3f1e4a2c-9b7d-4e0f-8a11-2c5d6e7f8a90"
}