Delete Single Web Pushes
  • 30 Jan 2024
  • 1 Minute to read

    Delete Single Web Pushes


      Article Summary

      Overview

      Insider's web push API allows you to delete single web push notifications from your own back-end without using Insider' InOne panel.

      Endpoint and Headers

      DELETE http://web-push.api.useinsider.com/v1/single/campaign_id

      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

      ParameterDescriptionData TypeRequired
      partner_idThis is your partner identification number, available from InOne Settings > Account Preferences.StringYes

      Sample Example

      Before sending the request, make sure:

      • To replace the authorization value with your own API key.
      • To add your partner ID in partner_id.
      Your title goes here
      When you send the request to create it, you will get your campaign_id as a response.

      Sample Request

      curl --location --request DELETE 'https://web-push.api.useinsider.com/v1/single/campaign_id' \
      --header 'Content-Type: application/json' \
      --header 'Authorization: Bearer 1a2b3c4d5e6f' \
      --data-raw '{
        "partner_id": "100000001",
      }'

      Sample Responses

      200 OK

      You can see this kind of response when you successfully deleted 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 DELETE request.
      • The API key should be provided as the authorization key on 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 second.

      Was this article helpful?

      What's Next
      ESC

      Eddy, a super-smart generative AI, opening up ways to have tailored queries and responses