Skip to main content
POST
/
api
/
v1
/
groups
Create Group
curl --request POST \
  --url https://api.athenahq.ai/api/v1/groups \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "Enterprise Clients",
  "website_ids": [
    "123e4567-e89b-12d3-a456-426614174000",
    "987e6543-e21b-12d3-a456-426614174000"
  ],
  "billing_enabled": false
}
'
{
  "group": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Enterprise Clients",
    "orgId": "987e6543-e21b-12d3-a456-426614174000",
    "billingEnabled": false,
    "websiteIds": [
      "123e4567-e89b-12d3-a456-426614174000"
    ],
    "createdAt": "2024-06-15T10:30:00.000Z"
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication. You can create one here.

Body

application/json

Request body for creating a new group

name
string
required

Name of the group. Must be unique within the organization.

Minimum string length: 1
Example:

"Enterprise Clients"

website_ids
string<uuid>[]
required

List of website IDs to include in the group. All websites must belong to your organization.

Minimum array length: 1
Example:
[
"123e4567-e89b-12d3-a456-426614174000",
"987e6543-e21b-12d3-a456-426614174000"
]
billing_enabled
boolean
default:false

Whether to enable billing for this group

Example:

false

Response

Group created successfully

group
object
required

A newly created group resource