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

# Quickstart

> Submit an AI-generated email to DataVibe and handle the gate response safely.

## Before you begin

Create a workspace and a `dv_live_` API key in
[Security → API keys](https://app.datavibe.cc/security/api-keys). The full key is
shown once.

<Steps>
  <Step title="Store the API key">
    ```bash theme={null}
    export DATAVIBE_API_KEY="dv_live_your_key"
    ```
  </Step>

  <Step title="Submit completed copy">
    ```bash theme={null}
    curl --request POST "https://api.datavibe.cc/v1/gate/outbound" \
      --header "Authorization: Bearer ${DATAVIBE_API_KEY}" \
      --header "Content-Type: application/json" \
      --data '{
        "recipient": "prospect@example.com",
        "subject": "Following up",
        "body_text": "Hi Jordan, checking in on your Q3 plans.",
        "body_html": "<p>Hi Jordan, checking in on your Q3 plans.</p>",
        "source_model": "gpt-4o",
        "idempotency_key": "campaign-42-send-1001"
      }'
    ```
  </Step>

  <Step title="Branch on status">
    ```javascript theme={null}
    switch (result.status) {
      case "APPROVED":
      case "SENT":
        await continueDelivery(result);
        break;
      case "QUEUED":
      case "DISPATCHING":
        await holdAndPoll(result.action_id);
        break;
      case "BLOCKED":
      case "FAILED":
      case "REJECTED":
        await stopDelivery(result);
        break;
      default:
        throw new Error(`Unknown gate status: ${result.status}`);
    }
    ```
  </Step>

  <Step title="Review the audit record">
    Open the returned `review_url` for queued work, or use `action_id` to poll
    `GET /v1/gate/outbound/{action_id}`.
  </Step>
</Steps>

<Warning>
  Do not use “status is not BLOCKED” as permission to send. `QUEUED` and
  `DISPATCHING` are hold states.
</Warning>

Next, read [Handle outcomes](/getting-started/handle-outcomes) and
[Idempotency and retries](/concepts/idempotency-and-retries).
