Skip to content

Tag contacts who opened, clicked, did not open or are from a country

POST
/v1/campaigns/{campaign}/audience-to-tag
curl --request POST \
--url https://api.replifier.com/v1/campaigns/cmp_01hx0000000000000000000000/audience-to-tag \
--header 'Content-Type: application/json' \
--data '{ "segment": "opens", "country": "example", "tag": "example" }'

Adds the tag to those contacts of the campaign’s brand. It does not subscribe them to any list or change their status. Contacts that already had it are counted in skipped.

campaign
required
string
/^cmp_[a-z0-9]{26}$/

Example

cmp_01hx0000000000000000000000
Media typeapplication/json
object
segment
required
string
Allowed values: opens clicks unopened country
country

ISO 3166-1 alpha-2 code; required with segment: country

string
/^[A-Z]{2}$/
tag
required

Tag added to those contacts (new or existing)

string
>= 1 characters <= 64 characters /^[^\x00-\x1f\x7f]*$/

Result

Media typeapplication/json
object
tag
required
string
tagged
required
number
skipped
required
number

Example generated

{
"tag": "example",
"tagged": 1,
"skipped": 1
}

Invalid data

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

No session, expired session, or invalid, expired or revoked API key

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Not allowed, API key missing the scope, IP not allowed, or request rejected (csrf_rejected)

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Does not exist or is not visible to you

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}

Internal error

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
cause
required
string
fix
required
string
requestId
required
string

Example

{
"error": {
"code": "not_found"
}
}