> ## Documentation Index
> Fetch the complete documentation index at: https://api.docs.dealmachine.com/llms.txt
> Use this file to discover all available pages before exploring further.

# API Reference

> Complete DealMachine API endpoint reference

The DealMachine API is organized around REST. All endpoints accept and return JSON.

## Base URL

```
https://api.v2.dealmachine.com/v1
```

## Authentication

All protected endpoints require a Bearer token in the `Authorization` header:

```bash theme={null}
curl https://api.v2.dealmachine.com/v1/account \
  -H "Authorization: Bearer dm_sk_live_xxx"
```

Two token types are supported:

| Token Type  | Format           | Access        |
| ----------- | ---------------- | ------------- |
| API Key     | `dm_sk_live_xxx` | Full access   |
| OAuth Token | `dm_at_live_xxx` | Scoped access |

## Request Format

* Content type: `application/json`
* All timestamps are ISO 8601 format
* IDs are integers or prefixed strings (e.g., `key_abc123`)

## Response Format

Search endpoints return results in a `data` array alongside a `pagination` object:

```json theme={null}
{
  "data": [
    {
      "dm_property_id": "prop_a1b2c3",
      "full_address": "1200 Barton Springs Rd, Austin, TX 78704",
      "address": "1200 Barton Springs Rd",
      "city": "Austin",
      "state": "TX",
      "zip": "78704",
      "latitude": 30.2598,
      "longitude": -97.7544,
      "images": {
        "street_view": "https://img.dealmachine.com/sv/30.2598,-97.7544.jpg",
        "satellite": "https://img.dealmachine.com/sat/30.2598,-97.7544.jpg",
        "roadmap": "https://img.dealmachine.com/map/30.2598,-97.7544.jpg"
      },
      "estimated_value": 575000,
      "equity_percent": 72,
      "bedrooms": 4,
      "contacts": [
        {
          "dm_person_id": "per_x1y2z3",
          "full_name": "John Smith",
          "phones": [
            { "number": "5125551234", "type": "wireless", "is_dnc": false }
          ],
          "match_status": "matched"
        }
      ]
    }
  ],
  "pagination": {
    "page": 1,
    "per_page": 25,
    "total_results": 1847,
    "total_pages": 74,
    "has_next_page": true,
    "has_previous_page": false
  }
}
```

See [Response Format](/concepts/response-format) for full details on always-included fields, field types, and pagination.

Error responses use a consistent structure:

```json theme={null}
{
  "error": {
    "code": "validation_error",
    "message": "Validation failed",
    "request_id": "req_abc123def456",
    "details": {
      "issues": [
        {
          "path": "filters[0].operator",
          "message": "Operator 'contains' is not allowed for NUMBER filter 'estimated_value'"
        }
      ]
    }
  }
}
```

## Response Headers

| Header         | Description                     |
| -------------- | ------------------------------- |
| `X-Request-Id` | Unique request ID for debugging |

## Endpoint Groups

| Group                                                     | Description                                                    |
| --------------------------------------------------------- | -------------------------------------------------------------- |
| [Authentication](/api-reference/auth/device-code)         | Device authorization flow for CLI and MCP                      |
| [OAuth](/api-reference/oauth/authorize)                   | OAuth 2.0 authorization code flow                              |
| [Account](/api-reference/account/get-account)             | Organization and user information                              |
| [Filters](/api-reference/filters/list-filters)            | Discover available search filters                              |
| [Fields](/api-reference/fields/list-fields)               | Discover available data fields                                 |
| [Properties](/api-reference/properties/search-properties) | Search and count properties                                    |
| [People](/api-reference/people/search-people)             | Search and count people/contacts                               |
| [Enrichment](/api-reference/enrichment/enrich-by-address) | Batch lookup by address, coordinates, APN, ID, email, or phone |

## Interactive Playground

Each endpoint page includes an interactive playground where you can test API calls directly in your browser. Enter your API key and try the endpoints in real time.
