# Send a one-shot push

With `oncall` (which also needs `oncall:write`), the push pages that on-call group instead (the token owner must be on its team) and returns the page; the Idempotency-Key becomes the page's dedup key.

HTML: https://notify.belweave.ai/docs/api/postNotifications

Required scopes: `notifications:send`

```http
POST /api/agent/notifications
Authorization: Bearer ntf_your_token
```

## Operation schema

```json
{
  "summary": "Send a one-shot push",
  "description": "With `oncall` (which also needs `oncall:write`), the push pages that on-call group instead (the token owner must be on its team) and returns the page; the Idempotency-Key becomes the page's dedup key.",
  "operationId": "postNotifications",
  "security": [
    {
      "bearer": [
        "notifications:send"
      ]
    }
  ],
  "x-notify-scopes": [
    "notifications:send"
  ],
  "parameters": [
    {
      "name": "Idempotency-Key",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "required": false
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "type": "object",
          "properties": {
            "body": {
              "type": "string",
              "minLength": 1,
              "maxLength": 8000
            },
            "title": {
              "default": "Notify",
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "imageUrl": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            "url": {
              "type": "string",
              "maxLength": 2048,
              "format": "uri"
            },
            "deviceIds": {
              "minItems": 1,
              "maxItems": 50,
              "type": "array",
              "items": {
                "type": "string",
                "minLength": 1,
                "maxLength": 100
              }
            },
            "project": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "summary": {
              "type": "string",
              "minLength": 1,
              "maxLength": 500
            },
            "bodyFormat": {
              "type": "string",
              "enum": [
                "text",
                "markdown"
              ]
            },
            "appId": {
              "type": "string",
              "pattern": "^app_[A-Za-z0-9_-]{8,64}$"
            },
            "oncall": {
              "type": "string",
              "pattern": "^ocg_[A-Za-z0-9_-]{8,64}$"
            },
            "group": {
              "type": "string",
              "pattern": "^dgrp_[A-Za-z0-9_-]{8,64}$"
            }
          },
          "required": [
            "body"
          ]
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/AgentNotificationCreated"
              },
              {
                "$ref": "#/components/schemas/OncallPageCreated"
              }
            ]
          }
        }
      }
    },
    "400": {
      "description": "Invalid request",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Missing, unknown, revoked, or expired token",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "The token lacks a required scope or the account lacks permission",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Not found for this account",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}
```

Resolve schema references against [OpenAPI](https://notify.belweave.ai/openapi.json).
