1MSG
ReferenceCampaigns API

Create a segment

POST
/api/v1/campaigns/segments

name is required, up to 200 characters. description is optional, up to 2000 characters. Returns the segment id used when creating a campaign.

Authorization

bearer
headerAuthorizationBearer <token>

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

Request Body

application/json
  1. body
name*string

Segment name, up to 200 characters.

description?string

Optional note, up to 2000 characters.

Response Body

application/json
  1. response
id*string

Segment id.

name*string

Segment name, up to 200 characters.

description*|

Optional note, up to 2000 characters, or null when none was stored.

createdAt*string

When the segment was created.

Formatdate-time
curl -X POST 'https://api.1msg.io/api/v1/campaigns/segments' \  -H 'Content-Type: application/json' \  -d '{  "name": "April buyers"}'
{  "id": "cm3segment01",  "name": "April buyers",  "description": "People who bought in April",  "createdAt": "2026-11-01T09:00:00.000Z"}