Upsert

POST /api/users/{user_id}/web_push_subscriptions

Upserts a web push subscription for the user

Path parameters

application/json

Body Required

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/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"
    }
  ]
}