ContactGroups

Update a contact group

Updates an existing contact group's fields and returns the updated group. Use this endpoint to update a contact group through the Samva email API.

PATCH
/v1/contact-groups/{id}

Updates an existing contact group's fields and returns the updated group.

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
name?|null
description?string|null|null
type?|null
criteria?|null|null
color?||null
icon?string|null|null
parentGroupId?|null|null
isActive?boolean|null

Response Body

Success

application/json
  1. response
id*ContactGroupId
Match^cgrp_[0-9a-hjkmnp-tv-z]{16,24}$
organizationId*OrganizationId
Match^org_[0-9a-hjkmnp-tv-z]{16,24}$
name*string
description*string|null
type*string
Value in"static""dynamic""smart"
criteria*|null
color*|

The list's label color, one of six families, or null for the neutral chip. Customer-chosen and purely presentational; it carries no meaning the API enforces.

icon*string|null
parentGroupId*|null
contactCount*integer
Range0 <= value <= 9007199254740991
lastCalculatedAt*string|null
isActive*boolean
createdAt*string
updatedAt*string
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.contactGroups.update({  "id": "example"});
Example Response
{  "id": "string",  "organizationId": "string",  "name": "string",  "description": "string",  "type": "static",  "criteria": {    "property1": "string",    "property2": "string"  },  "color": "clay",  "icon": "string",  "parentGroupId": "string",  "contactCount": 0,  "lastCalculatedAt": "string",  "isActive": true,  "createdAt": "string",  "updatedAt": "string"}

Related documentation