Skip to main content
PATCH
/
api
/
v1
/
groups
/
{group_id}
Update Group
curl --request PATCH \
  --url https://api.athenahq.ai/api/v1/groups/{group_id} \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "name": "Renamed Group",
  "add_website_ids": [
    "123e4567-e89b-12d3-a456-426614174000"
  ],
  "remove_website_ids": [
    "987e6543-e21b-12d3-a456-426614174000"
  ]
}
'
{
  "group": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "Enterprise Clients",
    "orgId": "987e6543-e21b-12d3-a456-426614174000",
    "billingEnabled": false,
    "createdAt": "2024-06-15T10:30:00.000Z",
    "websites": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174000",
        "websiteUrl": "example.com",
        "websiteName": "My Awesome Blog"
      }
    ]
  }
}

Authorizations

x-api-key
string
header
required

API key for authentication. You can create one here.

Path Parameters

group_id
string<uuid>
required

The unique identifier of the group

Body

application/json

Request body for updating a group. At least one field must be provided.

name
string

New name for the group. Must be unique within the organization.

Minimum string length: 1
Example:

"Renamed Group"

add_website_ids
string<uuid>[]

Website IDs to add to the group. Must belong to your organization. Websites already in the group are silently ignored.

Minimum array length: 1
Example:
["123e4567-e89b-12d3-a456-426614174000"]
remove_website_ids
string<uuid>[]

Website IDs to remove from the group. IDs not currently in the group are silently ignored.

Minimum array length: 1
Example:
["987e6543-e21b-12d3-a456-426614174000"]

Response

Group updated successfully

group
object
required

A group of websites in your organization