Skip to main content
POST
/
api
/
v1
/
invites
Create Invite
curl --request POST \
  --url https://api.athenahq.ai/api/v1/invites \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "type": "organization",
  "invite_method": "email",
  "email": "user@example.com",
  "role": "viewer",
  "website_id": "123e4567-e89b-12d3-a456-426614174000",
  "group_id": "456e7890-e89b-12d3-a456-426614174000",
  "first_name": "John",
  "last_name": "Doe"
}
'
{
  "success": true,
  "message": "User added to organization",
  "user_id": "abc12345-e89b-12d3-a456-426614174000"
}

Documentation Index

Fetch the complete documentation index at: https://docs.athenahq.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

API key for authentication. You can create one here.

Body

application/json

Request body for creating an invite

type
enum<string>
required

The type of invite. 'organization' grants org-wide access, 'website' grants access to a single website, 'group' grants access to all websites in a group. Group invites require a global API key.

Available options:
organization,
website,
group
Example:

"organization"

invite_method
enum<string>
required

How to invite the user. 'direct' adds the user to the resource immediately without sending any email — if no account exists for the email, a new user account is created automatically (with emailVerified=false) and the membership is added. 'email' creates a pending invite record and sends an invitation email via Postmark; the user must accept the invite to gain access.

Available options:
direct,
email
Example:

"email"

email
string<email>
required

Email address of the user to invite

Example:

"user@example.com"

role
enum<string>
default:viewer

The role to assign to the invited user

Available options:
admin,
viewer
Example:

"viewer"

website_id
string<uuid>

Required when type is 'website'. The ID of the website to grant access to

Example:

"123e4567-e89b-12d3-a456-426614174000"

group_id
string<uuid>

Required when type is 'group'. The ID of the group to grant access to. Requires a global API key.

Example:

"456e7890-e89b-12d3-a456-426614174000"

first_name
string

Optional first name of the invited user. Used when creating a new user account for 'direct' invites or populating the invite record for 'email' invites.

Example:

"John"

last_name
string

Optional last name of the invited user. Used when creating a new user account for 'direct' invites or populating the invite record for 'email' invites.

Example:

"Doe"

Response

User added or invitation sent successfully

Response from creating an invite

success
boolean
required

Whether the operation was successful

Example:

true

message
string
required

A message describing the result

Example:

"Invitation sent"

invite_id
string<uuid>

The ID of the created invite (only present for email invites)

Example:

"123e4567-e89b-12d3-a456-426614174000"

user_id
string<uuid>

The ID of the user the invite targets. Present only for direct invites (the user is looked up or created immediately). Never returned for email-method invites to prevent cross-tenant account-existence enumeration.

Example:

"abc12345-e89b-12d3-a456-426614174000"