# ink.resenha.notification.registerPush

> Requires the caller's service token. Registering a token again moves it to the caller.

- Kind: procedure
- Authority: notification.resenha.ink
- Lexicon: 1
- Published by [resenha.ink](https://lexicon.garden/identity/did:plc:v7itjf4h3sb5zuegiiskctqb), not the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:v7itjf4h3sb5zuegiiskctqb/ink.resenha.notification.registerPush)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:v7itjf4h3sb5zuegiiskctqb/ink.resenha.notification.registerPush/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:v7itjf4h3sb5zuegiiskctqb/ink.resenha.notification.registerPush/analytics)

## Procedure (`ink.resenha.notification.registerPush`)

Type: procedure · POST

### Input (application/json)

- `appId` (string, required): The app's bundle identifier.
  - Constraints: maxLength: 256
- `environment` (string, required): sandbox for debug builds, production for TestFlight and the App Store.
  - Constraints: knownValues: sandbox | production
- `platform` (string, required)
  - Constraints: knownValues: ios | macos
- `token` (string, required): The device's push token, hex.
  - Constraints: maxLength: 512

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Requires the caller's service token. Registering a token again moves it to the caller.",
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "appId": {
              "description": "The app's bundle identifier.",
              "maxLength": 256,
              "type": "string"
            },
            "environment": {
              "description": "sandbox for debug builds, production for TestFlight and the App Store.",
              "knownValues": [
                "sandbox",
                "production"
              ],
              "type": "string"
            },
            "platform": {
              "knownValues": [
                "ios",
                "macos"
              ],
              "type": "string"
            },
            "token": {
              "description": "The device's push token, hex.",
              "maxLength": 512,
              "type": "string"
            }
          },
          "required": [
            "token",
            "platform",
            "appId",
            "environment"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "description": "Registers a device for push notifications.",
  "id": "ink.resenha.notification.registerPush",
  "lexicon": 1
}
```
