# ai.newnal.illi.account.requestPDNCreationGrant

> Published by [illi-service.newnal.id](https://lexicon.garden/identity/did:plc:uztm7bi2ce42dez3uu3qafro)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.account.requestPDNCreationGrant)
- [Documentation](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.account.requestPDNCreationGrant/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:uztm7bi2ce42dez3uu3qafro/ai.newnal.illi.account.requestPDNCreationGrant/examples)

## Definitions

### `ai.newnal.illi.account.requestPDNCreationGrant`

**Type**: `procedure`

Issue a 60-second creation grant (a service-auth JWT for the PDN's ai.newnal.pdn.server.createAttestedAccount) to an attested ILLI client. In the PoC a device needs no attestation; in production the manufacturing-key or platform attestation is mandatory.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `attestation` | `string` | No | Client attestation bound to a nonce from account.getAttestationNonce: device = Android key attestation rooted at Newnal's RKP CA; familyApp = Play Integrity / App Attest; PoC = mock:<client>:<secret>. |
| `client` | `string` | Yes |  |
| `deviceId` | `string` | No |  |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `expiresAt` | `string` (datetime) | Yes |  |
| `grant` | `string` | Yes |  |
| `pdnDid` | `string` (did) | Yes |  |
| `pdnUrl` | `string` (uri) | Yes |  |

#### Errors

- **InvalidAttestation**
- **DeviceRevoked**
- **RateLimitExceeded**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Issue a 60-second creation grant (a service-auth JWT for the PDN's ai.newnal.pdn.server.createAttestedAccount) to an attested ILLI client. In the PoC a device needs no attestation; in production the manufacturing-key or platform attestation is mandatory.",
      "errors": [
        {
          "name": "InvalidAttestation"
        },
        {
          "name": "DeviceRevoked"
        },
        {
          "name": "RateLimitExceeded"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "attestation": {
              "description": "Client attestation bound to a nonce from account.getAttestationNonce: device = Android key attestation rooted at Newnal's RKP CA; familyApp = Play Integrity / App Attest; PoC = mock:<client>:<secret>.",
              "type": "string"
            },
            "client": {
              "knownValues": [
                "device",
                "familyApp"
              ],
              "type": "string"
            },
            "deviceId": {
              "maxLength": 64,
              "type": "string"
            }
          },
          "required": [
            "client"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "expiresAt": {
              "format": "datetime",
              "type": "string"
            },
            "grant": {
              "type": "string"
            },
            "pdnDid": {
              "format": "did",
              "type": "string"
            },
            "pdnUrl": {
              "format": "uri",
              "type": "string"
            }
          },
          "required": [
            "grant",
            "pdnUrl",
            "pdnDid",
            "expiresAt"
          ],
          "type": "object"
        }
      },
      "type": "procedure"
    }
  },
  "id": "ai.newnal.illi.account.requestPDNCreationGrant",
  "lexicon": 1
}
```
