Documentation Index

Fetch the complete documentation index at: https://academy.insiderone.com/llms.txt

Use this file to discover all available pages before exploring further.

Launch Single Web Pushes

Prev Next

Insider One's Web Push API allows you to launch Single Web Push notifications from your back-end without using Insider One's InOne panel.

The Web Push API v1 differs from the Web Push API v2 in two ways: its rate limit is 30 requests per minute, and its endpoint includes the v1 version.

Endpoint and Headers

POST https://web-push.api.useinsider.com/v1/single/campaign_id

Visit our Postman collection to test this request.

Headers

Header

Sample Value

Description

Authorization

Bearer 1a2b3c4d5e6f

This key is required to authorize your request. Refer to API Authentication Tokens to generate your token.

Content-Type

application/json

This header specifies the media type of the resource.

Body Parameters

Each request body requires a partner ID and a title. 

Parameter

Description

Data Type

Required

partner_id

This is your partner identification number, available in Inone Settings > Account Settings.

String

Yes

title

Every request creates a push notification campaign in InOne with the push type set to Single Push. This is the title of the push content. It cannot exceed 100 characters.

String

Yes

description

This is the body of your push notification. It cannot be more than 255 characters. If it is a rich push that has a banner, it is limited to 30 characters.

String

Yes

image

This is the push notification icon. Only HTTPS protocols are accepted. If not provided, the default icon is used instead.

String

Yes

banner

This is the rich push notification image. Only HTTPS protocols are accepted.

String

No

link

The link to the Web push message.

String

Yes

include_unengaged

Enables you to decide whether the bulk push should target unengaged tokens. When not sent in the payload, unengaged users are automatically excluded.

Boolean (true/false)

No

ttl

Short for time to live: the maximum time the system will try to send a push notification to an offline or temporarily unavailable user. TTL is limited to 240 hours.

String

Yes

target

Targeting options for the campaign (segmenting).

Object

Yes if is_all: false

     attribute

The attribute used for targeting, e.g., "d_wp_browser".

String

Yes, if the target is used.

     values

An array of values to target, e.g, ["Edg"]

Array

Yes, if the target is used.

Sample Request

  • If you want to use default attributes, you must follow the format:

d_Default_attribute_name

  • If you want to use custom attributes, you must follow the format:

c_Custom_attribute_name

You can refer to the Default Attributes documentation for a full list of available default fields.

Before sending the request, make sure to:

  • Replace the authorization value with your API key.

  • Add your partner ID in partner_id.

  • Add your campaign name to the title.

When you send the Create a Single Web Push request, you will receive a campaign_id in the response. You use this campaign_id to launch your Single Web Push campaign.

The sample below displays a request to launch a Single Web Push campaign without segments: is_all: true.

curl --location --request POST 'https://web-push.api.useinsider.com/v1/single/campaign_id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1a2b3c4d5e6f' \
--data-raw '{
  "partner_id": "100000001",
  "title": "title of push",
  "description": "description of push",
  "image": "https://image.useinsider.com/mywebsite/webPushDefaultImage/JpVu9aBXgTXmcrBkiZLB1512577074.jpeg",
  "banner": "https://image.useinsider.com/mywebsite/webPushDefaultImage/JpVu9aBXgTXmcrBkiZLB1512577074.jpeg",
  "link": "https://image.useinsider.com",
  "include_unengage": true,
  "ttl": "1000"
}'

 The sample below shows a request to launch a Single Web Push campaign with the is_all segment set to false.

curl --location --request POST 'https://web-push.api.useinsider.com/v1/single/campaign_id' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1a2b3c4d5e6f' \
--data-raw '{
  "partner_id": "10000001",
  "title": "title of push",
  "description": "description of push",
  "image": "https://image.useinsider.com/mywebsite/webPushDefaultImage/JpVu9aBXgTXmcrBkiZLB1512577074.jpeg",
  "banner": "https://image.useinsider.com/mywebsite/webPushDefaultImage/JpVu9aBXgTXmcrBkiZLB1512577074.jpeg",
  "link": "https://image.useinsider.com",
  "include_unengage": true,
  "ttl": "1000",
  "language": "en_US",
  "target": {
    "attribute": "d_wp_browser",
    "values": ["Edg"]
  }
}'

Sample Responses

200 OK

You can see this kind of response when you successfully launch your campaign.

{
  "success": true,
  "campaign_id": 1697300275
}

401 Unauthorized

{
"message": "Unauthorized"
}

424 Failed Dependency

{
  "message": "SERVICE:-"
}

Error Codes

  • 400 Bad Request

  • 401 Unauthorized Request

  • 424 Failed Dependency

  • 429 Request limit exceeded

Limitations

  • All functions must be executed with an HTTPS POST request.

  • The API key should be provided as the authorization key in the request header. If the key is incorrect, the operation will not be executed,  and an authorization error will return in the response.

  • The rate limit is 30 requests per minute.

The default limit shown here is a standard baseline. If your use case requires higher capacity, feel free to reach out to the Insider One team — we can adjust it to fit your needs.