social.colibri.notification.registerPush

colibri.social

Documentation

Registers a push subscription (Web Push or FCM) for the authenticated user.

main procedure

Registers a push subscription (Web Push or FCM) for the authenticated user.

Input

Encodingapplication/json
platform string Required

No description available.

subscription union Required

No description available.

Output

Encodingapplication/json
registered boolean Required

No description available.

Errors

AuthRequired Missing, malformed, or unverifiable service auth.
InvalidRequest A parameter or body field was missing or malformed.
Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://bsky.social)
Enter valid JSON for the request body
View raw schema
{
  "type": "procedure",
  "input": {
    "schema": {
      "type": "object",
      "required": [
        "platform",
        "subscription"
      ],
      "properties": {
        "platform": {
          "type": "string",
          "knownValues": [
            "web",
            "tauri",
            "android"
          ]
        },
        "subscription": {
          "refs": [
            "lex:social.colibri.notification.registerPush#webPushSubscription",
            "lex:social.colibri.notification.registerPush#fcmSubscription"
          ],
          "type": "union"
        }
      }
    },
    "encoding": "application/json"
  },
  "errors": [
    {
      "name": "AuthRequired",
      "description": "Missing, malformed, or unverifiable service auth."
    },
    {
      "name": "InvalidRequest",
      "description": "A parameter or body field was missing or malformed."
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "registered"
      ],
      "properties": {
        "registered": {
          "type": "boolean"
        }
      }
    },
    "encoding": "application/json"
  },
  "description": "Registers a push subscription (Web Push or FCM) for the authenticated user."
}
fcmSubscription object

A Firebase Cloud Messaging registration token.

Properties

token string Required

FCM registration token from FirebaseMessaging.getInstance().token.

View raw schema
{
  "type": "object",
  "required": [
    "token"
  ],
  "properties": {
    "token": {
      "type": "string",
      "description": "FCM registration token from FirebaseMessaging.getInstance().token."
    }
  },
  "description": "A Firebase Cloud Messaging registration token."
}
pushKeys object

Web Push subscription keys.

Properties

auth string Required

No description available.

p256dh string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "p256dh",
    "auth"
  ],
  "properties": {
    "auth": {
      "type": "string"
    },
    "p256dh": {
      "type": "string"
    }
  },
  "description": "Web Push subscription keys."
}
webPushSubscription object

A browser Web Push subscription.

Properties

endpoint string uri Required

A valid URI.

View raw schema
{
  "type": "object",
  "required": [
    "endpoint",
    "keys"
  ],
  "properties": {
    "keys": {
      "ref": "lex:social.colibri.notification.registerPush#pushKeys",
      "type": "ref"
    },
    "endpoint": {
      "type": "string",
      "format": "uri"
    }
  },
  "description": "A browser Web Push subscription."
}

Lexicon Garden

@