API DOCUMENTATION v2.0

Patrick API

Build decision intelligence into your applications with our REST API and SDKs.

Quick Start

Get up and running with the Patrick API in minutes.

1. Get API Key

Generate your API key from the Patrick dashboard under Settings → API Keys.

pk_live_abc123xyz...

2. Install SDK

Use our official SDKs for Python, Node.js, or Go.

npm install @patrick/sdk

3. Make Request

Query your organizational intelligence in seconds.

patrick.query("...")

Authentication

All API requests require authentication via API keys.

API Key Types

pk_live_
Production Keys
Use in production environments. Rate limited based on your plan.
pk_test_
Test Keys
Use for development and testing. Limited to 100 requests/hour.

Making Authenticated Requests

Include your API key in the Authorization header:

// cURL
curl https://api.heypatrick.ai/v2/query \
-H "Authorization: Bearer pk_live_..." \
-H "Content-Type: application/json" \
-d '{"query": "What's our churn risk?"}'

Core Endpoints

POST/v2/query

Query your organizational intelligence with natural language. Returns structured answers with sources.

Request Body

{
"query": "string",
"context": {
"timeframe": "30d",
"sources": ["slack", "salesforce"]
}
}

Response

{
"answer": "string",
"confidence": 0.95,
"sources": [{"type": "slack", "id": "..."}],
"query_time_ms": 847
}

Example

// Node.js
const response = await patrick.query({
query: "Which customers are at churn risk?",
context: { timeframe: "30d" }
});
GET/v2/insights

Get proactive insights and alerts based on patterns Patrick has detected.

Query Parameters

categoryFilter by category: customer, product, team, risk
priorityFilter by priority: critical, high, medium, low

Response

{
"insights": [{
"id": "ins_abc123",
"category": "customer",
"priority": "critical",
"title": "Acme Corp showing churn signals",
"detected_at": "2025-12-02T10:30:00Z"
}]
}
POST/v2/graph/traverse

Traverse the knowledge graph to explore relationships between entities.

Request Body

{
"start_entity": "customer:acme_corp",
"relationship": "uses_feature",
"depth": 2
}

Response

{
"nodes": [...],
"edges": [...],
"total_nodes": 47
}

Official SDKs

Use our official libraries for faster integration.

Node.js

npm install @patrick/sdk
View Documentation →

Python

pip install patrick-sdk
View Documentation →

Go

go get patrick.ai/sdk
View Documentation →

Rate Limits

PlanRequests/MinuteRequests/DayBurst
Test101,00020
Standard10050,000200
EnterpriseCustomCustomCustom

Error Codes

400
Bad Request
Invalid request parameters or malformed JSON
401
Unauthorized
Missing or invalid API key
403
Forbidden
API key doesn't have permission for this resource
429
Rate Limited
Too many requests. Check rate limit headers.
500
Internal Error
Something went wrong on our end. Contact support.
503
Service Unavailable
Temporary outage. Check status.heypatrick.ai

Need Help?

Our developer support team is here to help you integrate Patrick.