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.

Create Single Web Pushes

Prev Next

Use this endpoint to create a Single Web Push campaign from your back end. Creating a campaign does not send any notifications. It returns a campaign_id that is required in the subsequent Launch Single Web Push request, which triggers the actual send.

Workflow:

  • Create: Call this endpoint to create the campaign and receive a campaign_id.

  • Launch: Call the Launch Single Web Push endpoint with the campaign_id to send the notification.

Endpoint and Headers

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

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 from Inone Settings > Account Settings.

String

Yes

title

The name of the campaign as it will appear in the InOne panel. Maximum 100 characters. Must be unique; duplicate titles return a 400 error.

String

Yes

language

The language of the campaign. Use a valid locale code, for example, en_US or en_GB. To send to all subscribers regardless of language, use all_ALL.

String

Yes

is_all

Controls send behavior and panel visibility.
If you type true, the campaign sends once to all targeted subscribers and gets visible in the InOne panel on the Web Push listing page.

If you type false, the campaign can be sent multiple times to segmented subscribers, and it will not be visible in the InOne panel.

Boolean

No

When is_all is omitted from the request, the default behavior is equivalent to false.

Sample Request

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

Replace the Authorization value with your API key and update partner_id, title, and language with your values before sending the request.

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

The campaign is created in Draft status. It has not yet been sent. Pass the campaign_id value to the Launch Single Web Push endpoint to trigger the send.

If is_all is set to true, the campaign is also visible in the InOne panel on the Web Push listing page in Draft status.

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

400 Bad Request

{
  "message": "Bad Request"
}

Returned in the following cases:

  • A required parameter is missing.

  • The title value already exists as a campaign name in your account. Campaign titles must be unique.

  • The title exceeds 100 characters.

401 Unauthorized

Returned when the Authorization header is missing, malformed, or contains an invalid token.

{
"message": "Unauthorized"
}

424 Failed Dependency

Returned when an upstream service dependency fails. Retry the request. If the error persists, contact the Insider One team.

{
  "message": "SERVICE:-"
}

Error Codes

  • 400 Bad Request

  • 401 Unauthorized request

  • 424 Failed Dependency

  • 429 Request limit exceeded: Returned when the request rate exceeds 30 requests per minute. Wait before retrying. See API Rate Limits for details.

Limitations

  • All create requests must be executed with an HTTPS POST request.

  • The Authorization header must contain a valid API key. An invalid or missing key returns a 401 error.

  • Campaign titles must be unique within your account. Duplicate titles return a 400 error.

  • The title parameter has a maximum length of 100 characters.

  • The rate limit is 30 requests per minute. To request a higher limit, contact the Insider One team via the Help Center or refer to API Rate Limits.

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.