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

# API Reference

> Complete reference for the Sentrion API

## Introduction

The Sentrion API provides programmatic access to job market intelligence. Use our APIs to search for job postings from specific companies or run direct, cross-company job searches with detailed filters.

## Getting Started

<Steps>
  <Step title="Create your account">
    Head to [app.sentrion.ai](https://app.sentrion.ai) and sign up. You'll get access to your dashboard right away.
  </Step>

  <Step title="Get your API key">
    In your dashboard, go to **Settings > API Keys** and create a new key. This key is how Sentrion identifies your requests.

    <Info>
      Your API key is like a password — keep it private and never share it publicly.
    </Info>
  </Step>

  <Step title="Make your first request">
    Use your API key to search for company jobs:

    <CodeGroup>
      ```bash cURL theme={null}
      curl -X POST https://api.sentrion.ai/api/v1/search/company-jobs \
        -H "Authorization: Bearer YOUR_API_KEY" \
        -H "Content-Type: application/json" \
        -d '{"company_name": "Google"}'
      ```

      ```python Python theme={null}
      import requests

      response = requests.post(
          "https://api.sentrion.ai/api/v1/search/company-jobs",
          headers={"Authorization": "Bearer YOUR_API_KEY"},
          json={"company_name": "Google"}
      )
      data = response.json()
      ```

      ```javascript Node.js theme={null}
      const response = await fetch("https://api.sentrion.ai/api/v1/search/company-jobs", {
        method: "POST",
        headers: {
          "Authorization": "Bearer YOUR_API_KEY",
          "Content-Type": "application/json"
        },
        body: JSON.stringify({ company_name: "Google" })
      });
      const data = await response.json();
      ```
    </CodeGroup>
  </Step>
</Steps>

## Base URL

All API requests should be made to:

```
https://api.sentrion.ai/api/v1
```

## Authentication

All endpoints require Bearer token authentication. Include your API key in the `Authorization` header:

```bash theme={null}
Authorization: Bearer YOUR_API_KEY
```

## API Versioning

<Info>
  This API is currently unversioned. We are committed to maintaining backward compatibility. Any breaking changes will be introduced under a new versioned endpoint (e.g., `/v2/search/company-jobs`).
</Info>

## Available Endpoints

<CardGroup cols={2}>
  <Card title="POST /company-jobs/search" icon="building" href="/api-reference/company-jobs">
    Search for job postings from a specific company. Returns enriched company details alongside matching jobs.
  </Card>

  <Card title="POST /jobs-search/search" icon="briefcase" href="/api-reference/direct-jobs">
    Search across all companies using location, industry, department, keyword, job board, and salary filters.
  </Card>
</CardGroup>

## Response Format

All API responses follow a consistent format:

<Tabs>
  <Tab title="Success Response">
    ```json theme={null}
    {
      "success": true,
      "data": {
        // Response data here
      },
      "error": null
    }
    ```
  </Tab>

  <Tab title="Error Response">
    ```json theme={null}
    {
      "success": false,
      "data": null,
      "error": {
        "code": "error_code",
        "message": "Human-readable error message",
        "details": []
      }
    }
    ```
  </Tab>
</Tabs>

## Rate Limiting

The API implements rate limiting to ensure fair usage. If you exceed the rate limit, you'll receive a `429` status code with the following response:

```json theme={null}
{
  "success": false,
  "data": null,
  "error": {
    "code": "rate_limit_exceeded",
    "message": "You have exceeded the number of allowed requests per minute."
  }
}
```

## Error Codes

| Status Code | Error Code            | Description                |
| ----------- | --------------------- | -------------------------- |
| 400         | `bad_request`         | The request was malformed  |
| 401         | `unauthorized`        | Invalid or missing API key |
| 422         | `validation_error`    | Invalid request parameters |
| 429         | `rate_limit_exceeded` | Rate limit exceeded        |
| 500         | `server_error`        | Internal server error      |
