Create Single Web Pushes

Prev Next

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

Endpoint and Headers

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

Visit our Postman collection to test this request.

Headers

HeaderSample ValueDescription
AuthorizationBearer 1a2b3c4d5e6fThis key is required to authorize your request. Refer to API Authentication Tokens to generate your token.
Content-Typeapplication/jsonThis header specifies the media type of the resource.

Body Parameters

Each request body requires a partner ID and a title.

ParameterDescriptionData TypeRequired
partner_idThis is your partner identification number, available from Inone Settings > Account Settings.StringYes
titleEvery request creates a push notification campaign on InOne with the push type Single Push. This is the title of the campaign. It cannot be more than 100 characters.StringYes
languageThe language of the campaign, e.g., en_US. If you want to send the push to all languages, you can write “all_ALL”.StringYes
is_allIt helps you set when you want to send push notifications to all subscribers or segmented subscribers.
If you type true, the campaign will be sent only once, and you can open it in the InOne Panel. If you type false, it will be sent multiple times, but you cannot open the campaign in the InOne Panel.
BooleanNo

Sample Request

The sample below displays a request to create a Single Web Push campaign.

Before sending the request, make sure:

  • To replace the authorization value with your API key.
  • To add your partner ID in partner_id.
  • To add your campaign name to the title.
When the request is successfully sent, you will receive a campaign_id in the response. This ID will be required when launching the campaign.
curl --location --request POST 'https://web-push.api.useinsider.com/v1/single' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer 1a2b3c4d5e6f' \
--data-raw '{
  "partner_id": "100XXXXX",
  "title": "Title of campaign",
  "language": "en_GB",
  "is_all": false
}'

Sample Responses

201 Created

You can see this kind of response when you successfully create your campaign. You can also view your campaign in the InOne panel on the Web Push listing page, where it will appear in Draft status, indicating that the campaign has been created but not launched yet.

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

401 Unauthorized

{
"message": "Unauthorized"
}

424 Failed Dependency

{
  "message": "SERVICE:-"
}

Error Codes

  • 400 Bad Request
    If you create a campaign with an existing title, the system will return a 400 Bad Request error.
  • 401 Unauthorized request
  • 424 Failed Dependency
  • 429 Request limit exceeded

Limitations

  • All create requests 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.