For the complete documentation index, see llms.txt. This page is also available as Markdown.

User Invitations

This document contains endpoints for creating, updating, retrieving, resending, accepting, declining, and revoking user invitations in DocStudio.

User invitations add people to a corporate account or selected mailboxes and define their initial permissions and roles. A single invitation can include account access and access to one or more mailboxes.

Account administrators can create, update, resend, or revoke an invitation, while invited users can retrieve, accept, or decline their invitations. For complete request and response schemas, parameter requirements, and status codes, use the Swagger UI.

Business goals

User invitation endpoints support both account administration and the invited user’s side of the onboarding process:

  • Onboard corporate users: Invite a person to join a DocStudio account

  • Configure initial account access: Assign account permissions and roles during invitation

  • Configure initial mailbox access: Add the invited user to one or more mailboxes with the required permissions and roles

  • Correct pending invitations: Change the user’s name or assigned access before the invitation is accepted

  • Recover an unanswered invitation: Resend the invitation when the original invitation was not received or has not been processed

  • Let users respond to invitations: Retrieve, accept, or decline available invitations

  • Cancel pending access: Revoke an invitation before the user joins the account

Endpoint summary

Invitation administration

Method
Endpoint
Purpose

POST

/api/v1/user/invite

Create an invitation with account and mailbox access

PUT

/api/v1/user/invite/{id}

Update an invitation by user UUID

POST

/api/v1/permission/invite/{accountUuid}/{userUuid}/resend

Resend an account invitation

DELETE

/api/v1/permission/invite/{accountUuid}/{userUuid}

Revoke an account invitation

Invitation response

Method
Endpoint
Purpose

GET

/api/v1/user/invites

Retrieve the authenticated user’s invitations

POST

/api/v1/user/invite/accept/{inviteCode}

Accept an invitation

DELETE

/api/v1/user/invite/decline/{inviteCode}

Decline an invitation

Invitation structure and headers

All invitation operations require an API token in the Authorization header. Requests that create or update an invitation must also use Content-Type: application/json.

The invitation body contains information about the invited user and the access that must be assigned. The account object defines account access, while every object in mailboxes defines access within one mailbox.

Property
Type
Description

email

string

Email address of the invited user; accepted only when creating an invitation

firstName

string

First name of the invited user

lastName

string

Last name of the invited user

account

object

Account UUID, permission IDs, and account role UUIDs

mailboxes

array of objects

Mailbox UUIDs, permission IDs, and mailbox role UUIDs

Account and mailbox access objects use the following properties:

Property
Type
Description

uuid

UUID

UUID of the account or mailbox

permissions

array of integers

Numeric IDs of individual permissions

roles

array of UUIDs

UUIDs of permission roles

Use permission IDs and role UUIDs returned by the Permission Roles endpoints. Account roles and permissions must be included in the account object, while mailbox roles and permissions must be included in the corresponding mailboxes object.

The 0 permission ID shown in Swagger is a schema example rather than a permission that should be copied into a production request. Replace it with an actual account or mailbox permission ID.

Path parameters

Parameter
Type
Required
Description

id

UUID

Yes

UUID of the invited user whose invitation must be updated

accountUuid

UUID

Yes

UUID of the account to which the user was invited

userUuid

UUID

Yes

UUID of the invited user

inviteCode

string

Yes

Invitation code returned with the invitation data

Practical example: Invite a user to an account and mailbox

A company wants to invite a new contract reviewer to its corporate account. The user must receive an account role and access to the mailbox in which incoming contracts are processed.

Create the invitation

A successful request returns 201 Created and the invited user’s UUID. Use this value as {id} when updating the invitation and as {userUuid} when resending or revoking it.

A successful request returns 201 Created and a UUID. Save the returned value because the invitation management endpoints identify the invited user by UUID.

Update the invitation

Update the invitation when the user’s name, account access, or mailbox access must be changed before acceptance. The {id} path parameter contains the UUID of the invited user.

The update schema does not contain email, so this operation does not change the invitation email address. A successful request returns 200 OK without a response body.

Resend the invitation

Resend an invitation when the user has not received or processed the original invitation. The request identifies both the account and the invited user.

A successful request returns 200 OK without a response body. The existing invitation configuration remains unchanged.

Retrieve available invitations

The invited user can retrieve their invitations with pagination. The default offset is 0, the default limit is 25, and the maximum supported limit is 1000.

A successful request returns 200 OK and a paginated collection. Each item contains the account, its assigned permissions, available mailboxes, their permissions, and the invitation code.

Use the returned code as {inviteCode} when accepting or declining the invitation. Do not use the account UUID or user UUID in place of this value.

Accept the invitation

Accepting the invitation adds the user to the account with the account and mailbox access defined in the invitation. Use the invitation code returned by GET /api/v1/user/invites.

A successful request returns 200 OK without a response body. The configured account and mailbox permissions become available to the user.

Decline or revoke an invitation

The invited user can decline an invitation when they do not want to join the account. An account administrator can instead revoke a pending invitation when the offered access must be cancelled.

Decline an invitation

A successful request returns 200 OK without a response body. The invitation is identified by its code.

Revoke an invitation

A successful request returns 200 OK without a response body. The request identifies the account and invited user.

Last updated

Was this helpful?