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

# Direct HTTP API

> Integrate Siteline via HTTP API

Send bot visit data to Siteline from any backend using a JSON POST request. Use this integration when you need full control over tracking or your stack isn't covered by one of the platform-specific integrations.

## Prerequisites

* A [Siteline website key](https://docs.sightlineanalytics.io/authorization.md)
* A backend capable of making outbound HTTP requests

## Endpoint

```shellscript theme={null}
POST https://api.siteline.ai/v1/intake/pageview
```

Only POST requests with a JSON body are supported. Requests must be made over HTTPS.

## Body parameters

**url** `string` *required*

The full URL of the page being accessed (e.g. `https://yoursite.com/blog/post`).

**userAgent** `string` *required*

The `User-Agent` header from the incoming request.

**ref** `string`

The `Referer` header from the incoming request.

**ip** `string` *required*

The visitor's IP address.

**websiteKey** `string` *required*

Your Siteline website key.

## Example

```bash theme={null}
curl --request POST \
  "https://api.siteline.ai/v1/intake/pageview" \
  --header "Content-Type: application/json" \
  --data '{
    "url": "https://yoursite.com/blog/post",
    "userAgent": "Mozilla/5.0 (compatible; ChatGPT-User/1.0)",
    "ref": "https://referrer.example",
    "ip": "1.2.3.4",
    "websiteKey": "secret_key_..."
  }'
```

## Best practices

* **Track key pages only** — blogs, landing pages, product pages, `robots.txt`, `sitemap.xml`
* **Skip static assets** — images, CSS, JS, fonts don't need to be tracked
* **Fire-and-forget** — don't await the response; send tracking calls asynchronously for zero impact on site speed
* **Keep sensitive fields out of URLs** — send `websiteKey` and IP data only in the JSON body

## Troubleshooting

> [accordion] Requests not appearing in Agent Analytics
>
> Verify that all required body fields are present. Check that your `websiteKey` is correct and that the request includes `Content-Type: application/json`.

> [accordion] Where do I find my website key?
>
> Navigate to **Agent Analytics** in your Siteline workspace and click **Manage Configuration** to view or regenerate your key.

> [accordion] Should I track every request?
>
> No. Focus on content pages that AI bots are likely to crawl. Exclude static assets and internal API routes.

> [!TIP]
>
> **Need help?** [Book a setup call](https://cal.com/team/siteline/tech-set-up) and we'll walk you through it.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.