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

# Introduction

> Complete API reference documentation for the Thena platform.

Welcome to the Thena API reference documentation. Our API suite is organized into three main sections, each serving a distinct purpose in the Thena ecosystem.

<Info>
  All APIs require authentication using an <b>x-api-key</b> header. API keys are tied to individual users and can be generated from <b>Dashboard → Organization Settings → Security and Access</b>.
</Info>

<CardGroup>
  <Card title="Platform APIs" icon="server">
    Core infrastructure services including authentication, SLA management, workflow orchestration, ticketing, accounts, teams, tags, forms, comments, and more.
  </Card>

  <Card title="App Platform APIs" icon="puzzle-piece">
    Create, manage, and distribute custom applications within the Thena ecosystem. Includes app creation, installation, uninstallation, and webhook handling.
  </Card>

  <Card title="Workflows APIs" icon="bolt">
    Automate business processes and orchestrate workflows across the Thena platform. Includes workflow creation, execution, event handling, and activity/task management.
  </Card>
</CardGroup>

<Tip>
  Remember to check our rate limits and implement appropriate error handling in your applications. For production deployments, consider implementing retry logic with exponential backoff.
</Tip>

## API overview

<Tabs>
  <Tab title="Platform APIs">
    The Platform APIs form the core of Thena's infrastructure:

    * **Core services**: Authentication, health checks, and storage management.
    * **SLA management**: Create and manage SLA policies, monitor SLA compliance.
    * **Workflow orchestration**: Define, execute, and monitor automated workflows.
    * **Ticket management**: Comprehensive ticket lifecycle management.
    * **Accounts, teams, tags, forms, comments, and more**: Manage all aspects of your organization.

    <Note>
      Platform APIs are designed for system-level integrations and core service management.
    </Note>
  </Tab>

  <Tab title="App Platform APIs">
    The App Platform APIs enable custom application development and management:

    * **App management**: Create, update, and manage app manifests.
    * **Installation**: Handle app installation, uninstallation, and updates.
    * **Distribution**: Control app visibility and distribution.
    * **Configuration**: Manage app settings and configurations.
    * **Webhooks**: Handle incoming events from Thena.

    <Note>
      Perfect for developers building custom solutions and integrations on top of Thena.
    </Note>
  </Tab>

  <Tab title="Workflows APIs">
    The Workflows APIs enable automation and orchestration across the Thena platform:

    * **Workflow management**: Create, update, and delete workflows.
    * **Execution tracking**: Monitor workflow executions and tasks.
    * **Event handling**: Register and handle events to trigger workflows.
    * **Activity registry**: Access available workflow activities and operators.

    <Note>
      Ideal for automating business processes and integrating event-driven logic.
    </Note>
  </Tab>
</Tabs>

## Getting started

<Steps>
  <Step title="Choose your API">
    Select the appropriate API section based on your use case:

    * Platform APIs for core infrastructure and organization management.
    * App Platform APIs for custom applications and integrations.
    * Workflows APIs for automation and workflow orchestration.
  </Step>

  <Step title="Authentication">
    Generate an API key from your Thena Dashboard:

    * Go to <b>Organization Settings → Security and Access</b>.
    * Click <b>Generate API Key</b> and copy your key securely.
    * Include your API key in all requests using the <b>x-api-key</b> header.

    <br />

    <CodeGroup>
      ```bash theme={null}
      curl -X GET https://platform.thena.ai/v1/users \
        -H "x-api-key: YOUR_API_KEY"
      ```
    </CodeGroup>
  </Step>

  <Step title="Explore endpoints">
    Browse the API reference for your chosen section:

    * Review request/response formats.
    * Check required parameters.
    * Test example requests.
  </Step>

  <Step title="Integration">
    Start integrating with your application:

    * Follow best practices.
    * Monitor rate limits.
    * Handle errors appropriately.
  </Step>
</Steps>

## Rate limiting

All API requests are subject to rate limiting to ensure fair usage and platform stability. Rate limit information is provided in the response headers for every request:

| Header                | Description                                                     |
| --------------------- | --------------------------------------------------------------- |
| X-RateLimit-Limit     | The maximum number of requests allowed in the current window.   |
| X-RateLimit-Remaining | The number of requests remaining in the current window.         |
| X-RateLimit-Reset     | The UNIX timestamp (seconds) when the rate limit window resets. |
| X-RateLimit-IP        | The IP address associated with the request.                     |
| X-RateLimit-UserID    | The user ID associated with the request (if available).         |
| X-RateLimit-OrgID     | The organization ID associated with the request (if available). |
| X-RateLimit-Path      | The API path for which the rate limit applies.                  |

**Default rate limit:**

* <b>Standard tier</b>: 60 requests per minute per user, org, and IP (unless otherwise specified).
* <b>Enterprise tier</b>: Custom limits based on your plan.

You can monitor your current usage and remaining quota by inspecting these headers in each API response. If you exceed your rate limit, you will receive a `429 Too Many Requests` error. Wait until the reset time before making additional requests.
