Bulk Invite to Websites or Groups
Invites a user to multiple websites OR multiple groups in a single request. Provide exactly one of website_ids or group_ids — the two are mutually exclusive. Each target is processed independently, so some may succeed while others fail (e.g., if the user is already a member). In 'email' mode a single consolidated invitation email is sent. Group invites require a global API key. Website invites with a website-scoped key also require the key's creator to be an Admin of every listed website. Direct invites cannot create new accounts with email domains for Cuba, Iran, North Korea, Russia, Belarus, or regional domains for Crimea (including Sevastopol), Donetsk, or Luhansk. The response remains HTTP 201 with success: false and an error for each target in results. General .ua domains remain allowed. Existing accounts can still be invited.
Request
- Base URLhttps://api.athenahq.ai
- AuthAPI key in header x-api-key
Request body
Example request
{
"invite_method": "direct",
"email": "user@example.com",
"role": "viewer",
"role_id": "789e0123-e89b-12d3-a456-426614174000",
"website_ids": [
"123e4567-e89b-12d3-a456-426614174000",
"987e6543-e21b-12d3-a456-426614174000"
],
"group_ids": [
"456e7890-e89b-12d3-a456-426614174000",
"789e0123-e89b-12d3-a456-426614174000"
],
"first_name": "John",
"last_name": "Doe"
}Response
Bulk invite processed. Check individual results for per-target outcomes.
Example response
{
"success": true,
"results": [
{
"website_id": "123e4567-e89b-12d3-a456-426614174000",
"group_id": "456e7890-e89b-12d3-a456-426614174000",
"message": "User added to website",
"error": "User is already a member of this website"
}
]
}Changes
No recorded changes to this operation across all 3 revisions of this API.