Users API Endpoints

Base URLs

https://users-api.dev.dimo.zone


Get Authenticated User

GET {baseUrl}/v1/user

Retrieves user attributes for the authenticated user.

Headers

{
    "id": "CioweGY5RDI2MzIzQWI0OTE3OUE2ZDU3QzI2NTE1QjAxRGUwMTg1NTM3ODcSBHdlYjM",
    "email": {
        "address": null,
        "confirmed": false,
        "confirmationSentAt": null
    },
    "web3": {
        "address": "0xf9D26323Ab49179A6d57C26515B01De018553787",
        "confirmed": true,
        "used": true,
        "inApp": false,
        "challengeSentAt": null
    },
    "createdAt": "2024-01-18T23:19:22.693833Z",
    "countryCode": null,
    "agreedTosAt": null,
    "referralCode": "GAILPP",
    "referredBy": null,
    "referredAt": null
}

Update Authenticated User

PUT {baseUrl}/v1/user

Updates/modifies attributes for the authenticated user.

Headers

Request Body

{
  "agreedTosAt": "2021-12-01T09:00:41Z",
  "countryCode": "USA",
  "createdAt": "2021-12-01T09:00:00Z",
  "email": {
    "address": "koblitz@dimo.zone",
    "confirmationSentAt": "2021-12-01T09:01:12Z",
    "confirmed": false
  },
  "id": "ChFrb2JsaXR6QGRpbW8uem9uZRIGZ29vZ2xl",
  "referralCode": "ANB95N",
  "referredAt": "2021-12-01T09:00:41Z",
  "referredBy": "0x3497B704a954789BC39999262510DE9B09Ff1366",
  "web3": {
    "address": "0x142e0C7A098622Ea98E5D67034251C4dFA746B5d",
    "challengeSentAt": "2021-12-01T09:01:12Z",
    "confirmed": false,
    "inApp": false,
    "used": false
  }
}ss

Delete Authenticated User

DELETE {baseUrl}/v1/user

Deletes the authenticated user. Throws a 409 error if the authenticated user has device registered.

Headers


Send a Confirmation Email

POST {baseUrl}/v1/user/send-confirmation-email

Sends a confirmation email to the registered email address of the authenticated user. This is the initiation step of the 2-factor authentication (2FA).

Headers

Submit an Email Confirmation Key

POST {baseUrl}/v1/user/confirm-email

Confirms the receipt of the confirmation email, this is the completion step of the 2-factor authentication (2FA).

Headers

Request Body


Generate a Challenge for the User to Sign

POST {baseUrl}/v1/user/web3/challenge/generate

Generates a Web3 challenge message with an expiration timestamp for the user to sign.

Headers

Submit a Signed Challenge

POST {baseUrl}/v1/user/web3/challenge/submit

Confirms ownership of an Ethereum address.

Headers

Request Body


Agree to Terms of Service

POST {baseUrl}/v1/user/agree-tos

Sends a confirmation agreeing to the current Terms of Service.

Headers

Submit a Referral Code

POST {baseUrl}/v1/user/submit-referral-code

Submits a referral code from another user. The request sends the referral code, validates, and stores it for referral rewards recognition.

Headers

Request Body


Swagger Doc

Last updated