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

# Introduction

> Offload is an API for running async, email-based case workflows against a real counterparty.

Offload lets your application create a case, hand the outreach loop to Offload, and receive the outcome back as either structured JSON, a failure state, or a request for human input.

The implementation in this workspace is queue-driven and email-first:

* `POST /cases` stores the case and queues initial processing.
* A background worker sends the first message, evaluates replies, and schedules follow-ups.
* Offload emits webhook events only when a case `COMPLETED`, `FAILED`, or moved to `INPUT_NEEDED`.
* Your app can poll `GET /cases/{id}` at any time and can resume paused work with `POST /cases/{id}/input`.

## What Offload Is Good At

* Collecting documents or confirmations from a single person or team over email
* Turning a reply thread into a structured `result`
* Pausing when a human decision is needed and resuming later
* Tracking inbound attachments separately from extracted result data

## What Is Implemented Today

* Public routes:
  * `POST /cases`
  * `GET /cases/{id}`
  * `GET /cases/{id}/attachments/{attachmentId}`
  * `POST /cases/{id}/input`
* Authentication with the `x-api-key` header
* Email-thread execution backed by AgentMail
* Async processing via SQS plus worker-side idempotency

## Important Current Constraints

* The request schema accepts `channel: "SMS"`, but the implemented workflow is email-based. Use `EMAIL`.
* Webhook delivery is a single HTTP `POST` attempt with no signature header and no application-level retry.
* `POST /cases` does not support an idempotency key. Repeating the same request creates a new case.
* When no follow-up is scheduled, `nextActionAt` is currently stored and returned as the sentinel value `253402300799999`.

## Start Here

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Create a case, receive a webhook, resume input-needed work, and fetch attachments.
  </Card>

  <Card title="Cases" icon="folder" href="/concepts/cases">
    Understand the case object, defaults, counters, and field semantics.
  </Card>

  <Card title="Lifecycle" icon="map" href="/concepts/lifecycle">
    See how cases move between `CREATED`, `RUNNING`, `INPUT_NEEDED`, `COMPLETED`, and `FAILED`.
  </Card>

  <Card title="Webhook Events" icon="terminal" href="/api-reference/webhook-events">
    Review the exact webhook envelope and delivery behavior.
  </Card>
</CardGroup>

## Recommended Reading Order

1. [Quickstart](/quickstart)
2. [Case Lifecycle](/concepts/lifecycle)
3. [API Introduction](/api-reference/introduction)
4. [Error Handling](/guides/error-handling)
5. [Questions / Ambiguities Found](/guides/questions-ambiguities)
