> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.slotflow.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.slotflow.dev/_mcp/server.

# Get available slots

GET https://api.slotflow.dev/v1/humans/{humanId}/slots

Get available booking slots for a human within a date range. This is the core endpoint your AI agent calls to find when a human is free.

**How slot computation works:**
1. Loads the human's base availability rules and schedule overrides
2. For each day in the requested range:
   - Skips the day if an all-day block override matches
   - Generates candidate slots from the base schedule (working days + hours)
   - Removes slots that overlap with time-specific block overrides
   - Adds extra slots from open overrides (availability outside base hours)
3. Deduplicates overlapping slots
4. Filters out slots that conflict with existing confirmed bookings
5. Returns the remaining available slots

All times are returned in **UTC**. The `timezone` field indicates the human's local timezone so your agent can convert for display.

Returns an empty `slots` array (not an error) when no availability exists in the range.


Reference: https://docs.slotflow.dev/api-reference/slotflow-api/slots/get-available-slots

## Authentication

- `Authorization` header (bearer token, required) — API key authentication. Pass your key as a Bearer token: ``` Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx ``` Get your API key from the [Slotflow Dashboard](https://app.slotflow.dev).

## Request

### Path parameters

- `humanId` (string, required) — The ID of the human

### Query parameters

- `date_from` (date, required) — Start of date range (inclusive)
- `date_to` (date, required) — End of date range (inclusive)
- `duration` (integer, required) — Meeting duration in minutes. Must match one of the human's configured `meeting_durations`.

## Response

### 200

Available slots within the date range

- `human_id` (string, optional)
- `duration` (integer, optional) — Requested duration in minutes
- `timezone` (string, optional) — Human's IANA timezone (informational, for display conversion)
- `slots` (list of Slot, optional) — Available time slots, sorted by start time. Empty array if no availability.
- `total` (integer, optional) — Number of available slots

## Errors

### 404 Not Found Error

Resource not found

- `error` (ApiErrorError, optional)

### 422 Unprocessable Entity Error

Validation or duration error

- `error` (ApiErrorError, optional)

## Types

### Slot

- `starts_at` (datetime, optional) — Slot start time in UTC
- `ends_at` (datetime, optional) — Slot end time in UTC

### ApiErrorError

- `code` (enum, optional) — Machine-readable error code
  - Allowed values: `UNAUTHORIZED`, `NOT_FOUND`, `SLOT_UNAVAILABLE`, `INVALID_DURATION`, `OUTSIDE_WORKING_HOURS`, `SCHEDULE_BLOCKED`, `LIMIT_REACHED`, `VALIDATION_ERROR`
- `message` (string, optional) — Human-readable error description
- `status` (integer, optional) — HTTP status code

## Examples

**Response**

```json
{
  "human_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "duration": 30,
  "timezone": "America/New_York",
  "slots": [
    {
      "starts_at": "2026-03-10T14:00:00.000Z",
      "ends_at": "2026-03-10T14:30:00.000Z"
    },
    {
      "starts_at": "2026-03-10T14:30:00.000Z",
      "ends_at": "2026-03-10T15:00:00.000Z"
    },
    {
      "starts_at": "2026-03-10T15:00:00.000Z",
      "ends_at": "2026-03-10T15:30:00.000Z"
    }
  ],
  "total": 3
}
```

**SDK Code**

```python Slots_getAvailableSlots_example
import requests

url = "https://api.slotflow.dev/v1/humans/humanId/slots"

querystring = {"date_from":"2026-03-10","date_to":"2026-03-14","duration":"30"}

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Slots_getAvailableSlots_example
const url = 'https://api.slotflow.dev/v1/humans/humanId/slots?date_from=2026-03-10&date_to=2026-03-14&duration=30';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Slots_getAvailableSlots_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.slotflow.dev/v1/humans/humanId/slots?date_from=2026-03-10&date_to=2026-03-14&duration=30"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Slots_getAvailableSlots_example
require 'uri'
require 'net/http'

url = URI("https://api.slotflow.dev/v1/humans/humanId/slots?date_from=2026-03-10&date_to=2026-03-14&duration=30")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Slots_getAvailableSlots_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.slotflow.dev/v1/humans/humanId/slots?date_from=2026-03-10&date_to=2026-03-14&duration=30")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Slots_getAvailableSlots_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.slotflow.dev/v1/humans/humanId/slots?date_from=2026-03-10&date_to=2026-03-14&duration=30', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Slots_getAvailableSlots_example
using RestSharp;

var client = new RestClient("https://api.slotflow.dev/v1/humans/humanId/slots?date_from=2026-03-10&date_to=2026-03-14&duration=30");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Slots_getAvailableSlots_example
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.slotflow.dev/v1/humans/humanId/slots?date_from=2026-03-10&date_to=2026-03-14&duration=30")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```