> ## Documentation Index
> Fetch the complete documentation index at: https://emotion-trac.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Quickstart

> Create a prefilled form, open its edit link, and check for submission.

## 1. Set your API key

Obtain your partner key from your EmotionTrac contact and store it in your server’s secret manager. The examples use an environment variable:

```bash theme={null}
export EMOTIONTRAC_API_KEY='YOUR_PARTNER_API_KEY'
export EMOTIONTRAC_BASE_URL='https://intake.emotiontrac.com/api/partner/v1'
```

## 2. Create a draft

Choose a request ID for one intentional form. Save it with the exact request body before calling the API so that a network retry uses the same values.

```bash theme={null}
curl --request POST "$EMOTIONTRAC_BASE_URL/drafts" \
  --header "Authorization: Bearer $EMOTIONTRAC_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
    "requestId": "example-request-001",
    "form": {
      "contacts": {
        "firmName": "Example Law Firm",
        "attorneyFirstName": "Alex",
        "attorneyLastName": "Taylor",
        "attorneyEmail": "alex.taylor@example.com"
      }
    }
  }'
```

The first successful call returns `201 Created`:

```json theme={null}
{
  "draftId": "c80d2b31-9835-4fe8-a084-c81fedc390d1",
  "status": "in_progress",
  "createdAt": "2026-09-23T14:00:00.000Z",
  "submittedAt": null,
  "initialEmail": { "status": "not_requested", "sentAt": null },
  "editUrl": "https://intake.emotiontrac.com/new?edit=EXAMPLE_EDIT_TOKEN",
  "editUrlExpiresAt": "2026-10-23T14:00:00.000Z"
}
```

Save `draftId` in your system. Show the attorney a **Complete EmotionTrac form** action that opens `editUrl`. No EmotionTrac login is required.

## 3. Choose how to send the link

To have EmotionTrac email the primary attorney, include `"sendEmail": true` alongside `requestId` and `form` **on the first request**. The response starts with `initialEmail.status: "pending"`; status lookup shows delivery progress.

Omitting `sendEmail` or setting it to `false` suppresses only the initial email. Normal automated reminders still apply. Adding `sendEmail: true` to a replay changes the original request and returns `409`.

## 4. Check for submission

```bash theme={null}
export EMOTIONTRAC_DRAFT_ID='DRAFT_ID_FROM_CREATE_RESPONSE'
curl "$EMOTIONTRAC_BASE_URL/drafts/$EMOTIONTRAC_DRAFT_ID" \
  --header "Authorization: Bearer $EMOTIONTRAC_API_KEY"
```

After the attorney submits, the response includes `"status": "submitted"` and a `submittedAt` timestamp. A polling interval of a few minutes is sufficient for this workflow; keep all API calls within the shared rate limit.

Next: [add optional fields](https://emotion-trac.mintlify.site/fields.md), [handle retries](https://emotion-trac.mintlify.site/errors.md), or [review link behavior](https://emotion-trac.mintlify.site/lifecycle.md).


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