social.colibri.beta.notification.registerPush

colibri.social

Documentation

Registers a push endpoint for the requesting user's device. Web Push requires endpoint, p256dh, and auth. FCM requires token.

main procedure

Registers a push endpoint for the requesting user's device. Web Push requires endpoint, p256dh, and auth. FCM requires token.

Input

Encodingapplication/json
auth string Optional

The Web Push subscription's auth secret. Required when provider is webpush.

endpoint stringuri Optional

The Web Push subscription endpoint. Required when provider is webpush.

p256dh string Optional

The Web Push subscription's p256dh key. Required when provider is webpush.

platform string Required

The platform the device runs.

provider string Required

The push provider to register with.

token string Optional

The FCM registration token. Required when provider is fcm.

Output

Encodingapplication/json

Errors

AuthRequired The request has no valid service auth.
InvalidRequest The fields required for the given provider are missing or malformed.
PushNotConfigured This AppView has no keypair for the requested provider.
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": [
        "provider",
        "platform"
      ],
      "properties": {
        "auth": {
          "type": "string",
          "description": "The Web Push subscription's auth secret. Required when provider is webpush."
        },
        "token": {
          "type": "string",
          "description": "The FCM registration token. Required when provider is fcm."
        },
        "p256dh": {
          "type": "string",
          "description": "The Web Push subscription's p256dh key. Required when provider is webpush."
        },
        "endpoint": {
          "type": "string",
          "format": "uri",
          "description": "The Web Push subscription endpoint. Required when provider is webpush."
        },
        "platform": {
          "type": "string",
          "description": "The platform the device runs.",
          "knownValues": [
            "web",
            "ios",
            "android"
          ]
        },
        "provider": {
          "type": "string",
          "description": "The push provider to register with.",
          "knownValues": [
            "webpush",
            "fcm"
          ]
        }
      }
    },
    "encoding": "application/json"
  },
  "errors": [
    {
      "name": "AuthRequired",
      "description": "The request has no valid service auth."
    },
    {
      "name": "InvalidRequest",
      "description": "The fields required for the given provider are missing or malformed."
    },
    {
      "name": "PushNotConfigured",
      "description": "This AppView has no keypair for the requested provider."
    }
  ],
  "output": {
    "schema": {
      "type": "object",
      "properties": {}
    },
    "encoding": "application/json"
  },
  "description": "Registers a push endpoint for the requesting user's device. Web Push requires endpoint, p256dh, and auth. FCM requires token."
}

Lexicon Garden

@