---
updatedAt: 2026-04-20T19:43:46.000Z
agentTools:
  projectIndex: https://docs.trybadge.com/llms.txt
---

# Send batch push notifications

Notification delivery is attempted for 24 hours after the notification is scheduled to be sent. A notification is considered failed if it is not delivered within this time frame. This may occur if the user's device is not receiving updates, a newer notification has been sent, or if the daily notification limit is reached (3 for Google Wallet).


# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Badge API",
    "version": "0"
  },
  "servers": [
    {
      "url": "https://api.trybadge.com/v0"
    }
  ],
  "security": [
    {
      "WorkspaceAuth": []
    }
  ],
  "tags": [
    {
      "name": "Notification"
    }
  ],
  "paths": {
    "/rpc/notificationBatchCreate": {
      "post": {
        "operationId": "notificationBatchCreate",
        "tags": [
          "Notification"
        ],
        "summary": "Send batch push notifications",
        "description": "Notification delivery is attempted for 24 hours after the notification is scheduled to be sent. A notification is considered failed if it is not delivered within this time frame. This may occur if the user's device is not receiving updates, a newer notification has been sent, or if the daily notification limit is reached (3 for Google Wallet).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/NotificationBatchCreateWithGroupMessage"
                  },
                  {
                    "$ref": "#/components/schemas/NotificationBatchCreateWithoutGroupMessage"
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "notifications"
                  ],
                  "properties": {
                    "notifications": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/NotificationBatchCreateNotificationResult"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/400ErrorMessage"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "WorkspaceAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    },
    "schemas": {
      "NotificationBatchCreateWithGroupMessage": {
        "type": "object",
        "required": [
          "passTemplateId",
          "notificationGroupId",
          "notifications",
          "message"
        ],
        "properties": {
          "passTemplateId": {
            "type": "string",
            "format": "uuid"
          },
          "notificationGroupId": {
            "type": "string",
            "minLength": 1,
            "description": "Identifier for future lookup and deduplication of notifications. Use the same group identifier for related notifications that should be tracked and managed together. See `notifications` field for information on deduplication."
          },
          "message": {
            "type": "string",
            "minLength": 1,
            "description": "Message to be shown in the push notification and on the back of the pass. Can be omitted if every item in `notifications` has a `message`; use the `NotificationBatchCreateWithoutGroupMessage` request shape in that case."
          },
          "sendAt": {
            "type": "string",
            "format": "date-time",
            "description": "Schedules when the notifications are sent. If not provided or in the past, the notifications will be sent immediately."
          },
          "notifications": {
            "type": "array",
            "minItems": 1,
            "maxItems": 500,
            "description": "Each notification creation is handled in isolation. If the notification exists with different properties, the creation fails. Otherwise, the notification is created or no changes are made if the notification exists.",
            "items": {
              "type": "object",
              "required": [
                "passId"
              ],
              "properties": {
                "passId": {
                  "type": "string"
                },
                "message": {
                  "type": "string",
                  "minLength": 1,
                  "description": "If provided, overrides the `message` at the root level."
                },
                "sendAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The date and time to send the notification. If provided, overrides the `sendAt` at the root level."
                }
              }
            }
          }
        }
      },
      "NotificationBatchCreateWithoutGroupMessage": {
        "type": "object",
        "required": [
          "passTemplateId",
          "notificationGroupId",
          "notifications"
        ],
        "properties": {
          "passTemplateId": {
            "type": "string",
            "format": "uuid"
          },
          "notificationGroupId": {
            "type": "string",
            "minLength": 1,
            "description": "Identifier for future lookup and deduplication of notifications. Use the same group identifier for related notifications that should be tracked and managed together. See `notifications` field for information on deduplication."
          },
          "sendAt": {
            "type": "string",
            "format": "date-time",
            "description": "Schedules when the notifications are sent. If not provided or in the past, the notifications will be sent immediately."
          },
          "notifications": {
            "type": "array",
            "minItems": 1,
            "maxItems": 500,
            "description": "Each notification creation is handled in isolation. If the notification exists with different properties, the creation fails. Otherwise, the notification is created or no changes are made if the notification exists.",
            "items": {
              "type": "object",
              "required": [
                "passId",
                "message"
              ],
              "properties": {
                "passId": {
                  "type": "string"
                },
                "message": {
                  "type": "string",
                  "minLength": 1,
                  "description": "Message to be shown in the push notification and on the back of the pass."
                },
                "sendAt": {
                  "type": "string",
                  "format": "date-time",
                  "description": "The date and time to send the notification. If provided, overrides the `sendAt` at the root level."
                }
              }
            }
          }
        }
      },
      "NotificationBatchCreateNotificationResult": {
        "oneOf": [
          {
            "type": "object",
            "required": [
              "passId",
              "status"
            ],
            "properties": {
              "passId": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "success"
                ]
              }
            }
          },
          {
            "type": "object",
            "required": [
              "passId",
              "status",
              "error"
            ],
            "properties": {
              "passId": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "failed"
                ]
              },
              "error": {
                "type": "object",
                "required": [
                  "code",
                  "message"
                ],
                "properties": {
                  "code": {
                    "type": "string",
                    "enum": [
                      "PASS_NOT_FOUND",
                      "EXISTS_WITH_DIFFERENT_DATA"
                    ]
                  },
                  "message": {
                    "type": "string"
                  }
                }
              }
            }
          }
        ]
      }
    },
    "responses": {
      "400ErrorMessage": {
        "description": "Invalid input was received.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "message"
              ],
              "properties": {
                "message": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  }
}
```