Thanx Campaigns API

Create, retrieve, list campaigns and issue rewards.

Operations 4

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /partner/campaigns Create a marketing campaign · Create Campaign #
Ask an LLM
“How do I set up a new marketing campaign with a control group?”
“Can I create a campaign that tests a treatment variant against a control?”
Tell an agent
Create a new campaign with {campaign}.
Set up a campaign with treatment and control variants using {campaign}.
GET /partner/campaigns List a merchant's campaigns · List Campaigns #
Ask an LLM
“Which marketing campaigns are set up for my merchant?”
“Can I see all the loyalty campaigns running for a specific brand?”
Tell an agent
List all campaigns for merchant {merchant_id}.
Show me every campaign I have access to.
GET /partner/campaigns/{id} Get one campaign's details · Get Campaign #
Ask an LLM
“What are the variants and settings of a particular campaign?”
“How do I look up a single campaign by its ID in Thanx?”
Tell an agent
Get the details of campaign {id}.
Show me the variants for campaign {id}.
POST /partner/campaigns/issue Issue campaign rewards to a batch of users · Issue Rewards #
Ask an LLM
“How do I send campaign rewards to a list of customers at once?”
“How many identifiers can I include in one reward issuance request?”
Tell an agent
Issue rewards from campaign {campaign_id} variant {variant_id} to {identifiers} for merchant {merchant_id}.
Give these customers {identifiers} the reward for campaign {campaign_id}, variant {variant_id}, merchant {merchant_id}.

Documentation

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-authorization-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-birth-date-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-card-envelope-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-card-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-gift-card-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-location-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-pagination-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-purchase-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-reward-envelope-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-reward-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-user-envelope-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-user-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/consumer-api-user-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-authorization-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-birth-date-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-card-envelope-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-card-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-gift-card-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-location-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-pagination-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-purchase-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-reward-envelope-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-reward-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-user-envelope-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-user-input-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/consumer-api-user-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/partner-api-campaign-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/partner-api-campaign-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/partner-api-campaign-variant-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/partner-api-issuance-job-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/partner-api-partner-user-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/partner-api-campaign-input-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/partner-api-campaign-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/partner-api-campaign-variant-input-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/partner-api-issuance-job-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/partner-api-partner-user-structure.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/loyalty-api-account-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/loyalty-api-basket-input-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/loyalty-api-basket-item-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/loyalty-api-basket-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/loyalty-api-loyalty-reward-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/loyalty-api-payment-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-schema/loyalty-api-points-product-schema.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/loyalty-api-account-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/loyalty-api-basket-input-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/loyalty-api-basket-item-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/loyalty-api-basket-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/loyalty-api-loyalty-reward-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/loyalty-api-payment-structure.json
📊
JSONStructure
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-structure/loyalty-api-points-product-structure.json

Other Resources

🔗
Overlay
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/overlays/thanx-campaigns-overlay.yaml
🔗
SDKs
https://github.com/thanx/thanx-sdk-ios
🔗
SDKs
https://github.com/thanx/thanx-sdk-android
🔗
ErrorCodes
https://docs.thanx.com/consumer/usage/errors
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-authorization-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-birth-date-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-card-envelope-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-card-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-gift-card-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-location-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-pagination-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-purchase-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-reward-envelope-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-reward-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-user-envelope-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-user-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/consumer-api-user-input-example.json
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-ld/thanx-consumer-api-context.jsonld
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/partner-api-campaign-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/partner-api-campaign-input-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/partner-api-campaign-variant-input-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/partner-api-issuance-job-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/partner-api-partner-user-example.json
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-ld/thanx-partner-api-context.jsonld
🔗
Regions
https://docs.thanx.com/loyalty/private-link
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/loyalty-api-account-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/loyalty-api-basket-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/loyalty-api-basket-input-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/loyalty-api-basket-item-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/loyalty-api-loyalty-reward-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/loyalty-api-payment-example.json
🔗
Examples
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/examples/loyalty-api-points-product-example.json
🔗
JSONLD
https://raw.githubusercontent.com/api-evangelist/thanx/refs/heads/main/json-ld/thanx-loyalty-api-context.jsonld

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/thanx:thanx-campaigns-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

thanx-campaigns-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Thanx Partner Campaigns API
  description: The Thanx Partner API provides privileged endpoints supporting custom integration use cases, including end-user token issuance, campaign management and reward issuance, subscriber ingestion, feedback handling, tags, and metadata lookups for merchants, locations, and scopes. It is intended for approved partners building deeper integrations with the Thanx engagement and marketing platform.
  version: v4.0
  contact:
    name: Kin Lane
    email: kin@apievangelist.com
  license:
    name: Proprietary
servers:
- url: https://api.thanx.com
  description: Production
- url: https://api.thanxsandbox.com
  description: Sandbox
security:
- bearerAuth: []
  clientId: []
tags:
- name: Campaigns
  description: Create, retrieve, list campaigns and issue rewards.
paths:
  /partner/campaigns:
    post:
      operationId: createCampaign
      summary: Create Campaign
      description: Creates a marketing campaign with treatment and control variants.
      tags:
      - Campaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - campaign
              properties:
                campaign:
                  $ref: '#/components/schemas/CampaignInput'
            examples:
              CreateCampaignRequestExample:
                summary: Default createCampaign request
                x-microcks-default: true
                value:
                  campaign:
                    merchant_id: 92b7b0dac4
                    name: Pizza Town Co
                    objective: Free coffee for loyal customers.
                    fine_print: Free coffee for loyal customers.
                    start_at: '2025-06-01T18:02:05Z'
                    end_at: '2025-06-01T18:02:05Z'
                    redeemable_from: '2025-06-01T18:02:05Z'
                    redeemable_to: '2025-06-01T18:02:05Z'
                    variants:
                    - name: Pizza Town Co
                      reward_template_id: 92b7b0dac4
      responses:
        '201':
          description: The created campaign.
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaign:
                    $ref: '#/components/schemas/Campaign'
              examples:
                CreateCampaign201Example:
                  summary: Default createCampaign 201 response
                  x-microcks-default: true
                  value:
                    campaign:
                      id: 92b7b0dac4
                      name: Pizza Town Co
                      objective: Free coffee for loyal customers.
                      start_at: '2025-06-01T18:02:05Z'
                      end_at: '2025-06-01T18:02:05Z'
                      redeemable_from: '2025-06-01T18:02:05Z'
                      redeemable_to: '2025-06-01T18:02:05Z'
                      time_zone: example
                      fine_print: Free coffee for loyal customers.
                      variants:
                      - id: 92b7b0dac4
                        name: Pizza Town Co
                        reward_template_id: 92b7b0dac4
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
    get:
      operationId: listCampaigns
      summary: List Campaigns
      description: Lists campaigns for a merchant.
      tags:
      - Campaigns
      parameters:
      - name: merchant_id
        in: query
        schema:
          type: string
        example: 92b7b0dac4
      responses:
        '200':
          description: A list of campaigns.
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaigns:
                    type: array
                    items:
                      $ref: '#/components/schemas/Campaign'
              examples:
                ListCampaigns200Example:
                  summary: Default listCampaigns 200 response
                  x-microcks-default: true
                  value:
                    campaigns:
                    - id: 92b7b0dac4
                      name: Pizza Town Co
                      objective: Free coffee for loyal customers.
                      start_at: '2025-06-01T18:02:05Z'
                      end_at: '2025-06-01T18:02:05Z'
                      redeemable_from: '2025-06-01T18:02:05Z'
                      redeemable_to: '2025-06-01T18:02:05Z'
                      time_zone: example
                      fine_print: Free coffee for loyal customers.
                      variants:
                      - id: 92b7b0dac4
                        name: Pizza Town Co
                        reward_template_id: 92b7b0dac4
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /partner/campaigns/{id}:
    get:
      operationId: getCampaign
      summary: Get Campaign
      description: Retrieves a single campaign by identifier.
      tags:
      - Campaigns
      parameters:
      - $ref: '#/components/parameters/PathId'
      responses:
        '200':
          description: The campaign.
          content:
            application/json:
              schema:
                type: object
                properties:
                  campaign:
                    $ref: '#/components/schemas/Campaign'
              examples:
                GetCampaign200Example:
                  summary: Default getCampaign 200 response
                  x-microcks-default: true
                  value:
                    campaign:
                      id: 92b7b0dac4
                      name: Pizza Town Co
                      objective: Free coffee for loyal customers.
                      start_at: '2025-06-01T18:02:05Z'
                      end_at: '2025-06-01T18:02:05Z'
                      redeemable_from: '2025-06-01T18:02:05Z'
                      redeemable_to: '2025-06-01T18:02:05Z'
                      time_zone: example
                      fine_print: Free coffee for loyal customers.
                      variants:
                      - id: 92b7b0dac4
                        name: Pizza Town Co
                        reward_template_id: 92b7b0dac4
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /partner/campaigns/issue:
    post:
      operationId: issueRewards
      summary: Issue Rewards
      description: Issues campaign rewards to a batch of identifiers (up to 10,000 per request). Returns an asynchronous issuance job.
      tags:
      - Campaigns
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
              - campaign_id
              - merchant_id
              - variant_id
              - identifiers
              properties:
                campaign_id:
                  type: string
                merchant_id:
                  type: string
                variant_id:
                  type: string
                identifiers:
                  type: array
                  maxItems: 10000
                  items:
                    type: object
                    required:
                    - type
                    - value
                    properties:
                      type:
                        type: string
                        enum:
                        - email
                        - phone
                      value:
                        type: string
            examples:
              IssueRewardsRequestExample:
                summary: Default issueRewards request
                x-microcks-default: true
                value:
                  campaign_id: 92b7b0dac4
                  merchant_id: 92b7b0dac4
                  variant_id: 92b7b0dac4
                  identifiers:
                  - type: email
                    value: example
      responses:
        '202':
          description: The reward issuance job was accepted.
          content:
            application/json:
              schema:
                type: object
                properties:
                  issuance_job:
                    $ref: '#/components/schemas/IssuanceJob'
              examples:
                IssueRewards202Example:
                  summary: Default issueRewards 202 response
                  x-microcks-default: true
                  value:
                    issuance_job:
                      id: 92b7b0dac4
                      state: CA
                      requested_count: 3
                      issued_count: 3
                      failed_count: 3
                      created_at: '2025-06-01T18:02:05Z'
                      updated_at: '2025-06-01T18:02:05Z'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    CampaignInput:
      type: object
      required:
      - merchant_id
      - name
      - start_at
      - end_at
      - redeemable_from
      - redeemable_to
      properties:
        merchant_id:
          type: string
          example: 92b7b0dac4
        name:
          type: string
          example: Pizza Town Co
        objective:
          type: string
          example: Free coffee for loyal customers.
        fine_print:
          type: string
          example: Free coffee for loyal customers.
        start_at:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        end_at:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        redeemable_from:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        redeemable_to:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        variants:
          type: array
          items:
            $ref: '#/components/schemas/CampaignVariantInput'
    Campaign:
      type: object
      properties:
        id:
          type: string
          example: 92b7b0dac4
        name:
          type: string
          example: Pizza Town Co
        objective:
          type: string
          example: Free coffee for loyal customers.
        start_at:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        end_at:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        redeemable_from:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        redeemable_to:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        time_zone:
          type: string
          example: example
        fine_print:
          type: string
          example: Free coffee for loyal customers.
        variants:
          type: array
          items:
            type: object
            properties:
              id:
                type: string
              name:
                type: string
              reward_template_id:
                type: string
                nullable: true
    CampaignVariantInput:
      type: object
      required:
      - name
      properties:
        name:
          type: string
          example: Pizza Town Co
        reward_template_id:
          type: string
          description: Required for treatment variants, omitted for control.
          example: 92b7b0dac4
    IssuanceJob:
      type: object
      properties:
        id:
          type: string
          example: 92b7b0dac4
        state:
          type: string
          example: CA
        requested_count:
          type: integer
          example: 3
        issued_count:
          type: integer
          example: 3
        failed_count:
          type: integer
          example: 3
        created_at:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
        updated_at:
          type: string
          format: date-time
          example: '2025-06-01T18:02:05Z'
  parameters:
    PathId:
      name: id
      in: path
      required: true
      schema:
        type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Partner access token.
    clientId:
      type: apiKey
      in: header
      name: X-ClientId
      description: Client-specific identifier provided by Thanx.