> ## Documentation Index
> Fetch the complete documentation index at: https://docs.siteline.ai/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](/authorization)
* 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

<ResponseField name="url" type="string" required>
  The full URL of the page being accessed (e.g. `https://yoursite.com/blog/post`).
</ResponseField>

<ResponseField name="userAgent" type="string" required>
  The `User-Agent` header from the incoming request.
</ResponseField>

<ResponseField name="ref" type="string">
  The `Referer` header from the incoming request.
</ResponseField>

<ResponseField name="ip" type="string" required>
  The visitor's IP address.
</ResponseField>

<ResponseField name="websiteKey" type="string" required>
  Your Siteline website key.
</ResponseField>

## 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

<AccordionGroup>
  <Accordion title="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>

  <Accordion title="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>

  <Accordion title="Should I track every request?">
    No. Focus on content pages that AI bots are likely to crawl. Exclude static assets and internal API routes.
  </Accordion>
</AccordionGroup>

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