ContactGroups

Add members to a contact group

Adds one or more contacts to a contact group, returning counts of added and skipped members. One request carries at most 1000 ids.

POST
/v1/contact-groups/{id}/members

Adds one or more contacts to a contact group, returning counts of added and skipped members. One request carries at most 1000 ids.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$

Request Body

application/json
  1. body
contactIds*array<>
Items1 <= items <= 1000
role?|null

Response Body

Success

application/json
  1. response
added*integer
Range0 <= value <= 9007199254740991
skipped*integer
Range0 <= value <= 9007199254740991
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.contactGroups.addMembers({  "id": "example",  "contactIds": [    "example"  ]});
Example Response
{  "added": 0,  "skipped": 0}

Related documentation