Registration API

Lets user signup on the platform

Create User

POST https://www.ondemandstaffing.app/api/v1/sign_up

This endpoint allows you to post new users.

Query Parameters

Name
Type
Description

email

string

Email of the user. User must not have an account on the platform.

password

string

Must be a unique password and 8 characters or higher.

user_type

string

Must be either 'freelancer' or 'company'. Everything in lowercase. No other forms are accepted.

tenant

string

Tenant key for the App.

Headers

Name
Type
Description

Authentication

string

API Key for the tenant required.

{
  "status": 200,
  "message": "Success",
  "user": {
    "id": 34368,
    "email": "[email protected]",
    "created_at": "2019-12-07T05:58:08.683Z",
    "updated_at": "2019-12-07T10:18:38.341Z",
    "user_type": "freelancer",
    "provider": null,
    "uid": null,
    "invitation_token": null,
    "invitation_created_at": null,
    "invitation_sent_at": null,
    "invitation_accepted_at": null,
    "invitation_limit": null,
    "invited_by_id": null,
    "invited_by_type": null,
    "invitations_count": 0,
    "referred_by_id": null,
    "locale": "en",
    "country_id": 6,
    "authentication_token": "72wxmXSewkov_An3fWXz"
  }
}

An email is automatically sent to the user's email with a token. User must verify this token before proceeding.

Verify Token

POST https://www.ondemandstaffing.app/api/v1/email_verification

This method verifies the email address of the user. Account will experience a leash unless their email is confirmed.

Request Body

Name
Type
Description

verification_token

string

Token sent to user's email

tenant

string

Tenant key for the app

id

string

ID of the current user

email

number

email of the current user

{'verification_status' => 'Verified'} #for Valid Token
{'verification_status' => 'Incorrect', 'message' => "Token did not match"} . #Invalid Token

Send optional parameter: 'resend_email' as true to resend email with verification code to user. User should be locked for 24 hours after 10 attempts have been made. Minimum 60 seconds delay required between each request for resending email. Below is an example request.

{'resend_email':true, 'tenant':'tenant_key','id': 2392,'email':'[email protected]}

Last updated

Was this helpful?