> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neuro-tech.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Create account

> Create a Neuron account and receive an initial JWT

## Overview

Creates a new agent account and logs the user in. The account behaves like a
regular XMPP account. New accounts are disabled until their email address is
verified. Phone verification is optional if a phone number is provided.

## Authentication

This endpoint requires an API key and secret. Sign the request with HMAC-SHA256
using the API secret as the key.

Signature message:

```
userName:host:eMail:password:apiKey:nonce
```

## Notes

* Protect your API key and secret. They should only be used from secure back-end
  services.
* Each API key has a limit on how many accounts it can create.
* If you cannot protect secrets (for example, in a browser), use CreateWebForm.


## OpenAPI

````yaml /test-api/openapi.yaml post /Agent/Account/Create
openapi: 3.1.0
info:
  title: Neuron Agent API
  version: 1.0.0
  description: |-
    The Agent API exposes core Neuron functionality over HTTP so services can
    operate without a persistent XMPP connection. Endpoints are grouped by
    capability, starting with Accounts and XMPP messaging.
servers:
  - url: https://{host}
    variables:
      host:
        default: neuron.example.com
        description: Neuron domain issued to you.
security:
  - bearerAuth: []
tags:
  - name: Accounts
  - name: Crypto
  - name: Open intelligence
  - name: Legal and contracts
  - name: State machines
  - name: Storage
  - name: Tokens
  - name: Wallet
  - name: XMPP messaging
paths:
  /Agent/Account/Create:
    post:
      tags:
        - Accounts
      summary: Create account
      description: Create a Neuron account and receive an initial JWT
      operationId: post_Agent_Account_Create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                userName:
                  type: string
                eMail:
                  type: string
                phoneNr:
                  type: string
                password:
                  type: string
                apiKey:
                  type: string
                nonce:
                  type: string
                signature:
                  type: string
                seconds:
                  type: integer
                language:
                  type: string
              additionalProperties: true
              required:
                - userName
                - eMail
                - phoneNr
                - password
                - apiKey
                - nonce
                - signature
                - seconds
                - language
            example:
              userName: alice
              eMail: alice@example.com
              phoneNr: '+46700000000'
              password: correct-horse-battery-staple
              apiKey: your-api-key
              nonce: random-unique-string-at-least-32-chars
              signature: base64-hmac
              seconds: 3600
              language: en
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                properties:
                  created:
                    type: string
                  updated:
                    type: string
                  enabled:
                    type: boolean
                  canRelay:
                    type: boolean
                  jwt:
                    type: string
                  expires:
                    type: string
                  eMailCodeSent:
                    type: boolean
                  phoneNrCodeSent:
                    type: boolean
                additionalProperties: true
                required:
                  - created
                  - updated
                  - enabled
                  - canRelay
                  - jwt
                  - expires
                  - eMailCodeSent
                  - phoneNrCodeSent
              example:
                created: '2024-08-02T10:22:11Z'
                updated: '2024-08-02T10:22:11Z'
                enabled: false
                canRelay: true
                jwt: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
                expires: '2024-08-02T11:22:11Z'
                eMailCodeSent: true
                phoneNrCodeSent: false
      security: []
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````