Tag contacts who opened, clicked, did not open or are from a country
POST
/v1/campaigns/{campaign}/audience-to-tag
const url = 'https://api.replifier.com/v1/campaigns/cmp_01hx0000000000000000000000/audience-to-tag';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"segment":"opens","country":"example","tag":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”campaign
required
string
Example
cmp_01hx0000000000000000000000Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
segment
required
string
country
ISO 3166-1 alpha-2 code; required with segment: country
string
tag
required
Tag added to those contacts (new or existing)
string
Responses
Section titled “Responses”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" }}