Signup (Registration)

/db/users

New user sign up will create a new user in the User collection.

ParameterRequiredDescription
usernameYesNew user username.
passwordYesNew user password.
columnNameNoAdditional columns present in Users collection.

In addition to the required parameters you can add custom columns and fill them out during user registration.

To reduce the number of errors, the Appery.io Database doesn’t allow the creation of new fields from a POST request. First, the fields need to be added in the web console. Once it’s done, you can add a new user with the new field.

Examples

New user registration with just the username and password.
curl -X POST \
   -H "X-Appery-Database-Id: 57928860e4b00ef864f3dc24" \
   -H "Content-Type: application/json" \
   -d "{'username':'alexa','password':'456'}" \
   https://api.appery.io/rest/1/db/users
{
	"_id": "5792b95fe4b079a3621798b8",
	"username": "alexa",
	"_createdAt": "2016-07-23 00:25:03.361",
	"_updatedAt": "2016-07-23 00:25:03.364",
	"acl": {
		"*": {
			"read": true
		},
		"5792b95fe4b079a3621798b8": {
			"read": true,
			"write": true
		}
	},
	"sessionToken": "68bbb336-cec1-416e-976b-5452dfa9be52"
}
This examples shows how to send additional column information during registration. Note that the column has to exist in the database collection.
curl -X POST \
   -H "X-Appery-Database-Id: 57928860e4b00ef864f3dc24" \
   -H "Content-Type: application/json" \
   -d "{'username':'alexa','password':'456', 'email':'[email protected]'}" \
   https://api.appery.io/rest/1/db/users
{
	"_id": "5792ba75e4b079a3621798db",
	"username": "alexa",
	"_createdAt": "2016-07-23 00:29:41.650",
	"_updatedAt": "2016-07-23 00:29:41.653",
	"acl": {
		"*": {
			"read": true
		},
		"5792ba75e4b079a3621798db": {
			"read": true,
			"write": true
		}
	},
	"sessionToken": "606a5b2c-5e3c-48a8-931f-49db227dbd24"
}