Skip to content

User Invitations

Operations Summary

Method Endpoint Description
Core CRUD
GET /api/user-invitations/ List user invitations
GET /api/user-invitations/{uuid}/ Retrieve user invitation
POST /api/user-invitations/ Create user invitation
PUT /api/user-invitations/{uuid}/ Update user invitation
PATCH /api/user-invitations/{uuid}/ Partially update user invitation
DELETE /api/user-invitations/{uuid}/ Delete user invitation
Other Actions
GET /api/user-invitations/{uuid}/details/ Get public invitation details
POST /api/user-invitations/{uuid}/accept/ Accept an invitation
POST /api/user-invitations/approve/ Approve a requested invitation
POST /api/user-invitations/{uuid}/cancel/ Cancel an invitation
POST /api/user-invitations/{uuid}/check/ Check invitation validity
POST /api/user-invitations/{uuid}/delete/ Delete an invitation (staff only)
POST /api/user-invitations/reject/ Reject a requested invitation
POST /api/user-invitations/{uuid}/send/ Resend an invitation

Core CRUD

List user invitations

Retrieve a list of user invitations visible to the current user.

1
2
3
4
http \
  GET \
  https://api.example.com/api/user-invitations/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_list # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_list.sync(client=client)

for item in response:
    print(item)
  1. API Source: user_invitations_list
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
import { userInvitationsList } from 'waldur-js-client';

try {
  const response = await userInvitationsList({
  auth: "Token YOUR_API_TOKEN"
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Description
civil_number string
customer_uuid string (uuid)
email string
email_exact string
o array Ordering

page integer A page number within the paginated result set.
page_size integer Number of results to return per page.
role_name string
role_uuid string (uuid)
scope_description string
scope_name string
scope_type string
state array

200 -

The response body is an array of objects, where each object has the following structure:

Field Type Description
scope_uuid string (uuid)
scope_name string
scope_description string Get the description field from the scope if it exists. Returns empty string if scope doesn't have a description field.
scope_type string
customer_uuid string (uuid)
customer_name string
role_name string
role_description string
created_by_full_name string
created_by_username string
created_by_image string (uri)
url string (uri)
uuid string (uuid)
role string (uuid)
created string (date-time)
expires string (date-time)
full_name string
native_name string
phone_number string
organization string
job_title string
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
civil_number string Civil number of invited user. If civil number is not defined any user can accept invitation.
state any
error_message string
extra_invitation_text string
execution_state any

Retrieve user invitation

Retrieve details of a specific user invitation.

1
2
3
4
http \
  GET \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: user_invitations_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsRetrieve } from 'waldur-js-client';

try {
  const response = await userInvitationsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type Description
scope_uuid string (uuid)
scope_name string
scope_description string Get the description field from the scope if it exists. Returns empty string if scope doesn't have a description field.
scope_type string
customer_uuid string (uuid)
customer_name string
role_name string
role_description string
created_by_full_name string
created_by_username string
created_by_image string (uri)
url string (uri)
uuid string (uuid)
role string (uuid)
created string (date-time)
expires string (date-time)
full_name string
native_name string
phone_number string
organization string
job_title string
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
civil_number string Civil number of invited user. If civil number is not defined any user can accept invitation.
state any
error_message string
extra_invitation_text string
execution_state any

Create user invitation

Create a new user invitation to grant a role in a specific scope (e.g., organization or project).

1
2
3
4
5
6
7
http \
  POST \
  https://api.example.com/api/user-invitations/ \
  Authorization:"Token YOUR_API_TOKEN" \
  role="a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  scope="string-value" \
  email="alice@example.com"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.invitation_request import InvitationRequest # (1)
from waldur_api_client.api.user_invitations import user_invitations_create # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = InvitationRequest(
    role="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    scope="string-value",
    email="alice@example.com"
)
response = user_invitations_create.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: InvitationRequest
  2. API Source: user_invitations_create
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
import { userInvitationsCreate } from 'waldur-js-client';

try {
  const response = await userInvitationsCreate({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "role": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "scope": "string-value",
    "email": "alice@example.com"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required Description
role string (uuid)
scope string
Constraints: write-only
full_name string
native_name string
phone_number string
organization string
job_title string
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
civil_number string Civil number of invited user. If civil number is not defined any user can accept invitation.
extra_invitation_text string

201 -

Field Type Description
scope_uuid string (uuid)
scope_name string
scope_description string Get the description field from the scope if it exists. Returns empty string if scope doesn't have a description field.
scope_type string
customer_uuid string (uuid)
customer_name string
role_name string
role_description string
created_by_full_name string
created_by_username string
created_by_image string (uri)
url string (uri)
uuid string (uuid)
role string (uuid)
created string (date-time)
expires string (date-time)
full_name string
native_name string
phone_number string
organization string
job_title string
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
civil_number string Civil number of invited user. If civil number is not defined any user can accept invitation.
state any
error_message string
extra_invitation_text string
execution_state any

Update user invitation

Update an existing user invitation. Only pending invitations can be edited. Allows changing email and role within the same scope.

1
2
3
4
5
http \
  PUT \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN" \
  email="alice@example.com"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.invitation_update_request import InvitationUpdateRequest # (1)
from waldur_api_client.api.user_invitations import user_invitations_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = InvitationUpdateRequest(
    email="alice@example.com"
)
response = user_invitations_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: InvitationUpdateRequest
  2. API Source: user_invitations_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
import { userInvitationsUpdate } from 'waldur-js-client';

try {
  const response = await userInvitationsUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  },
  body: {
    "email": "alice@example.com"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
role string (uuid)

200 -

Field Type Description
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
role string (uuid)

Partially update user invitation

Partially update an existing user invitation. Only pending invitations can be edited. Allows changing email and role within the same scope.

1
2
3
4
http \
  PATCH \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.patched_invitation_update_request import PatchedInvitationUpdateRequest # (1)
from waldur_api_client.api.user_invitations import user_invitations_partial_update # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = PatchedInvitationUpdateRequest()
response = user_invitations_partial_update.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client,
    body=body_data
)

print(response)
  1. Model Source: PatchedInvitationUpdateRequest
  2. API Source: user_invitations_partial_update
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsPartialUpdate } from 'waldur-js-client';

try {
  const response = await userInvitationsPartialUpdate({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)
Field Type Required Description
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
role string (uuid)

200 -

Field Type Description
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
role string (uuid)

Delete user invitation

Delete a user invitation. Only users with invitation management permissions can delete invitations.

1
2
3
4
http \
  DELETE \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_destroy # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_destroy.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: user_invitations_destroy
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsDestroy } from 'waldur-js-client';

try {
  const response = await userInvitationsDestroy({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

204 - No response body


Other Actions

Get public invitation details

Retrieves public-facing details of an invitation. This is used to show information to a user before they accept it.

1
2
3
4
http \
  GET \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/details/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_details_retrieve # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_details_retrieve.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: user_invitations_details_retrieve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsDetailsRetrieve } from 'waldur-js-client';

try {
  const response = await userInvitationsDetailsRetrieve({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type Description
scope_uuid string (uuid)
scope_name string
scope_description string Get the description field from the scope if it exists. Returns empty string if scope doesn't have a description field.
scope_type string
customer_uuid string (uuid)
customer_name string
role_name string
role_description string
created_by_full_name string
created_by_username string
created_by_image string (uri)
email string (email) Invitation link will be sent to this email. Note that user can accept invitation with different email.
error_message string
execution_state any
state any

Accept an invitation

Accepts an invitation for the currently authenticated user. This grants the user the specified role in the invitation's scope.

1
2
3
4
http \
  POST \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/accept/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_accept # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_accept.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: user_invitations_accept
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsAccept } from 'waldur-js-client';

try {
  const response = await userInvitationsAccept({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body


Approve a requested invitation

1
2
    For user's convenience invitation approval is performed without authentication.
    User UUID and invitation UUID is encoded into cryptographically signed token.
1
2
3
4
5
http \
  POST \
  https://api.example.com/api/user-invitations/approve/ \
  Authorization:"Token YOUR_API_TOKEN" \
  token="********"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.token_request import TokenRequest # (1)
from waldur_api_client.api.user_invitations import user_invitations_approve # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = TokenRequest(
    token="********"
)
response = user_invitations_approve.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: TokenRequest
  2. API Source: user_invitations_approve
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsApprove } from 'waldur-js-client';

try {
  const response = await userInvitationsApprove({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "token": "********"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
token string

200 - No response body


Cancel an invitation

Cancels a pending or planned (pending_project) invitation.

1
2
3
4
http \
  POST \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/cancel/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_cancel # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_cancel.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: user_invitations_cancel
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsCancel } from 'waldur-js-client';

try {
  const response = await userInvitationsCancel({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -


Check invitation validity

Checks if an invitation is pending and returns its email and whether a civil number is required for acceptance. This endpoint is public and does not require authentication.

1
2
3
4
http \
  POST \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/check/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_check # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_check.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: user_invitations_check
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsCheck } from 'waldur-js-client';

try {
  const response = await userInvitationsCheck({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 -

Field Type
email string (email)
civil_number_required boolean

Delete an invitation (staff only)

Deletes an invitation. This action is restricted to staff users.

1
2
3
4
http \
  POST \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/delete/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_delete # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_delete.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: user_invitations_delete
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsDelete } from 'waldur-js-client';

try {
  const response = await userInvitationsDelete({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body


Reject a requested invitation

1
2
    For user's convenience invitation reject action is performed without authentication.
    User UUID and invitation UUID is encoded into cryptographically signed token.
1
2
3
4
5
http \
  POST \
  https://api.example.com/api/user-invitations/reject/ \
  Authorization:"Token YOUR_API_TOKEN" \
  token="********"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.models.token_request import TokenRequest # (1)
from waldur_api_client.api.user_invitations import user_invitations_reject # (2)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)

body_data = TokenRequest(
    token="********"
)
response = user_invitations_reject.sync(
    client=client,
    body=body_data
)

print(response)
  1. Model Source: TokenRequest
  2. API Source: user_invitations_reject
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsReject } from 'waldur-js-client';

try {
  const response = await userInvitationsReject({
  auth: "Token YOUR_API_TOKEN",
  body: {
    "token": "********"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Field Type Required
token string

200 - No response body


Resend an invitation

Resends an email for a pending, expired, or canceled invitation. If the invitation was expired or canceled, its state is reset to 'pending' and its creation time is updated.

1
2
3
4
http \
  POST \
  https://api.example.com/api/user-invitations/a1b2c3d4-e5f6-7890-abcd-ef1234567890/send/ \
  Authorization:"Token YOUR_API_TOKEN"
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from waldur_api_client.client import AuthenticatedClient
from waldur_api_client.api.user_invitations import user_invitations_send # (1)

client = AuthenticatedClient(
    base_url="https://api.example.com", token="YOUR_API_TOKEN"
)
response = user_invitations_send.sync(
    uuid="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    client=client
)

print(response)
  1. API Source: user_invitations_send
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
import { userInvitationsSend } from 'waldur-js-client';

try {
  const response = await userInvitationsSend({
  auth: "Token YOUR_API_TOKEN",
  path: {
    "uuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
});
  console.log('Success:', response);
} catch (error) {
  console.error('Error:', error);
}
Name Type Required
uuid string (uuid)

200 - No response body