ReferenceREST API
Invitations
Organization invitation management
List invitations
Query Parameters
page?number
Page number (1-indexed)
Default
1Range
1 <= valuelimit?number
Items per page
Default
20Range
1 <= value <= 100Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://loading/api/v1/invitations"{
"data": [
{
"acceptedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"email": "string",
"expiresAt": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"invitedBy": "string",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"role": "ORG_ADMIN",
"status": "PENDING",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"meta": {
"limit": 0,
"page": 0,
"total": 0,
"totalPages": 0
}
}{
"code": "VALIDATION_ERROR",
"details": {},
"error": "Bad Request",
"message": "Validation error",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Create an invitation
Request Body
application/json
email*string
Email address to invite
Format
emailrole?string
Role to assign (defaults to VIEWER)
Default
"VIEWER"Value in
"ORG_ADMIN" | "OPERATOR" | "VIEWER"Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/v1/invitations" \ -H "Content-Type: application/json" \ -d '{ "email": "user@example.com" }'{
"acceptedAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"email": "string",
"expiresAt": "2019-08-24T14:15:22Z",
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"invitedBy": "string",
"organizationId": "7bc05553-4b68-44e8-b7bc-37be63c6d9e9",
"role": "ORG_ADMIN",
"status": "PENDING",
"updatedAt": "2019-08-24T14:15:22Z"
}{
"code": "VALIDATION_ERROR",
"details": {},
"error": "Bad Request",
"message": "Validation error",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "CONFLICT",
"details": {},
"error": "Conflict",
"message": "A pending invitation already exists for this email",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}Revoke an invitation
Path Parameters
id*string
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X DELETE "https://loading/api/v1/invitations/string"{
"message": "string"
}{
"code": "BAD_REQUEST",
"details": {},
"error": "Bad Request",
"message": "Invalid UUID or invitation cannot be revoked in its current state",
"statusCode": 400
}{
"code": "UNAUTHORIZED",
"details": {},
"error": "Unauthorized",
"message": "Unauthorized",
"statusCode": 400
}{
"code": "FORBIDDEN",
"details": {},
"error": "Forbidden",
"message": "Forbidden",
"statusCode": 400
}{
"code": "INVITATION_NOT_FOUND",
"details": {},
"error": "Not Found",
"message": "Invitation not found",
"statusCode": 400
}{
"code": "INTERNAL_SERVER_ERROR",
"details": {},
"error": "Internal Server Error",
"message": "Internal server error",
"statusCode": 400
}