Sign up¶
Sign up¶
/signupUsed to register a new user. A verification email is sent; the account cannot log in until the email address is verified.
Request¶
Auth: None ยท Content-type: application/json
Request body:
The request body is JSON. The email address is also used as the username.
| Field name | Description | Type |
|---|---|---|
| firstname | First name | str |
| lastname | Last name | str |
| Email address; must not already be registered | str | |
| password | Account password | str |
| cellphone | Cellphone number | str |
| gender | [Optional] Gender. Defaults to N/A |
str |
| date_of_birth | [Optional] Date of birth | str |
| address_line_1 | [Optional] Address line 1 | str |
| address_line_2 | [Optional] Address line 2 | str |
| address_postal_code | [Optional] Postal code | int |
| address_state | [Optional] State or province | str |
| address_country | [Optional] Country | str |
| profile_pic | [Optional] Profile picture (URL or data string) | str |
Request example:
{
"firstname": "John",
"lastname": "Doe",
"email": "user@example.com",
"password": "secure_password",
"cellphone": "+27000000000",
"gender": "M",
"date_of_birth": "1990-01-01",
"address_line_1": "1 Example Street",
"address_line_2": "",
"address_postal_code": 2000,
"address_state": "Gauteng",
"address_country": "South Africa"
}
Response¶
{
"success": {
"user_registered": true,
"api_key": "a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5",
"notification_sent": true
}
}
Field description¶
| Field name | Description | Type |
|---|---|---|
| user_registered | Whether the account was created | bool |
| api_key | Key stored on the user record. It is not a login session; call /login after verifying your email to get an api_key for requests |
str |
| notification_sent | Whether the verification email was sent | bool |
Possible failed messages: Missing body argument: <field> for a missing required field, Username already exists when the email is already registered.
Verify email¶
/verificationUsed to verify the account's email address with the token from the verification email.
Request¶
Auth: None (uses the verification token)
Request body:
None. Send the token as a query parameter.
| Field name | Description | Type |
|---|---|---|
| verification_link | Verification token from the email | str |
Request example:
https://spoilerinterface.com/interface/verification?verification_link=a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
Response¶
Possible failed messages: Missing verification link, Invalid verification token.