> This page is for version V3 - Beta (default).
> For other versions, use one of these documentation indexes:
> - V3 - Beta (default): https://docs.authlyx.dev/v3/llms.txt
> - V2 - Legacy: https://docs.authlyx.dev/v2/llms.txt
> - V1 - End of support: https://docs.authlyx.dev/v1/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.authlyx.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.authlyx.dev/_mcp/server.

# Register

POST http://127.0.0.1:4000/v3/register
Content-Type: application/json

Creates an app user with a username, password and unused license. Prepare sign-in first and sign the register operation. This is not AuthlyX dashboard registration.

Reference: https://docs.authlyx.dev/api-reference/client/authentication/sign-in/register

## Servers

- `http://127.0.0.1:4000` (Local development, default)
- `https://api.authlyx.dev` (Production host - deployment pending)

## Request

### Headers

- `X-AuthlyX-Nonce` (string, optional) — Random nonce for binding and verifying the signed response.

### Body (application/json)

This endpoint expects an object.

- `appKey` (string, required) — Application identifier copied from the dashboard. Not an Elite Key or Bot Key.
- `version` (string, required) — Version of the application making this request, for example 1.0.0.
- `sid` (string, required) — Stable platform system identifier. Windows SDK defaults use the Windows user SID.
- `challengeId` (string, required) — ID from an unexpired single-use challenge for this operation.
- `signature` (string, required) — Base64 Ed25519 signature over the challenge proof payload.
- `type` (enum, required, default: register)
  - Allowed values: `register`
- `hash` (string, optional) — SHA-256 build hash. Required by policy when hash checking is enabled.
- `username` (string, optional) — App username, required for user and register sign-in. Between 1 and 200 characters.
- `password` (string, optional) — App password, required for user and register sign-in. Between 1 and 256 characters.
- `licenseKey` (string, optional) — License key belonging to this app. Required for license sign-in and registration.
- `installationPublicKey` (string, optional) — PEM-encoded Ed25519 public key for this installation. Never send its private key.
- `email` (string, optional) — Optional app-user email for registration.

## Response

### 200

Successful

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (SessionAccess, required, nullable)
- `requestId` (string, required)
- `verification` (V3RegisterPostResponsesContentApplicationJsonSchemaVerification, required)

## Errors

### 400 Bad Request Error

Bad request

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (map from string to any, required, nullable)
- `requestId` (string, required)
- `verification` (SignedResponseVerification, required)

### 401 Unauthorized Error

Unauthorized

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (map from string to any, required, nullable)
- `requestId` (string, required)
- `verification` (SignedResponseVerification, required)

### 403 Forbidden Error

Forbidden

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (map from string to any, required, nullable)
- `requestId` (string, required)
- `verification` (SignedResponseVerification, required)

### 404 Not Found Error

Not found

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (map from string to any, required, nullable)
- `requestId` (string, required)
- `verification` (SignedResponseVerification, required)

### 413 Content Too Large Error

Payload too large

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (map from string to any, required, nullable)
- `requestId` (string, required)
- `verification` (SignedResponseVerification, required)

### 415 Unsupported Media Type Error

Unsupported content type

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (map from string to any, required, nullable)
- `requestId` (string, required)
- `verification` (SignedResponseVerification, required)

### 429 Too Many Requests Error

Too many requests

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (map from string to any, required, nullable)
- `requestId` (string, required)
- `verification` (SignedResponseVerification, required)

### 503 Service Unavailable Error

Service unavailable

- `success` (boolean, required)
- `code` (string, required)
- `message` (string, required)
- `data` (map from string to any, required, nullable)
- `requestId` (string, required)
- `verification` (SignedResponseVerification, required)

## Types

### SessionAccess

- `token` (string, optional) — Opaque bearer token. Treat as a credential.
- `sessionId` (string, optional)
- `application` (string, optional)
- `identityId` (string, optional)
- `identity` (Identity, optional)
- `expiresAt` (datetime, optional)
- `accessDeadline` (datetime, optional)
- `serverTime` (datetime, optional)
- `heartbeatSeconds` (integer, optional)
- `jitterSeconds` (integer, optional)
- `leaseSeconds` (integer, optional)
- `currentVersion` (string, optional)
- `update` (ReleaseUpdate, optional)
- `updateAvailable` (boolean, optional)

### V3RegisterPostResponsesContentApplicationJsonSchemaVerification

- `keyId` (string, required)
- `signedPayload` (string, required)
- `signature` (string, required)

### SignedResponseVerification

- `keyId` (string, required)
- `signedPayload` (string, required)
- `signature` (string, required)

### Identity

- `type` (enum, optional)
  - Allowed values: `user`, `license`, `device`
- `name` (string, optional) — Signed-in username, license or device identifier.
- `licenseKey` (string, optional, nullable) — License key or linked license, when applicable.
- `email` (string, optional, nullable) — App-user email, if set.
- `plan` (string, optional, nullable) — App plan name, not the developer billing plan.
- `expiry` (string, optional, nullable) — Access expiry, or null for lifetime access.
- `deviceLimit` (integer, optional) — Device limit; 0 means unlimited.
- `registeredAt` (string, optional, nullable) — Creation timestamp when available.
- `lastLogin` (datetime, optional)
- `systemId` (string, optional)
- `ipAddress` (string, optional)
- `country` (string, optional, nullable) — Country code resolved from the connection IP.
- `features` (list of string, optional)
- `metadata` (map from string to IdentityMetadata, optional)

### ReleaseUpdate

- `enabled` (boolean, optional)
- `channel` (string, optional)
- `channelName` (string, optional)
- `version` (string, optional)
- `url` (string, optional, nullable)
- `notes` (string, optional)
- `mode` (enum, optional)
  - Allowed values: `browser`

### IdentityMetadata

- string
- double
- boolean
- string

## Examples

**Request**

```json
{
  "appKey": "ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78",
  "version": "1.0.0",
  "sid": "S-1-5-21-3349523261-4242746980-1390621393-1001",
  "challengeId": "98b6a22d-2ea3-4863-91f8-c575cdccf1a2",
  "signature": "DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==",
  "type": "register",
  "hash": "a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f",
  "username": "alex",
  "password": "River-Glass-29",
  "licenseKey": "4J8N-7P2C-9K6R-3W5M",
  "installationPublicKey": "-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=\n-----END PUBLIC KEY-----\n",
  "email": "alex@example.com"
}
```

**Response**

```json
{
  "success": true,
  "code": "LOGIN_SUCCESS",
  "message": "Request completed.",
  "data": {
    "token": "c7be084b6eaf9140c7be084b6eaf9140c7be084b6eaf9140c7be084b6eaf9140",
    "sessionId": "98b6a22d-2ea3-4863-91f8-c575cdccf1a2",
    "application": "MyApp",
    "identityId": "98b6a22d-2ea3-4863-91f8-c575cdccf1a2",
    "identity": {
      "type": "user",
      "name": "4J8N-7P2C-9K6R-3W5M",
      "licenseKey": "4J8N-7P2C-9K6R-3W5M",
      "email": "alex@example.com",
      "plan": "Premium",
      "expiry": "2026-11-24T12:00:00.000Z",
      "deviceLimit": 2,
      "registeredAt": "2026-10-01T09:15:00.000Z",
      "lastLogin": "2026-10-24T12:00:00.000Z",
      "systemId": "S-1-5-21-3349523261-4242746980-1390621393-1001",
      "ipAddress": "197.210.54.18",
      "country": "NG",
      "features": [
        "exportPdf"
      ],
      "metadata": {
        "customerReference": "ORDER-1042",
        "preferredLanguage": "en"
      },
      "featureValues": {
        "exportPdf": true,
        "projects": 25,
        "videoQuality": "4K"
      }
    },
    "expiresAt": "2026-10-25T12:00:00.000Z",
    "accessDeadline": "2026-10-24T12:15:00.000Z",
    "serverTime": "2026-10-24T12:00:00.000Z",
    "heartbeatSeconds": 600,
    "jitterSeconds": 15,
    "leaseSeconds": 900,
    "currentVersion": "1.4.0",
    "update": {
      "enabled": true,
      "channel": "stable",
      "channelName": "Stable",
      "version": "1.4.0",
      "url": "https://example.com/ger-1.4.0.zip",
      "notes": "Improves sign-in after waking from sleep.",
      "mode": "browser"
    },
    "updateAvailable": true
  },
  "requestId": "98b6a22d-2ea3-4863-91f8-c575cdccf1a2",
  "verification": {
    "keyId": "324be2dea8bc44461b0233e51fa48902ed6b1cc671e7739af2551e0bfe68f54e",
    "signedPayload": "{\"type\":\"authlyx.response.v3\",\"keyId\":\"324be2dea8bc44461b0233e51fa48902ed6b1cc671e7739af2551e0bfe68f54e\",\"httpStatus\":200,\"serverTime\":\"2026-10-24T12:00:00.000Z\",\"request\":{\"method\":\"POST\",\"path\":\"/v3/register\",\"nonce\":\"a6e4c18b379520dfa6e4c18b379520df\",\"bodySha256\":\"325d5c115f5b186a029eaa9268e4c86153a561df9dfb7da7a04b889d323edc18\"},\"response\":{\"success\":true,\"code\":\"LOGIN_SUCCESS\",\"message\":\"Request completed.\",\"data\":{\"token\":\"c7be084b6eaf9140c7be084b6eaf9140c7be084b6eaf9140c7be084b6eaf9140\",\"sessionId\":\"98b6a22d-2ea3-4863-91f8-c575cdccf1a2\",\"application\":\"MyApp\",\"identityId\":\"98b6a22d-2ea3-4863-91f8-c575cdccf1a2\",\"identity\":{\"type\":\"user\",\"name\":\"4J8N-7P2C-9K6R-3W5M\",\"licenseKey\":\"4J8N-7P2C-9K6R-3W5M\",\"email\":\"alex@example.com\",\"plan\":\"Premium\",\"expiry\":\"2026-11-24T12:00:00.000Z\",\"deviceLimit\":2,\"registeredAt\":\"2026-10-01T09:15:00.000Z\",\"lastLogin\":\"2026-10-24T12:00:00.000Z\",\"systemId\":\"S-1-5-21-3349523261-4242746980-1390621393-1001\",\"ipAddress\":\"197.210.54.18\",\"country\":\"NG\",\"features\":[\"exportPdf\"],\"featureValues\":{\"exportPdf\":true,\"videoQuality\":\"4K\",\"projects\":25},\"metadata\":{\"preferredLanguage\":\"en\",\"customerReference\":\"ORDER-1042\"}},\"updateAvailable\":true,\"currentVersion\":\"1.4.0\",\"update\":{\"enabled\":true,\"channel\":\"stable\",\"channelName\":\"Stable\",\"version\":\"1.4.0\",\"url\":\"https://example.com/ger-1.4.0.zip\",\"notes\":\"Improves sign-in after waking from sleep.\",\"mode\":\"browser\"},\"serverTime\":\"2026-10-24T12:00:00.000Z\",\"accessDeadline\":\"2026-10-24T12:15:00.000Z\",\"expiresAt\":\"2026-10-25T12:00:00.000Z\",\"heartbeatSeconds\":600,\"jitterSeconds\":15,\"leaseSeconds\":900},\"requestId\":\"98b6a22d-2ea3-4863-91f8-c575cdccf1a2\"}}",
    "signature": "pDMwdLX2XWarhAuWEuIyEUeyfJPiM51qCg0pJf4EUpJ2ZTzhwjDkJoepUewNb7XpDfPg6siTexHXv2iE5pFOCg=="
  }
}
```

**SDK Code**

```python
import requests

url = "http://127.0.0.1:4000/v3/register"

payload = {
    "appKey": "ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78",
    "version": "1.0.0",
    "sid": "S-1-5-21-3349523261-4242746980-1390621393-1001",
    "challengeId": "98b6a22d-2ea3-4863-91f8-c575cdccf1a2",
    "signature": "DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==",
    "type": "register",
    "hash": "a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f",
    "username": "alex",
    "password": "River-Glass-29",
    "licenseKey": "4J8N-7P2C-9K6R-3W5M",
    "installationPublicKey": "-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=
-----END PUBLIC KEY-----
",
    "email": "alex@example.com"
}
headers = {
    "X-AuthlyX-Nonce": "a6e4c18b379520dfa6e4c18b379520df",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'http://127.0.0.1:4000/v3/register';
const options = {
  method: 'POST',
  headers: {
    'X-AuthlyX-Nonce': 'a6e4c18b379520dfa6e4c18b379520df',
    'Content-Type': 'application/json'
  },
  body: '{"appKey":"ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78","version":"1.0.0","sid":"S-1-5-21-3349523261-4242746980-1390621393-1001","challengeId":"98b6a22d-2ea3-4863-91f8-c575cdccf1a2","signature":"DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==","type":"register","hash":"a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f","username":"alex","password":"River-Glass-29","licenseKey":"4J8N-7P2C-9K6R-3W5M","installationPublicKey":"-----BEGIN PUBLIC KEY-----\nMCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=\n-----END PUBLIC KEY-----\n","email":"alex@example.com"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "http://127.0.0.1:4000/v3/register"

	payload := strings.NewReader("{\n  \"appKey\": \"ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78\",\n  \"version\": \"1.0.0\",\n  \"sid\": \"S-1-5-21-3349523261-4242746980-1390621393-1001\",\n  \"challengeId\": \"98b6a22d-2ea3-4863-91f8-c575cdccf1a2\",\n  \"signature\": \"DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==\",\n  \"type\": \"register\",\n  \"hash\": \"a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f\",\n  \"username\": \"alex\",\n  \"password\": \"River-Glass-29\",\n  \"licenseKey\": \"4J8N-7P2C-9K6R-3W5M\",\n  \"installationPublicKey\": \"-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=\\n-----END PUBLIC KEY-----\\n\",\n  \"email\": \"alex@example.com\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("X-AuthlyX-Nonce", "a6e4c18b379520dfa6e4c18b379520df")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("http://127.0.0.1:4000/v3/register")

http = Net::HTTP.new(url.host, url.port)

request = Net::HTTP::Post.new(url)
request["X-AuthlyX-Nonce"] = 'a6e4c18b379520dfa6e4c18b379520df'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"appKey\": \"ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78\",\n  \"version\": \"1.0.0\",\n  \"sid\": \"S-1-5-21-3349523261-4242746980-1390621393-1001\",\n  \"challengeId\": \"98b6a22d-2ea3-4863-91f8-c575cdccf1a2\",\n  \"signature\": \"DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==\",\n  \"type\": \"register\",\n  \"hash\": \"a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f\",\n  \"username\": \"alex\",\n  \"password\": \"River-Glass-29\",\n  \"licenseKey\": \"4J8N-7P2C-9K6R-3W5M\",\n  \"installationPublicKey\": \"-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=\\n-----END PUBLIC KEY-----\\n\",\n  \"email\": \"alex@example.com\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("http://127.0.0.1:4000/v3/register")
  .header("X-AuthlyX-Nonce", "a6e4c18b379520dfa6e4c18b379520df")
  .header("Content-Type", "application/json")
  .body("{\n  \"appKey\": \"ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78\",\n  \"version\": \"1.0.0\",\n  \"sid\": \"S-1-5-21-3349523261-4242746980-1390621393-1001\",\n  \"challengeId\": \"98b6a22d-2ea3-4863-91f8-c575cdccf1a2\",\n  \"signature\": \"DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==\",\n  \"type\": \"register\",\n  \"hash\": \"a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f\",\n  \"username\": \"alex\",\n  \"password\": \"River-Glass-29\",\n  \"licenseKey\": \"4J8N-7P2C-9K6R-3W5M\",\n  \"installationPublicKey\": \"-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=\\n-----END PUBLIC KEY-----\\n\",\n  \"email\": \"alex@example.com\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'http://127.0.0.1:4000/v3/register', [
  'body' => '{
  "appKey": "ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78",
  "version": "1.0.0",
  "sid": "S-1-5-21-3349523261-4242746980-1390621393-1001",
  "challengeId": "98b6a22d-2ea3-4863-91f8-c575cdccf1a2",
  "signature": "DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==",
  "type": "register",
  "hash": "a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f",
  "username": "alex",
  "password": "River-Glass-29",
  "licenseKey": "4J8N-7P2C-9K6R-3W5M",
  "installationPublicKey": "-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=\\n-----END PUBLIC KEY-----\\n",
  "email": "alex@example.com"
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'X-AuthlyX-Nonce' => 'a6e4c18b379520dfa6e4c18b379520df',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("http://127.0.0.1:4000/v3/register");
var request = new RestRequest(Method.POST);
request.AddHeader("X-AuthlyX-Nonce", "a6e4c18b379520dfa6e4c18b379520df");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"appKey\": \"ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78\",\n  \"version\": \"1.0.0\",\n  \"sid\": \"S-1-5-21-3349523261-4242746980-1390621393-1001\",\n  \"challengeId\": \"98b6a22d-2ea3-4863-91f8-c575cdccf1a2\",\n  \"signature\": \"DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==\",\n  \"type\": \"register\",\n  \"hash\": \"a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f\",\n  \"username\": \"alex\",\n  \"password\": \"River-Glass-29\",\n  \"licenseKey\": \"4J8N-7P2C-9K6R-3W5M\",\n  \"installationPublicKey\": \"-----BEGIN PUBLIC KEY-----\\nMCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=\\n-----END PUBLIC KEY-----\\n\",\n  \"email\": \"alex@example.com\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "X-AuthlyX-Nonce": "a6e4c18b379520dfa6e4c18b379520df",
  "Content-Type": "application/json"
]
let parameters = [
  "appKey": "ger_5607ad6df93c49359adfa5a8dc6f3c96cacd6275d9a44d78",
  "version": "1.0.0",
  "sid": "S-1-5-21-3349523261-4242746980-1390621393-1001",
  "challengeId": "98b6a22d-2ea3-4863-91f8-c575cdccf1a2",
  "signature": "DQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ0NDQ==",
  "type": "register",
  "hash": "a75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109fa75c96e38b2d109f",
  "username": "alex",
  "password": "River-Glass-29",
  "licenseKey": "4J8N-7P2C-9K6R-3W5M",
  "installationPublicKey": "-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEA6kpsY+KcUgq+9VB7Ey7F+ZVHdq6+vnuSQh7qaRRG0iw=
-----END PUBLIC KEY-----
",
  "email": "alex@example.com"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "http://127.0.0.1:4000/v3/register")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```