Ir al contenido

Editar segmento

PATCH
/v1/bulk/segments/{id}
curl --request PATCH \
--url https://api.mailerdash.com/v1/bulk/segments/example \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "name": "example", "rules": { "match": "all", "rules": [ { "field": "tag", "op": "has", "value": "vip" }, { "field": "engagement", "op": "opened", "days": 30 } ] } }'
id
required
string
Media type application/json
object
name
string
rules

Reglas del segmento. match: all exige que se cumplan todas; any, que se cumpla alguna.

object
match
string
default: all
Allowed values: all any
rules
Array<object>
object
field
required
string
Allowed values: tag status engagement created list custom
op
required

Tag: has|not_has - status: is|is_not - engagement: opened|not_opened|clicked|not_clicked - created: before|after - list: in|not_in - custom: is|is_not|contains|exists|not_exists

string
value
string
days
integer
>= 1 <= 3650
field_name

Nombre del custom field dentro de metadata.

string
Example
{
"match": "all",
"rules": [
{
"field": "tag",
"op": "has",
"value": "vip"
},
{
"field": "engagement",
"op": "opened",
"days": 30
}
]
}

Segmento actualizado

Media type application/json
object
id
string
key_id
string
name
string
rules

Reglas del segmento. match: all exige que se cumplan todas; any, que se cumpla alguna.

object
match
string
default: all
Allowed values: all any
rules
Array<object>
object
field
required
string
Allowed values: tag status engagement created list custom
op
required

Tag: has|not_has - status: is|is_not - engagement: opened|not_opened|clicked|not_clicked - created: before|after - list: in|not_in - custom: is|is_not|contains|exists|not_exists

string
value
string
days
integer
>= 1 <= 3650
field_name

Nombre del custom field dentro de metadata.

string
created_at
string
updated_at
string
Example
{
"rules": {
"match": "all",
"rules": [
{
"field": "tag",
"op": "has",
"value": "vip"
},
{
"field": "engagement",
"op": "opened",
"days": 30
}
]
}
}

Reglas invalidas

No encontrado