Skip to content

Create a contact list

POST
/v2/contact-lists
curl --request POST \
--url https://api.connect.ms/v2/contact-lists \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "description": "example", "kind": "static", "rules": [ { "field": "first_name", "op": "equals", "value": "example" } ] }'

Creates a static list to add contacts to by hand, or a dynamic list whose membership follows its rules.

Connect-Version
string

The API version to use, for example 2026-10-01. Defaults to the version set on your API key.

Idempotency-Key
string

A unique value of up to 255 characters, so a retried request is not acted on twice. Required for keys in Strict API Mode.

The contact list to create.

Media typeapplication/json

The contact list to create.

object
name
required

The name of the list, up to 128 characters. Unique within the workspace, including deleted lists.

string
0 <= 128 characters
description

A description for your own reference, up to 512 characters.

string
nullable 0 <= 512 characters
kind
One of:

The kind of list: static (members are added and removed by hand), dynamic (membership follows the rules) or all_contacts (the built-in list of every contact).

string
Allowed values: static dynamic all_contacts
rules

The membership rules. Required for dynamic lists (at least one) and ignored for static ones.

Array<object>
>= 1 characters

One rule of a dynamic list. A contact is a member when every rule matches.

object
field
required
One of:

The contact field a rule tests: first_name, last_name, company, email, client_reference, country (ISO 3166-1 alpha-2), created_at (a date), tag or list (membership of another list).

string
Allowed values: first_name last_name company email client_reference country created_at tag list
op
required
One of:

How a rule compares the field with its value: equals, not_equals, contains or starts_with for text fields (country takes equals and not_equals only; tag takes equals, not_equals and contains), before or after for created_at, and in or not_in for list.

string
Allowed values: equals not_equals contains starts_with before after in not_in
value
required

The value to compare with. For the list field, the id of one other list; for created_at, a date or time (UTC).

string

The list was created. The Location header holds its URL.

Media typeapplication/json

A contact list.

object
id
required

The unique id of the list.

string
name
required

The name of the list.

string
description

A description for your own reference, or null.

string
nullable
kind
required
One of:

The kind of list: static (members are added and removed by hand), dynamic (membership follows the rules) or all_contacts (the built-in list of every contact).

string
Allowed values: static dynamic all_contacts
rules

The membership rules of a dynamic list. Null for other kinds.

Array<object>
nullable

One rule of a dynamic list. A contact is a member when every rule matches.

object
field
required
One of:

The contact field a rule tests: first_name, last_name, company, email, client_reference, country (ISO 3166-1 alpha-2), created_at (a date), tag or list (membership of another list).

string
Allowed values: first_name last_name company email client_reference country created_at tag list
op
required
One of:

How a rule compares the field with its value: equals, not_equals, contains or starts_with for text fields (country takes equals and not_equals only; tag takes equals, not_equals and contains), before or after for created_at, and in or not_in for list.

string
Allowed values: equals not_equals contains starts_with before after in not_in
value
required

The value to compare with. For the list field, the id of one other list; for created_at, a date or time (UTC).

string
splitSourceListId

The id of the list this one was split from, or null when it is not part of a split.

string
nullable
splitIndex

This list’s number within the split, counting from 1 and never reused, or null when it is not part of a split.

integer format: int32
nullable
createdAt
required

When (UTC) the list was created.

string format: date-time
updatedAt
required

When (UTC) the list last changed.

string format: date-time

Example

{
"kind": "static",
"rules": [
{
"field": "first_name",
"op": "equals"
}
]
}

The request is not valid. The detail field says why, and errors lists any problems by field name.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The API key or bearer token is missing or not valid, or the request signature could not be verified.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The caller is not allowed to do this.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

A list with this name already exists.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

This Idempotency-Key was already used for a different request. Use a new key.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

This API key requires an Idempotency-Key header on every POST and PATCH.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}

The service is temporarily unavailable. Retry after the Retry-After header.

Media typeapplication/problem+json

Why a request failed, in the RFC 9457 problem details format.

object
type
required

A URI identifying the kind of problem, ending in a code such as validation_failed, not_found, sending_blocked or rate_limited.

string
title
required

A short, fixed summary of the kind of problem.

string
status
required

The HTTP status code of the response.

integer format: int32
detail

What went wrong with this particular request, when there is more to say than the title.

string
nullable
errors

For validation failures, the problems found, keyed by field name (nested fields as template.name, list items as messages[3]).

object
key
additional properties
Array<string>
requestId
required

The id recorded for this error, matching the Request-Id header when one is sent. Quote it when contacting support.

string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"errors": {
"additionalProperty": [
"example"
]
},
"requestId": "example"
}