To sign a user up, you should submit their details to Milliner. For testing you are welcome to use the development cluster at hubat.net, but if you become an issuer, you will be given a separate address.

	"request": {
		"url": "https://<cluster>/api/signup",
		"method": "POST",
		"header": [
			{
				"key": "Content-Type",
				"value": "application/json",
				"description": ""
			}
		],
		"body": {
			"mode": "raw",
			"raw": "{\n\t\"fullName\": \"Name LastName\",\n\t\"username\": \"testhat\",\n\t\"email\": \"email@example.com\",\n\t\"pass\": \"very-strong-password\",\n\t\"passRepeat\": \"very-strong-password\"\n}"
		},
		"description": "Register a new HAT with a cluster"
	}

If signing up is successful, you will receive a simple response:

	"response": [
		{
			"name": "Successful Signup",
			"code": 200,
			"header": [
				{
					"key": "Content-Type",
					"value": "application/json",
					"name": "Content-Type",
					"description": ""
				}
			],
			"cookie": [],
			"body": "{\"status\":\"OK\",\"message\":\"Signup for testhat saved\"}"
		}
	]

Alternatively, the response will signal an error through HTTP response status and contain detail as to the nature of the error in the message body

	"response": [
		{
			"name": "Error: invalid username",
			"status": "Bad Request",
			"code": 400,
			"header": [
				{
					"key": "Content-Type",
					"value": "application/json",
					"name": "Content-Type",
					"description": "The mime type of this content"
				}
			],
			"cookie": [],
			"body": "{\"message\":\"Invalid username\",\"cause\":\"Username must not contain spaces, uppercase letters or special characters, 22 characters maximum\"}"
		},
		{
			"name": "Error: Duplicate Signup",
			"status": "Bad Request",
			"code": 400,
			"header": [
				{
					"key": "Content-Type",
					"value": "application/json",
					"name": "Content-Type",
					"description": "The mime type of this content"
				}
			],
			"cookie": [],
			"body": "{\"message\":\"Duplicate Signup\",\"cause\":\"HAT with such username or email already exists\"}"
		}
	]
© 2017 - 2019 HAT Data Exchange Ltd.