Optimizely Unsubscribes API

Manage unsubscribe lists for opt-out recipients.

Operations 4

GET /{clientId}/unsubscribes List unsubscribes #
POST /{clientId}/unsubscribes Add an unsubscribe #
DELETE /{clientId}/unsubscribes Remove one or multiple recipients from the internal unsubscribe list #
GET /{clientId}/unsubscribes/count Get the total number of unsubscribes #

Documentation

Specifications

Other Resources

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/optimizely-unsubscribes-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 email required.

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

OpenAPI Specification

optimizely-unsubscribes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Optimizely Unsubscribes API
  version: '1.0'
  description: 'Operations tagged Unsubscribes across 2 of this provider''s published API definitions: optimizely-campaign-openapi.yml, optimizely-campaign-optimizely-campaign-rest-api-openapi.json. Each path carries the servers of the definition it was published in.'
servers:
- url: https://api.campaign.episerver.net/rest
  description: Optimizely Campaign Production Server
tags:
- name: Unsubscribes
  description: Manage unsubscribe lists for opt-out recipients.
paths:
  /{clientId}/unsubscribes:
    get:
      operationId: listUnsubscribes
      summary: List unsubscribes
      description: Returns a list of recipients who have unsubscribed from communications.
      tags:
      - Unsubscribes
      parameters:
      - $ref: '#/components/parameters/clientId'
      responses:
        '200':
          description: Successfully retrieved unsubscribes
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Unsubscribe'
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - basicAuth: []
    post:
      operationId: addUnsubscribe
      summary: Add an unsubscribe
      description: Adds a recipient to the unsubscribe list.
      tags:
      - Unsubscribes
      parameters:
      - $ref: '#/components/parameters/clientId'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UnsubscribeInput'
      responses:
        '201':
          description: Unsubscribe successfully added
        '400':
          description: Invalid request body
        '401':
          description: Authentication credentials are missing or invalid
      security:
      - basicAuth: []
    delete:
      tags:
      - Unsubscribes
      summary: Remove one or multiple recipients from the internal unsubscribe list
      operationId: removeUnsubscribes
      parameters:
      - name: clientId
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      - name: recipientIds
        in: query
        description: Comma-separated recipient IDs
        required: true
        explode: false
        schema:
          type: array
          items:
            type: string
      - name: mediaType
        in: query
        description: 'Media type of the delivery channel<p><i>Default value</i> : GLOBAL</p>'
        schema:
          type: string
          enum:
          - EMAIL
          - FAX
          - SMS
          - LETTER
          - PUSH
          - PRINT
      - name: recipientListId
        in: query
        description: ID of the recipient list to which the recipients are assigned (only if recipient list based unsubscribe is set)
        schema:
          type: integer
          format: int64
      responses:
        '204':
          description: The removal was initiated successfully.
        '404':
          description: Unsubscribe could not be found for the indicated recipient ID. Ensure that the 'recipientId' is correct and the recipient exists.
      security:
      - Authorization: []
    servers:
    - url: https://api.campaign.episerver.net/rest
      description: Optimizely Campaign Production Server
  /{clientId}/unsubscribes/count:
    get:
      tags:
      - Unsubscribes
      summary: Get the total number of unsubscribes
      description: Get the total number of recipients that are currently unsubscribed in a client.
      operationId: countUnsubscribes
      parameters:
      - name: clientId
        in: path
        description: Client ID
        required: true
        schema:
          type: string
      - name: mediaType
        in: query
        description: Media type of the delivery channel
        schema:
          type: string
          enum:
          - EMAIL
          - FAX
          - SMS
          - LETTER
          - PUSH
          - PRINT
      responses:
        '200':
          description: The total number of unsubscribes was retrieved successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RestCount'
            application/vnd.optivo.broadmail.v1+json:
              schema:
                $ref: '#/components/schemas/RestCount'
      security:
      - Authorization: []
    servers:
    - url: https://api.campaign.episerver.net/rest
components:
  schemas:
    UnsubscribeInput:
      type: object
      description: Input for adding an unsubscribe
      required:
      - email
      properties:
        email:
          type: string
          format: email
          description: Email address to unsubscribe
    Unsubscribe:
      type: object
      description: An unsubscribed recipient
      properties:
        email:
          type: string
          format: email
          description: Email address of the unsubscribed recipient
        unsubscribed_at:
          type: string
          format: date-time
          description: Timestamp when the recipient unsubscribed
        reason:
          type: string
          description: Reason for the unsubscription
    RestUnsubscribe:
      type: object
      properties:
        recipientListId:
          type: integer
          description: ID of the recipient list to which the recipients are assigned (only if recipient list based unsubscribe is set)
          format: int64
        recipientId:
          type: string
          description: Recipient ID
        mailingId:
          type: integer
          description: Mailing ID
          format: int64
        reason:
          type: string
          description: Unsubscribe reason
        created:
          type: string
          description: Creation date
          format: date-time
        links:
          type: array
          items:
            type: object
            properties:
              uriBuilder:
                type: object
              rels:
                type: array
                items:
                  type: string
              rel:
                type: string
              type:
                type: string
              params:
                type: object
                additionalProperties:
                  type: string
              title:
                type: string
              uri:
                type: string
                format: uri
        mediaType:
          type: string
          description: 'Media type of the delivery channel<p><i>Default value</i> : GLOBAL</p>'
    CreateUnsubscribesRequestData:
      type: object
      properties:
        recipientIds:
          type: array
          description: Comma-separated list of recipient IDs (only required if the "mailIds" parameter is not specified)
          items:
            type: string
            description: Comma-separated list of recipient IDs (only required if the "mailIds" parameter is not specified)
        mediaType:
          type: string
          description: Media type of the delivery channel
          enum:
          - EMAIL
          - FAX
          - SMS
          - LETTER
          - PUSH
          - PRINT
        mailIds:
          type: array
          description: Comma-separated list of mail IDs (only required if the "recipientIds" parameter is not specified)
          items:
            type: string
            description: Comma-separated list of mail IDs (only required if the "recipientIds" parameter is not specified)
        recipientListId:
          type: integer
          description: ID of the recipient list to which the recipients are assigned (only if recipient list based unsubscribe is set)
          format: int64
    RestUnsubscribeStreamingCollection:
      type: object
      properties:
        elements:
          type: array
          items:
            $ref: '#/components/schemas/RestUnsubscribe'
        links:
          type: array
          writeOnly: true
          items:
            $ref: '#/components/schemas/RestApiLink'
        count:
          type: integer
          format: int32
        offset:
          type: integer
          format: int32
        limit:
          type: integer
          format: int32
    RestCount:
      type: object
      properties:
        links:
          type: array
          items:
            type: object
            properties:
              uriBuilder:
                type: object
              rels:
                type: array
                items:
                  type: string
              rel:
                type: string
              type:
                type: string
              params:
                type: object
                additionalProperties:
                  type: string
              title:
                type: string
              uri:
                type: string
                format: uri
        count:
          type: integer
          description: Total number
          format: int64
    RestApiLink:
      type: object
      properties:
        href:
          type: string
        rel:
          type: string
    RestUnsubscribesCreateResult:
      type: object
      properties:
        successfulIds:
          type: array
          description: Successfully unsubscribed IDs
          items:
            type: string
            description: Successfully unsubscribed IDs
        unsuccessfulIds:
          type: array
          description: Unsuccessfully unsubscribed IDs
          items:
            type: string
            description: Unsuccessfully unsubscribed IDs
  parameters:
    clientId:
      name: clientId
      in: path
      required: true
      description: The unique identifier for the Optimizely Campaign client
      schema:
        type: string
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic authentication using the Optimizely Campaign API credentials.
    Authorization:
      type: apiKey
      name: Authorization
      in: header
externalDocs:
  description: Optimizely Campaign REST API Documentation
  url: https://docs.developers.optimizely.com/optimizely-campaign/docs/rest-api
x-refined-from:
- optimizely-campaign-openapi.yml
- optimizely-campaign-optimizely-campaign-rest-api-openapi.json