POST
/
invites
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/invites' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"emails": [
"test@example.com",
"another@example.com"
],
"roleAlias": "learner",
"groups": [12],
"courses": [110, 150],
"text": "Welcome to our learning platform!"
}'
[
{
    "id": 1,
    "email": "test@example.com",
    "createdAt": 1234567890,
    "inviteUrl": "https://YOURSITE.konstant.ly/signup/1qaz2wsx3edc4rfv"
},
{
    "id": 2,
    "email": "another@example.com",
    "createdAt": 1234567890,
    "inviteUrl": "https://YOURSITE.konstant.ly/signup/2wsx3edc4rfv5tgb"
}
]

Send email invitations to potential users to join your platform.

Request Headers

X-API-KEY
string
required

API Key. Go to your Konstantly site > Settings > API and copy the value from there.

Request Body

emails
array
required

Array of email addresses to send invitations to

text
string

Custom invitation message

roleAlias
string
default:"learner"

Role to assign to users when they accept the invitation

groups
array

Array of group IDs to add users to upon acceptance

courses
array

Array of course IDs to assign to users upon acceptance

deadlineAt
integer

Timestamp for course assignment deadlines

Response

Array of created invitation objects.

id
integer
required
Invitation ID
email
string
required
Recipient email address
createdAt
integer
required
Creation timestamp
inviteUrl
string
required
Signup URL for recipient

Notes

  1. Email requirements:
  • Must be valid email format
  • Cannot be already registered users
  • One invitation per email address
  1. Role assignment:
  • Default role is “learner”
  • Role must exist in system
  • Custom roles must be valid
  1. URL expiration:
  • Signup URLs are valid for 7 days
  • New invitations invalidate old ones
curl --request POST \
--url 'https://YOURSITE.konstant.ly/openapi/v1/invites' \
--header 'X-API-KEY: 1qaz2wsx3edc4rfv1qaz2wsx3edc4rfv' \
--header 'Content-Type: application/json' \
--data '{
"emails": [
"test@example.com",
"another@example.com"
],
"roleAlias": "learner",
"groups": [12],
"courses": [110, 150],
"text": "Welcome to our learning platform!"
}'
[
{
    "id": 1,
    "email": "test@example.com",
    "createdAt": 1234567890,
    "inviteUrl": "https://YOURSITE.konstant.ly/signup/1qaz2wsx3edc4rfv"
},
{
    "id": 2,
    "email": "another@example.com",
    "createdAt": 1234567890,
    "inviteUrl": "https://YOURSITE.konstant.ly/signup/2wsx3edc4rfv5tgb"
}
]