Skip to content

Push notifications

GET/api/v1.1/push/state

Get push state

Pixelfed only User token Scope push

Returns

curl "https://pixelfed.social/api/v1.1/push/state" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "version": "1.0",
  "username": "dansup",
  "profile_id": "2",
  "notify_enabled": true,
  "has_token": true,
  "notify_like": true,
  "notify_follow": true,
  "notify_mention": true,
  "notify_comment": false
}
POST/api/v1.1/push/compare

Compare push token

Pixelfed only User token Scope push

Body parameters

expo_tokenstringrequired

Returns

curl -X POST "https://pixelfed.social/api/v1.1/push/compare" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "expo_token": "ExponentPushToken[xH7kQ2mLp9Rt4vB1nC8dZe]"
  }'
Response
{
  "version": "1.0",
  "username": "dansup",
  "profile_id": "2",
  "notify_enabled": true,
  "match": false,
  "has_existing": true
}
POST/api/v1.1/push/update

Update push settings

Pixelfed only User token Scope push

Body parameters

tokenstringrequired

notify_enabledbooleanrequired

notify_likeboolean

notify_followboolean

notify_mentionboolean

notify_commentboolean

Returns

curl -X POST "https://pixelfed.social/api/v1.1/push/update" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "token": "ExponentPushToken[xH7kQ2mLp9Rt4vB1nC8dZe]",
    "notify_enabled": true,
    "notify_like": true,
    "notify_follow": true,
    "notify_mention": true
  }'
Response
{
  "version": "1.0",
  "notify_enabled": true,
  "has_token": true,
  "notify_like": true,
  "notify_follow": true,
  "notify_mention": true,
  "notify_comment": false
}
POST/api/v1.1/push/disable

Disable push

Pixelfed only User token Scope push

Returns

curl -X POST "https://pixelfed.social/api/v1.1/push/disable" \
  -H "Accept: application/json" \
  -H "Authorization: Bearer $TOKEN"
Response
{
  "version": "1.0",
  "username": "dansup",
  "profile_id": "2",
  "notify_enabled": false,
  "has_token": false,
  "notify_like": false,
  "notify_follow": false,
  "notify_mention": false,
  "notify_comment": false
}
Pixelfed is free and open source software. Edit this page Report a docs issue