# ai.newnal.illi.phone.registerIdentity

> Register the caller's Private Phone account (Matrix user ID). Called by a family member from the family app, or by the device with parent 1's device-app session for the account the device calls with. The MXID is taken to belong to the signed-in caller; there is no proof of control. The client creates the account by DID sign-in on a Messaging Node and writes the ILLI enrollment marker first. The Service Agent Node records phoneIdentity in the caller's family spheres and starts room provisioning; calling it again with the same MXID asks for a new provisioning run.

- Kind: procedure
- Authority: phone.illi.newnal.ai
- Lexicon: 1
- Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.phone.registerIdentity)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.phone.registerIdentity/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.phone.registerIdentity/analytics)

## Procedure (`ai.newnal.illi.phone.registerIdentity`)

Type: procedure · POST

### Input (application/json)

- `mxid` (string, required): Matrix user ID on one of the Service Agent Node's supported homeservers.
  - Constraints: maxLength: 255

### Output (application/json)

- `mxid` (string, required): Matrix user ID, @localpart:server name.
  - Constraints: maxLength: 255

### Errors

- `UnsupportedHomeserver`: The MXID is malformed or its server is not in the supported homeserver list.
- `IdentityTaken`: The MXID is registered to another account.
- `PhoneNotAllowed`: Parents call through the device: a parent's account from a family session, or a parent other than the device's signed-in parent.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Register the caller's Private Phone account (Matrix user ID). Called by a family member from the family app, or by the device with parent 1's device-app session for the account the device calls with. The MXID is taken to belong to the signed-in caller; there is no proof of control. The client creates the account by DID sign-in on a Messaging Node and writes the ILLI enrollment marker first. The Service Agent Node records phoneIdentity in the caller's family spheres and starts room provisioning; calling it again with the same MXID asks for a new provisioning run.",
      "errors": [
        {
          "description": "The MXID is malformed or its server is not in the supported homeserver list.",
          "name": "UnsupportedHomeserver"
        },
        {
          "description": "The MXID is registered to another account.",
          "name": "IdentityTaken"
        },
        {
          "description": "Parents call through the device: a parent's account from a family session, or a parent other than the device's signed-in parent.",
          "name": "PhoneNotAllowed"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "mxid": {
              "description": "Matrix user ID on one of the Service Agent Node's supported homeservers.",
              "maxLength": 255,
              "type": "string"
            }
          },
          "required": [
            "mxid"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "mxid": {
              "description": "Matrix user ID, @localpart:server name.",
              "maxLength": 255,
              "type": "string"
            }
          },
          "required": [
            "mxid"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.phone.registerIdentity",
  "lexicon": 1
}
```
