Post
/api/v1/push.token
Changelog
| Version | Description |
|---|---|
| 0.60.0 | Added |
Header parameters
X-Auth-Token
stringRequired
The authorization token of the user.
Example9HqLlyZOugoStsXCUfD_0YdwnNnunAJF8V47U3QHXSq
X-User-Id
stringRequired
The user ID of the user.
ExampleaobEdbYhXfu5hkeqG
Body parameters
Example
{
"type": "gcm",
"value": "TOKEN",
"appName": "MyApp"
}object
type
string Required
The possible values are apn or gcm.
value
string Required
The token value.
appName
string Required
The name of the application to associate the token with
Responses
200
Success Example
{
"result": {
"token": {
"gcm": "TOKEN"
},
"appName": "RocketAPP",
"userId": "52d5Rw8LT3TeDa59Z",
"enabled": true,
"createdAt": "2018-09-11T18:22:55.006Z",
"updatedAt": "2018-09-11T18:22:55.006Z",
"_id": "DMMjKG2hFoLvM2hk7"
},
"success": true
}object
result
object
token
object
gcm
string
appName
string
userId
string
enabled
boolean
createdAt
string
updatedAt
string
_id
string
success
boolean
400
Bad Request
Invalid Token Param
{
"success": false,
"error": "The required \"type\" body param is missing or invalid. [error-type-param-not-valid]",
"errorType": "error-type-param-not-valid"
}object
success
boolean
error
string
errorType
string
401
Unauthorized
Authorization Error
{
"status": "error",
"message": "You must be logged in to do this."
}object
status
string
message
string