Contacts and companies are the foundational entities in Rex. A contact represents a person you're tracking through your go-to-market process. A company represents an organization.
A contact has a lifecycle tracked through stages:
| Stage | Description |
|---|---|
lead | New — not yet qualified |
prospect | Qualified — active sales interest |
customer | Closed-won — paying customer |
churned | Former customer |
Every contact has a source indicating how they entered your CRM:
organic · referral · paid · social · email · event · other
| Field | Type | Description |
|---|---|---|
id | string | TypeID with cont_ prefix |
email | string | Primary email (unique per org, used for deduplication) |
first_name | string | First name |
last_name | string | Last name |
phone | string | Phone number |
title | string | Job title |
linkedin_url | string | LinkedIn profile URL |
stage | enum | Current lifecycle stage |
source | enum | How this contact was acquired |
company_id | string | Linked company (optional) |
owner_id | string | Assigned team member (optional) |
metadata | object | Arbitrary key-value pairs |
created_at | datetime | When the contact was created |
updated_at | datetime | When the contact was last modified |
Contacts are deduplicated by email within an org. The POST /contacts/upsert endpoint creates a new contact if the email doesn't exist, or updates the existing one if it does.
A company represents an organization. Contacts can be linked to companies via company_id.
| Field | Type | Description |
|---|---|---|
id | string | TypeID with comp_ prefix |
name | string | Company name |
domain | string | Primary web domain (unique per org, used for deduplication) |
industry | string | Industry vertical |
size | string | Employee count range |
description | string | Brief description |
metadata | object | Arbitrary key-value pairs |
Companies are deduplicated by domain within an org. The POST /companies/upsert endpoint creates or updates based on domain match.
Company (1) ──── (many) Contact
Contact (1) ──── (many) Deal
Contact (1) ──── (many) Activity
Contact (1) ──── (many) Task
A contact can belong to one company. A company can have many contacts. Deals, activities, and tasks are linked to contacts.
| Operation | Method | Endpoint |
|---|---|---|
| Create a contact | POST | /contacts |
| List contacts | GET | /contacts |
| Get a contact | GET | /contacts/:id |
| Update a contact | PATCH | /contacts/:id |
| Delete a contact | DELETE | /contacts/:id |
| Upsert by email | POST | /contacts/upsert |
| Create a company | POST | /companies |
| List companies | GET | /companies |
| Get a company | GET | /companies/:id |
| Upsert by domain | POST | /companies/upsert |
See the full Contacts API reference and Companies API reference.