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

# Get Started with Scrubbe in Four Steps

> Register a business account, log in to get your access token, verify your session, and create your first incident ticket with Scrubbe — all in minutes.

Scrubbe's REST API lets you manage incidents programmatically from registration through resolution. This guide walks you through creating a business account, logging in to get an access token, and submitting your first incident ticket — all with real request and response examples.

<Note>
  All requests go to `https://your-api-domain.com/api/v1`. Replace `your-api-domain.com` with your Scrubbe instance URL. All request and response bodies use `Content-Type: application/json`.
</Note>

<Steps>
  <Step title="Register a business account">
    Send a `POST` request to `/api/v1/auth/business/register` with your organization details. This creates a business account and sends a verification email to the address you provide.

    ```http theme={null}
    POST /api/v1/auth/business/register
    Content-Type: application/json
    ```

    ```json theme={null}
    {
      "email": "you@example.com",
      "password": "SecurePassword1!",
      "firstName": "Ada",
      "lastName": "Lovelace",
      "businessName": "Acme Engineering"
    }
    ```

    After registration, check your inbox and verify your email using the OTP sent to you before proceeding. You can verify with `POST /api/v1/auth/verify_email` using the OTP code from the email.
  </Step>

  <Step title="Log in and get your access token">
    Send a `POST` request to `/api/v1/auth/login` with your credentials. The response includes an `accessToken` and a `refreshToken`.

    ```http theme={null}
    POST /api/v1/auth/login
    Content-Type: application/json
    ```

    ```json theme={null}
    {
      "email": "you@example.com",
      "password": "SecurePassword1!"
    }
    ```

    **Response:**

    ```json theme={null}
    {
      "success": true,
      "message": "Login successful",
      "data": {
        "user": {
          "id": "clx1abc2def3ghi4jkl5",
          "email": "you@example.com",
          "firstName": "Ada",
          "roles": ["ENGINEER"]
        },
        "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
        "refreshToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
      }
    }
    ```

    Copy the `accessToken` value — you'll use it in the next steps. Access tokens expire after **15 minutes**. See [Authentication](/authentication) for how to refresh them.

    <Warning>
      The login endpoint is rate-limited to 10 requests per 15 minutes. If you exceed this, you'll receive a `429 Too Many Requests` response.
    </Warning>
  </Step>

  <Step title="Send your first API request">
    Use the `accessToken` from the previous step in the `Authorization` header as a Bearer token. Here's a quick check using `GET /api/v1/auth/me` to confirm your token works:

    <CodeGroup>
      ```http HTTP theme={null}
      GET /api/v1/auth/me
      Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
      ```

      ```bash cURL theme={null}
      curl https://your-api-domain.com/api/v1/auth/me \
        -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
      ```
    </CodeGroup>

    A `200 OK` response with your user profile confirms your token is valid.
  </Step>

  <Step title="Create an incident ticket">
    Send a `POST` request to `/api/v1/incident-ticket` with the details of the incident you want to track.

    <CodeGroup>
      ```http HTTP theme={null}
      POST /api/v1/incident-ticket
      Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
      Content-Type: application/json
      ```

      ```bash cURL theme={null}
      curl -X POST https://your-api-domain.com/api/v1/incident-ticket \
        -H "Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..." \
        -H "Content-Type: application/json" \
        -d '{
          "summary": "Payment service down",
          "priority": "CRITICAL",
          "status": "OPEN",
          "source": "MONITORING",
          "serviceArea": "payments",
          "environment": "production",
          "region": "us-east-1",
          "assignedToEmail": "oncall@example.com",
          "description": "The payment gateway is returning 500 errors.",
          "techDescription": "Redis connection pool exhausted.",
          "impactSummary": "All checkout flows are failing.",
          "blastRadius": "100% of users attempting checkout"
        }'
      ```
    </CodeGroup>

    **Request body:**

    ```json theme={null}
    {
      "summary": "Payment service down",
      "priority": "CRITICAL",
      "status": "OPEN",
      "source": "MONITORING",
      "serviceArea": "payments",
      "environment": "production",
      "region": "us-east-1",
      "assignedToEmail": "oncall@example.com",
      "description": "The payment gateway is returning 500 errors.",
      "techDescription": "Redis connection pool exhausted.",
      "impactSummary": "All checkout flows are failing.",
      "blastRadius": "100% of users attempting checkout"
    }
    ```

    **Response:**

    ```json theme={null}
    {
      "success": true,
      "message": "Incident ticket created",
      "data": {
        "id": "clx9xyz1abc2def3ghi4",
        "summary": "Payment service down",
        "priority": "CRITICAL",
        "status": "OPEN",
        "environment": "production",
        "region": "us-east-1",
        "createdAt": "2026-05-22T10:30:00.000Z"
      }
    }
    ```

    Your incident is now live. Save the `id` from the response to retrieve, update, or resolve the ticket later.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Authentication" icon="key" href="/authentication">
    Learn how to refresh tokens, create API keys, and understand rate limits
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference/incidents">
    Explore all incident management endpoints
  </Card>
</CardGroup>
