8 operations. Guide: Manage contacts and consent. Requests and responses are JSON with snake_case fields; authenticate with Authorization: Bearer <api key>. The examples assume a client built as in SDKs and the command line.

Create a segment

POST /v1/segments

static segments hold members you add; dynamic ones match their rules whenever they are read.

Operation createSegment, SDK minket.segments.create. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Request body

FieldTypeRequiredDescription
namestringyes1 to 100 characters.
kindone of "static", "dynamic"noDefault "static".
rulesobjectno
rules (shape 1).allarray of objectyesAt most 50 items.
rules (shape 1).all[].fieldstringyesAt most 120 characters.
rules (shape 1).all[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 1).all[].valuestring or number or boolean or array of string or nullno
rules (shape 2).anyarray of objectyesAt most 50 items.
rules (shape 2).any[].fieldstringyesAt most 120 characters.
rules (shape 2).any[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 2).any[].valuestring or number or boolean or array of string or nullno

Response

201 Created: Segment.

FieldTypeRequiredDescription
idstringyesA UUID.
object"segment"yes
project_idstringyesA UUID.
namestringyes
kindone of "static", "dynamic"yes
rulesobject or nullyes
rules (shape 1).allarray of objectyesAt most 50 items.
rules (shape 1).all[].fieldstringyesAt most 120 characters.
rules (shape 1).all[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 1).all[].valuestring or number or boolean or array of string or nullno
rules (shape 2).anyarray of objectyesAt most 50 items.
rules (shape 2).any[].fieldstringyesAt most 120 characters.
rules (shape 2).any[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 2).any[].valuestring or number or boolean or array of string or nullno
contacts_countinteger or nullyes
created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
updated_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X POST https://api.minket.com/v1/segments \
  -H "Authorization: Bearer $MINKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Customers"}'

List segments

GET /v1/segments

Operation listSegments, SDK minket.segments.list. Keys: full access. Test keys work on test-mode data.

Parameters

NameInTypeRequiredDescription
limitqueryintegerno Default 20.
afterquerystringnoA UUID.
beforequerystringnoA UUID.

Response

200 Success: object.

FieldTypeRequiredDescription
object"list"yes
dataarray of Segmentyes
data[].idstringyesA UUID.
data[].object"segment"yes
data[].project_idstringyesA UUID.
data[].namestringyes
data[].kindone of "static", "dynamic"yes
data[].rulesobject or nullyes
data[].rules (shape 1).allarray of objectyesAt most 50 items.
data[].rules (shape 1).all[].fieldstringyesAt most 120 characters.
data[].rules (shape 1).all[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
data[].rules (shape 1).all[].valuestring or number or boolean or array of string or nullno
data[].rules (shape 2).anyarray of objectyesAt most 50 items.
data[].rules (shape 2).any[].fieldstringyesAt most 120 characters.
data[].rules (shape 2).any[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
data[].rules (shape 2).any[].valuestring or number or boolean or array of string or nullno
data[].contacts_countinteger or nullyes
data[].created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
data[].updated_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
has_morebooleanyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl https://api.minket.com/v1/segments \
  -H "Authorization: Bearer $MINKET_API_KEY"

Get a segment

GET /v1/segments/{id}

Operation getSegment, SDK minket.segments.get. Keys: full access. Test keys work on test-mode data.

Parameters

NameInTypeRequiredDescription
idpathstringyesA UUID.

Response

200 Success: Segment.

FieldTypeRequiredDescription
idstringyesA UUID.
object"segment"yes
project_idstringyesA UUID.
namestringyes
kindone of "static", "dynamic"yes
rulesobject or nullyes
rules (shape 1).allarray of objectyesAt most 50 items.
rules (shape 1).all[].fieldstringyesAt most 120 characters.
rules (shape 1).all[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 1).all[].valuestring or number or boolean or array of string or nullno
rules (shape 2).anyarray of objectyesAt most 50 items.
rules (shape 2).any[].fieldstringyesAt most 120 characters.
rules (shape 2).any[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 2).any[].valuestring or number or boolean or array of string or nullno
contacts_countinteger or nullyes
created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
updated_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl https://api.minket.com/v1/segments/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
  -H "Authorization: Bearer $MINKET_API_KEY"

Update a segment

PATCH /v1/segments/{id}

Renames it or, for a dynamic segment, replaces its rules. The kind is fixed.

Operation updateSegment, SDK minket.segments.update. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Parameters

NameInTypeRequiredDescription
idpathstringyesA UUID.

Request body

FieldTypeRequiredDescription
namestringno1 to 100 characters.
kindone of "static", "dynamic"noDefault "static".
rulesobjectno
rules (shape 1).allarray of objectyesAt most 50 items.
rules (shape 1).all[].fieldstringyesAt most 120 characters.
rules (shape 1).all[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 1).all[].valuestring or number or boolean or array of string or nullno
rules (shape 2).anyarray of objectyesAt most 50 items.
rules (shape 2).any[].fieldstringyesAt most 120 characters.
rules (shape 2).any[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 2).any[].valuestring or number or boolean or array of string or nullno

Response

200 Success: Segment.

FieldTypeRequiredDescription
idstringyesA UUID.
object"segment"yes
project_idstringyesA UUID.
namestringyes
kindone of "static", "dynamic"yes
rulesobject or nullyes
rules (shape 1).allarray of objectyesAt most 50 items.
rules (shape 1).all[].fieldstringyesAt most 120 characters.
rules (shape 1).all[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 1).all[].valuestring or number or boolean or array of string or nullno
rules (shape 2).anyarray of objectyesAt most 50 items.
rules (shape 2).any[].fieldstringyesAt most 120 characters.
rules (shape 2).any[].opone of "eq", "neq", "contains", "not_contains", "starts_with", "ends_with", "gt", "gte", "lt", "lte", "is_set", "is_not_set", …yes
rules (shape 2).any[].valuestring or number or boolean or array of string or nullno
contacts_countinteger or nullyes
created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
updated_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X PATCH https://api.minket.com/v1/segments/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
  -H "Authorization: Bearer $MINKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Paying customers"}'

Delete a segment

DELETE /v1/segments/{id}

Operation deleteSegment, SDK minket.segments.delete. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Parameters

NameInTypeRequiredDescription
idpathstringyesA UUID.

Response

200 Success: object.

FieldTypeRequiredDescription
object"segment"yes
idstringyes
deletedtrueyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X DELETE https://api.minket.com/v1/segments/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b \
  -H "Authorization: Bearer $MINKET_API_KEY"

List a segment's contacts

GET /v1/segments/{id}/contacts

Operation listSegmentContacts, SDK minket.segments.contacts.list. Keys: full access. Test keys work on test-mode data.

Parameters

NameInTypeRequiredDescription
idpathstringyesA UUID.
limitqueryintegerno Default 20.
afterquerystringnoA UUID.
beforequerystringnoA UUID.

Response

200 Success: object.

FieldTypeRequiredDescription
object"list"yes
dataarray of objectyes
data[].idstringyesA UUID.
data[].object"contact"yes
data[].project_idstringyesA UUID.
data[].emailstringyes
data[].first_namestring or nullyes
data[].last_namestring or nullyes
data[].unsubscribedbooleanyes
data[].statusone of "active", "unsubscribed", "bounced", "complained", "sunset"yes
data[].propertiesmap of string or number or boolean or nullyes
data[].last_sent_atstring (date-time) or nullyesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
data[].last_opened_atstring (date-time) or nullyesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
data[].last_clicked_atstring (date-time) or nullyesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
data[].created_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
data[].updated_atstring (date-time)yesAn ISO 8601 timestamp with timezone, for example 2026-10-24T18:00:00.000Z.
has_morebooleanyes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl https://api.minket.com/v1/segments/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/contacts \
  -H "Authorization: Bearer $MINKET_API_KEY"

Add contacts to a static segment

POST /v1/segments/{id}/contacts

Operation addSegmentContacts, SDK minket.segments.contacts.add. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Parameters

NameInTypeRequiredDescription
idpathstringyesA UUID.

Request body

FieldTypeRequiredDescription
contact_idsarray of stringnoAt most 1000 items.
emailsarray of stringnoAt most 1000 items.

Response

200 Success: object.

FieldTypeRequiredDescription
object"segment"yes
idstringyes
addedintegeryes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X POST https://api.minket.com/v1/segments/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/contacts \
  -H "Authorization: Bearer $MINKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"emails":["jane@example.com"]}'

Remove contacts from a static segment

DELETE /v1/segments/{id}/contacts

Operation removeSegmentContacts, SDK minket.segments.contacts.remove. Keys: full access. Live keys only: test keys get 403 test_mode_only.

Parameters

NameInTypeRequiredDescription
idpathstringyesA UUID.

Request body

FieldTypeRequiredDescription
contact_idsarray of stringnoAt most 1000 items.
emailsarray of stringnoAt most 1000 items.

Response

200 Success: object.

FieldTypeRequiredDescription
object"segment"yes
idstringyes
removedintegeryes

Errors: 400, 401, 403, 404, 409, 422, 429, 500, with the error body.

Examples

curl
curl -X DELETE https://api.minket.com/v1/segments/019a2b3c-4d5e-7f60-8a9b-0c1d2e3f4a5b/contacts \
  -H "Authorization: Bearer $MINKET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"emails":["jane@example.com"]}'

Updated