Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.targeter.tech/llms.txt

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

Welcome to the Targeter API

The Targeter REST API is the partner-facing HTTP API for Targeter: obtain a JWT and create or resolve campaigns from external systems. As an approved partner with issued API credentials, you can integrate on behalf of your clients. Current REST API version: 1.1.0.

Base URL

All API requests are made to your client-specific endpoint:
https://{client_slug}.targeter.tech/api
Where {client_slug} is your unique client identifier (e.g., storhaug).

Partner Authentication

The Targeter API uses JWT (JSON Web Token) authentication for trusted third-party partners. Protected routes expect Authorization: Bearer <token> (obtain the token from POST /auth/token). Here’s how it works:
  1. Receive Issued Credentials: Get your API key and secret issued by the Targeter team for your approved partnership
  2. Exchange for Token: Use your issued credentials to get a JWT from /auth/token (tokens expire after one hour)
  3. Include in Requests: Add the token to the Authorization header for protected routes

Example Partner Authentication Flow

# Step 1: Get JWT token using your issued credentials
curl -X POST "https://storhaug.targeter.tech/api/auth/token" \
  -H "Content-Type: application/json" \
  -d '{
    "api_key": "YOUR_ISSUED_PARTNER_KEY",
    "api_secret": "YOUR_ISSUED_PARTNER_SECRET"
  }'

# Step 2: Use token in API calls on behalf of your clients
curl -X POST "https://storhaug.targeter.tech/api/campaign" \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Rate Limits

Not yet implemented.

Error Handling

The API uses standard HTTP status codes and returns detailed error information:
{
    "error": "Missing required field: source.reference_id",
    "details": [
        {
            "path": ["source", "reference_id"],
            "message": "Reference ID is required"
        }
    ]
}