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

# Getting Started

> Create your first job in minutes

# Getting Started with QuedUp

Get up and running with QuedUp in just a few minutes. This guide will walk you through creating your first job and monitoring its execution.

## Prerequisites

Before you begin, you'll need:

* **An API key**:
  1. Sign up at [app.quedup.dev](https://app.quedup.dev)
  2. Navigate to **API Keys** in the sidebar
  3. Click **Create New Key** to generate your token
* **An HTTP endpoint**: A URL to receive job requests (see [Local Development](#local-development) below for testing)
* **Basic knowledge**: Familiarity with HTTP requests and cron expressions

## Local Development

To test QuedUp with your local development server, you'll need to expose your localhost to the internet. We recommend using a tool like [ngrok](https://ngrok.com/) or [localtunnel](https://github.com/localtunnel/localtunnel).

1. Start your local server (e.g., running on port 3000).
2. Expose it with ngrok:
   ```bash theme={null}
   ngrok http 3000
   ```
3. Copy the HTTPS URL provided by ngrok (e.g., `https://abc-123.ngrok-free.app`).
4. Use this URL when creating jobs.

## Step 1: Create Your First Job

Let's create a simple one-time job that will make a POST request to your endpoint. Replace `YOUR_API_KEY` with your key and the URL with your ngrok or production URL.

```bash theme={null}
curl -X POST https://api.quedup.dev/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My First Job",
    "url": "https://abc-123.ngrok-free.app/webhook",
    "method": "POST",
    "run_at": "2024-01-15T10:00:00Z",
    "body": "{\"message\": \"Hello from QuedUp!\"}"
  }'
```

## Step 2: Create a Recurring Job

Now let's create a job that runs every day at 2 AM:

```bash theme={null}
curl -X POST https://api.quedup.dev/jobs \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Daily Backup",
    "url": "https://abc-123.ngrok-free.app/backup",
    "method": "POST",
    "schedule": "0 2 * * *",
    "headers": {
      "X-API-Key": "your-backup-key"
    }
  }'
```

## Step 3: Monitor Your Jobs

Check the status of your jobs:

```bash theme={null}
curl -X GET https://api.quedup.dev/jobs \
  -H "Authorization: Bearer YOUR_API_KEY"
```

View job runs and their results:

```bash theme={null}
curl -X GET https://api.quedup.dev/jobs/{job_id}/runs \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Understanding Job Status

Jobs can have the following statuses:

* **`active`** - Job is scheduled and will run at the next scheduled time
* **`paused`** - Job is temporarily disabled
* **`completed`** - One-time job has finished successfully
* **`failed`** - Job encountered an error and won't retry

## Understanding Job Run Status

Individual job runs can have these statuses:

* **`pending`** - Job is queued for execution
* **`running`** - Job is currently executing
* **`success`** - Job completed successfully
* **`failed`** - Job failed (may retry based on configuration)

## Next Steps

Now that you've created your first job:

1. **[Explore Job Types](/job-types)** - Learn about different job configurations
2. **[Understand Concepts](/concepts)** - Deep dive into how QuedUp works
3. **[Check the API Reference](/api-reference)** - Complete API documentation

## Common Use Cases

Here are some popular ways to use QuedUp:

* **Database Backups** - Run daily backups of your database
* **Email Campaigns** - Send welcome emails with a delay
* **Data Synchronization** - Sync data between services periodically
* **Cleanup Tasks** - Remove old files or expired data
* **Health Checks** - Monitor your services regularly

<CardGroup cols={2}>
  <Card title="Job Types" icon="clock" href="/job-types">
    Explore different job configurations
  </Card>

  <Card title="API Reference" icon="code" href="/api-reference">
    Complete API documentation
  </Card>
</CardGroup>

<Tip>
  Start with simple one-time jobs to test your endpoint, then move on to recurring jobs once you're comfortable with the platform.
</Tip>
