Invitations
Invitations to join an organization.
4 endpoints · Plakar Control Plane v0.18 · Base URL, authentication and errors
List the pending invitations
GET
Badge
/api/v1/account/organizations/{id}/invitations
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Response 200 OK application/json
-
accountstring -
created_atstring<date-time> -
emailstring -
expires_atstring<date-time> -
idstring<uuid> -
tokenstring
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
Badge
/api/v1/account/organizations/{id}/invitations
With auto_accept, the invitation is spent in the same call and the user is created.
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s.
Request body application/json required
-
auto_acceptboolean -
emailstring nullable -
is_serviceboolean -
namestring
Response 200 OK application/json
-
acceptedobject nullable-
accountstring -
account_createdboolean -
emailstring -
generated_passwordstring nullable -
organization_idstring<uuid> -
user_idstring<uuid>
-
-
invitationobject-
accountstring -
created_atstring<date-time> -
emailstring -
expires_atstring<date-time> -
idstring<uuid> -
tokenstring
-
-
is_serviceboolean
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
Badge
/api/v1/account/organizations/{id}/invitations/{invitation_id}
Path parameters
-
idstring<uuid> requiredOrganization ID, at or below the caller’s. -
invitation_idstring 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
No authentication
/api/v1/invitations/accept
The invitation token is the credential. The invitee may have no account yet.
Request body application/json required
-
namestring -
passwordstring -
tokenstring required
Response 200 OK application/json
-
accountstring -
account_createdboolean -
emailstring -
generated_passwordstring nullable -
organization_idstring<uuid> -
user_idstring<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"
}