Add a contact to a group

Adds the contact identified by phoneNumber to the group identified by groupId. The request body chooses the enrollment mode:

  • optInMode: "DIRECT" (default) — caller asserts prior consent. The contact is added as an active member immediately; the group's configured opt-in message may be sent.
  • optInMode: "CONFIRM" — the system sends an SMS confirmation to the contact. They land in pendingGroups[] until they reply YES.
  • optInMode: "SILENT" — caller asserts prior consent AND no contact-facing messaging is sent (no confirmation, no opt-in message, no linked flow). Not available on all accounts — requests from accounts without this capability are rejected with 403 (33038).

Consent gate (cannot be overridden, all modes): HARD-opted-out contacts are rejected with 409 ContactHardOptedOut (33035). Contacts with PENDING memberships in groups other than the target are rejected with 409 ContactPending (33036).

Idempotency: if the contact is already active in this group, the call is a no-op and returns the current contact state, for all modes. A pending confirmation in this group: DIRECT/CONFIRM no-op; SILENT quietly completes the membership (pending → active, no message).

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Contact phone number in E.164 format (+ then country code and subscriber number).

string
required

Group public ID (grp_...).

Body Params
string
enum
Defaults to DIRECT

How the contact should be enrolled. DIRECT adds the contact immediately and asserts prior consent; the group's configured opt-in message may be sent. CONFIRM sends an SMS confirmation and parks the contact in pendingGroups[] until they reply YES. SILENT adds the contact immediately with no contact-facing messaging at all — not available on all accounts; rejected with 403 when the account does not have this capability.

Allowed:
Responses

Language
Credentials
Basic
base64
:
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json