LogoLogo
DocsHomeSupportContact
  • Getting Started
    • Introduction
    • Build on DIMO
  • DEVELOPER GUIDE
    • Developer Overview
    • Developer Console
    • Authentication
    • DIMO Developer SDKs
      • Data SDK
      • Login with DIMO SDK
        • React Component
        • Login with DIMO Redirect
        • Core Functionalities
      • TypeScript: Transactions SDK
      • SDK Release Notes
    • Low Code Tools
      • n8n: Getting Started
    • Permissions Contract: SACD
    • DIMO Credits
    • Response Types
    • Rate Limits
    • Developer FAQ
    • Developer Changelogs
    • Troubleshooting Common Issues
  • API References
    • Overview of DIMO API
    • Attestation API
    • Device Definitions API
    • Identity API
      • Schema & Types
      • Scalars
      • Nodes & Objects
        • AftermarketDevice
        • AftermarketDeviceConnection
        • DCN
        • DCNConnection
        • DeveloperLicense
        • DeviceDefinition
        • Earning
        • EarningsConnection
        • Manufacturer
        • Sacd
        • SyntheticDevice
        • Vehicle
        • VehicleConnection
        • VehicleEarnings
        • UserRewards
      • Common Queries
    • Telemetry API
      • Schema & Types
      • Scalars
      • Nodes & Objects
        • Vehicle Signals
      • Common Queries
    • Token Exchange API
    • Trips API
    • Valuations API
  • DIMO Webhooks
    • Webhooks
    • Webhooks API Reference
  • DIMO Hardware
    • Introduction
    • DIMO Hardware Application
    • DIMO Manufacturing License
    • Development & Certification
    • Audits & Assessments
      • Hardware & Security Audit
      • Customer Experience Assessment
      • Integration Testing & Quality Control
      • Final Approval
    • DIMO Device License
      • Device Minting Certificates
    • Essential Documents
      • Hardware & Security Audit Checklist
      • Approved Hardware Auditors
      • DIMO Memorandum of Understanding (MOU)
  • Additional References
    • Developer License
    • DIMO GraphQL Basics
  • Deprecated Resources
    • Guides
      • Developer Journey
      • Quick Start Guide
      • Hello World
      • Code Exchange Flow
    • Data Availability
Powered by GitBook
On this page
  • Base URLs
  • Basic User Operations
  • Get Authenticated User
  • Update Authenticated User
  • Delete Authenticated User
  • 2FA Email Confirmation Flow
  • Send a Confirmation Email
  • Submit an Email Confirmation Key
  • Web3 User Auth Flow
  • Generate a Challenge for the User to Sign
  • Submit a Signed Challenge
  • Get User's Other Accounts
  • Miscellaneous
  • Agree to Terms of Service
  • Submit a Referral Code
  • Swagger Doc

Was this helpful?

  1. Deprecated Resources
  2. Deprioritized APIs
  3. Users API

Users API Endpoints

Last updated 7 months ago

Was this helpful?

Base URLs

https://users-api.dimo.zone


Basic User Operations

Get Authenticated User

GET /v1/user

Retrieves user attributes for the authenticated user.

Headers

Name
Type
Description

Authorization*

String

{
    "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
}
{
    "code": 401,
    "message": "Invalid JWT."
}

Update Authenticated User

Updates/modifies attributes for the authenticated user.

Headers

Name
Type
Description

Authorization*

String

Request Body

Name
Type
Description

userUpdateRequest*

Object

See example below for data structure:

{
  "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

{
    "code": 401,
    "message": "Invalid JWT."
}

Delete Authenticated User

DELETE {baseUrl}/v1/user

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

Headers

Name
Type
Description

Authorization*

String

{
    "code": 401,
    "message": "Invalid JWT."
}


Send a 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

Name
Type
Description

Authorization*

String

{
    "code": 401,
    "message": "Invalid JWT."
}

Submit an Email Confirmation Key

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

Headers

Name
Type
Description

Authorization*

String

Request Body

Name
Type
Description

confirmEmailRequest*

Object

Specifies the key from the email. This needs to be in the format of { "key": "<6-digit-number>" }

{
    "code": 401,
    "message": "Invalid JWT."
}


Generate a Challenge for the User to Sign

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

Headers

Name
Type
Description

Authorization*

String

{
    "code": 401,
    "message": "Invalid JWT."
}

Submit a Signed Challenge

Confirms ownership of an Ethereum address.

Headers

Name
Type
Description

Authorization*

String

Request Body

Name
Type
Description

confirmEthereumRequest*

Object

This needs to be in the format of { "signature": "<signed_challenge_msg>" }

{
    "code": 401,
    "message": "Invalid JWT."
}


Get User's Other Accounts

GET {baseUrl}/v1/user/check-accounts

Retrieves other connected accounts of the authenticated user.

Headers

Name
Type
Description

Authorization*

String

{
    "otherAccounts": [
        {
            "type": "google",
            "login": "dimo_is_cool@gmail.com"
        }
    ]
}


Agree to Terms of Service

Sends a confirmation agreeing to the current Terms of Service.

Headers

Name
Type
Description

Authorization*

String

{
    "code": 401,
    "message": "Invalid JWT."
}

Submit a Referral Code

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

Headers

Name
Type
Description

Authorization*

String

Request Body

Name
Type
Description

submitReferralCodeRequest*

Object

This needs to be in the format of { "referralCode": "<6-digit-code>" }

{
    "code": 401,
    "message": "Invalid JWT."
}


Swagger Doc

Bearer authentication using the access_token generated from the .

PUT /v1/user

Bearer authentication using the access_token generated from the .

Bearer authentication using the access_token generated from the .

2FA Email Confirmation Flow

POST /v1/user/send-confirmation-email

Bearer authentication using the access_token generated from the .

POST /v1/user/confirm-email

Bearer authentication using the access_token generated from the .

Web3 User Auth Flow

POST /v1/user/web3/challenge/generate

Bearer authentication using the access_token generated from the .

POST /v1/user/web3/challenge/submit

Bearer authentication using the access_token generated from the .

Bearer authentication using the access_token generated from the .

Miscellaneous

POST /v1/user/agree-tos

Bearer authentication using the access_token generated from the .

POST /v1/user/submit-referral-code

Bearer authentication using the access_token generated from the .

{
    "countryCode": "USA",
    "email": {
        "address": "dimo_is_cool@gmail.com"
    },
    "web3": {
        "address": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
        "inApp": true
    }
}
🔐
🔐
🔐
🔐
{baseUrl}
{baseUrl}
{baseUrl}
{baseUrl}
{baseUrl}
{baseUrl}
{baseUrl}
{baseUrl}
Web3 challenge
Web3 challenge
Web3 challenge
Web3 challenge
Web3 challenge
Web3 challenge
Web3 challenge
Web3 challenge
Web3 challenge
Web3 challenge
Swagger UI
Logo