# rip.pds.account.createAccount

> Published by [pds.rip](https://lexicon.garden/identity/did:plc:w24v65i3bcsxk6mbbgfdukve)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:w24v65i3bcsxk6mbbgfdukve/rip.pds.account.createAccount)
- [Documentation](https://lexicon.garden/lexicon/did:plc:w24v65i3bcsxk6mbbgfdukve/rip.pds.account.createAccount/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:w24v65i3bcsxk6mbbgfdukve/rip.pds.account.createAccount/examples)

## Definitions

### `rip.pds.account.createAccount`

**Type**: `procedure`

Mint an ephemeral account owned by the calling account. The account is deleted and its identity retired when it expires.

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `domain` | `string` | No | Handle domain to mint under, which also selects the identity method. Defaults to the server's first configured domain. |
| `handle` | `string` (handle) | No | Desired handle. A two-word handle under the chosen domain is generated when omitted. |
| `password` | `string` | No | Password for the new account. One is generated and returned when omitted. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `account` | `ref` → `rip.pds.account.defs#accountView` | Yes |  |
| `password` | `string` | Yes | Shown once. The server does not store it in a recoverable form. |
| `pdsEndpoint` | `string` (uri) | Yes |  |

#### Errors

- **QuotaExceeded**: The caller already holds the maximum number of live accounts.
- **HandleUnavailable**: The requested handle is taken or not valid for the domain.
- **UnknownDomain**: The requested domain is not offered by this server.
- **OwnerNotEligible**: The caller's own identity is hosted here and would expire, orphaning what it mints.

## Raw Schema

```json
{
  "id": "rip.pds.account.createAccount",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "properties": {
            "domain": {
              "type": "string",
              "description": "Handle domain to mint under, which also selects the identity method. Defaults to the server's first configured domain."
            },
            "handle": {
              "type": "string",
              "format": "handle",
              "description": "Desired handle. A two-word handle under the chosen domain is generated when omitted."
            },
            "password": {
              "type": "string",
              "maxLength": 256,
              "minLength": 8,
              "description": "Password for the new account. One is generated and returned when omitted."
            }
          }
        },
        "encoding": "application/json"
      },
      "errors": [
        {
          "name": "QuotaExceeded",
          "description": "The caller already holds the maximum number of live accounts."
        },
        {
          "name": "HandleUnavailable",
          "description": "The requested handle is taken or not valid for the domain."
        },
        {
          "name": "UnknownDomain",
          "description": "The requested domain is not offered by this server."
        },
        {
          "name": "OwnerNotEligible",
          "description": "The caller's own identity is hosted here and would expire, orphaning what it mints."
        }
      ],
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "account",
            "password",
            "pdsEndpoint"
          ],
          "properties": {
            "account": {
              "ref": "rip.pds.account.defs#accountView",
              "type": "ref"
            },
            "password": {
              "type": "string",
              "description": "Shown once. The server does not store it in a recoverable form."
            },
            "pdsEndpoint": {
              "type": "string",
              "format": "uri"
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Mint an ephemeral account owned by the calling account. The account is deleted and its identity retired when it expires."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
