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

# API Introduction

> Integrate with User Intuition to manage studies, participants, interviews, and webhooks

## Public Integration API

The User Intuition API allows you to programmatically manage studies, invite participants, access interview recordings and transcripts, generate reports, field panels, and set up webhooks to receive interview data.

<Card title="OpenAPI Specification" icon="file-code" href="/api-reference/openapi.json">
  View the complete OpenAPI specification
</Card>

## Base URL

All API requests should be made to:

```
https://api.userintuition.ai
```

## Authentication

All endpoints require Bearer token authentication. You can authenticate with either an **API key** or a **JWT token**.

```bash theme={null}
Authorization: Bearer <your_api_key_or_jwt_token>
```

### API keys (recommended)

API keys are org-scoped, long-lived credentials ideal for server-to-server integrations and MCP clients. They start with the prefix `ui_sk_`.

Create and manage your keys from the **Manage Account** pane in the dashboard — no API call required to get started.

<Steps>
  <Step title="Open Manage Account">
    Sign in to the [User Intuition Dashboard](https://app.userintuition.ai), click your avatar in the bottom-left corner of the sidebar, then select **Manage Account**.
  </Step>

  <Step title="Go to the API Keys tab">
    In the account management dialog, click **API Keys** in the sidebar.
  </Step>

  <Step title="Create a key">
    Enter a descriptive name (for example, `Production` or `MCP Server`) and click **Create Key**. If you leave the name blank, it defaults to `Default`. The new key appears in a banner at the top of the page.
  </Step>

  <Step title="Copy the key immediately">
    Click **Copy Key** to copy it to your clipboard. The full key is only shown **once** — after you dismiss the banner or navigate away, only the key prefix remains visible.
  </Step>

  <Step title="Use the key">
    Pass the key as a Bearer token in the `Authorization` header:

    ```bash theme={null}
    Authorization: Bearer ui_sk_aBcDeFgHiJkLmNoPqRs...
    ```
  </Step>
</Steps>

To revoke a key, return to the **API Keys** tab and click the trash icon next to it. Revoked keys stop working immediately and cannot be restored.

<Warning>
  The raw API key is only shown once at creation. If you lose it, revoke the old key and create a new one.
</Warning>

<Note>
  See [Account settings → API keys](/essentials/account-settings#api-keys) for the full UI walkthrough.
</Note>

### JWT tokens

JWT tokens are short-lived tokens issued by the dashboard. They are useful for quick testing.

<Steps>
  <Step title="Sign in to your account">
    Sign in to your [User Intuition Dashboard](https://app.userintuition.ai) if you haven't already.
  </Step>

  <Step title="Open your profile">
    Click on your profile in the bottom-left corner of the sidebar. This will show your name and company.
  </Step>

  <Step title="Select View JWT Token">
    Select **"View JWT Token"** from the dropdown menu (it has a key icon).
  </Step>

  <Step title="Copy your token">
    A dialog will appear displaying your JWT token. Click the **"Copy Token"** button to copy the token to your clipboard.
  </Step>

  <Step title="Confirmation">
    You'll see a confirmation message when the token has been successfully copied.
  </Step>
</Steps>

<Warning>
  Keep your JWT token secure and do not share it with others. This token provides authenticated access to your account.
</Warning>

## Available Resources

<CardGroup cols={2}>
  <Card title="Studies" icon="robot" href="/api-reference/studies/list-studies">
    Create and manage your studies, screeners, and interview configuration.
  </Card>

  <Card title="Interviews" icon="phone" href="/api-reference/interviews/list-interviews">
    Access interview records, transcripts, recordings, and analysis data.
  </Card>

  <Card title="Participants" icon="envelope" href="/api-reference/participants/create-participant">
    Invite participants, send rewards, and track their status.
  </Card>

  <Card title="Webhooks" icon="webhook" href="/api-reference/webhooks/overview">
    Receive interview data at your own endpoint as soon as an interview completes.
  </Card>
</CardGroup>

## Response Format

All responses are returned in JSON format. Successful list responses include the resource collection plus pagination information (the collection key matches the resource, e.g. `studies`, `participants`, `interviews`):

```json theme={null}
{
  "studies": [...],
  "total_count": 100,
  "page": 1,
  "page_size": 10
}
```

## Error Handling

The API uses standard HTTP status codes:

| Status Code | Description                                 |
| ----------- | ------------------------------------------- |
| `200`       | Success                                     |
| `201`       | Created                                     |
| `400`       | Bad Request - Invalid input                 |
| `401`       | Unauthorized - Invalid or missing JWT token |
| `404`       | Not Found                                   |
| `500`       | Internal Server Error                       |

Error responses include a `detail` field with more information:

```json theme={null}
{
  "detail": "Error message describing what went wrong"
}
```

## Rate Limiting

API requests are rate limited to ensure fair usage. If you exceed the rate limit, you'll receive a `429 Too Many Requests` response.

## Support

For API support, contact [support@userintuition.ai](mailto:support@userintuition.ai).
