Skip to content

Save the current filters as a view

POST
/api/v1/workspaces/{workspace}/contacts/views
curl --request POST \
--url https://reputecast.example.com/api/v1/workspaces/acme-newsletter/contacts/views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "filters": { "band": "cold", "bought": "example", "check": "valid", "consent": "double", "growthSource": "example", "joinedAfter": "example", "language": "example", "list": "example", "mailbox": "gmail", "paid": "with_access", "paidTier": "example", "phone": "yes", "phoneCountry": "example", "pushSubscribed": true, "q": "example", "referringDomain": "example", "scoreFrom": "example", "scoreTo": "example", "segment": "example", "signedIn": true, "smsConsent": "example", "sort": "activity", "source": "example", "spentFrom": "example", "spentTo": "example", "storeCustomer": "example", "tag": "example", "tier": "active", "utmCampaign": "example", "utmMedium": "example", "utmSource": "example", "whatsAppConsent": true }, "name": "example", "personal": true }'

Permission: subscribers:edit

workspace
required

Workspace slug

string
/^[a-z0-9][a-z0-9-]{1,62}$/

Workspace slug

Media typeapplication/json
object
filters
required
object
band
string
Allowed values: cold warm hot none
bought

Buyers of a product (its id), or of any product (any)

string
<= 40 characters
check
string
Allowed values: valid invalid risky unknown never
consent
string
Allowed values: double single pending
growthSource
string
<= 200 characters
joinedAfter
string
<= 10 characters
language
string
<= 16 characters
list

List id

string
mailbox
string
Allowed values: gmail outlook yahoo icloud other
paid
string
Allowed values: with_access trialing past_due complimentary gift ended free
paidTier

With paid=with_access: a tier’s id, for that tier and above

string
phone
string
Allowed values: yes no
phoneCountry
string
<= 2 characters
pushSubscribed
boolean
q

Email, name or tag

string
<= 200 characters
referringDomain
string
<= 255 characters
scoreFrom
string
<= 3 characters
scoreTo
string
<= 3 characters
segment

Segment id

string
signedIn
boolean
smsConsent
string
<= 40 characters
sort
string
Allowed values: activity score
source
string
<= 80 characters
spentFrom
string
<= 12 characters
spentTo
string
<= 12 characters
storeCustomer
string
<= 36 characters
tag
string
<= 80 characters
tier
string
Allowed values: active cooling at_risk sunset
utmCampaign
string
<= 200 characters
utmMedium
string
<= 200 characters
utmSource
string
<= 200 characters
whatsAppConsent
boolean
name
required
string
>= 1 characters <= 80 characters
personal
boolean

Created

Media typeapplication/json
object
count
required
integer format: int64
filters
required
object
band
string
Allowed values: cold warm hot none
bought

Buyers of a product (its id), or of any product (any)

string
<= 40 characters
check
string
Allowed values: valid invalid risky unknown never
consent
string
Allowed values: double single pending
growthSource
string
<= 200 characters
joinedAfter
string
<= 10 characters
language
string
<= 16 characters
list

List id

string
mailbox
string
Allowed values: gmail outlook yahoo icloud other
paid
string
Allowed values: with_access trialing past_due complimentary gift ended free
paidTier

With paid=with_access: a tier’s id, for that tier and above

string
phone
string
Allowed values: yes no
phoneCountry
string
<= 2 characters
pushSubscribed
boolean
q

Email, name or tag

string
<= 200 characters
referringDomain
string
<= 255 characters
scoreFrom
string
<= 3 characters
scoreTo
string
<= 3 characters
segment

Segment id

string
signedIn
boolean
smsConsent
string
<= 40 characters
sort
string
Allowed values: activity score
source
string
<= 80 characters
spentFrom
string
<= 12 characters
spentTo
string
<= 12 characters
storeCustomer
string
<= 36 characters
tag
string
<= 80 characters
tier
string
Allowed values: active cooling at_risk sunset
utmCampaign
string
<= 200 characters
utmMedium
string
<= 200 characters
utmSource
string
<= 200 characters
whatsAppConsent
boolean
id
required
string
name
required
string
shared
required
boolean

Example

{
"filters": {
"band": "cold",
"check": "valid",
"consent": "double",
"mailbox": "gmail",
"paid": "with_access",
"phone": "yes",
"sort": "activity",
"tier": "active"
}
}

Error

Media typeapplication/problem+json
object
code

Stable error code, e.g. permission_denied

string
detail

A human-readable explanation specific to this occurrence of the problem.

string
errors

Optional list of individual error details

Array<object>
object
location

Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’

string
message

Error message text

string
value

The value at the given location

helpers

Members who hold the missing permission

Array<string>
instance

A URI reference that identifies the specific occurrence of the problem.

string format: uri
meta
object
key
additional properties
permission

The missing permission key

string
status

HTTP status code

integer format: int64
title

A short, human-readable summary of the problem type. This value should not change between occurrences of the error.

string
type

A URI reference to human-readable documentation for the error.

string format: uri
default: about:blank

Example

{
"detail": "Property foo is required but is missing.",
"instance": "https://example.com/error-log/abc123",
"status": 400,
"title": "Bad Request",
"type": "about:blank"
}