Skip to main content

PUT /users/:user_id/tokens

PUThttps://api.courier.com/users/:user_id/tokens
Associate a group of tokens with the supplied :user_id. Will overwrite any existing tokens associated with that user.
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"
}
}
]
}