Register

Create new user accounts with essential information such as email, username, and password.

API Documentation for auth/register

Endpoint Description

This endpoint is used for registering a new user. It requires various personal details including the user's name, date of birth, phone number, and ID number.

HTTP Method and URL

POST https://xvdev.xash.co.zw/api/v1/auth/register

Headers

  • Accept: application/json

Request Parameters

  • first_name (string, required): The first name of the user.

  • last_name (string, required): The last name of the user.

  • dob (date, required): The date of birth of the user, must be at least 11 years old.

  • phone (string, required): The phone number of the user, must be a valid Zimbabwe number.

  • email (string, optional): The email address of the user, must be unique.

  • id_number (string, required): The ID number of the user, must be unique.

Example Request

var axios = require("axios").default;
var options = {
  method: 'POST',
  url: 'https://xvdev.xash.co.zw/api/v1/auth/register',
  headers: { ... },
  data: { ... } // Data formatted as multipart/form-data
};

axios.request(options).then(function (response) {
  console.log(response.data);
}).catch(function (error) {
  console.error(error);
});

Successful Response

Rate Limiting

The API

endpoint auth/register is subject to rate limiting to prevent abuse. The current limit is set to 3 requests per minute. Exceeding this limit will result in a 429 Too Many Requests response.

Notes

  • Ensure all data is validated before sending to prevent any client-side errors.

  • The dob field requires the format DD/MM/YYYY.

  • Phone numbers should be in the format +263... and must be a valid Zimbabwe number.

  • The email and id_number fields, if provided, must be unique across all profiles.

Last updated