Skip to main content

Add multiple tokens to user

PUThttps://api.courier.com/users/:user_id/tokens
Adds multiple tokens to a user and overwrites matching existing tokens.
PATH PARAMS
user_idstringrequired
The user's ID. This can be any uniquely identifiable string.
BODY PARAM
Responses
AUTH TOKEN
curl --request PUT \
--url https://api.courier.com/users/user-1234/tokens \
--header 'Accept: application/json'
Response Example
Empty

Examples

  • URL: /users/user-1234/tokens
  • Method: PUT
  • Body:
{
"tokens": [
{
"token": "ads23fghsdfgsd32",
"provider_key": "apn",
"properties": {
"is_person": true
},
"device": {
"app_id": "com.my.app",
"platform": "iOS",
"model": "iPhone 13"
}
},
{
"token": "b2345dfgdgnwa",
"provider_key": "apn",
"tracking": {
"ip": "127.0.0.1",
"lat": "0.0",
"long": "123"
}
},
{
"token": "c32432fsdfdsdsfscxzcz",
"provider_key": "firebase-fcm",
"device": {
"device_id": "ipad",
"platform": "ipadOS",
"model": "iPad mini"
}
}
]
}