📚 DatomniX Documentation

← Back to Index

DatomniX API Documentation

Version: 1.0.0
Base URL: https://your-api.railway.app
Authentication: Bearer JWT Token
Format: JSON

---

Table of Contents

1. Authentication
2. Core Resources
3. Attribution & Analytics
4. Integrations
5. Email Templates (Super Admin)
6. Error Handling
7. Rate Limits
8. Webhooks

---

Authentication

Register


POST /auth/register
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "SecurePassword123",
  "firstName": "John",
  "lastName": "Doe"
}

Response:

{
  "user": {
    "id": "uuid",
    "email": "user@example.com",
    "firstName": "John",
    "lastName": "Doe"
  },
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "message": "Registration successful. Please verify your email."
}

Login


POST /auth/login
Content-Type: application/json

{
  "email": "user@example.com",
  "password": "SecurePassword123"
}

Response:

{
  "user": {
    "id": "uuid",
    "email": "user@example.com",
    "isSuperAdmin": false
  },
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}

Using Authentication


Include the JWT token in all subsequent requests:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

---

Core Resources

Brands

#

Get All Brands


GET /brands
Authorization: Bearer {token}

Response:

[
  {
    "id": "brand-uuid",
    "name": "My E-commerce Store",
    "domain": "mystore.com",
    "timezone": "America/New_York",
    "currency": "USD",
    "pixelId": "px_abc123",
    "createdAt": "2025-01-01T00:00:00Z"
  }
]

#

Create Brand


POST /brands
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "My E-commerce Store",
  "domain": "mystore.com",
  "timezone": "America/New_York",
  "currency": "USD"
}

#

Update Brand Settings


PUT /brands/:brandId/settings
Authorization: Bearer {token}
Content-Type: application/json

{
  "name": "Updated Store Name",
  "timezone": "America/Los_Angeles"
}

---

Attribution & Analytics

Get Attribution Data


GET /brands/:brandId/attribution?days=30&model=time_decay
Authorization: Bearer {token}

Parameters:

---

SDK & Libraries

JavaScript/TypeScript


npm install @datomnix/sdk

import { DatomniXClient } from '@datomnix/sdk'

const client = new DatomniXClient({
  apiKey: 'your-api-key',
  brandId: 'your-brand-id'
})

// Track event
await client.trackEvent({
  type: 'purchase',
  revenue: 239.99,
  orderId: 'order-123'
})

// Get attribution
const attribution = await client.getAttribution({
  days: 30,
  model: 'time_decay'
})

Python (Coming Soon)


from datomnix import DatomniXClient

client = DatomniXClient(api_key='your-api-key')
attribution = client.get_attribution(brand_id='brand-id', days=30)

---

Support

Documentation: https://docs.datomnix.com
API Status: https://status.datomnix.com
Support Email: support@datomnix.com
Community: https://discord.gg/datomnix

---

API Version: 1.0.0
Last Updated: November 16, 2025