Upsert

POST /api/users/{user_id}/web_push_subscriptions

Upserts a web push subscription for the user

Path parameters

  • user_id string Required
application/json

Body Required

  • endpoint string Required

    Minimum length is 10, maximum length is 1024.

  • expirationTime string | null
  • keys object | null

Responses

  • 204

    Successful Response

  • 422 application/json

    Validation Error

    Hide response attribute Show response attribute object
    • detail array[object]
      Hide detail attributes Show detail attributes object
      • loc array[string | integer] Required
      • msg string Required
      • type string Required
POST /api/users/{user_id}/web_push_subscriptions
curl \
 -X POST https://metropolitanabogota.org/api/users/{user_id}/web_push_subscriptions \
 -H "Authorization: Bearer $ACCESS_TOKEN" \
 -H "Content-Type: application/json" \
 -d '{"endpoint":"string","expirationTime":"string","keys":{}}'
Request example
{
  "endpoint": "string",
  "expirationTime": "string",
  "keys": {}
}
Response examples (422)
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}