Discover your org's full data model at runtime -- built-in objects, custom object types, and their field definitions.
| Method | Path | Description |
|---|---|---|
| GET | /schema | Get the full org schema |
GET /schema
Returns every object type available in your org, including both built-in CRM objects (contacts, companies, deals, etc.) and any custom object types you have defined. Each object includes its field definitions with types, constraints, and validation rules.
This endpoint is designed for AI agents and developer tools that need to understand the data model before making API calls.
curl "$REX_URL/schema" \
-H "X-Api-Key: $REX_API_KEY"
{
"data": {
"objects": [
{
"name": "Contact",
"slug": "contact",
"kind": "built_in",
"enforcement_level": "hard",
"fields": [
{
"name": "email",
"label": "Email",
"type": "email",
"required": true,
"unique": true
},
{
"name": "first_name",
"label": "First Name",
"type": "string"
},
{
"name": "stage",
"label": "Stage",
"type": "enum",
"enum_values": ["lead", "prospect", "customer", "churned"]
}
]
},
{
"id": "ot_01HQ...",
"name": "Support Ticket",
"slug": "support-ticket",
"kind": "custom",
"status": "active",
"enforcement_level": "soft",
"fields": [
{
"name": "priority",
"label": "Priority",
"type": "enum",
"enum_values": ["low", "medium", "high", "critical"],
"required": true
},
{
"name": "assigned_to",
"label": "Assigned To",
"type": "reference",
"reference_target": "user"
}
]
}
]
}
}
| Type | Description |
|---|---|
string | Free text |
number | Numeric value |
boolean | True/false |
date | Date (no time) |
datetime | Date and time (RFC 3339) |
email | Email address |
url | URL |
phone | Phone number |
currency | Money value in cents |
enum | One of a fixed set of values (see enum_values) |
reference | Foreign key to another object (see reference_target) |
array | List of values (see nested items field definition) |
| Level | Description |
|---|---|
none | No validation; fields are advisory only |
soft | Validation warnings are returned but writes succeed |
hard | Validation errors reject the write |