Skip to content

Integrations & API ​

Connect your Madrix app with external services.

REST API ​

Every generated app exposes a REST API automatically.

Base URL ​

https://[your-app-domain]/api/v1

Authentication ​

All API requests require a bearer token:

http
Authorization: Bearer <token>

Generate tokens in Runtime Settings → API Tokens.

Endpoints ​

For each entity in your project, the following endpoints are generated:

MethodPathDescription
GET/[entity]List records (with pagination and filters)
GET/[entity]/:idGet a single record
POST/[entity]Create a record
PUT/[entity]/:idUpdate a record
DELETE/[entity]/:idDelete a record

Pagination ​

http
GET /tasks?page=1&limit=20&sort=createdAt&order=desc

Filtering ​

http
GET /tasks?status=Open&priority=High
GET /tasks?createdAt__gte=2025-01-01

Response format ​

json
{
  "data": [...],
  "total": 100,
  "page": 1,
  "limit": 20
}

Webhooks (outbound) ​

Configure Madrix to notify external systems when events occur.

  • Trigger: record created, updated, deleted, status changed
  • Target: any HTTPS endpoint
  • Payload: JSON with event type and record snapshot
  • Retry: 3 attempts with exponential backoff

See Runtime Settings → Webhooks for configuration steps.

Webhook payload example ​

json
{
  "event": "task.updated",
  "timestamp": "2025-06-01T12:00:00Z",
  "entity": "task",
  "record": {
    "id": "abc123",
    "title": "Fix login bug",
    "status": "Done",
    "updatedAt": "2025-06-01T12:00:00Z"
  },
  "changes": {
    "status": { "from": "In Progress", "to": "Done" }
  }
}

Integration use cases ​

Notify Slack on record creation ​

python
# Script: on Task created
import requests
import os

def on_create(task):
    webhook_url = os.environ.get('SLACK_WEBHOOK_URL')
    requests.post(webhook_url, json={
        "text": f"New task created: {task['title']}"
    })

Sync with external CRM ​

python
# Script: on Customer updated
import requests
import os

def on_update(customer):
    crm_url = os.environ.get('CRM_API_URL')
    token = os.environ.get('CRM_API_TOKEN')
    requests.put(
        f"{crm_url}/contacts/{customer['externalId']}",
        headers={"Authorization": f"Bearer {token}"},
        json={"name": customer['name'], "email": customer['email']}
    )

Supported native integrations ​

IntegrationTypeAvailable
SlackNotifications✅
Email (SMTP)Notifications✅
Google WorkspaceSSO✅
Microsoft Azure ADSSO✅
Custom SAML / OIDCSSO✅
StripePaymentsPlanned
Zapier / MakeAutomationPlanned

Next: Troubleshooting →

© Madrix Software. All rights reserved.