Skip to main content
POST
/
api
/
v1
/
invites
/
bulk
Bulk Invite to Websites
curl --request POST \
  --url https://api.athenahq.ai/api/v1/invites/bulk \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "invite_method": "direct",
  "email": "user@example.com",
  "website_ids": [
    "123e4567-e89b-12d3-a456-426614174000",
    "987e6543-e21b-12d3-a456-426614174000"
  ],
  "role": "viewer",
  "first_name": "John",
  "last_name": "Doe"
}
'
{
  "success": true,
  "results": [
    {
      "website_id": "123e4567-e89b-12d3-a456-426614174000",
      "success": true,
      "message": "User added to website"
    },
    {
      "website_id": "987e6543-e21b-12d3-a456-426614174000",
      "success": false,
      "error": "User is already a member of this website"
    }
  ]
}

Authorizations

x-api-key
string
header
required

API key for authentication. You can create one here.

Body

application/json

Request body for inviting a user to multiple websites

invite_method
enum<string>
required

How to invite the user. Use 'direct' to add an existing user immediately, or 'email' to send invitation emails

Available options:
direct,
email
Example:

"direct"

email
string<email>
required

Email address of the user to invite

Example:

"user@example.com"

website_ids
string<uuid>[]
required

Array of website IDs to invite the user to (1-50)

Required array length: 1 - 50 elements
Example:
[
"123e4567-e89b-12d3-a456-426614174000",
"987e6543-e21b-12d3-a456-426614174000"
]
role
enum<string>
default:viewer

The role to assign to the invited user on each website

Available options:
admin,
viewer
Example:

"viewer"

first_name
string

Optional first name of the invited user

Example:

"John"

last_name
string

Optional last name of the invited user

Example:

"Doe"

Response

Bulk invite processed. Check individual results for per-website outcomes.

Response from a bulk invite request. Each website is processed independently.

success
boolean
required

Whether the bulk operation was processed (always true if request was valid)

Example:

true

results
object[]
required

Per-website results