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

# API Quickstart

> Make your first Tedro API call in under 5 minutes.

# API Quickstart

This guide walks you through making your first authenticated API call. By the end, you will have listed your workflows, created a contact, and retrieved conversations -- all from the command line.

## Prerequisites

* A Tedro account ([sign up](https://app.tedro.io/auth/signup))
* A workspace with at least one workflow
* cURL installed on your machine (pre-installed on macOS and most Linux distributions)

<Steps>
  ### Authenticate

  Sign in and save your session cookie to a file:

  ```bash theme={null}
  curl -X POST https://api.tedro.io/api/auth/sign-in/email \
    -H "Content-Type: application/json" \
    -c cookies.txt \
    -d '{
      "email": "you@example.com",
      "password": "your-password"
    }'
  ```

  You should receive a JSON response with your user details. The session cookie is saved to `cookies.txt`.

  ### Set Your Workspace ID

  Find your workspace ID in the dashboard URL (`/app/[workspaceId]/overview`) and export it as a variable:

  ```bash theme={null}
  export WORKSPACE_ID="your-workspace-uuid"
  ```

  ### List Your Workflows

  Fetch all workflows in your workspace:

  ```bash theme={null}
  curl https://api.tedro.io/api/workflows \
    -b cookies.txt \
    -H "x-workspace-id: $WORKSPACE_ID"
  ```

  Response:

  ```json theme={null}
  {
    "items": [
      {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "Customer Support Bot",
        "status": "published"
      }
    ]
  }
  ```

  ### Create a Contact

  Add a new contact to your workspace:

  ```bash theme={null}
  curl -X POST https://api.tedro.io/api/contacts \
    -b cookies.txt \
    -H "x-workspace-id: $WORKSPACE_ID" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Jane Doe",
      "phone": "+14155551234"
    }'
  ```

  Response:

  ```json theme={null}
  {
    "id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
    "name": "Jane Doe",
    "phone": "+14155551234"
  }
  ```

  ### List Conversations

  View recent conversations in your workspace:

  ```bash theme={null}
  curl "https://api.tedro.io/api/conversations?limit=5" \
    -b cookies.txt \
    -H "x-workspace-id: $WORKSPACE_ID"
  ```

  Response:

  ```json theme={null}
  {
    "items": [
      {
        "id": "...",
        "contactId": "...",
        "status": "active"
      }
    ],
    "total": 12
  }
  ```
</Steps>

You have now made authenticated API calls to list workflows, create a contact, and retrieve conversations. Explore the full [API Reference](/api-reference/introduction) or check out more [Code Examples](/api-reference/examples).

## Next Steps

<CardGroup cols={2}>
  <Card title="Authentication Details" icon="key" href="/api-reference/authentication">
    Learn about session lifecycle, brute force protection, and Node.js authentication.
  </Card>

  <Card title="Code Examples" icon="code" href="/api-reference/examples">
    cURL and Node.js examples for workflows, contacts, conversations, runs, and more.
  </Card>
</CardGroup>
