openapi: 3.2.0 info: title: Optimizely Campaign REST Custom blocklists API description: 'This documentation lists all available resources and endpoints of the Optimizely Campaign REST API. The REST API lets you integrate Optimizely Campaign with your business applications and third-party software. Use Optimizely Campaign features and functionalities remotely to manage your recipient data, campaigns and mailings.

To use the REST API, set up your Optimizely Campaign client first. See Client setup on Optimizely World.

The base URL for all API requests is as follows: https://api.campaign.episerver.net/rest/{clientId}/{component}/{path}?{parameters}

Try it out
The "Try it out" feature lets you test the API before you implement it in the target system. To perform real API requests against your client, authorize with your Base64-encoded credentials. See Authentication on Optimizely World.

To learn more about the Optimizely Campaign REST API, see Optimizely World.


If you want to import the API definition in Postman, download the source file and import it in Postman as a collection.' version: '1' servers: - url: https://api.campaign.episerver.net/rest tags: - name: Custom blocklists description: Manage custom blocklists paths: /{clientId}/customblacklists: get: tags: - Custom blocklists summary: Get information about all custom blocklists description: Get detailed information about all custom blocklists, such as name or hash algorithm. You can limit the number of retrieved custom blocklists and set the starting point of the result list. operationId: selectCustomBlacklists parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: limit in: query description: 'Maximum number of retrieved custom blocklists

Default value : 100

' schema: type: integer format: int32 - name: folderId in: query description: Filter custom blocklists assigned to a folder schema: type: integer format: int64 responses: '200': description: The custom blocklists were retrieved successfully (empty result if none was found). content: application/json: schema: $ref: '#/components/schemas/RestCustomBlacklistStreamingCollection' application/vnd.optivo.broadmail.v1+json: schema: $ref: '#/components/schemas/RestCustomBlacklistStreamingCollection' '400': description: Invalid limit request. Change the limit to less than 10000. security: - Authorization: [] post: tags: - Custom blocklists summary: Create a custom blocklist operationId: createCustomBlacklist parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CustomBlacklistRequestData' responses: '201': description: The custom blocklist was created successfully. content: application/json: schema: $ref: '#/components/schemas/RestCustomBlacklist' application/vnd.optivo.broadmail.v1+json: schema: $ref: '#/components/schemas/RestCustomBlacklist' security: - Authorization: [] /{clientId}/customblacklists/{customBlacklistId}/entries: get: tags: - Custom blocklists summary: Get information about all entries of a custom blocklist description: Get detailed information about all entries of a custom blocklist, such as pattern, reason for blocklisting or creation date. operationId: selectCustomBlacklistEntries parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: offset in: query description: 'Custom blocklist entries offset

Default value : 0

' schema: type: integer format: int32 - name: limit in: query description: 'Maximum number of retrieved custom blocklist entries

Default value : 100

' schema: type: integer format: int32 - name: exactPattern in: query description: Exact pattern schema: type: string - name: matchingPattern in: query description: Matching pattern schema: type: string - name: sort in: query description: Sort result by specific criteria schema: type: string default: created enum: - pattern - reason - created - name: direction in: query description: Sort order schema: type: string enum: - ASC - DESC - name: customBlacklistId in: path description: Custom blocklist ID required: true schema: type: integer format: int64 responses: '200': description: The custom blocklist entries were retrieved successfully (empty result if none was found). content: application/json: schema: $ref: '#/components/schemas/RestCustomBlacklistEntryStreamingCollection' application/vnd.optivo.broadmail.v1+json: schema: $ref: '#/components/schemas/RestCustomBlacklistEntryStreamingCollection' '400': description: Invalid limit request. Change the limit to less than 10000. security: - Authorization: [] post: tags: - Custom blocklists summary: Create custom blocklist entries operationId: createBlacklistEntries parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: customBlacklistId in: path description: Custom blocklist ID required: true schema: type: integer format: int64 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CreateCustomBlacklistEntriesRequestData' responses: '200': description: The custom blocklist entries were created successfully. content: application/json: schema: type: array items: $ref: '#/components/schemas/RestCustomBlacklistEntry' application/vnd.optivo.broadmail.v1+json: schema: type: array items: $ref: '#/components/schemas/RestCustomBlacklistEntry' security: - Authorization: [] delete: tags: - Custom blocklists summary: Delete all entries from a custom blocklist operationId: wipeCustomBlacklistEntries parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: customBlacklistId in: path description: Custom blocklist ID required: true schema: type: integer format: int64 responses: '204': description: The custom blocklist was cleared successfully. security: - Authorization: [] /{clientId}/customblacklists/{customBlacklistId}/entries/{customBlacklistEntryId}: get: tags: - Custom blocklists summary: Get information about a custom blocklist entry description: Get detailed information about a custom blocklist entry, such as pattern, reason for blocklisting or creation date. operationId: getCustomBlacklistEntry parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: customBlacklistEntryId in: path description: Custom blocklist entry ID required: true schema: type: integer format: int64 - name: customBlacklistId in: path description: Custom blocklist ID required: true schema: type: integer format: int64 responses: '200': description: The custom blocklist entry was retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/RestCustomBlacklistEntry' application/vnd.optivo.broadmail.v1+json: schema: $ref: '#/components/schemas/RestCustomBlacklistEntry' '404': description: The custom blocklist entry could not be found. Ensure that the required parameters such as "customBlacklistId" are correct and the custom blocklist entry exists. security: - Authorization: [] post: tags: - Custom blocklists summary: Update a custom blocklist entry description: Update information of a custom blocklist entry, such as pattern or reason for blocklisting. operationId: updateCustomBlacklistEntry parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: customBlacklistEntryId in: path description: Custom blocklist entry ID required: true schema: type: integer format: int64 - name: customBlacklistId in: path description: Custom blocklist ID required: true schema: type: integer format: int64 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CustomBlacklistEntryRequestData' responses: '200': description: The custom blocklist entry was updated successfully. content: application/json: schema: $ref: '#/components/schemas/RestCustomBlacklistEntry' application/vnd.optivo.broadmail.v1+json: schema: $ref: '#/components/schemas/RestCustomBlacklistEntry' '404': description: The custom blocklist entry could not be found. Ensure that the required parameters such as "customBlacklistId" are correct and the custom blocklist entry exists. security: - Authorization: [] delete: tags: - Custom blocklists summary: Delete a custom blocklist entry operationId: deleteCustomBlacklistEntry parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: customBlacklistEntryId in: path description: Custom blocklist entry ID required: true schema: type: integer format: int64 - name: customBlacklistId in: path description: Custom blocklist ID required: true schema: type: integer format: int64 responses: '204': description: The custom blocklist entry was deleted successfully. '404': description: The custom blocklist entry could not be found. Ensure that the required parameters such as "customBlacklistId" are correct and the custom blocklist entry exists. security: - Authorization: [] /{clientId}/customblacklists/{customBlacklistId}: get: tags: - Custom blocklists summary: Get information about a custom blocklist description: Get detailed information about a custom blocklist, such as name or hash algorithm. operationId: getCustomBlacklist parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: customBlacklistId in: path description: Custom blocklist ID required: true schema: type: integer format: int64 responses: '200': description: The custom blocklist was retrieved successfully. content: application/json: schema: $ref: '#/components/schemas/RestCustomBlacklist' application/vnd.optivo.broadmail.v1+json: schema: $ref: '#/components/schemas/RestCustomBlacklist' '404': description: The custom blocklist could not be found. Ensure that the required parameters such as "customBlacklistId" are correct and the custom blocklist exists. '409': description: The custom blocklist could not be transmitted. Ensure that the required parameters such as "customBlacklistId" are correct and the custom blocklist exists. security: - Authorization: [] post: tags: - Custom blocklists summary: Update a custom blocklist description: Update information of a custom blocklist, such as name or hash algorithm. operationId: updateCustomBlacklist parameters: - name: clientId in: path description: Client ID required: true schema: type: integer format: int64 - name: customBlacklistId in: path description: Custom blocklist ID required: true schema: type: integer format: int64 requestBody: content: application/x-www-form-urlencoded: schema: $ref: '#/components/schemas/CustomBlacklistRequestData' responses: '200': description: The custom blocklist was updated successfully. content: application/json: schema: $ref: '#/components/schemas/RestCustomBlacklist' application/vnd.optivo.broadmail.v1+json: schema: $ref: '#/components/schemas/RestCustomBlacklist' security: - Authorization: [] components: schemas: CreateCustomBlacklistEntriesRequestData: required: - patterns type: object properties: patterns: type: array description: Patterns of the custom blocklist entries items: type: string description: Patterns of the custom blocklist entries reason: type: string description: Reason for creating a custom blocklist entry RestCustomBlacklistEntryStreamingCollection: type: object properties: elements: type: array items: $ref: '#/components/schemas/RestCustomBlacklistEntry' 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 RestCustomBlacklistStreamingCollection: type: object properties: elements: type: array items: $ref: '#/components/schemas/RestCustomBlacklist' 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 RestCustomBlacklistEntry: type: object properties: id: type: integer format: int64 pattern: type: string description: Pattern for all mailing addresses that push into a custom blocklist reason: type: string description: Reason for adding a pattern into a custom blocklist created: type: string description: Creation date format: date-time modified: type: string description: Modification 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 CustomBlacklistRequestData: required: - name type: object properties: name: type: string description: Name of the custom blocklist hashAlgorithm: type: string description: Hash algorithm to be used. NONE by default. enum: - NONE - MD5 - SHA1 - SHA2_256 - SHA2_512 - SHA2_256_OF_MD5_AND_DATA RestApiLink: type: object properties: href: type: string rel: type: string RestCustomBlacklist: type: object properties: id: type: integer description: Custom blocklist ID format: int64 name: type: string description: Name of the custom blocklist hashAlgorithm: type: string description: Hash algorithm of the custom blocklist enum: - NONE - MD5 - SHA1 - SHA2_256 - SHA2_512 - SHA2_256_OF_MD5_AND_DATA created: type: string description: Creation date format: date-time modified: type: string description: Modification date format: date-time links: type: array description: Restful links 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 description: Restful links CustomBlacklistEntryRequestData: type: object properties: reason: type: string description: Reason for creating a custom blocklist entry securitySchemes: Authorization: type: apiKey name: Authorization in: header x-readme: explorer-enabled: true proxy-enabled: true