> ## Documentation Index
> Fetch the complete documentation index at: https://www.autumn.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Autumn AI (autumn.ai) is a people and company intelligence API, a separate company from useautumn.com (billing software); no billing-product routes exist here.
> Base URL https://api.autumn.ai. Auth on every request: `X-API-Key: <key>` or `Authorization: Bearer <key>`. Plain HTTP + JSON. Hosted MCP: https://api.autumn.ai/mcp. Schemas: https://api.autumn.ai/openapi.json. Every docs page is Markdown at its URL plus `.md`.

# Enrichment

> Inbound leads, work emails and phones, AI columns, job changes and CRM refreshes, moved from Clay to Autumn tasks.

Each section is the `output.schema` and prompt for one common Clay table. Run them with the
steps in [Move a table](https://www.autumn.ai/docs/clay-migration/move-a-table.md): rows go in as `input_rows` with your
record ID, and the ID comes back on every row.

## Inbound leads

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart LR
  A[Sign-ups] --> Q[Your queue] -- hourly --> T[Autumn task] --> C[Score and route in your code]
```

Clay enriches each lead the moment its webhook fires. Autumn has no inbound webhook, so
collect leads in your own queue and send each batch as one task.

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "prompt": "These are new product sign-ups. For each, identify the person and their company from the email and name. Return one row per input row, keeping each lead_id. For personal email addresses, only fill company fields if the person can be identified with confidence; otherwise leave them empty.",
  "input_schema": {"lead_id": "str", "email": "str", "name": "str"},
  "input_rows": [{"lead_id": "su_1042", "email": "ada@example.com", "name": "Ada Lovelace"}],
  "output": {
    "id": "inbound-leads", "kind": "research", "path": "outputs/inbound-leads.jsonl",
    "schema": {
      "company": {"type": "str"},
      "company_domain": {"type": "domain"},
      "employee_count": {"type": "int"},
      "title": {"type": "str"},
      "seniority": {"type": "str", "description": "ic, manager, director, vp or c_level"},
      "linkedin_url": {"type": "url"}
    }
  },
  "rules": {"identity": "The company and title belong to this person, not someone with the same name."},
  "clarify": false
}
```

In a four-lead test, the three work emails came back with company, headcount, title and
seniority. A Gmail address with a common name came back empty with `rule_identity: unclear`
instead of a guess. Keep the score formula from Clay in your code and run it on these fields.

## Work emails and phone numbers

A Clay waterfall tries providers in order until one returns a value. In Autumn, state the bar
the value has to meet and ask for a status next to it:

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
"schema": {
  "work_email": {"type": "str"},
  "email_status": {"type": "str", "description": "verified, likely, or not_found"},
  "phone": {"type": "str"},
  "phone_status": {"type": "str", "description": "verified, likely, or not_found"}
}
```

with this in the prompt: *"For email and phone, only return a value you found or verified,
and set the status to say how confident you are. Leave it empty rather than guessing."* Your
code decides what each status is allowed to do (for example, only `verified` emails go to the
sequencer).

## AI and Claygent columns

Each AI column becomes one field. Put the question and its allowed answers in the
description, and anything that must hold for the row in `rules`:

| Clay column | Autumn field |
| - | - |
| Claygent: "Does this company sell to developers? Yes or no." | `"sells_to_developers": {"type": "str", "description": "yes, no or unknown. Does the company sell to developers?"}` |
| AI: "Summarize their latest product launch in one sentence." | `"latest_launch": {"type": "str", "description": "One sentence on the most recent product launch, with its date"}` |
| AI: "Is this a B2B company?" used to filter rows | `"rules": {"b2b": "Sells mainly to businesses."}` |

`unknown` matters: without it, a yes or no question gets a guess.

## Job changes

Send each contact's last known title and company. Autumn returns the current ones:

```json wrap theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "prompt": "For every input contact, check whether they still hold the title and company we have on record. Return one row per input row, keeping each row's record_id. Fill current_title and current_company from the most recent dated evidence, set changed to true only when the evidence shows they moved company, and give the date of the change when it is known. Leave a field empty rather than guessing.",
  "input_schema": {"record_id": "str", "full_name": "str", "title": "str", "company": "str"},
  "input_rows": [{"record_id": "003A01", "full_name": "Ada Lovelace", "title": "CTO", "company": "Analytical Engines"}],
  "output": {
    "id": "job-changes", "kind": "research", "path": "outputs/job-changes.jsonl",
    "schema": {
      "current_title": {"type": "str"},
      "current_company": {"type": "str"},
      "changed": {"type": "bool"},
      "change_date": {"type": "str", "description": "YYYY-MM or YYYY-MM-DD when known"}
    }
  },
  "clarify": false
}
```

In a three-contact test, two people who had moved came back `changed: true` with their new
company and the month they moved; the one who hadn't came back `false`. Run it on the
signal's old schedule and act on `changed: true` rows.

## Refresh CRM records

Export the records with their CRM IDs, run them through the same task as the table that
first enriched them, then write back only fields whose value changed and whose row passed
every rule. The diff in `compare.py` from [Move a table](https://www.autumn.ai/docs/clay-migration/move-a-table.md#5-compare-with-clay)
works the same way; swap its Clay loader for one that reads the CRM export.

> **[Structured output](https://www.autumn.ai/docs/guides/structured-output.md)**
>
> Field types for `output.schema`.

> **[Signals](https://www.autumn.ai/docs/clay-migration/signals.md)**
>
> Funding, news and hiring events on a schedule.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.