1MSG
ReferenceCampaigns API

Replace segment members

PUT
/api/v1/campaigns/segments/{segmentId}/members

Deletes every current member and inserts this list. The same name, phone, and bsuid rules apply as when adding members. The new list cannot exceed 500 members.

Authorization

bearer
headerAuthorizationBearer <token>

Key issued in Settings → Developer → API key. Inbox methods need the Inbox scope. Campaigns methods need the Campaigns scope.

Path Parameters

segmentId*string

Segment id returned by create or list.

Request Body

application/json
  1. body
members*array<>

Replaces every current member. Same name, phone, and bsuid rules as when adding members. An empty list clears the segment. The new list cannot exceed 500 members.

Response Body

application/json
  1. response
items*array<>

Members written by this request.

curl -X PUT 'https://api.1msg.io/api/v1/campaigns/segments/string/members' \  -H 'Content-Type: application/json' \  -d '{  "members": [    {      "name": "Ana"    }  ]}'
{  "items": [    {      "id": "cm3member01",      "name": "Ana",      "phone": "+15551234567",      "bsuid": "ab.abc123xyz"    }  ]}