Skip to main content

Welcome to the Targeter API

The Targeter REST API provides trusted third-party partners with programmatic access to our marketing platform. As an approved partner with issued API credentials, you can assist in creation and retrieve marketing campaigns on behalf of your clients.

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. 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 token from /auth/token
  3. Include in Requests: Add the token to the Authorization header for all API calls

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_API_KEY",
    "api_secret": "YOUR_ISSUED_API_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"
        }
    ]
}