Scrub - Open API

accounts

Endpoint:https://odoopi.usescrub.io/v1

User account management


Login

POST
https://odoopi.usescrub.io/v1
/accounts/login/

Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials.

LoginRequest Body

  • emailstring · minLength: 1 · required
  • passwordstring · minLength: 1 · required

LoginResponses

    • accessstring · minLength: 1
    • refreshstring · minLength: 1

Get authenticated user

GET
https://odoopi.usescrub.io/v1
/accounts/me/

Get authenticated user Responses

    • usernamestring · minLength: 1 · maxLength: 150 · required
    • emailstring · email · minLength: 1 · maxLength: 254 · required
    • idinteger · readOnly
    • passwordstring · minLength: 1
    • first_namestring · maxLength: 150
    • last_namestring · maxLength: 150
    • is_activeboolean · readOnly

      Designates whether this user should be treated as active. Unselect this instead of deleting accounts.

    • rolestring · enum
      Enum values:
      A
      B
    • date_joinedstring · date-time · readOnly
    • statusstring · readOnly
    • phonestring · minLength: 1 · maxLength: 200
    • genderstring · enum
      Enum values:
      MALE
      FEMALE
      OTHERS
    • tierinteger · readOnly
      Default: 1
    • is_verified_for_loginstring · readOnly

Refresh token

POST
https://odoopi.usescrub.io/v1
/accounts/refresh/

Takes a refresh type JSON web token and returns an access type JSON web token if the refresh token is valid.

Refresh tokenRequest Body

  • refreshstring · minLength: 1 · required
  • accessstring · minLength: 1 · readOnly

Refresh tokenResponses

    • refreshstring · minLength: 1 · required
    • accessstring · minLength: 1 · readOnly