Developer Resources

API Documentation

Complete developer documentation for integrating with the Mentyx.ai lending platform. RESTful API, webhooks, SDKs, and code examples.

REST
API Architecture
OAuth 2.0
Authentication
JSON
Request/Response

Quick Start Guide

Get up and running with the Mentyx API in minutes

1

Get Your API Key

Request access to the Mentyx API and receive your authentication credentials.

Request Access →
2

Make Your First Request

Test the API with a simple GET request to verify your credentials work.

curl https://api.mentyx.ai/v1/health \ -H "Authorization: Bearer YOUR_API_KEY"
3

Explore the Endpoints

Browse our comprehensive endpoint documentation and start building your integration.

View Endpoints →

Authentication

Secure your API requests with OAuth 2.0

OAuth 2.0 Bearer Token

All API requests must include a valid bearer token in the Authorization header. Tokens are issued per environment (sandbox/production) and should be kept secure.

1. Request API Credentials

Contact our team to receive your client ID and secret for the sandbox environment.

2. Exchange for Access Token

Use your credentials to obtain a bearer token via the /oauth/token endpoint.

3. Include in All Requests

Add the Authorization header with your bearer token to every API call.

Authentication Example POST
POST /oauth/token
Content-Type: application/json

{
  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "grant_type": "client_credentials"
}

Response:
{
  "access_token": "eyJhbGciOiJIUzI1NiIs...",
  "token_type": "bearer",
  "expires_in": 3600
}
Using the Token
GET /v1/applications
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Content-Type: application/json

API Endpoints

Complete reference for all available endpoints

POST /v1/applications
Create a new loan application

Request Body

{
  "borrower": {
    "firstName": "Sarah",
    "lastName": "Chen",
    "email": "sarah@example.com",
    "phone": "+1-555-123-4567",
    "ssn": "XXX-XX-1234"
  },
  "property": {
    "address": "123 Main St",
    "city": "Austin",
    "state": "TX",
    "zipCode": "78701",
    "propertyType": "single_family"
  },
  "loanDetails": {
    "loanAmount": 250000,
    "loanType": "fix_and_flip",
    "purchasePrice": 350000,
    "rehabBudget": 75000,
    "arv": 525000
  }
}

Response (201 Created)

{
  "id": "app_1a2b3c4d5e6f",
  "status": "submitted",
  "borrower": {
    "id": "bwr_9z8y7x6w5v4u",
    "firstName": "Sarah",
    "lastName": "Chen",
    "email": "sarah@example.com"
  },
  "loanDetails": {
    "loanAmount": 250000,
    "loanType": "fix_and_flip",
    "ltv": 71.43,
    "ltc": 86.67
  },
  "createdAt": "2024-01-15T10:30:00Z",
  "updatedAt": "2024-01-15T10:30:00Z"
}
GET /v1/applications/{id}
Retrieve an application by ID

Path Parameters

id string Application ID (e.g., app_1a2b3c4d5e6f)

Response (200 OK)

{
  "id": "app_1a2b3c4d5e6f",
  "status": "underwriting",
  "borrower": { ... },
  "property": { ... },
  "loanDetails": { ... },
  "underwriting": {
    "riskScore": 42,
    "ltv": 71.43,
    "dscr": null,
    "creditScore": 720
  },
  "timeline": [
    {
      "status": "submitted",
      "timestamp": "2024-01-15T10:30:00Z"
    },
    {
      "status": "underwriting",
      "timestamp": "2024-01-15T14:22:00Z"
    }
  ]
}
GET /v1/applications
List all applications with optional filters

Query Parameters

status string Filter by status: submitted, underwriting, approved, declined
limit integer Number of results per page (default: 20, max: 100)
offset integer Pagination offset (default: 0)
createdAfter datetime Filter applications created after this date (ISO 8601)

Response (200 OK)

{
  "data": [
    {
      "id": "app_1a2b3c4d5e6f",
      "status": "approved",
      "borrower": { ... },
      "loanAmount": 250000
    },
    ...
  ],
  "pagination": {
    "total": 145,
    "limit": 20,
    "offset": 0,
    "hasMore": true
  }
}
PATCH /v1/applications/{id}
Update an existing application

Request Body (Partial Update)

{
  "loanDetails": {
    "rehabBudget": 85000,
    "arv": 550000
  }
}

Response (200 OK)

{
  "id": "app_1a2b3c4d5e6f",
  "status": "underwriting",
  "loanDetails": {
    "loanAmount": 250000,
    "rehabBudget": 85000,
    "arv": 550000,
    "ltc": 88.33
  },
  "updatedAt": "2024-01-15T16:45:00Z"
}
POST /v1/borrowers
Create a new borrower profile
GET /v1/borrowers/{id}
Retrieve borrower details and loan history
POST /v1/documents/upload
Upload documents for an application
GET /v1/documents/{id}
Retrieve document metadata and download URL
POST /v1/underwriting/analyze
Run AI underwriting analysis on an application
GET /v1/underwriting/{applicationId}
Get underwriting results and risk scores
POST /v1/webhooks
Register a webhook endpoint

Request Body

{
  "url": "https://yourdomain.com/webhooks",
  "events": [
    "application.created",
    "application.approved",
    "application.declined",
    "document.uploaded"
  ],
  "description": "Production webhook endpoint"
}

Webhook Payload Example

POST https://yourdomain.com/webhooks
Content-Type: application/json
X-Mentyx-Signature: sha256=abc123...

{
  "event": "application.approved",
  "timestamp": "2024-01-15T14:30:00Z",
  "data": {
    "applicationId": "app_1a2b3c4d5e6f",
    "borrowerName": "Sarah Chen",
    "loanAmount": 250000,
    "approvalTerms": {
      "rate": 9.5,
      "term": 12,
      "ltv": 71.43
    }
  }
}

Official SDKs

Pre-built libraries to accelerate your integration

JavaScript / Node.js

Official JavaScript SDK with TypeScript support for Node.js and browser environments.

npm install @mentyx/sdk
View Documentation →

Python

Python SDK with async support and comprehensive type hints for modern Python applications.

pip install mentyx-sdk
View Documentation →

.NET / C#

Fully async .NET SDK with strong typing and LINQ support for enterprise .NET applications.

dotnet add package Mentyx.SDK
View Documentation →

Quick Example (JavaScript)

import { Mentyx } from '@mentyx/sdk';

const mentyx = new Mentyx({
  apiKey: process.env.MENTYX_API_KEY
});

// Create a new application
const application = await mentyx.applications.create({
  borrower: {
    firstName: 'Sarah',
    lastName: 'Chen',
    email: 'sarah@example.com'
  },
  property: {
    address: '123 Main St',
    city: 'Austin',
    state: 'TX',
    zipCode: '78701'
  },
  loanDetails: {
    loanAmount: 250000,
    loanType: 'fix_and_flip',
    purchasePrice: 350000
  }
});

console.log('Application created:', application.id);
from mentyx import Mentyx

mentyx = Mentyx(api_key=os.environ['MENTYX_API_KEY'])

# Create a new application
application = mentyx.applications.create(
    borrower={
        'firstName': 'Sarah',
        'lastName': 'Chen',
        'email': 'sarah@example.com'
    },
    property={
        'address': '123 Main St',
        'city': 'Austin',
        'state': 'TX',
        'zipCode': '78701'
    },
    loan_details={
        'loanAmount': 250000,
        'loanType': 'fix_and_flip',
        'purchasePrice': 350000
    }
)

print(f'Application created: {application.id}')
using Mentyx.SDK;

var mentyx = new Mentyx(
    apiKey: Environment.GetEnvironmentVariable("MENTYX_API_KEY")
);

// Create a new application
var application = await mentyx.Applications.CreateAsync(new CreateApplicationRequest
{
    Borrower = new Borrower
    {
        FirstName = "Sarah",
        LastName = "Chen",
        Email = "sarah@example.com"
    },
    Property = new Property
    {
        Address = "123 Main St",
        City = "Austin",
        State = "TX",
        ZipCode = "78701"
    },
    LoanDetails = new LoanDetails
    {
        LoanAmount = 250000,
        LoanType = LoanType.FixAndFlip,
        PurchasePrice = 350000
    }
});

Console.WriteLine($"Application created: {application.Id}");

Error Codes

Common error responses and how to handle them

400

Bad Request

Invalid request parameters or malformed JSON. Check the error message for specific field validation errors.

401

Unauthorized

Invalid or missing API key. Ensure your Authorization header includes a valid bearer token.

403

Forbidden

Valid credentials but insufficient permissions for the requested resource or action.

404

Not Found

The requested resource does not exist. Verify the resource ID in your request.

429

Rate Limit Exceeded

Too many requests. Default limit is 100 requests/minute. Check the Retry-After header.

500

Server Error

Internal server error. Contact support if the issue persists with your request ID.

Error Response Format

{
  "error": {
    "type": "validation_error",
    "message": "Invalid request parameters",
    "code": "INVALID_LOAN_AMOUNT",
    "fields": {
      "loanAmount": "Must be between $50,000 and $5,000,000"
    },
    "requestId": "req_abc123xyz",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Developer Support

Get help from our technical team via email or dedicated Slack channel for enterprise customers.

developers@mentyx.ai

Changelog

Stay updated with API changes, new features, and deprecation notices in our changelog.

View Changelog →

Status Page

Check real-time API status, uptime history, and subscribe to incident notifications.

status.mentyx.ai →

Ready to Start Building?

Request API access and start integrating with Mentyx today