Welcome to the Mextyl Developer Platform
The Mextyl API gives you full programmatic access to your CRM, deal sourcing pipeline, cap table and LP portal. All responses are JSON, authentication is handled via OAuth2 / Bearer API keys, and every endpoint mirrors a permissioned MCP tool.
https://mcp.mextyl.com/v1https://mock-api.mextyl.com/v1 — no real credentials required, always returns valid static responses.Register a free developer account, create your first app, and grab your API credentials from your Developer Portal.
- Quickstart Guide — register, create an app, make your first call
- OAuth 2.0 Workflow — Authorization Code & Client Credentials
- REST Resources — all available API categories
- MCP Tools — connect Claude Desktop or ChatGPT directly
- Webhooks — get notified in real time
Authentication
Two authentication modes are supported:
- API Key (recommended for server-side scripts) — Header
Authorization: Bearer sk_live_xxx - OAuth2 / PKCE (recommended for third-party apps) —
authorization_codeorclient_credentialsflow, see OAuth 2.0
curl https://mcp.mextyl.com/v1/crm/contacts \
-H "Authorization: Bearer sk_live_51Hxxx"
crm_readonly) is re-checked on every request. If their role changes, you may start receiving 403 insufficient_scope for previously working calls.Quickstart Guide
Register for our developer portal and create your Sandbox app to start building against Mextyl's API in minutes.
1. Register for the Developer Portal
Sign in with your existing Mextyl account on the Developer Portal — your developer account is automatically linked to your workspace, no separate signup required. You'll land on My Apps, where every application you register appears with its status (Draft, Sandbox, Pending Review, Production).
2. Create your first app
From My Apps, click + New App and fill out:
- Name — shown to end users when they authorize access
- Description — what your app does
- Company name
- Homepage URL
- Redirect URIs — one or more callback URLs for the Authorization Code flow
- Tool Access — the specific Mextyl tools/endpoints your app can call over REST
3. Save your API credentials
| Field | Description |
|---|---|
client_id | The public, unique identifier of your OAuth app. |
client_secret | Shown only once — copy it immediately and store it securely. Never expose it client-side. |
client_secret like a password. If it leaks, regenerate it immediately from the app details page.4. Test in Sandbox
Every new app starts in Sandbox mode, pointed at https://mock-api.mextyl.com. It behaves identically to production (same OAuth flow, same response shapes) but returns realistic fake data — safe to experiment with, no real workspace data required.
curl --request POST \
--url https://mock-api.mextyl.com/v1/sandbox/token
curl --request GET \
--url https://mock-api.mextyl.com/v1/crm/deals \
--header 'Authorization: Bearer mxt_sandbox_xxx'
const res = await fetch('https://mock-api.mextyl.com/v1/crm/deals', {
headers: { Authorization: `Bearer ${process.env.MEXTYL_API_KEY}` }
});
const data = await res.json();
console.log(data);
import requests
resp = requests.get(
"https://mock-api.mextyl.com/v1/crm/deals",
headers={"Authorization": f"Bearer {API_KEY}"}
)
print(resp.json())
5. Next steps
- Read the OAuth Workflow guide to implement Authorization Code or Client Credentials in production.
- Browse REST Resources for every endpoint and MCP tool.
- Subscribe to Webhooks to react to events in real time.
- When ready, follow Migrate to Production.
Rate Limits & Errors
Mextyl rate-limits API access to maintain platform stability. Every response includes headers so you can monitor usage and avoid 429 errors.
| Environment | Per second | Per minute |
|---|---|---|
| Sandbox | 5 req/s | 150 req/min |
| Production | 10 req/s | 300 req/min |
RateLimit-Limit: 10
RateLimit-Remaining: 9
RateLimit-Reset: 1
X-RateLimit-Limit-Minute: 300
X-RateLimit-Remaining-Minute: 299
| Header | Description |
|---|---|
RateLimit-Limit | Max requests allowed per second. |
RateLimit-Remaining | Requests remaining in the current second. |
RateLimit-Reset | Seconds until the limit resets. |
X-RateLimit-Limit-Minute | Max requests allowed per minute. |
X-RateLimit-Remaining-Minute | Requests remaining this minute. |
429 Too Many Requests with {"error":{"code":"rate_limited"}}. Implement exponential backoff before retrying.HTTP status codes
| Code | Meaning |
|---|---|
200 | OK — request succeeded. |
201 | Created — resource successfully created. |
400 | Bad Request — malformed syntax or missing required field. |
401 | Unauthorized — missing, expired or invalid access token. |
403 | Forbidden — token lacks the required scope, or the tool requires human approval. |
404 | Not Found — resource does not exist or you lack access. |
409 | Conflict — resource already exists / concurrent modification. |
422 | Unprocessable Entity — validation failed. |
429 | Too Many Requests — rate limit exceeded. |
500 | Internal Server Error. |
503 | Service Unavailable — check status.mextyl.com. |
Error Response Shape
Every error follows the same JSON envelope:
{
"error": {
"code": "insufficient_scope",
"message": "Your token is missing the 'readwrite_crm_deals' scope.",
"request_id": "req_7f1c2a"
}
}
Reason codes
| Code | Status | Meaning |
|---|---|---|
missing_or_invalid_token | 401 | Token is missing, expired, revoked, or malformed. |
insufficient_scope | 403 | Token lacks the scope required for this endpoint. |
access_to_resource_restricted | 403 | The authorizing user did not grant access to this resource. |
requires_approval | 403 | Tool flagged requiresApproval — needs human-in-the-loop confirmation. |
rate_limited | 429 | Too many requests. |
internal_error | 500 | Unexpected server error — retry with backoff. |
Using Mextyl's OAuth Workflow
Mextyl's API uses the OAuth 2.0 open specification to authorize access to our data, supporting both Authorization Code and Client Credentials grant types.
| Scenario | Use this flow |
|---|---|
| Your app acts on behalf of a Mextyl user (e.g. a portfolio-monitoring SaaS reading a specific fund's data) | authorization_code |
| Your app accesses only your own firm's data, no third-party user involved (e.g. internal automation script) | client_credentials |
Authorization Code Flow
This flow requires explicit permission from the Mextyl user prior to your app being granted access.
1. Redirect the user to Mextyl
GET https://mcp.mextyl.com/oauth/authorize
?response_type=code
&client_id={CLIENT_ID}
&redirect_uri={REDIRECT_URI}
&scope={SCOPES}
&state={STATE}
| Parameter | Description |
|---|---|
response_type | Always code. |
client_id | Your app's client ID. |
redirect_uri | Must exactly match one of the URIs registered for your app. |
scope | Space-delimited list of scopes (see Scopes Reference). |
state | An unguessable random string to protect against CSRF. |
2. Mextyl redirects back to your app
{REDIRECT_URI}?code={AUTHORIZATION_CODE}&state={STATE}
state matches the one you sent.3. Exchange the code for an access token
POST https://mcp.mextyl.com/oauth/token
Authorization: Basic {BASE64(client_id:client_secret)}
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
&code={AUTHORIZATION_CODE}
&redirect_uri={REDIRECT_URI}
{
"access_token": "mxt_at_xxx",
"expires_in": 3600,
"refresh_token": "mxt_rt_xxx",
"scope": "read_crm_contacts read_deal_sourcing",
"token_type": "Bearer"
}
4. Call the API
curl --request GET \
--url https://mcp.mextyl.com/v1/crm/contacts \
--header 'Authorization: Bearer mxt_at_xxx'
Refresh Token Flow
Use this to obtain a new access token without re-prompting the user. Each refresh also rotates the refresh token.
POST https://mcp.mextyl.com/oauth/token
Authorization: Basic {BASE64(client_id:client_secret)}
Content-Type: application/x-www-form-urlencoded
grant_type=refresh_token
&refresh_token={REFRESH_TOKEN}
Client Credentials Flow
Use this when your app only needs access to your own firm's data, with no third-party user in the loop.
POST https://mcp.mextyl.com/oauth/token
Authorization: Basic {BASE64(client_id:client_secret)}
Content-Type: application/x-www-form-urlencoded
grant_type=client_credentials
&scope={SCOPES}
{
"access_token": "mxt_at_xxx",
"expires_in": 3600,
"scope": "read_crm_contacts readwrite_deal_sourcing",
"token_type": "Bearer"
}
Revoking a Token
POST https://mcp.mextyl.com/oauth/revoke
Authorization: Basic {BASE64(client_id:client_secret)}
Content-Type: application/x-www-form-urlencoded
token={TOKEN}
&token_type_hint=access_token
OpenID Connect (OIDC)
Request the openid, profile, and email scopes to receive an id_token alongside your access token, containing basic user claims.
GET https://mcp.mextyl.com/.well-known/openid-configuration
Endpoint Summary
| Key | Value |
|---|---|
| API Base URL | https://mcp.mextyl.com/v1/<endpoint> |
| Sandbox Base URL | https://mock-api.mextyl.com/v1/<endpoint> |
| Authorize Endpoint | https://mcp.mextyl.com/oauth/authorize |
| Token Endpoint | https://mcp.mextyl.com/oauth/token |
| Revoke Endpoint | https://mcp.mextyl.com/oauth/revoke |
| UserInfo Endpoint | https://mcp.mextyl.com/oauth/userinfo |
| OIDC Discovery | https://mcp.mextyl.com/.well-known/openid-configuration |
| Access Token TTL | 1 hour |
| Refresh Token TTL | 14 days |
| Auth Code TTL | 60 seconds |
User & OpenID Scopes
| Scope | Description |
|---|---|
read_user_info | Read the authorizing user's id, name, email. |
openid | OIDC — enables the id_token in the token response. |
profile | OIDC — includes name/picture claims in id_token. |
email | OIDC — includes email claims in id_token. |
Risk Levels & Approval
Every scope maps to one or more MCP tools carrying a risk level. Tools flagged requiresApproval: true will return 403 requires_approval over REST until a human approves the action from the Mextyl workspace UI — this cannot be bypassed via the API by design.
| Risk level | Example actions |
|---|---|
read | Listing, fetching records. |
medium | Creating/updating a deal, contact, interaction. |
legal | Generating or signing legal documents (LOI, e-sign). |
critical | Closing a transaction, deleting records, issuing capital calls. |
Claude Desktop Setup
Add Mextyl to your Claude Desktop configuration file:
{
"mcpServers": {
"mextyl": {
"url": "https://mcp.mextyl.com",
"auth": {
"type": "oauth2",
"client_id": "your_client_id"
}
}
}
}
Tools Catalog
Loading tool categories…
Explore the full catalogPermissions & Scopes
Each tool has a risk level (read, medium, legal, critical) and may require human approval (requiresApproval). Configure per-tool permissions from your console.
Webhooks
Subscribe to real-time events pushed to your endpoint whenever data changes in a workspace your app has been authorized on — no polling required.
Available Event Types
| Event | Category | Fired when… |
|---|---|---|
crm.deal.stage_changed | CRM | A deal moves to a new pipeline stage. |
crm.contact.created | CRM | A new contact is created. |
deal_sourcing.submission.created | Deal Sourcing | A new inbound deal submission is received. |
cap_table.grant.issued | Cap Table | A new equity grant is issued for a portfolio company. |
cap_table.valuation.finalized | Cap Table | A 409A valuation is finalized. |
lp_portal.commitment.created | LP Portal | A new LP commitment is recorded. |
lp_portal.capital_call.issued | LP Portal | A capital call notice is issued to LPs. |
lp_portal.distribution.paid | LP Portal | A distribution is marked as paid. |
Setting up a Webhook
- Register an endpoint — add an HTTPS URL and select event types.
- Store your signing secret — Mextyl generates a unique
whsec_...secret per webhook. Use it to verify payload authenticity. - Return a 2xx quickly — acknowledge receipt within 5 seconds by returning any 2xx status. Process the payload asynchronously afterward.
Payload Structure
{
"id": "evt_8f2c1a90",
"type": "crm.deal.stage_changed",
"created_at": "2026-05-14T10:32:00Z",
"enterprise_id": "ent_4471",
"data": {
"deal_id": "deal_9931",
"previous_stage": "screening",
"new_stage": "due_diligence"
}
}
Verifying the Signature
Every request includes an X-Mextyl-Signature header: an HMAC-SHA256 hex digest of the raw request body, signed with your webhook secret.
const crypto = require('crypto');
function verifyMextylSignature(rawBody, signatureHeader, secret) {
const expected = crypto
.createHmac('sha256', secret)
.update(rawBody)
.digest('hex');
return crypto.timingSafeEqual(
Buffer.from(expected),
Buffer.from(signatureHeader)
);
}
Retry Policy
| Attempt | Delay after previous failure |
|---|---|
| 1 | Immediate |
| 2 | 30 seconds |
| 3 | 5 minutes |
| 4 | 30 minutes |
| 5 (final) | 4 hours |
failed and no longer retried. Delivery logs remain visible for 30 days in your app's Webhooks tab.Using Postman with Mextyl's API
Import our pre-configured Postman collection and let Postman handle the OAuth token exchange for you.
1. Download the collection
Generate the collection locally against the live gateway:
node scripts/generate-postman.js --url=https://mcp.mextyl.com
This writes api-artifacts/mextyl-api.postman_collection.json and api-artifacts/openapi.json. Or fetch it directly:
curl -o mextyl-api.postman_collection.json \
https://mcp.mextyl.com/v1/postman-collection.json
Import into Postman
- Import the file — open Postman → Import → Upload Files → select
mextyl-api.postman_collection.json. - Confirm collection name — you'll see "Mextyl API" appear in your Collections sidebar, organized by category (CRM, Deal Sourcing, Cap Table, LP Portal).
Configure OAuth 2.0 in the Collection
Click the collection root → Authorization tab → set:
| Field | Value |
|---|---|
| Grant Type | Authorization Code (or Client Credentials) |
| Auth URL | https://mcp.mextyl.com/oauth/authorize |
| Access Token URL | https://mcp.mextyl.com/oauth/token |
| Client ID | Your app's client_id |
| Client Secret | Your app's client_secret |
| Scope | Space-delimited list, e.g. read_crm_contacts read_crm_deals |
| Callback URL | https://oauth.pstmn.io/v1/callback |
https://oauth.pstmn.io/v1/callback is registered as one of your app's Redirect URIs before requesting a token.Get a New Access Token
Click Get New Access Token. A browser window opens for you to authenticate. Once authorized, Postman redirects back and shows Authentication complete. Click Use Token.
Testing Against the Mock Environment
To skip auth entirely and use static mock data, edit the collection's baseUrl variable:
baseUrl = https://mock-api.mextyl.com
No authentication is required against the mock environment — any string works as a Bearer token.
Send a Request
Open any endpoint in the collection, set its Authorization tab to Inherit auth from parent, and click Send. You'll see the live response in Postman's Body panel.
Migrate to Production
Pre-requisites and checklist before promoting your app from Sandbox to Live traffic against real Mextyl workspace data.
Requirements
- Fully developed and tested integration in the Sandbox environment (
mock-api.mextyl.com). - Documented rollout plan and expected API traffic volume (requests/day, peak req/s).
- If your app is externally-facing, incorporate approved Mextyl branding assets (logo, "Built with Mextyl" badge).
- Webhook endpoint (if used) publicly reachable over HTTPS with a valid certificate.
- A short demo (video or live walkthrough) of the full integration flow and end-user experience.
Promotion Checklist
- Review app details — from My Apps → your app → Actions → Promote to Production, review name, description, redirect URIs, and requested tool access one final time.
- Submit for review — click Submit for Review. Your app moves to
Pending Reviewstatus. The Mextyl team typically reviews within 1–2 business days. - Receive approval — upon approval, your app's status becomes
Productionand it can now request real user authorization againstmcp.mextyl.com. - Rotate credentials if needed — Production apps receive a fresh
client_id/client_secretpair, distinct from your Sandbox app. Update your environment variables accordingly. - Run an internal smoke test — before fully launching, run a small round of internal testing in Production with a real (non-sensitive) account to confirm the full OAuth + API flow behaves as expected.
After Launch
- Monitor the
RateLimit-*headers on your production traffic and set up alerting before you approach quota. - Subscribe to updates on API changes to catch breaking changes ahead of time.
- Keep a webhook health check — Mextyl disables webhook endpoints automatically after 7 consecutive days of delivery failures.
JavaScript / Node SDK
npm install @mextyl/sdk
Python SDK
pip install mextyl