Skip to main content
POST
Create a segment

Authorizations

apiKey
string
header
required

API key from Settings → API keys.

apiSecret
string
header
required

Secret shown once when the API key is created.

Path Parameters

accountId
string
required

Your Gallabox account ID. Must be the API key's own account. A 24-character hexadecimal ID.

Pattern: ^[a-fA-F0-9]{24}$
Example:

"6650a1b2c3d4e5f6a7b8c9d0"

Body

application/json
name
string
required

Segment name. It must be unique in the account.

contactFilter
object
required

Which contacts match. Rules are combined with condition, and a rule can itself be a group with its own condition and rules. GET /contacts/filters lists the properties you can filter on, with each one's type, meta and operators.

Response

The segment that was created.

A saved group of contacts.

id
string

A 24-character hexadecimal ID.

Pattern: ^[a-fA-F0-9]{24}$
Example:

"6650a1b2c3d4e5f6a7b8c9d0"

name
string
accountId
string

A 24-character hexadecimal ID.

Pattern: ^[a-fA-F0-9]{24}$
Example:

"6650a1b2c3d4e5f6a7b8c9d0"

contactFilter
object

The filter that decides which contacts are in the segment.

creatorId
string

A 24-character hexadecimal ID.

Pattern: ^[a-fA-F0-9]{24}$
Example:

"6650a1b2c3d4e5f6a7b8c9d0"

createdAt
string<date-time>
updatedAt
string<date-time>