Create

POST /api/notifications

Send a notification to users

application/json

Body Required

  • channel string Required

    Values are email, web_push, or sms.

  • subject string Required

    Minimum length is 4, maximum length is 100.

  • body object Required
    Hide body attributes Show body attributes object
    • html string | null Required

      Maximum length is 50000.

    • text string | null Required

      Maximum length is 50000.

  • recipients array[object] Required
    Hide recipients attributes Show recipients attributes object
    • email string | null

      Minimum length is 3, maximum length is 254.

    • matches string | null

      Minimum length is 1, maximum length is 254.

Responses

  • Successful Response

  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
POST /api/notifications
curl \
 -X POST https://ppammedellin.com/api/notifications \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"channel":"email","subject":"string","body":{"html":"string","text":"string"},"recipients":[{"email":"string","matches":"string"}]}'
Request example
{
  "channel": "email",
  "subject": "string",
  "body": {
    "html": "string",
    "text": "string"
  },
  "recipients": [
    {
      "email": "string",
      "matches": "string"
    }
  ]
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}