Skip to main content
POST
/
api
/
v1
/
analytics
/
events
Ingest server-side SDK analytics event (page_visit)
curl --request POST \
  --url https://app.promptingco.com/api/v1/analytics/events \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "event": "page_visit",
  "page": {
    "href": "<string>",
    "domain": "<string>",
    "pathname": "<string>",
    "title": "<string>",
    "canonicalUrl": "<string>"
  }
}
'
{
  "ok": true,
  "data": {
    "ok": true,
    "data": {
      "accepted": true,
      "eventId": "<string>",
      "status": "accepted",
      "receivedAt": "2023-11-07T05:31:56Z"
    }
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.promptingcompany.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Organization-scoped API key. Available scopes:

  • content:read: Read site pages, markdown content, and llms.txt files
  • content:write: Create, update, and delete site pages and content
  • prompts:read: Read prompts, topics, and prompt analysis results
  • prompts:write: Create, update, archive prompts
  • simulations:read: Read agent-simulation tasks, runs, environments, and analytics
  • simulations:write: Create and trigger simulation runs
  • logs:read: Read AI-traffic logs and request-level audit events
  • analytics:read: Read analytics aggregates (rankings, mentions, sources, SOV)
  • products:read: Read product metadata and competitor data
  • products:write: Update product settings and competitor lists

Body

application/json
event
enum<string>
required
Available options:
page_visit
page
object
required
occurredAt
string<date-time>
eventId
string
Minimum string length: 1
sessionId
string | null
anonymousId
string | null
request
object
sdk
object
properties
object

Response

Successful response

ok
enum<boolean>
required
Available options:
true
data
object
required