Skip to main content
GET/webpush-campaign/:id/

Get webpush campaign

You can return a specific webpush campaign.

Attributes

Optional unless marked required

idintegerrequired
A unique identifier for the webpush campaign which is given by User automatically.

Request​

curl -X GET "https://<your_app_subdomain>.user.com/api/public/webpush-campaign/:id/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2"

Response examples​

{
"id": 1,
"description": "string",
"type": 1,
"eta": "2026-01-01T12:00:00Z",
"name": "string",
"status": 1,
"messages": [
{
"id": 1,
"name": "string",
"message_id": 1,
"message_title": "string",
"message_body": "string",
"message_badge": null,
"message_icon": null,
"message_url": "https://example.com",
"message_require_interaction": true,
"message_doughnut_title": "string",
"message_doughnut_url": "string",
"message_actions": true,
"message_coffee_title": "string",
"message_coffee_url": "string"
}
],
"recipients": {
"glue": "string",
"mode": "string",
"queries": [
2 fields
],
"real_and": true,
"real_and_models": {
"deal": true,
"company": true
},
"real_and_for_all_models": {
"deal": true
}
},
"recipients_count": 1,
"created_at": "2026-01-01T12:00:00Z",
"updated_at": "2026-01-01T12:00:00Z",
"category": null,
"ttl": 1,
"user_activity_schedule": true,
"advance_filtering": null,
"multiple_domains_warning": true,
"statistics": {
"sent": 1,
"scheduled": 1,
"delivered": 1,
"clicked": 1
},
"folder": null
}

Response fields​

Fields returned in the 200 OK response body.

idinteger
A unique identifier for the campaign.
descriptionstring
Campaign description.
typeinteger
Campaign type. 1 = manual, 2 = automated.
etastring (date-time)
A DateTime when the campaign is scheduled to be sent. null if sent immediately.
namestring
A Webpush campaign name.
statusinteger
Campaign status. 1 = draft, 2 = sent/active.
messagesarray of objects
A list of message objects (see Webpush Message model for field details).
messages[].idinteger
A unique identifier for the campaign.
messages[].namestring
A Webpush campaign name.
messages[].message_idinteger
ID of the webpush message.
messages[].message_titlestring
Title of the notification, up to 64 characters.
messages[].message_bodystring
Text of the notification. Template tags are allowed; HTML is removed.
messages[].message_badgestring (URL)nullable
URL of the large image shown at the top of the notification (Windows only).
messages[].message_iconstring (URL)nullable
URL of the small icon shown in the notification.
messages[].message_urlstring (URL)
URL opened when the notification is clicked.
messages[].message_require_interactionboolean
Whether the notification stays on screen until the contact interacts with it.
messages[].message_doughnut_titlestring
Label of the left action button.
messages[].message_doughnut_urlstring
URL opened by the left action button.
messages[].message_actionsboolean
Whether the two action buttons are shown.
messages[].message_coffee_titlestring
Label of the right action button.
messages[].message_coffee_urlstring
URL opened by the right action button.
recipientsobject
Segment query definition used to target recipients.
recipients.gluestring
How the filter groups combine: AND or OR.
recipients.modestring
REGULAR, or INVERTED to take the contacts that don't match.
recipients.queriesarray of objects
Filter groups, one per field.
recipients.queries[].fieldstring
Field the group filters on.
recipients.queries[].queriesarray of objects
Conditions in the group.
recipients.queries[].queries[].gluestring
How the condition combines with the others in the group: AND or OR.
recipients.queries[].queries[].fieldstring
Field the condition checks.
recipients.queries[].queries[].valuestring
Value the condition compares with.
recipients.queries[].queries[].operatorstring
Comparison, for example equal or greater.
recipients.real_andboolean
Whether event conditions must be met by the same event occurrence.
recipients.real_and_modelsobject
Per record type, whether conditions must be met by the same record.
recipients.real_and_models.dealboolean
Whether deal conditions must be met by the same deal. Used with glue AND.
recipients.real_and_models.companyboolean
Whether company conditions must be met by the same company. Used with glue AND.
recipients.real_and_for_all_modelsobject
Per record type, whether conditions may be met by different records.
recipients.real_and_for_all_models.dealboolean
Whether deal conditions may be met by different deals of the contact. Used with glue AND.
recipients_countinteger
Number of recipients matching the segment at the time of query.
created_atstring (date-time)
ISO 8601 DateTime when the campaign was created.
updated_atstring (date-time)
ISO 8601 DateTime when the campaign was last updated.
categoryinteger or nullnullable
Deprecated (replaced by folders). Read-only. Existing campaigns may return a legacy category value; new campaigns always return null. Folder assignment will be available in the next API version.
ttlinteger
Time-to-live in seconds.
user_activity_scheduleboolean
Whether user activity schedule is enabled.
advance_filteringobjectnullable
Advanced filtering configuration, or null.
multiple_domains_warningboolean
Whether a multiple domains warning is present.
statisticsobject
Campaign delivery statistics (see below).
statistics.sentinteger
Number of notifications sent.
statistics.scheduledinteger
Number of notifications scheduled.
statistics.deliveredinteger
Number of notifications delivered.
statistics.clickedinteger
Number of notifications clicked.
folderintegernullable
ID of the folder the campaign is in, or null.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.