curl https://api.v2.dealmachine.com/v1/account \
-H "Authorization: Bearer dm_sk_live_xxx"
const response = await fetch('https://api.v2.dealmachine.com/v1/account', {
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const { data } = await response.json();
console.log(data.organization.name);
import requests
response = requests.get(
'https://api.v2.dealmachine.com/v1/account',
headers={'Authorization': f'Bearer {api_key}'}
)
data = response.json()['data']
print(data['organization']['name'])
{
"data": {
"organization": {
"id": 1,
"name": "My Company",
"createdAt": "2024-01-01T00:00:00.000Z"
},
"user": {
"id": null,
"authType": "api_key"
},
"plan": {
"name": "Basic",
"enrichment_credit_cap": 30000,
"total_enrichment_credit_cap": 30000,
"total_enrichment_credit_available": 29998,
"monthly_enrichment_credit_cap": 30000,
"additional_enrichment_credit_balance": 0,
"is_paid": true,
"billing_cycle_start": "2024-01-01T00:00:00.000Z",
"billing_cycle_end": "2024-02-01T00:00:00.000Z"
}
}
}
{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key",
"request_id": "req_abc123"
}
}
Account
Get Account
GET
/
v1
/
account
curl https://api.v2.dealmachine.com/v1/account \
-H "Authorization: Bearer dm_sk_live_xxx"
const response = await fetch('https://api.v2.dealmachine.com/v1/account', {
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const { data } = await response.json();
console.log(data.organization.name);
import requests
response = requests.get(
'https://api.v2.dealmachine.com/v1/account',
headers={'Authorization': f'Bearer {api_key}'}
)
data = response.json()['data']
print(data['organization']['name'])
{
"data": {
"organization": {
"id": 1,
"name": "My Company",
"createdAt": "2024-01-01T00:00:00.000Z"
},
"user": {
"id": null,
"authType": "api_key"
},
"plan": {
"name": "Basic",
"enrichment_credit_cap": 30000,
"total_enrichment_credit_cap": 30000,
"total_enrichment_credit_available": 29998,
"monthly_enrichment_credit_cap": 30000,
"additional_enrichment_credit_balance": 0,
"is_paid": true,
"billing_cycle_start": "2024-01-01T00:00:00.000Z",
"billing_cycle_end": "2024-02-01T00:00:00.000Z"
}
}
}
{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key",
"request_id": "req_abc123"
}
}
Get your organization info and authentication details. Works with both API keys and OAuth tokens.
curl https://api.v2.dealmachine.com/v1/account \
-H "Authorization: Bearer dm_sk_live_xxx"
const response = await fetch('https://api.v2.dealmachine.com/v1/account', {
headers: {
Authorization: `Bearer ${apiKey}`,
},
});
const { data } = await response.json();
console.log(data.organization.name);
import requests
response = requests.get(
'https://api.v2.dealmachine.com/v1/account',
headers={'Authorization': f'Bearer {api_key}'}
)
data = response.json()['data']
print(data['organization']['name'])
{
"data": {
"organization": {
"id": 1,
"name": "My Company",
"createdAt": "2024-01-01T00:00:00.000Z"
},
"user": {
"id": null,
"authType": "api_key"
},
"plan": {
"name": "Basic",
"enrichment_credit_cap": 30000,
"total_enrichment_credit_cap": 30000,
"total_enrichment_credit_available": 29998,
"monthly_enrichment_credit_cap": 30000,
"additional_enrichment_credit_balance": 0,
"is_paid": true,
"billing_cycle_start": "2024-01-01T00:00:00.000Z",
"billing_cycle_end": "2024-02-01T00:00:00.000Z"
}
}
}
{
"error": {
"code": "invalid_api_key",
"message": "Invalid API key",
"request_id": "req_abc123"
}
}
Response Fields
| Field | Type | Description |
|---|---|---|
data.organization.id | number | Organization ID |
data.organization.name | string | Organization name |
data.organization.createdAt | string | ISO 8601 creation timestamp |
data.user.id | number | null | User ID (null for API key auth) |
data.user.authType | string | api_key or oauth |
data.plan.name | string | Plan name |
data.plan.enrichment_credit_cap | number | Monthly data credit cap |
data.plan.total_enrichment_credit_cap | number | Total current-cycle capacity, including additional credits |
data.plan.total_enrichment_credit_available | number | Total spendable data credits remaining in the current cycle |
data.plan.monthly_enrichment_credit_cap | number | Monthly data credit cap |
data.plan.additional_enrichment_credit_balance | number | Additional credits available after monthly credits are used |
data.plan.is_paid | boolean | Whether the plan is paid |
data.plan.billing_cycle_start | string | ISO 8601 billing cycle start |
data.plan.billing_cycle_end | string | ISO 8601 billing cycle end |
total_enrichment_credit_available is the live remaining balance, not the plan cap. It reconciles
current reservations with recorded credit usage, using the same balance calculation as the Usage
endpoint and DealMachine app.When authenticated with an API key,
user.id is null because API keys are organization-level,
not user-level. OAuth tokens include the user ID of the person who authorized the token.⌘I