# Entities (/entities)



Every entity exists because headless.ly needs it to run itself as an autonomous business.

Base Meta-Fields [#base-meta-fields]

Every Digital Object carries these `$` meta-fields automatically — you never declare them in a Noun, but they're always present:

```typescript
{
  $type: 'Contact',                              // TypeScript discriminator
  $id: 'contact_fX9bL5nRd',                     // unique, type-prefixed
  $context: 'https://headless.ly/~acme',         // tenant namespace
  $version: 7,                                   // event-sourcing version
  $createdAt: '2025-01-15T...',
  $createdBy: 'user_Qm8xNfKpL',
  $updatedAt: '2025-02-07T...',
}
```

`$context` supports custom domains — if Acme maps `api.acme.com` to their org, then `https://headless.ly/~acme` and `https://api.acme.com` resolve to the same data.

Domains [#domains]

| Domain                                       | Package                   | Entities                                                       | Count |
| -------------------------------------------- | ------------------------- | -------------------------------------------------------------- | ----- |
| [Identity](/entities/identity)               | `@headlessly/sdk`         | User, ApiKey                                                   | 2     |
| [CRM](/entities/crm)                         | `@headlessly/crm`         | Organization, Contact, Lead, Deal, Activity, Pipeline          | 6     |
| [Billing](/entities/billing)                 | `@headlessly/billing`     | Customer, Product, Plan, Price, Subscription, Invoice, Payment | 7     |
| [Projects](/entities/projects)               | `@headlessly/projects`    | Project, Issue, Comment                                        | 3     |
| [Content](/entities/content)                 | `@headlessly/content`     | Content, Asset, Site                                           | 3     |
| [Support](/entities/support)                 | `@headlessly/support`     | Ticket                                                         | 1     |
| [Analytics](/entities/analytics)             | `@headlessly/analytics`   | Event, Metric, Funnel, Goal                                    | 4     |
| [Marketing](/entities/marketing)             | `@headlessly/marketing`   | Campaign, Segment, Form                                        | 3     |
| [Experimentation](/entities/experimentation) | `@headlessly/experiments` | Experiment, FeatureFlag                                        | 2     |
| [Platform](/entities/platform)               | `@headlessly/platform`    | Workflow, Integration, Agent                                   | 3     |
| [Communication](/entities/communication)     | `@headlessly/sdk`         | Message                                                        | 1     |

All entities share the same interface: `create`, `get`, `find`, `update`, `delete`, `count`, plus custom verbs defined on each Noun.

All 35 Entities [#all-35-entities]

The complete entity reference, alphabetical. Every entity supports CRUD automatically. Custom verbs add domain-specific lifecycle.

| #  | Entity           | Domain          | Custom Verbs                                                                 |
| -- | ---------------- | --------------- | ---------------------------------------------------------------------------- |
| 1  | **Activity**     | CRM             | `complete`, `cancel`, `log`                                                  |
| 2  | **Agent**        | Platform        | `deploy`, `pause`, `retire`, `invoke`                                        |
| 3  | **ApiKey**       | Identity        | `revoke`                                                                     |
| 4  | **Asset**        | Content         | `process`                                                                    |
| 5  | **Campaign**     | Marketing       | `launch`, `pause`, `complete`                                                |
| 6  | **Comment**      | Projects        | `resolve`                                                                    |
| 7  | **Contact**      | CRM             | `qualify`, `capture`, `assign`, `merge`, `enrich`                            |
| 8  | **Content**      | Content         | `publish`, `archive`, `schedule`                                             |
| 9  | **Customer**     | Billing         | —                                                                            |
| 10 | **Deal**         | CRM             | `close`, `win`, `lose`, `advance`, `reopen`                                  |
| 11 | **Event**        | Analytics       | —                                                                            |
| 12 | **Experiment**   | Experimentation | `start`, `conclude`, `pause`, `stop`                                         |
| 13 | **FeatureFlag**  | Experimentation | `rollout`, `enable`, `disable`                                               |
| 14 | **Form**         | Marketing       | `publish`, `archive`, `submit`                                               |
| 15 | **Funnel**       | Analytics       | `activate`                                                                   |
| 16 | **Goal**         | Analytics       | `achieve`, `complete`, `miss`, `reset`                                       |
| 17 | **Integration**  | Platform        | `connect`, `disconnect`, `sync`                                              |
| 18 | **Invoice**      | Billing         | `pay`, `void`, `finalize`                                                    |
| 19 | **Issue**        | Projects        | `assign`, `close`, `reopen`                                                  |
| 20 | **Lead**         | CRM             | `convert`, `lose`                                                            |
| 21 | **Message**      | Communication   | `send`, `deliver`, `read`                                                    |
| 22 | **Metric**       | Analytics       | `snapshot`, `record`, `reset`                                                |
| 23 | **Organization** | CRM             | `enrich`, `score`                                                            |
| 24 | **Payment**      | Billing         | `refund`, `capture`                                                          |
| 25 | **Pipeline**     | CRM             | —                                                                            |
| 26 | **Plan**         | Billing         | —                                                                            |
| 27 | **Price**        | Billing         | —                                                                            |
| 28 | **Product**      | Billing         | —                                                                            |
| 29 | **Project**      | Projects        | `archive`, `complete`, `activate`                                            |
| 30 | **Segment**      | Marketing       | `refresh`                                                                    |
| 31 | **Site**         | Content         | —                                                                            |
| 32 | **Subscription** | Billing         | `pause`, `cancel`, `reactivate`, `upgrade`, `downgrade`, `activate`, `renew` |
| 33 | **Ticket**       | Support         | `resolve`, `escalate`, `close`, `reopen`                                     |
| 34 | **User**         | Identity        | `invite`, `suspend`, `activate`                                              |
| 35 | **Workflow**     | Platform        | `activate`, `pause`, `trigger`, `archive`                                    |
