# com.suibari.nagi.registerPushSubscription

> Published by [suibari.com](https://lexicon.garden/identity/did:plc:uixgxpiqf4i63p6rgpu7ytmx)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.registerPushSubscription)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.registerPushSubscription/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uixgxpiqf4i63p6rgpu7ytmx/com.suibari.nagi.registerPushSubscription/examples)

## Definitions

### `com.suibari.nagi.registerPushSubscription`

**Type**: `procedure`

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `keys` | `ref` → `#pushKeys` | Yes |  |
| `endpoint` | `string` (uri) | Yes |  |
| `capability` | `string` | No |  |
| `installationId` | `string` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `registered` | `boolean` | Yes |  |

#### Errors

- **AuthRequired**

### `com.suibari.nagi.registerPushSubscription#pushKeys`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `auth` | `string` | Yes |  |
| `p256dh` | `string` | Yes |  |

## Raw Schema

```json
{
  "id": "com.suibari.nagi.registerPushSubscription",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "required": [
            "endpoint",
            "keys"
          ],
          "properties": {
            "keys": {
              "ref": "#pushKeys",
              "type": "ref"
            },
            "endpoint": {
              "type": "string",
              "format": "uri"
            },
            "capability": {
              "type": "string",
              "maxLength": 128,
              "minLength": 32
            },
            "installationId": {
              "type": "string",
              "maxLength": 36,
              "minLength": 36
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "AuthRequired"
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "registered"
          ],
          "properties": {
            "registered": {
              "type": "boolean"
            }
          }
        },
        "encoding": "application/json"
      }
    },
    "pushKeys": {
      "type": "object",
      "required": [
        "p256dh",
        "auth"
      ],
      "properties": {
        "auth": {
          "type": "string"
        },
        "p256dh": {
          "type": "string"
        }
      }
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
