Skip to content

Getting Started

Publisher exposes a POST-based RPC-style API. All endpoints accept JSON request bodies and return JSON responses. There are no GET endpoints or URL-encoded parameters — every interaction follows the same pattern of posting a JSON payload to a named endpoint.

Base URL

All API requests are made against your Publisher instance's base URL. For cloud-hosted environments this is provided during onboarding. For self-hosted deployments, this is the URL where your Publisher instance is accessible.

bash
curl -X POST https://api.k42.com/publisher.v1/member/get \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"member_base_id": "...", "ref": "..."}'

Request Format

Every request must include:

  • Content-Type: application/json header
  • Authorization: Bearer <api-key> header
  • A JSON request body (even for operations that take no parameters, send {})

Response Format

Responses are JSON objects. Successful responses return the requested data directly. Error responses include a machine-readable error code and a human-readable message.

Typical Integration Flow

To begin interacting with Publisher, you'll need an API key issued by your K42 account administrator. Once you have your key, the typical integration flow is:

  1. Authenticate requests using a Bearer token
  2. Create or reference a memberbase (your audience container)
  3. Populate it with members
  4. Configure attribute schemas for targeting
  5. Ingest transaction data for analytics

The API is designed so that each operation is idempotent where possible — upserting members, for example, will create new records or update existing ones without requiring you to check for prior existence.