---
agentTools:
  projectIndex: https://docs.nvecta.com/llms.txt
---

# Send to All Subscribers

This endpoint is used to send a notification to all subscribers. The title, message and URL of the notification and the Image URL have to be sent as POST parameters to the API endpoint.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "description": "<h2>This Push REST API can be used to :</h2> <p>Send notification to all subscribers/a list of subscribers/subscribers belonging to a particular segment, or even an individual subscriber</p>\n<p>Add or remove subscribers to/from segments.</p>\n<p>All requests to the API will be authenticated by an authentication token in a request header, as explained in the next section.</p>",
    "version": "1.0.0",
    "title": "Push Notification API",
    "termsOfService": "http://swagger.io/terms/",
    "contact": {
      "email": "info@notifyvisitors.com"
    }
  },
  "paths": {
    "/android/broadcast/all": {
      "post": {
        "tags": [
          "android"
        ],
        "summary": "Send to All Subscribers",
        "description": "This endpoint is used to send a notification to all subscribers. The title, message and URL of the notification and the Image URL have to be sent as POST parameters to the API endpoint.",
        "operationId": "androidAll",
        "parameters": [
          {
            "name": "x-brand-id",
            "in": "header",
            "description": "Brand id of notifyvisitors account",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "x-api-key",
            "in": "header",
            "description": "Api key of notifyvisitors",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/androidAll"
              }
            }
          },
          "description": "Body Parameter",
          "required": true
        },
        "responses": {
          "200": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_200"
                }
              }
            }
          },
          "400": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_400"
                }
              }
            }
          },
          "401": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_401"
                }
              }
            }
          },
          "403": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_403"
                }
              }
            }
          },
          "500": {
            "description": "status",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/inline_response_500"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://push.notifyvisitors.com/api/v1"
    }
  ],
  "components": {
    "schemas": {
      "androidAll": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "format": "string",
            "description": "Notification Name"
          },
          "title": {
            "type": "string",
            "format": "string",
            "description": "Maximum character limit for the title must be 70 characters"
          },
          "message": {
            "type": "string",
            "format": "string",
            "description": "Maximum character limit for the push notification message should be 130 characters"
          },
          "url": {
            "type": "string",
            "format": "string",
            "description": "0 -> Android Activity, 1 -> Url, 2 -> Package Name, 3 -> Share, 4 -> Call"
          },
          "target": {
            "type": "string",
            "format": "string",
            "description": "Target users while sending push notifications on the basis of their source and location (0 -> Navigate in App , 1 -> Navigate to Webpage , 2 -> Navigate to Third party App, 3 -> Share, 4 -> Call)."
          },
          "schedule_date": {
            "type": "integer",
            "format": "int64",
            "description": "Schedule Date (2020-01-13)"
          },
          "schedule_time": {
            "type": "integer",
            "format": "int64",
            "description": "Schedule Time (12:16:00)"
          },
          "time_zone": {
            "type": "integer",
            "format": "int64",
            "description": "Time Zone ( default 0 )"
          },
          "type": {
            "type": "integer",
            "format": "int64",
            "description": "1 -> standard (image_url), 2 -> rich (image_url, hero_image_url)"
          },
          "image_url": {
            "type": "string",
            "format": "string",
            "description": "Image URL must be on HTTPs. Image URL size must be 200 * 200 Pixels"
          },
          "hero_image_url": {
            "type": "string",
            "format": "string",
            "description": "URL needs to be on HTTPs. Hero image URL size must be 512 * 256 Pixels. Works only for chrome subscribers"
          },
          "summary": {
            "type": "string",
            "format": "string",
            "description": "An overview of the sent notifications"
          },
          "button_one_title": {
            "type": "string",
            "format": "string",
            "description": "Maximum Length of the call-to-action button must be 12 characters. Works only for chrome subscribers"
          },
          "button_one_url": {
            "type": "string",
            "format": "string",
            "description": "0 -> Android Activity, 1 -> Url, 2 -> Package Name, 3 -> Share, 4 -> Call , 5 -> Remind me Later (Seconds)"
          },
          "button_one_target": {
            "type": "string",
            "format": "string",
            "description": "0 -> Navigate in App , 1 -> Navigate to Webpage , 2 -> Navigate to Third party App, 3 -> Share, 4 -> Call, 5 -> snooze"
          },
          "button_two_title": {
            "type": "string",
            "format": "string",
            "description": "Allowed only in chrome version 48 and above"
          },
          "button_two_url": {
            "type": "string",
            "format": "string",
            "description": "0 -> Android Activity, 1 -> Url, 2 -> Package Name, 3 -> Share, 4 -> Call , 5 -> Remind me Later (Seconds)"
          },
          "button_two_target": {
            "type": "string",
            "format": "string",
            "description": "0 -> Navigate in App , 1 -> Navigate to Webpage , 2 -> Navigate to Third party App, 3 -> Share, 4 -> Call, 5 -> snooze"
          },
          "message_lifetime": {
            "type": "string",
            "format": "json",
            "description": "Set life time of the message in JSON format. ex - { 'days':10, 'hours':0, 'minutes':1 }"
          }
        }
      },
      "inline_response_200": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Success",
            "description": "Success"
          },
          "status": {
            "type": "number",
            "example": 200,
            "description": "200"
          }
        }
      },
      "inline_response_400": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Bad Request",
            "description": "Bad Request"
          },
          "status": {
            "type": "number",
            "example": 400,
            "description": "400"
          }
        }
      },
      "inline_response_401": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Invalid Data",
            "description": "Invalid Data"
          },
          "status": {
            "type": "number",
            "example": 401,
            "description": "401"
          }
        }
      },
      "inline_response_403": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Require Parameters Missing",
            "description": "Require Parameters Missing"
          },
          "status": {
            "type": "number",
            "example": 403,
            "description": "403"
          }
        }
      },
      "inline_response_500": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "example": "Something Went Wrong",
            "description": "Something Went Wrong"
          },
          "status": {
            "type": "number",
            "example": 500,
            "description": "500"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true,
    "samples-languages": [
      "curl",
      "node",
      "ruby",
      "javascript",
      "python"
    ]
  },
  "_id": {
    "buffer": {
      "0": 95,
      "1": 60,
      "2": 219,
      "3": 215,
      "4": 188,
      "5": 141,
      "6": 101,
      "7": 3,
      "8": 11,
      "9": 46,
      "10": 149,
      "11": 191
    }
  }
}
```