Skip to main content
PATCH
/
v1
/
groups
/
:groupId
/
links
curl -X PATCH https://api.bouncy.ai/v1/groups/grp_abc123xyz/links \
  -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "linkIds": ["link_abc123", "link_def456", "link_ghi789"],
    "action": "add"
  }'
curl -X PATCH https://api.bouncy.ai/v1/groups/grp_abc123xyz/links \
  -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "linkIds": ["link_abc123"],
    "action": "remove"
  }'
// Add links to group
const response = await fetch(
  'https://api.bouncy.ai/v1/groups/grp_abc123xyz/links',
  {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      linkIds: ['link_abc123', 'link_def456', 'link_ghi789'],
      action: 'add'
    })
  }
);

const result = await response.json();
console.log(`Added ${result.updated} links to group`);
import requests

# Add links to group
response = requests.patch(
    'https://api.bouncy.ai/v1/groups/grp_abc123xyz/links',
    headers={
        'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'linkIds': ['link_abc123', 'link_def456', 'link_ghi789'],
        'action': 'add'
    }
)

result = response.json()
print(f"Added {result['updated']} links to group")
{
  "groupId": "grp_abc123xyz",
  "message": "Links assigned to group successfully",
  "updated": 3,
  "failed": []
}
{
  "groupId": "grp_abc123xyz",
  "message": "Some links assigned successfully",
  "updated": 2,
  "failed": [
    {
      "linkId": "link_xyz999",
      "error": {
        "code": "link_not_found",
        "message": "Link not found"
      }
    }
  ]
}
{
  "error": {
    "code": "group_not_found",
    "message": "Group not found"
  }
}

Request

Headers

Content-Type
string
required
Must be application/json

Path Parameters

groupId
string
required
The group IDExample: grp_abc123xyz

Body

Array of link IDs to add to this groupExample: ["link_abc123", "link_def456", "link_ghi789"]
action
string
default:"add"
Action to performOptions: add, remove Default: add

Response

groupId
string
Group ID
message
string
Success message
updated
number
Number of links updated
failed
array
Array of link IDs that failed (if any)
curl -X PATCH https://api.bouncy.ai/v1/groups/grp_abc123xyz/links \
  -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "linkIds": ["link_abc123", "link_def456", "link_ghi789"],
    "action": "add"
  }'
curl -X PATCH https://api.bouncy.ai/v1/groups/grp_abc123xyz/links \
  -H "Authorization: Bearer bcy_live_pk_YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "linkIds": ["link_abc123"],
    "action": "remove"
  }'
// Add links to group
const response = await fetch(
  'https://api.bouncy.ai/v1/groups/grp_abc123xyz/links',
  {
    method: 'PATCH',
    headers: {
      'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      linkIds: ['link_abc123', 'link_def456', 'link_ghi789'],
      action: 'add'
    })
  }
);

const result = await response.json();
console.log(`Added ${result.updated} links to group`);
import requests

# Add links to group
response = requests.patch(
    'https://api.bouncy.ai/v1/groups/grp_abc123xyz/links',
    headers={
        'Authorization': 'Bearer bcy_live_pk_YOUR_API_KEY',
        'Content-Type': 'application/json'
    },
    json={
        'linkIds': ['link_abc123', 'link_def456', 'link_ghi789'],
        'action': 'add'
    }
)

result = response.json()
print(f"Added {result['updated']} links to group")
{
  "groupId": "grp_abc123xyz",
  "message": "Links assigned to group successfully",
  "updated": 3,
  "failed": []
}
{
  "groupId": "grp_abc123xyz",
  "message": "Some links assigned successfully",
  "updated": 2,
  "failed": [
    {
      "linkId": "link_xyz999",
      "error": {
        "code": "link_not_found",
        "message": "Link not found"
      }
    }
  ]
}
{
  "error": {
    "code": "group_not_found",
    "message": "Group not found"
  }
}