AffiliateRail Programs API

The Programs API from AffiliateRail — 2 operation(s) for programs.

Operations 3

GET /v1/programs List programs #
GET /v1/programs/{id} Retrieve a program #
POST /v1/programs/{id} Update a program #

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/affiliaterail-com:affiliaterail-com-programs-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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

affiliaterail-com-programs-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Affiliaterail Com Programs API
  version: '2026-08-21'
  description: 'Operations tagged Programs across 2 of this provider''s published API definitions: affiliaterail-com-docs-openapi.json, affiliaterail-com-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.affiliaterail.com
  description: Production
tags:
- name: Programs
paths:
  /v1/programs:
    get:
      tags:
      - Programs
      summary: List programs
      description: 'Every program in your organization. The one list that does not take `program_id`.


        **Scope:** `read`'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
        required: false
        name: limit
        in: query
      - schema:
          type: string
        required: false
        name: starting_after
        in: query
      - schema:
          type: string
        required: false
        name: ending_before
        in: query
      - schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
        required: false
        name: include[]
        in: query
      responses:
        '200':
          description: Programs
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProgramList'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getV1Programs
      x-operation-id-source: derived
    servers:
    - url: https://api.affiliaterail.com
      description: Production
  /v1/programs/{id}:
    get:
      tags:
      - Programs
      summary: Retrieve a program
      description: '**Scope:** `read`'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^(sample_)?prg_
          example: prg_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`prg_…`)
        required: true
        description: Prefixed id (`prg_…`)
        name: id
        in: path
      - schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
          description: No relations on this resource
        required: false
        description: No relations on this resource
        name: expand[]
        in: query
      - schema:
          anyOf:
          - type: string
          - type: array
            items:
              type: string
          description: 'Extras to include: stats'
        required: false
        description: 'Extras to include: stats'
        name: include[]
        in: query
      responses:
        '200':
          description: The program
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Program'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: getV1ProgramsById
      x-operation-id-source: derived
    post:
      tags:
      - Programs
      summary: Update a program
      description: 'Settings a merchant can change from the API. Portal branding and processor connections stay in the app.


        **Scope:** `write`'
      security:
      - bearerAuth: []
      parameters:
      - schema:
          type: string
          pattern: ^(sample_)?prg_
          example: prg_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`prg_…`)
        required: true
        description: Prefixed id (`prg_…`)
        name: id
        in: path
      requestBody:
        description: ''
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProgramUpdate'
      responses:
        '200':
          description: The updated program
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Program'
        '400':
          description: Invalid request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or unknown API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Key lacks the required scope
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: No such object in your organization
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: The request was understood and refused
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: 'Rate limited: see Retry-After'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      operationId: postV1ProgramsById
      x-operation-id-source: derived
    servers:
    - url: https://api.affiliaterail.com
      description: Production
components:
  schemas:
    ProgramStats:
      type: object
      properties:
        partners:
          type: integer
        active_partners:
          type: integer
        clicks:
          type: integer
        referrals:
          type: integer
        customers:
          type: integer
        sales_minor:
          type: integer
          example: 2500
          description: Integer minor units (cents, pence). Never a float, never a string.
        commissions_minor:
          type: integer
          example: 2500
          description: Integer minor units (cents, pence). Never a float, never a string.
      required:
      - partners
      - active_partners
      - clicks
      - referrals
      - customers
      - sales_minor
      - commissions_minor
    Program:
      type: object
      properties:
        id:
          type: string
          pattern: ^(sample_)?prg_
          example: prg_7uSyy9FqVLCFWrdPeZaK
          description: Prefixed id (`prg_…`)
        object:
          type: string
          enum:
          - program
        name:
          type: string
        product_name:
          type: string
        website_url:
          type: string
        currency:
          type: string
          minLength: 3
          maxLength: 3
          example: USD
          description: ISO-4217
        status:
          type: string
          enum:
          - active
          - paused
        subdomain:
          type: string
        custom_domain:
          type:
          - string
          - 'null'
        terms_url:
          type:
          - string
          - 'null'
        terms_version:
          type:
          - string
          - 'null'
        cookie_days:
          type: integer
        url_params:
          type: array
          items:
            type: string
        commission_on_net_revenue:
          type: boolean
        holding_period_days:
          type: integer
        min_payout_minor:
          type: integer
          example: 2500
          description: Integer minor units (cents, pence). Never a float, never a string.
        payout_term:
          type: string
          enum:
          - net_15
          - net_30
          - net_60
        payout_methods:
          type: array
          items:
            type: string
            enum:
            - paypal
            - wise
            - bank_transfer
            - wire
            - crypto
            - payoneer
        block_self_referrals:
          type: boolean
        blocked_countries:
          type: array
          items:
            type: string
        require_tax_forms:
          type: boolean
        auto_payouts_enabled:
          type: boolean
        processor:
          type:
          - string
          - 'null'
          enum:
          - stripe
          - paddle
          - chargebee
          - manual
          - api
          - null
        stats:
          $ref: '#/components/schemas/ProgramStats'
        created_at:
          type: string
          format: date-time
          example: '2026-08-21T10:15:30.000Z'
          description: ISO-8601, UTC
        updated_at:
          type: string
          format: date-time
          example: '2026-08-21T10:15:30.000Z'
          description: ISO-8601, UTC
      required:
      - id
      - object
      - name
      - product_name
      - website_url
      - currency
      - status
      - subdomain
      - custom_domain
      - terms_url
      - terms_version
      - cookie_days
      - url_params
      - commission_on_net_revenue
      - holding_period_days
      - min_payout_minor
      - payout_term
      - payout_methods
      - block_self_referrals
      - blocked_countries
      - require_tax_forms
      - auto_payouts_enabled
      - processor
      - created_at
      - updated_at
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            type:
              type: string
              enum:
              - authentication_error
              - permission_error
              - invalid_request_error
              - not_found_error
              - conflict_error
              - rate_limit_error
              - plan_error
              - not_implemented_error
              - api_error
            code:
              type: string
            message:
              type: string
            param:
              type: string
          required:
          - type
          - code
          - message
      required:
      - error
    ProgramList:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Program'
        has_more:
          type: boolean
          description: Pass the last object's id as `starting_after` to fetch the next page
        total_count:
          type: integer
          description: Count of every object matching the filters, ignoring the cursor
      required:
      - data
      - has_more
      - total_count
    ProgramUpdate:
      type: object
      properties:
        name:
          type: string
          minLength: 1
        product_name:
          type: string
          minLength: 1
        website_url:
          type: string
          format: uri
        status:
          type: string
          enum:
          - active
          - paused
        terms_url:
          type:
          - string
          - 'null'
          format: uri
        cookie_days:
          type: integer
          minimum: 1
          maximum: 365
        commission_on_net_revenue:
          type: boolean
        holding_period_days:
          type: integer
          minimum: 0
          maximum: 180
        min_payout_minor:
          type: integer
          minimum: 0
          example: 2500
          description: Integer minor units (cents, pence). Never a float, never a string.
        payout_term:
          type: string
          enum:
          - net_15
          - net_30
          - net_60
        block_self_referrals:
          type: boolean
        blocked_countries:
          type: array
          items:
            type: string
            minLength: 2
            maxLength: 2
        require_tax_forms:
          type: boolean
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: rail_live_… or rail_test_…
      description: Create keys in Settings → API keys. Each key carries scopes; the docs name the scope every route needs.
x-refined-from:
- affiliaterail-com-docs-openapi.json
- affiliaterail-com-openapi.json