API Documentation

Current Version: v1.0 | Updated: March 25, 2025

Introduction

The Axiom API allows you to programmatically access and manipulate your data, automate workflows, and integrate Axiom with other systems. Our RESTful API provides secure access to contacts, properties, campaigns, and analytics data.

Base URL

All API requests should be made to:

https://api.axiom-console.com/v1

The API requires an API key for authentication. All requests must be made over HTTPS to ensure data security.

Authentication

To authenticate API requests, you need to include your API key in the request headers. You can generate API keys in your Axiom account under Account Settings > API > API Keys.

API Key Authentication

Include your API key in the request header:

X-Axiom-API-Key: your_api_key_here

Example Request

curl -X GET "https://api.axiom-console.com/v1/contacts" \
     -H "X-Axiom-API-Key: your_api_key_here" \
     -H "Content-Type: application/json"
const axios = require('axios');

const getContacts = async () => {
  try {
    const response = await axios.get('https://api.axiom-console.com/v1/contacts', {
      headers: {
        'X-Axiom-API-Key': 'your_api_key_here',
        'Content-Type': 'application/json'
      }
    });
    console.log(response.data);
    return response.data;
  } catch (error) {
    console.error('Error fetching contacts:', error);
  }
};
import requests

def get_contacts():
    url = "https://api.axiom-console.com/v1/contacts"
    headers = {
        "X-Axiom-API-Key": "your_api_key_here",
        "Content-Type": "application/json"
    }
    
    response = requests.get(url, headers=headers)
    
    if response.status_code == 200:
        return response.json()
    else:
        print(f"Error: {response.status_code}")
        print(response.text)
function getContacts() {
    $url = 'https://api.axiom-console.com/v1/contacts';
    $headers = [
        'X-Axiom-API-Key: your_api_key_here',
        'Content-Type: application/json'
    ];
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    
    curl_close($ch);
    
    if ($httpCode == 200) {
        return json_decode($response, true);
    } else {
        echo "Error: " . $httpCode . "\n";
        echo $response;
    }
}

Security Notice: Keep your API key secure and never share it in client-side code or public repositories.

Rate Limits

To ensure optimal performance for all users, the Axiom API implements rate limiting. Rate limits vary based on your plan.

Plan Rate Limit Burst Capacity
Starter 60 requests/minute 100 requests
Professional 120 requests/minute 200 requests
Enterprise 300 requests/minute 500 requests

Each response includes rate limit information in the headers:

X-RateLimit-Limit: 60 X-RateLimit-Remaining: 58 X-RateLimit-Reset: 1603123456

If you exceed the rate limit, you'll receive a 429 "Too Many Requests" response. The response will include a Retry-After header indicating how long to wait before making another request.

Error Handling

The Axiom API uses standard HTTP status codes to indicate success or failure of API requests. In case of an error, additional information is provided in the response body.

HTTP Status Codes

Status Code Description
200 - OK Request succeeded
201 - Created Resource created successfully
400 - Bad Request Invalid request parameters
401 - Unauthorized Authentication failed or not provided
403 - Forbidden Authorized but access denied
404 - Not Found Resource not found
429 - Too Many Requests Rate limit exceeded
500 - Server Error Server-side error occurred

Error Response Format

When an error occurs, the response body contains detailed information:

{
  "error": {
    "code": "invalid_parameter",
    "message": "The parameter 'email' is invalid",
    "details": {
      "field": "email",
      "reason": "invalid_format"
    },
    "documentation_url": "https://api.axiom-console.com/docs/errors#invalid_parameter"
  }
}

Contacts API

The Contacts API allows you to manage your contacts database, including creating, retrieving, updating, and deleting contact records.

Endpoints

GET
/contacts
List all contacts with pagination
GET
/contacts/{contact_id}
Get a specific contact
POST
/contacts
Create a new contact
PUT
/contacts/{contact_id}
Update an existing contact
DELETE
/contacts/{contact_id}
Delete a contact

List Contacts

Retrieve a paginated list of contacts in your account.

Request

GET /contacts
Query Parameters
Parameter Type Required Description
page integer No Page number (default: 1)
limit integer No Results per page (default: 20, max: 100)
sort string No Sort field (e.g., "created_at", "name")
order string No Sort order: "asc" or "desc" (default: "desc")
search string No Search query for filtering results

Response

{
  "data": [
    {
      "id": "cnt_12345",
      "name": "John Smith",
      "email": "john.smith@example.com",
      "phone": "+11234567890",
      "company": "Acme Real Estate",
      "type": "client",
      "status": "active",
      "tags": ["buyer", "residential"],
      "custom_fields": {
        "preferred_location": "Downtown",
        "budget": "$500k-$750k"
      },
      "created_at": "2025-01-15T10:30:45Z",
      "updated_at": "2025-03-10T15:22:18Z"
    },
    // More contacts...
  ],
  "meta": {
    "current_page": 1,
    "total_pages": 12,
    "total_count": 235,
    "per_page": 20
  },
  "links": {
    "self": "https://api.axiom-console.com/v1/contacts?page=1&limit=20",
    "next": "https://api.axiom-console.com/v1/contacts?page=2&limit=20",
    "prev": null
  }
}

Create Contact

Add a new contact to your account.

Request

POST /contacts
Request Body
{
  "name": "Jane Doe",
  "email": "jane.doe@example.com",
  "phone": "+11235550199",
  "company": "Premier Properties",
  "type": "lead",
  "status": "new",
  "tags": ["seller", "commercial"],
  "custom_fields": {
    "property_type": "Office Space",
    "property_size": "2000-5000 sqft"
  }
}

Response

{
  "data": {
    "id": "cnt_67890",
    "name": "Jane Doe",
    "email": "jane.doe@example.com",
    "phone": "+11235550199",
    "company": "Premier Properties",
    "type": "lead",
    "status": "new",
    "tags": ["seller", "commercial"],
    "custom_fields": {
      "property_type": "Office Space",
      "property_size": "2000-5000 sqft"
    },
    "created_at": "2025-04-01T08:15:30Z",
    "updated_at": "2025-04-01T08:15:30Z"
  }
}

Properties API

The Properties API allows you to manage real estate listings and property information.

Endpoints

GET
/properties
List all properties with pagination
GET
/properties/{property_id}
Get a specific property
POST
/properties
Create a new property listing
PUT
/properties/{property_id}
Update a property listing
DELETE
/properties/{property_id}
Delete a property listing

Property Object

{
  "id": "prop_12345",
  "title": "Modern Downtown Condo",
  "description": "Spacious 2-bedroom condo with beautiful city views...",
  "address": {
    "street": "123 Main Street",
    "unit": "Apt 501",
    "city": "San Francisco",
    "state": "CA",
    "zip": "94105",
    "country": "USA",
    "latitude": 37.7749,
    "longitude": -122.4194
  },
  "property_type": "residential",
  "listing_type": "sale",
  "status": "active",
  "price": 750000,
  "currency": "USD",
  "bedrooms": 2,
  "bathrooms": 2,
  "square_feet": 1200,
  "amenities": ["elevator", "parking", "gym", "pool"],
  "images": [
    {
      "id": "img_12345",
      "url": "https://example.com/images/property-12345-1.jpg",
      "is_primary": true
    },
    {
      "id": "img_12346",
      "url": "https://example.com/images/property-12345-2.jpg",
      "is_primary": false
    }
  ],
  "contact_id": "cnt_98765",
  "created_at": "2025-02-10T09:15:30Z",
  "updated_at": "2025-03-22T14:20:45Z"
}

Email Campaigns API

The Email Campaigns API allows you to create, manage, and track email marketing campaigns.

Endpoints

GET
/campaigns
List all campaigns
POST
/campaigns
Create a new campaign
GET
/campaigns/{campaign_id}
Get campaign details
POST
/campaigns/{campaign_id}/send
Send a campaign
GET
/campaigns/{campaign_id}/analytics
Get campaign analytics

For detailed examples of creating and managing email campaigns, refer to our Email Campaign Guide.

Analytics API

The Analytics API provides access to performance metrics for your business, contacts, properties, and marketing campaigns.

Endpoints

GET
/analytics/dashboard
Get overview dashboard metrics
GET
/analytics/contacts
Get contact growth and conversion metrics
GET
/analytics/properties
Get property performance metrics
GET
/analytics/emails
Get email marketing performance metrics

Example Response

{
  "data": {
    "timeframe": {
      "start": "2025-03-01T00:00:00Z",
      "end": "2025-03-31T23:59:59Z"
    },
    "leads": {
      "new": 128,
      "converted": 42,
      "conversion_rate": 32.8,
      "change": {
        "percent": 12.4,
        "direction": "up"
      }
    },
    "properties": {
      "active": 43,
      "sold": 15,
      "new": 21,
      "change": {
        "percent": 5.8,
        "direction": "up"
      }
    },
    "sales": {
      "volume": 1200000,
      "transactions": 12,
      "average": 100000,
      "change": {
        "percent": 22.3,
        "direction": "up"
      }
    },
    "emails": {
      "sent": 5432,
      "opened": 2280,
      "clicked": 983,
      "open_rate": 42.0,
      "click_rate": 18.1,
      "change": {
        "percent": 3.5,
        "direction": "up"
      }
    }
  }
}

Webhooks

Webhooks allow you to receive real-time notifications when events happen in your Axiom account.

Available Events

Event Type Description
contact.created A new contact has been created
contact.updated A contact has been updated
property.created A new property listing has been created
property.updated A property listing has been updated
property.status_changed A property status has changed (e.g., "active" to "sold")
campaign.sent An email campaign has been sent
email.opened An email has been opened
email.clicked A link in an email has been clicked

Managing Webhooks

You can manage webhooks through the API or in your Axiom dashboard under Settings > Webhooks.

POST
/webhooks
Create a new webhook
GET
/webhooks
List all webhooks
DELETE
/webhooks/{webhook_id}
Delete a webhook

Client Libraries

To simplify integration with the Axiom API, we provide official client libraries for popular programming languages.

JavaScript / Node.js

Official JavaScript SDK for Node.js and browser applications.

Python

Python SDK for server-side integrations.

PHP

PHP SDK for easy integration with PHP applications.

We're actively developing client libraries for Ruby, Java, and .NET. If you're interested in contributing to these libraries, check out our GitHub organization.

API Changelog

Stay updated on the latest API changes and improvements.

March 25, 2025
v1.0

Major Release: API v1.0

Addition

Added new Analytics API endpoints for comprehensive reporting

Addition

Added webhook support for real-time event notifications

Change

Improved authentication with API key in header

Deprecation

Deprecated API v1.0 (end-of-life: September 30, 2025)

January 15, 2025
v1.5

Feature Update: Enhanced Property Management

Addition

Added support for property analytics and performance tracking

Addition

Extended property object to include additional fields

Fix

Fixed pagination issues in property listing endpoint

API Coming Soon: Our API is currently under construction and will be available in Summer 2025. This documentation is for preview purposes only.