Update or rename a contact group

posthttps://api.expiryedge.com/v1/updateContactGroup
editor or admin60/minJede Methode
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/updateContactGroup?id=grp_7Qw2' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Suppliers",
  "sortOrder": 1
}'
Antwort
{
  "message": "Group updated",
  "group": {
    "id": "grp_7Qw2",
    "organization_id": "org_northwind",
    "name": "Suppliers",
    "color": "#2e7d32",
    "sortOrder": 1,
    "createdAt": "2026-09-27T14:05:00.000Z",
    "updatedAt": "2026-09-28T09:12:00.000Z"
  },
  "membersUpdated": 3
}

Id from the id query parameter (or body id). Renaming checks uniqueness (409 GROUP_EXISTS) and moves every member contact to the new name; membersUpdated reports how many.

Query-Parameter

  • idstring
    Group id (alternative to body id).

Body-Parameter

application/json
  • namestring
    Required on create. Unique per organization (case-insensitive).
  • colorstring
    Hex color; empty derives one from the name.
  • sortOrdernumber
  • idstring
    Group id (used when id is not in the query).

Rückgabe

200
Group updated.
  • messagestringerforderlich
  • groupobjecterforderlich
    An organization-wide contact group.
  • membersUpdatedinteger
    Contacts moved to the new name (0 when not renamed).

Fehler

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Authenticated, but your role or organization does not allow this action.
404
The record does not exist or is not in your organization.
409
A group with that name already exists.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.