openapi: 3.0.3
info:
  title: Selligent API
  version: 1.0.0
  description: |
    # Selligent API Reference

    By providing a fully documented API reference, we want to enable everyone to maximize the usage of the Selligent Marketing Platform for automating & exchange data.

    # REST API

    <!-- The Selligent API endpoints are segmented.

    ## Base URL

    ![](assets/img/smc-api-base-url.png)

    ```
    https://customerdomain/Portal/Api
    ```

    Example: `https://customerengagedomain/Portal/Api`

    **Definition**

    1. **customerdomain**: The base URL is build up out of the domain where your engage install is located.
    2. **/Portal/Api**: Path to the Selligent API

       **Europe**: `https://customername.module.slgnt.eu` / **United States**: `https://customername.module.slgnt.us`

    4. **Touchpoint**: refers to the grouped entrypoint for the user to interact/interface with the application. For this API reference the touchpoint is the API.
    5. **Component/Channel**: refers to the channels (mail/sms/mobile) or towards a specific component (like reporting, lists, journeys …). In the example the channel is "push".

    ## URI parts

    ![](assets/img/smc-api-url-parts.png)

    ```
    https://baseUrl/chapter/versioning/entity(_type)/{identifier}/operation|result
    ```

    Example: `https://contoso.smc.slgnt.eu/api/list/v2/audience/678/import`

    **Definition**

    0. _Part 0_: **Base URL** - The base url is a reference to the customer domain.
    1. _Part 1_: **Component** - Refers to the Selligent SMC chapters: Lists, Journeys, Content, ...
    2. _Part 2_: **Version number** - major numbering only - example: `v2`. In case no version number is part, it refers to the initial API version.
    3. _Part 3_: **Entity(_type)** - Refers to entity or entity type. This is depends on the chapter, if it is needed or not.
    4. _Part 4_: **Identifier** - Refers to the unique identifier for a specific entity. 
    5. _Part 5_: **Operation|Result** - Refers to additional operations or specific sub-entities of the parent entity. This is depends on the chapter, if it is needed or not. Examples: lists > fields / journeys > send


    ## Versioning

    Currently, we are introducing a new version of our REST API, which is version 2.
    The version number is part of the URI part of the API endpoint.

    Keep in mind that the previous version of our API does not have a version number in the URI.

    When we make improvements to the current version of the API endpoints, we strive to make only backwards-incompatible changes.
    We release improvements or new endpoints regularly. Read our API changelog to stay up-to-date with the latest changes.

    Example for V2 for lists: `https://contoso.smc.slgnt.eu/api/lists/v2`

    Example for V3 for lists: `https://contoso.smc.slgnt.eu/api/lists/v3` -->

    ## Authentication

    The Selligent V1 API's use the basic authentication protocol, through key/secter key authentication with the `X-ApiKey` Header, and value `{key}:{secret}`.
    If you have a Selligent account with admin configuration rights, then you can create a Service Account  under Admin Configuration --> Access Management --> Service Accounts.
    Make sure to select type `custom` for credentials for this api.
    that will generate these credentials. 

    ![](assets/img/service-account.png)

    Once this service account is generated, your `Key` and `Secret` will be made available. You can rotate this pair at any time.
    You can further specify an expiry date for your keys.
    under "endpoints" you can specify which actions on the API can be performed by this service account.
    If the service account does an action it is not configured for, a 401 unauthorized will be returned by the API.

    ![](assets/img/endpoints-config.png)
    <!-- ReDoc-Inject: <security-definitions> -->

    ## Errors

    Selligent uses the conventional HTTP response codes to indicate successful or failed API requests.

    Codes in the `2xx` range indicate success.

    Codes in the `4xx` range indicate an input related error or validation restrictions.

    Codes in the `5xx` range indicate an error with Selligent servers.

    | HTTP Status Codes          | Description                                                                        |
    | -------------------------- | ---------------------------------------------------------------------------------- |
    | 200 - OK                   | We found the request resource                                                      |
    | 201 - Created              | The resource is successfully created                                               |
    | 204 - No Content           | The requested resources is empty                                                   |
    | 400 - Bad Request          | There was an error with the request. The body of the response will have more info. |
    | 401 - Unauthorized         | The access key was incorrect                                                       |
    | 404 - Not found            | The resources cannot be found                                                      |
    | 405 - Method Not Allowed   | The method is not allowed                                                          |
    | 408 - Request Timeout      | The request is taking too long to respond                                          |
    | 422 - Unprocessable Entity | The resource couldn't be created                                                   |
    | 429 - Too Many Requests    | Too many requests hit the API too quickly                                          |
    | 5xx - Server errors        | Something went wrong on our end. Please try again                                  |

    # OpenAPI specification

    We provide the API specification in the format of OpenApi files which can be found in the openapi/ directory:

    - OpenAPI 3.0 - JSON format - <a href="https://developers.meetmarigold.com/engage/api/smc-v1/openapi/smc-api-rest-v1.openapi.json" target="_blank">smc-api-rest-v1.openapi.json</a>
    - OpenAPI 3.0 - YAML format - <a href="https://developers.meetmarigold.com/engage/api/smc-v1/openapi/smc-api-rest-v1.openapi.yaml" target="_blank">smc-api-rest-v1.openapi.yaml</a>

    The older Swagger/OpenAPI 2.0 can currently still be accessed from the Api explorer in engage. We will not support it explicitly here.

    # Postman collection

    To get you up and running and provide a hands on experience, we provide an up-to-date Postman collection of the SMC API V2.

    <a href="https://developers.meetmarigold.com/engage/api/smc-v1/postman/smc-api-rest-v1.postman.json" target="_blank"><img src="https://run.pstmn.io/button.svg" alt="Open in Postman"></a>


    Import the Postman collection through any of the methods specified below.


    - Use the link: <a href="https://developers.meetmarigold.com/engage/api/smc-v1/postman/smc-api-rest-v1.postman.json" target="_blank">https://developers.meetmarigold.com/engage/api/smc-v1/postman/smc-api-rest-v1.postman.json</a> via "Import" > "Link"
    - Download the file <a href="https://developers.meetmarigold.com/engage/api/smc-v1/postman/smc-api-rest-v1.postman.json" target="_blank">smc-api-rest-v1.postman.json</a> and import the file via "Import" > "File"
    - Download the file <a href="https://developers.meetmarigold.com/engage/api/smc-v1/postman/smc-api-rest-v1.postman.json" target="_blank">smc-api-rest-v1.postman.json</a> and copy the contents and paste in the "Import" > Paste "Raw Text" section.

    This collection takes advantage of Postman variables and environments to store/access your Selligent API key and base URL.

    - **baseUrl** - Your personalised Selligent base URL
    - **X-ApiKey** - Your Selligent secret API key.

    These variables can be found by navigating to "Admin Config" > "Access Management" > "Service Accounts" on the left-hand side of the administration section.
    Make sure your Selligent Environment is active, and your variable definitions match those listed above.


    <!-- # Developer documentation

    The Selligent API can provide very powerful manner for integrating, exchanging data and automating tasks.
    To facilitate with the usage of the API, we have created a number of guides in our development portal.

    Our getting started guide will demonstrate for a number of basic use
    cases. It will refer to this API reference us to highlight the implementation and refer to other information resources
    in Selligent that will be helpful for many other use cases too.
    [Click here to visit our developer portal](https://developers.meetmarigold.com/engage/). --> 
  contact:
    name: Team Selligent
    url: https://developers.meetmarigold.com/engage/
    email: info@zetaglobal.com
  license:
    name: All Rights Reserved
    url: https://zetaglobal.com/
  x-logo:
    url: ../../assets/logo/zeta_logoLandscape_1Color_WHITE.png
    backgroundColor: '#1677FF'
servers:
  - url: https://customername.slgnt.eu/Portal/Api
    description: Selligent V1 API endpoint (EU region)
  - url: https://customername.slgnt.us/Portal/Api
    description: Selligent V1 API endpoint (US region)
security:
  - ApiKeyAuth: []
tags:
  - name: Medium
    description: All medium endpoints
  - name: Organization
    description: All organization endpoints
  - name: CIM
    description: All cim endpoints
  - name: Content
    description: All content endpoints
  - name: Dictionary
    description: All dictionary endpoints
  - name: Dictionary Labels
    description: All endpoints to change labels inside a dictionary
  - name: Notification Group
    description: All notification group endpoints
  - name: Data Export
    description: All data export endpoints
  - name: Folder
    description: All folder endpoints
  - name: Data Import
    description: All data import endpoints
  - name: Journey
    description: All journey endpoints
  - name: AB journey
    description: Endpoints to create tests journeys to test your content
  - name: AB subject line journey
    description: Endpoints to create AB tests for subject lines
  - name: Recurring journey
    description: All recurring journey endpoints
  - name: Single Batch journey
    description: All single batch journey endpoints
  - name: Transactional journey
    description: All transactional journey endpoints
  - name: Transactional Bulk journey
    description: All transactional bulk journey endpoints
  - name: Custom journey
    description: All custom journey endpoints
  - name: Custom journey entrypoint
    description: All custom journey endpoints
  - name: List
    description: All list endpoints
  - name: List Custom Event
    description: All list event endpoints
  - name: List data
    description: All list data endpoints
  - name: List engagement
    description: All list engagement endpoints
  - name: List field
    description: All list field endpoints
  - name: List interest
    description: All list interest endpoints
  - name: List record
    description: All list record endpoints
  - name: List relation
    description: All list relation endpoints
  - name: List segment
    description: All list relation endpoints
  - name: Tag list
    description: All tag list endpoints
  - name: Task
    description: All task endpoints
  - name: Status
    description: All status endpoints
  - name: Stored Procedure
    description: All stored procedures endpoints
paths:
  /mediums:
    get:
      operationId: Medium_GetMediums
      summary: List mediums
      description: List defined medium configurations.
      parameters:
        - $ref: '#/components/parameters/filter'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/take'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mediums_Retrieve'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_ADMIN_CONFIG_INVALIDMEDIUMTYPE
                    description: Invalid medium type provided.
                result_code: ValidationFailed
                message: null
      tags:
        - Medium
  /mediums/{api_name}:
    get:
      operationId: Medium_GetMedium
      summary: Get medium
      description: Retrieve medium (Ftp/Url/Repository/AmazonS3) details.
      parameters:
        - $ref: '#/components/parameters/medium_api_name'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                anyOf:
                  - $ref: '#/components/schemas/Medium_Repository_Retrieve'
                  - $ref: '#/components/schemas/Medium_Url_Retrieve'
                  - $ref: '#/components/schemas/Medium_Ftp_Retrieve'
                  - $ref: '#/components/schemas/Medium_AzureBlob_Retrieve'
                discriminator:
                  propertyName: api_name
                  mapping:
                    repository: '#/components/schemas/Medium_Repository_Retrieve'
                    url: '#/components/schemas/Medium_Url_Retrieve'
                    ftp: '#/components/schemas/Medium_Ftp_Retrieve'
                    azureBlob: '#/components/schemas/Medium_AzureBlob_Retrieve'
        '404':
          description: Not found
      tags:
        - Medium
    delete:
      operationId: Medium_DeleteMedium
      summary: Delete medium
      description: Use this endpoint to delete a medium.
      parameters:
        - $ref: '#/components/parameters/medium_api_name'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The medium has been deleted successfully
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_ADMIN_CONFIG_MEDIUMNOTFOUND
                    description: Medium not found.
                result_code: Failed
                message: null
      tags:
        - Medium
  /mediums/amazons3:
    post:
      operationId: Medium_CreateAmazonS3Medium
      summary: Create AmazonS3 medium
      description: Use this endpoint to create a AmazonS3 medium.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_AmazonS3_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium created successfully.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_ADMIN_CONFIG_INVALIDBRAND
                    description: Organization 'Organization1' does not exist.
                result_code: Failed
                message: null
      tags:
        - Medium
  /mediums/amazons3/{api_name}:
    put:
      operationId: Medium_UpdateAmazonS3Medium
      summary: Update AmazonS3 medium
      description: Update a AmazonS3 medium.
      parameters:
        - $ref: '#/components/parameters/medium_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_AmazonS3_Update'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium updated successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_MEDIUM_VALIDATION
                    description: Failed to update medium
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - Medium
  /mediums/azureblob:
    post:
      operationId: Medium_CreateAzureBlobMedium
      summary: Create Azureblob medium
      description: Create an Azureblob medium.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_AzureBlob_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: null
      tags:
        - Medium
  /mediums/azureblob/{api_name}:
    put:
      operationId: Medium_UpdateAzureBlobMedium
      summary: Update Azureblob medium
      description: Update an Azureblob medium.
      parameters:
        - $ref: '#/components/parameters/medium_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_AzureBlob_Update'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium updated successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_MEDIUM_VALIDATION
                    description: Failed to update medium
                result_code: ValidationFailed
                message: null
      tags:
        - Medium
  /mediums/ftp:
    post:
      operationId: Medium_CreateFtpMedium
      summary: Create FTP medium
      description: Create a FTP medium.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_Ftp_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: null
      tags:
        - Medium
  /mediums/ftp/{api_name}:
    put:
      operationId: Medium_UpdateFtpMedium
      summary: Update FTP medium
      description: Update a FTP medium.
      parameters:
        - $ref: '#/components/parameters/medium_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_Ftp_Update'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium updated successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_MEDIUM_VALIDATION
                    description: Failed to update medium
                result_code: ValidationFailed
                message: null
      tags:
        - Medium
  /mediums/googlecloud:
    post:
      operationId: Medium_CreateGoogleCloudMedium
      summary: Create GOOGLECLOUD medium
      description: Create a GOOGLECLOUD medium.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_GoogleCloud_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: null
      tags:
        - Medium
  /mediums/googlecloud/{api_name}:
    put:
      operationId: Medium_UpdateGoogleCloudMedium
      summary: Update GOOGLECLOUD medium
      description: Update a GOOGLECLOUD medium.
      parameters:
        - $ref: '#/components/parameters/medium_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_GoogleCloud_Update'
        required: true
      responses:
        '200':
          description: updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium updated successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_MEDIUM_VALIDATION
                    description: Failed to update medium
                result_code: ValidationFailed
                message: null
      tags:
        - Medium
  /mediums/repository:
    post:
      operationId: Medium_CreateRepositoryMedium
      summary: Create Repository medium
      description: Create a Repository medium.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_Repository_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: null
      tags:
        - Medium
  /mediums/repository/{api_name}:
    put:
      operationId: Medium_UpdateRepositoryMedium
      summary: Update Repository medium
      description: Update a Repository medium.
      parameters:
        - $ref: '#/components/parameters/medium_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_Repository_Update'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium updated successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_MEDIUM_VALIDATION
                    description: Failed to update medium
                result_code: ValidationFailed
                message: null
      tags:
        - Medium
  /mediums/url:
    post:
      operationId: Medium_CreateUrlMedium
      summary: Create URL medium
      description: Create a URL medium
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_Url_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: null
      tags:
        - Medium
  /mediums/url/{api_name}:
    put:
      operationId: Medium_UpdateUrlMedium
      summary: Update URL medium
      description: Update a URL medium.
      parameters:
        - $ref: '#/components/parameters/medium_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Medium_Url_Update'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Medium updated successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_MEDIUM_VALIDATION
                    description: Failed to update medium
                result_code: ValidationFailed
                message: null
      tags:
        - Medium
  /organizations/{organization}/mediums:
    get:
      operationId: Medium_GetOrganizationMediums
      summary: List organization mediums
      description: Use this endpoint to get list of all mediums mapped to an organization.
      parameters:
        - $ref: '#/components/parameters/filter'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/take'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: This endpoint will retrieve list of mediums of an organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Mediums_Retrieve'
        '400':
          description: Represents a response for an unsuccessful retrieval in case of invalid medium type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_ADMIN_CONFIG_INVALIDMEDIUMTYPE
                    description: Invalid medium type provided.
                result_code: ValidationFailed
                message: null
      tags:
        - Medium
  /organizations/{organization}:
    get:
      operationId: Organization_Get
      summary: Get organization
      description: Retrieve the details of this organization set up on your instance of Selligent Marketing Cloud.
      parameters:
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/organization'
      tags:
        - Organization
  /organizations/{organization}/cim/{api_name}/collect:
    post:
      operationId: CIM_CreateCIMRequestOfTypeCollect
      summary: Create CIM collect request
      description: Create a request to collect customer(s) information in the specified list, based on the provided filters.
      parameters:
        - $ref: '#/components/parameters/user_list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CIM_Create'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CIM_Result_Retrieve'
      tags:
        - CIM
  /organizations/{organization}/cim/{api_name}/optout:
    post:
      operationId: CIM_CreateCIMRequestOfTypeOptOut
      summary: Create CIM optout request
      description: Create a request to optout customer(s) in the specified list, based on the provided filters.
      parameters:
        - $ref: '#/components/parameters/user_list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CIM_Create'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CIM_Result_Retrieve'
      tags:
        - CIM
  /organizations/{organization}/cim/{api_name}/remove:
    post:
      operationId: CIM_CreateCIMRequestOfTypeRemove
      summary: Create CIM remove request
      description: Create a request to remove customer(s) information in the specified list, based on the provided filters.
      parameters:
        - $ref: '#/components/parameters/user_list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CIM_Create'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CIM_Result_Retrieve'
      tags:
        - CIM
  /organizations/{organization}/cim/request/{requestId}:
    get:
      operationId: CIM_GetCIMRequestResult
      summary: Get CIM request payload
      parameters:
        - $ref: '#/components/parameters/cim_request_id'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Returns the result of the request linked to the given requestId.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CIM_Result_Retrieve'
      tags:
        - CIM
    delete:
      operationId: CIM_CancelCIMRequest
      summary: Cancel CIM request
      parameters:
        - $ref: '#/components/parameters/cim_request_id'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Cancels the request linked to the given requestId. Only requests in state NEW can be cancelled.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CIM_Result_Retrieve'
      tags:
        - CIM
  /organizations/{organization}/cim/request/{requestId}/state:
    get:
      operationId: CIM_GetCIMRequestState
      summary: Get state of CIM request
      parameters:
        - $ref: '#/components/parameters/cim_request_id'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CIM_State_Retrieve'
      tags:
        - CIM
  /organizations/{organization}/content/{api_name}:
    get:
      operationId: Content_GetContent
      summary: Get content
      description: Returns information on the requested Content.
      parameters:
        - $ref: '#/components/parameters/content_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Object containing information about the requested content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content'
      tags:
        - Content
    delete:
      operationId: Content_Delete
      summary: Remove content
      parameters:
        - $ref: '#/components/parameters/content_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Content has been deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The content has been deleted successfully
        '400':
          description: Content could not be deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                result_code: Failed
                message: null
                errors:
                  - error_code: ERR_CONTENT_VALIDATION_CONTENTISLOCK
                    description: Failed to delete the content since it is locked.
      tags:
        - Content
  /organizations/{organization}/content/{api_name}/lockstate:
    get:
      operationId: Content_GetContentLockState
      summary: Get content lock state
      description: returns the lock state (being edited by someone) of the requested Content.
      parameters:
        - $ref: '#/components/parameters/content_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Content_Lock_State_Retrieve'
              example:
                lockstate: locked
      tags:
        - Content
  /organizations/{organization}/content/{api_name}/unlock:
    put:
      operationId: Content_UnlockContent
      summary: Unlock content
      description: Forces an unlock for the requested Content.
      parameters:
        - $ref: '#/components/parameters/content_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The content has been unlocked successfully
                errors: []
        '400':
          description: Error ocurred while unlocking the content.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                result_code: Failed
                message: An Error occurred while unlocking the content
                errors:
                  - error_code: UNLOCKCONTENTFAILED
                    description: Failed to unlock content
      tags:
        - Content
  /organizations/{organization}/content/email:
    post:
      operationId: Content_CreateEmailContent
      summary: Create email
      description: API to create simple (only html) single language message of email.
      parameters:
        - $ref: '#/components/parameters/publish'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Email_Create'
        required: true
      responses:
        '201':
          description: Email message content created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The Email message has been created successfully.
                errors: []
        '400':
          description: Email message content Not created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Content
  /organizations/{organization}/content/mms:
    post:
      operationId: CreateMmsContent
      summary: Create MMS
      description: Create an MMS template.
      parameters:
        - $ref: '#/components/parameters/publish'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Mms_Create'
        required: true
      responses:
        '201':
          description: MMS created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The MMS message has been created successfully.
                errors: []
        '400':
          description: Could not create MMS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Content
  /organizations/{organization}/content/mobile:
    post:
      operationId: CreateMobileMessageContent
      summary: Create mobile push
      description: API to create a Mobile push message.
      parameters:
        - $ref: '#/components/parameters/publish'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Mobile_Create'
        required: true
      responses:
        '201':
          description: Mobile push created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The Mobile message has been created successfully.
                errors: []
        '400':
          description: Could not create mobile push
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Content
  /organizations/{organization}/content/page:
    post:
      operationId: CreatePageContent
      summary: Create page
      description: API to create single language page content.
      parameters:
        - $ref: '#/components/parameters/publish'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Page_Create'
        required: true
      responses:
        '201':
          description: Page created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The Page content has been created successfully.
                errors: []
        '400':
          description: Could not create page
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Content
  /organizations/{organization}/content/rcs:
    post:
      operationId: CreateRcsContent
      summary: Create RCS
      description: Create a single language RCS.
      parameters:
        - $ref: '#/components/parameters/publish'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Rcs_Create'
        required: true
      responses:
        '201':
          description: RCS created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The RCS message has been created successfully.
                errors: []
        '400':
          description: Could not create RCS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Content
  /organizations/{organization}/content/sms:
    post:
      operationId: CreateSmsContent
      summary: Create SMS
      description: Create a single language SMS.
      parameters:
        - $ref: '#/components/parameters/publish'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Sms_Create'
        required: true
      responses:
        '201':
          description: SMS created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The SMS message has been created successfully.
                errors: []
        '400':
          description: Could not create SMS
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Content
  /organizations/{organization}/dictionaries:
    get:
      operationId: Dictionary_GetDictionaries
      summary: List dictionaries
      description: List dictionaries matching the given criteria.
      parameters:
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/take'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dictionaries'
      tags:
        - Dictionary
    post:
      operationId: Dictionary_CreateDictionary
      summary: Create dictionary
      description: Create a dictionary.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dictionary_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Dictionary created successfully.
                errors: []
        '400':
          description: Failed to create dictionary
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_LABEL_VALIDATION
                    description: Failed to create dictionary.
                result_code: ValidationFailed
                message: null
      tags:
        - Dictionary
  /organizations/{organization}/dictionaries/{api_name}:
    get:
      operationId: Dictionary_GetDictionary
      summary: Get dictionary
      description: Use this endpoint to get details of the dictionary with the given API name.
      parameters:
        - $ref: '#/components/parameters/dictionary_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Dictionary_Retrieve'
      tags:
        - Dictionary
    put:
      operationId: Dictionary_UpdateDictionary
      summary: Update dictionary
      description: Use this endpoint to update an existing dictionary.
      parameters:
        - $ref: '#/components/parameters/dictionary_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Dictionary_Update'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Dictionary updated successfully.
                errors: []
        '400':
          description: Failed to update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_LABEL_VALIDATION
                    description: Failed to update dictionary.
                result_code: ValidationFailed
                message: null
      tags:
        - Dictionary
    delete:
      operationId: Dictionary_DeleteDictionary
      summary: Delete dictionary
      description: Use this endpoint to delete an existing dictionary.
      parameters:
        - $ref: '#/components/parameters/dictionary_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Dictionary deleted successfully.
                errors: []
        '400':
          description: Failed to delete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Failed to delete dictionary.
                result_code: ValidationFailed
                message: null
      tags:
        - Dictionary
  /organizations/{organization}/dictionaries/{api_name}/labels:
    get:
      operationId: Dictionary_GetLabels
      summary: List dictionary labels
      description: List labels for a particular dictionary.
      parameters:
        - $ref: '#/components/parameters/data_import_api_name'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/take'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: This endpoint will retrieve all labels for a specified dictionary with given api_name.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Labels'
      tags:
        - Dictionary Labels
    post:
      operationId: Dictionary_CreateLabel
      summary: Create dictionary label
      description: Use this endpoint to create a label in a dictionary.
      parameters:
        - $ref: '#/components/parameters/dictionary_api_name'
        - $ref: '#/components/parameters/sync'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Label_Create'
        required: true
      responses:
        '200':
          description: Created Label
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Label created successfully.
                errors: []
        '400':
          description: Failed to create label
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_LABEL_VALIDATION
                    description: Failed to create label.
                result_code: ValidationFailed
                message: null
      tags:
        - Dictionary Labels
  /organizations/{organization}/dictionaries/{api_name}/labels/{label}:
    put:
      operationId: Dictionary_UpdateLabel
      summary: Update dictionary label
      description: Use this endpoint to update an existing label in a dictionary.
      parameters:
        - $ref: '#/components/parameters/data_import_api_name'
        - $ref: '#/components/parameters/label'
        - $ref: '#/components/parameters/sync'
        - $ref: '#/components/parameters/organization'
      requestBody:
        description: The model object consists of label details that is used to update an existing label in a dictionary.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Label_Update'
        required: true
      responses:
        '200':
          description: This endpoint will update an existing label.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Label updated successfully.
                errors: []
        '400':
          description: Failed to update label.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_LABEL_VALIDATION
                    description: Failed to update label.
                result_code: ValidationFailed
                message: null
      tags:
        - Dictionary Labels
    delete:
      operationId: Dictionary_DeleteLabel
      summary: Delete dictionary label
      description: Use this endpoint to delete a label in a dictionary.
      parameters:
        - $ref: '#/components/parameters/dictionary_api_name'
        - $ref: '#/components/parameters/label'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Label deleted successfully.
                errors: []
        '400':
          description: Failed to delete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Failed to delete label.
                result_code: ValidationFailed
                message: null
      tags:
        - Dictionary Labels
  /notificationgroups:
    get:
      operationId: NotificationGroup_RetrieveNotificationGroups
      summary: List notification groups
      description: Retrieve all the notification groups.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Notification_Groups'
      tags:
        - Notification Group
    post:
      operationId: NotificationGroup_CreateNotificationGroup
      summary: Create notification group
      description: Create a new notification group.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Notification_Group_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Notification group saved successfully.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Notification Group
  /notificationgroups/{api_name}:
    get:
      operationId: NotificationGroup_GetNotificationGroup
      summary: Get notification group
      description: Get the details of the notification group with given API name.
      parameters:
        - $ref: '#/components/parameters/notification_group_api_name'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Notification_Group_Retrieve'
      tags:
        - Notification Group
    put:
      operationId: NotificationGroup_UpdateNotificationGroup
      summary: Update notification group
      description: Update the properties of the given notification group.
      parameters:
        - $ref: '#/components/parameters/notification_group_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Notification_Group_Update'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Notification group saved successfully.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Notification Group
    delete:
      operationId: NotificationGroup_DeleteNotificationGroup
      summary: Delete notification group
      description: Delete a notification group.
      parameters:
        - $ref: '#/components/parameters/notification_group_api_name'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Notification group deleted successfully.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Failed to delete notification group.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - Notification Group
  /organizations/{organization}/exports/{api_name}:
    delete:
      operationId: DataExport_DeleteDataExport
      summary: Delete data export
      description: Use this endpoint to delete a data export.
      parameters:
        - $ref: '#/components/parameters/data_export_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Data export has been deleted successfully.
                errors: []
        '400':
          description: Could not delete export
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Failed to delete data export.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - Data Export
  /organizations/{organization}/folders:
    post:
      operationId: Folder_CreateFolder
      summary: Create folder
      description: Use this endpoint to create a folder.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Folder_Create'
        required: true
      responses:
        '200':
          description: The folder was successfully created in the given organization, under the provided parent folder.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Folder_Response'
              example:
                folder:
                  id: 1
                  name: folder_1
        '400':
          description: Failed to create folder
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_LABEL_VALIDATION
                    description: Name already exists.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - Folder
  /organizations/{organization}/folders/{id}:
    get:
      operationId: Folder_RetrieveFolderContent
      summary: Get folder tree
      description: Use this endpoint to retrieve the contents of a folder on the given organization.
      parameters:
        - $ref: '#/components/parameters/organization'
        - name: id
          in: path
          required: true
          schema:
            description: ID of the folder. ID 0 is the root folder.
            type: integer
            format: int64
            example: 1
      responses:
        '200':
          description: This endpoint will retrieve the contents of a folder on the given organization.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Folder_Retrieve'
              example:
                result_code: Succeeded
                id: 100
                name: TestFolder
                children:
                  - id: 10
                    name: folder_1
                    type: FOLDER
                  - name: TestTemplate
                    api_name: TestTemplate
                    type: TMP
                    leaf_type: Template
                  - name: TestEmail
                    api_name: TestEmail
                    type: TMP
                    leaf_type: Email
                  - name: TestMobilePush
                    api_name: TestMobilePush
                    type: TMP
                    leaf_type: MobilePush
                  - name: TestPage
                    api_name: TestPage
                    type: TMP
                    leaf_type: Page
                  - name: TestDataSync
                    api_name: TestDataSync
                    type: CRMDATASYNC
                    leaf_type: CRMDataSync
                  - name: TestImport
                    api_name: TestImport
                    type: IMPORT
                    leaf_type: ImportConfig
                  - name: TestTask
                    api_name: TestTask
                    type: TASK
                    leaf_type: Sql
                  - name: TestCustomComponent
                    api_name: TestCustomComponent
                    type: CUSTOMCOMPONENTS
                    leaf_type: CustomComponent
                  - name: TestList
                    api_name: TestList
                    type: LIST
                    leaf_type: Articlelist
                  - name: TestContentBlock
                    api_name: TestContentBlock
                    type: CONTENTBLOCK
                    leaf_type: ContentBlock
                  - name: TestSingleBatchJourney
                    api_name: TestSingleBatchJourney
                    type: EXEC
                    leaf_type: SingleBatch
      tags:
        - Folder
  /organizations/{organization}/imports/{api_name}:
    delete:
      operationId: DataImport_DeleteDataImport
      summary: Delete data import
      description: Use this endpoint to delete a data import.
      parameters:
        - $ref: '#/components/parameters/data_import_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Data import has been deleted successfully.
                errors: []
        '400':
          description: Could not delete Data Import
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Failed to delete data import.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - Data Import
  /organizations/{organization}/journeys:
    get:
      operationId: Journey_Get
      summary: list journeys
      description: Retrieve the last 1000 created journeys.
      parameters:
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Journeys'
      tags:
        - Journey
  /organizations/{organization}/journeys/ab/{api_name}:
    get:
      operationId: AB_Get
      summary: Get AB journey
      description: Use this endpoint to check whether AB journey already exists.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ab_Retrieve'
              example:
                api_name: journey_1
                type: ab
                name: journey_1
                description: this is the description.
      tags:
        - AB journey
    delete:
      operationId: AB_Delete
      summary: Delete AB journey
      description: Use this endpoint to delete existing AB journey.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: AB journey deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been deleted successfully
                errors: []
      tags:
        - AB journey
  /organizations/{organization}/journeys/ab:
    post:
      operationId: AB_Create
      summary: Create AB journey
      description: Use this endpoint to create an AB journey.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Ab_Create'
        required: true
      responses:
        '201':
          description: AB Journey created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Success'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Error'
      tags:
        - AB journey
  /organizations/{organization}/journeys/ab/{api_name}/launch:
    post:
      operationId: AB_Launch
      summary: Launch an AB journey
      description: Launch a specific AB journey journey given the schedule.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              discriminator:
                propertyName: launch_state
                mapping:
                  scheduled: '#/components/schemas/Single_Batch_Launch_Required_Schedule'
                  launch: '#/components/schemas/Single_Batch_Launch'
                  none: '#/components/schemas/Single_Batch_Launch'
              oneOf:
                - $ref: '#/components/schemas/Single_Batch_Launch'
                - $ref: '#/components/schemas/Single_Batch_Launch_Required_Schedule'
        required: true
      responses:
        '200':
          description: Launched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been launched successfully.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - AB journey
  /organizations/{organization}/journeys/ab_subject/{api_name}:
    get:
      operationId: AB_Subject_Get
      summary: Get AB subject line journey
      description: Use this endpoint to check whether AB subject line journey already exists.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Ab_Retrieve'
              example:
                api_name: journey_1
                type: ab_subject
                name: journey_1
                description: this is the description.
      tags:
        - AB subject line journey
    delete:
      operationId: AB_Subject_Delete
      summary: Delete AB subject line journey
      description: Use this endpoint to delete existing AB subject line journey.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: AB journey deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been deleted successfully
                errors: []
      tags:
        - AB subject line journey
  /organizations/{organization}/journeys/ab_subject:
    post:
      operationId: AB_Subject_Create
      summary: Create AB subject line journey
      description: Use this endpoint to create an AB Subject line journey.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Ab_Subject'
        required: true
      responses:
        '201':
          description: AB subject line journey created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Success'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Error'
      tags:
        - AB subject line journey
  /organizations/{organization}/journeys/ab_subject/{api_name}/launch:
    post:
      operationId: AB_Subject_Launch
      summary: Launch an AB subject line journey
      description: Launch a specific AB subject line journey given the schedule.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              discriminator:
                propertyName: launch_state
                mapping:
                  scheduled: '#/components/schemas/Single_Batch_Launch_Required_Schedule'
                  launch: '#/components/schemas/Single_Batch_Launch'
                  none: '#/components/schemas/Single_Batch_Launch'
              oneOf:
                - $ref: '#/components/schemas/Single_Batch_Launch'
                - $ref: '#/components/schemas/Single_Batch_Launch_Required_Schedule'
        required: true
      responses:
        '200':
          description: Launched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been launched successfully.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - AB subject line journey
  /organizations/{organization}/journeys/custom/{api_name}:
    get:
      operationId: Custom_Get
      summary: Get custom journey
      description: Use this endpoint to check whether custom journey already exists.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Custom'
              example:
                api_name: journey_1
                type: custom
                name: journey_1
                description: this is the description.
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: string
      tags:
        - Custom journey
    delete:
      operationId: Custom_Delete
      summary: Delete custom journey
      description: Use this endpoint to delete existing custom journey.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been deleted successfully
            text/json:
              schema:
                $ref: '#/components/schemas/Success'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: string
      tags:
        - Custom journey
  /organizations/{organization}/journeys/custom/{api_name}/entrypoints:
    get:
      operationId: Custom_GetEntryPoints
      summary: List custom journey entrypoint components
      description: Lists all entry point components in the custom journey usable via api.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Entrypoints'
              example:
                - info: null
                  model:
                    entry_point_type: Input
                    name: My name of the entry point
                    api_name: entrypoint_api_name
                - info: this entry point can not be used to trigger the journey as it is not yet published
                  model:
                    entry_point_type: Input
                    name: null
                    api_name: null
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: string
        '404':
          description: Not found
      tags:
        - Custom journey entrypoint
  /organizations/{organization}/journeys/custom/{api_name}/entrypoints/{entrypoint_api_name}:
    get:
      operationId: Custom_GetEntryPoint
      summary: Get custom journey entrypoint
      description: Gets detailed information about the entry point component.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - name: entrypoint_api_name
          in: path
          description: the api name of the entry point defined in the custom journey.
          required: true
          schema:
            type: string
            example: entrypoint_api_name_custom_journey
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entrypoint_Retrieve'
              example:
                system_info: some optional system information about the entry point.
                model:
                  entry_point_type: Input
                  name: My name of the entry point
                  api_name: entrypoint_api_name
                  parameters:
                    - name: PARAM1
                      required: true
                    - name: PARAM2
                      required: false
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: string
        '404':
          description: Not found
      tags:
        - Custom journey entrypoint
  /organizations/{organization}/journeys/custom/{api_name}/entrypoints/{entrypoint_api_name}/trigger:
    post:
      operationId: Custom_TriggerEntryPoint
      summary: Trigger custom journey entrypoint
      description: This will trigger a specific start component in the custom journey
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - name: entrypoint_api_name
          in: path
          description: the api name of the entry point defined in the custom journey.
          required: true
          schema:
            type: string
            example: entrypoint_api_name_custom_journey
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Trigger'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Entrypoint_Trigger_Response'
        '400':
          description: Failed to trigger
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: string
        '404':
          description: Not found
      tags:
        - Custom journey entrypoint
  /organizations/{organization}/journeys/recurring/{api_name}:
    get:
      operationId: Recurring_Get
      summary: Get recurring journey
      description: retrieve information about the specified recurring journey, if it exists.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Recurring'
              example:
                api_name: journey_1
                type: recurring
                name: journey_1
                description: this is the description.
      tags:
        - Recurring journey
    delete:
      operationId: Recurring_Delete
      summary: Delete recurring journey
      description: Delete an existing recurring journey.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been deleted successfully
                errors: []
      tags:
        - Recurring journey
  /organizations/{organization}/journeys/singlebatch:
    get:
      operationId: SingleBatch_Get
      summary: List Single Batch journeys
      description: Use this endpoint to retrieve all journeys on the given organization of type Single Batch.
      parameters:
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batches'
              example:
                journeys:
                  - api_name: api_name_1
                    type: singlebatch
                  - api_name: api_name_2
                    type: singlebatch
      tags:
        - Single Batch journey
    post:
      operationId: SingleBatch_Create
      summary: Create Single Batch journey
      description: Use this endpoint to create a new Single-Batch journey.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Single_Batch_Create'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Success'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Error'
      tags:
        - Single Batch journey
  /organizations/{organization}/journeys/singlebatch/{api_name}:
    get:
      operationId: SingleBatch_GetByAPIName
      summary: Get Single Batch journey
      description: Use this endpoint to retrieve information on the Single Batch journey with the given api name.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Retrieve'
      tags:
        - Single Batch journey
    delete:
      operationId: SingleBatch_Delete
      summary: Delete Single Batch journey
      description: Use this endpoint to delete existing single batch journey.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been deleted successfully
      tags:
        - Single Batch journey
  /organizations/{organization}/journeys/singlebatch/{api_name}/cancel:
    post:
      operationId: SingleBatch_Cancel
      summary: Cancel a journey
      description: Cancel the execution or scheduled execution of a Single Batch journey.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Journey has been cancelled successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been cancelled successfully.
        '400':
          description: Journey cancel was not successful
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
        '404':
          description: Journey (api_name or organization) cannot be found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Single Batch journey
  /organizations/{organization}/journeys/singlebatch/{api_name}/launch:
    post:
      operationId: SingleBatch_Launch
      summary: Launch a single batch journey
      description: Launch a specific Single Batch journey given the schedule.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              discriminator:
                propertyName: launch_state
                mapping:
                  scheduled: '#/components/schemas/Single_Batch_Launch_Required_Schedule'
                  launch: '#/components/schemas/Single_Batch_Launch'
                  none: '#/components/schemas/Single_Batch_Launch'
              oneOf:
                - $ref: '#/components/schemas/Single_Batch_Launch'
                - $ref: '#/components/schemas/Single_Batch_Launch_Required_Schedule'
        required: true
      responses:
        '200':
          description: Launched
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been launched successfully.
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Single Batch journey
  /organizations/{organization}/journeys/singlebatch/{api_name}/trigger:
    post:
      operationId: SingleBatch_Trigger
      summary: Trigger single batch journey
      description: Use this endpoint to trigger a Single-Batch journey execution.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Single_Batch_Trigger_Create'
        required: true
      responses:
        '201':
          description: Triggered
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Success'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Error'
      tags:
        - Single Batch journey
  /organizations/{organization}/journeys/singlebatch/message:
    post:
      operationId: SingleBatch_CreateSingleBatchEmailMessage
      summary: Send Single Batch email journey
      description: Use this end point to send single batch with an email message.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Single_Batch_Email'
        required: true
      responses:
        '200':
          description: Scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Success'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Error'
      tags:
        - Single Batch journey
  /organizations/{organization}/journeys/singlebatch/mobile:
    post:
      operationId: SingleBatch_CreateSingleBatchMobilePush
      summary: Send Single Batch mobile push journey
      description: Use this end point to send single batch with a mobile push message.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Single_Batch_Mobile'
        required: true
      responses:
        '200':
          description: Scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Success'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Error'
      tags:
        - Single Batch journey
  /organizations/{organization}/journeys/singlebatch/sms:
    post:
      operationId: SingleBatch_CreateSingleBatchSms
      summary: Send Single Batch SMS journey
      description: Use this end point to send single batch with an SMS.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Single_Batch_Sms'
        required: true
      responses:
        '200':
          description: Scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Success'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Single_Batch_Error'
      tags:
        - Single Batch journey
  /organizations/{organization}/journeys/transactional:
    get:
      operationId: Transactional_Get
      summary: List Transactional journeys
      description: Use this endpoint to retrieve all journeys on the given organization of type Transactional.
      parameters:
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactionals'
      tags:
        - Transactional journey
  /organizations/{organization}/journeys/transactional/{api_name}:
    get:
      operationId: Transactional_GetByAPIName
      summary: Get Transactional journey
      description: Use this endpoint to retrieve information on the transactional journey with the given api name.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Retrieve'
      tags:
        - Transactional journey
    delete:
      operationId: Transactional_Delete
      summary: Delete Transactional journey
      description: Use this endpoint to delete existing transactional journey.
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The journey has been deleted successfully.
                errors: []
      tags:
        - Transactional journey
  /organizations/{organization}/journeys/transactional/{api_name}/send:
    post:
      operationId: Transactional_Send
      summary: Trigger Transactional journey(s)
      description: Use this endpoint to send (multiple) transactional messages (email mobile push sms).
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Transactional_Trigger_Create'
        required: true
      responses:
        '200':
          description: Scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Trigger_Response'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Trigger_Response'
        '413':
          description: Content to large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Trigger_Response'
      tags:
        - Transactional journey
  /organizations/{organization}/journeys/transactional/shortcut/{api_name}/updateProfileAndSend:
    post:
      operationId: TransactionalShortcut_UpdateProfileAndSendTransactional
      summary: Update User and trigger Transactional journey
      description: Use this endpoint to update the user profile with given data and then send (multiple) transactional messages (email mobile push sms).
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Transactional_Update_and_Trigger'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Trigger_Response'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Trigger_Response'
        '413':
          description: Content to large
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Trigger_Response'
      tags:
        - Transactional journey
  /organizations/{organization}/journeys/transactional/status:
    post:
      operationId: Transactional_GetStatus
      summary: List status Transactional journeys
      description: Use this endpoint to get the status of multiple transactional messages.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Transactional_Status_Request'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Statuses'
      tags:
        - Transactional journey
  /organizations/{organization}/journeys/transactional/status/{id}:
    get:
      operationId: Transactional_GetStatusById
      summary: Get status transactional journey
      description: Use this endpoint to get the status of a transactional message with a given id.
      parameters:
        - name: id
          in: path
          description: ID of the message. This is found in the return model of the [Send](#tag/Transactional-journey/operation/Transactional_Send) or [UpdateProfileAndSend](#tag/Transactional-journey/operation/TransactionalShortcut_UpdateProfileAndSendTransactional) call.
          required: true
          schema:
            type: string
            format: uuid
            example: 973592c1-7198-4b10-aab1-db0da381cd13
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Transactional_Status_Retrieve'
      tags:
        - Transactional journey
  /organizations/{organization}/journeys/transactional/bulk/{api_name}/send:
    post:
      operationId: TransactionalBulk_Send
      summary: Trigger Transactional Bulk journey
      description: Use this method to trigger a bulk journey in a transactional way
      parameters:
        - $ref: '#/components/parameters/journey_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Scheduled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                result_code: PartiallySucceeded
                errors:
                  - error_code: Failed
                    description: an error has occurred
      tags:
        - Transactional Bulk journey
  /organizations/{organization}/lists:
    get:
      operationId: List_GetLists
      summary: Get lists
      description: Get Lists defined for an organization.
      parameters:
        - name: filter
          in: query
          description: Filter by list typ(s). Multiple types can be provided comma separated.
          schema:
            type: string
            example: UserList, Datalist
            enum:
              - Unknown
              - Userlist
              - Datalist
              - DataSelectionList
              - Optionlist
              - Devicelist
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - name: take
          in: query
          description: The maximum amount of items to return.
          schema:
            type: integer
            format: int32
            example: 1
            default: -1
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Lists'
      tags:
        - List
    post:
      operationId: List_CreateList
      summary: Create list
      description: Create a new list in the given organization.
      parameters:
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Create'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: List created successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List
  /organizations/{organization}/lists/{api_name}:
    get:
      operationId: List_GetList
      summary: Get List
      description: Get a list of details for the list with the given API name.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Retrieve'
      tags:
        - List
    put:
      operationId: List_UpdateList
      summary: Update list
      description: Use this endpoint to update a list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Update'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: List updated successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List
    delete:
      operationId: List_Delete
      summary: Delete list
      description: Delete a list by its API name in the given organization.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/drop_table'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The list has been deleted successfully
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to delete list.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - List
  /organizations/{organization}/lists/{api_name}/customevents:
    get:
      operationId: List_RetrieveCustomEvents
      summary: List Custom Events
      description: Use this endpoint to get custom events
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - name: filter
          in: query
          description: Filter by event type.
          schema:
            type: string
            example: Streaming,Scheduled
            enum:
              - Streaming
              - Scheduled
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/take'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Custom_Events'
              example:
                custom_events:
                  - name: Custom event 1
                  - name: Custom event 2
                  - name: Custom event 3
      tags:
        - List Custom Event
    post:
      operationId: List_CreateCustomEvent
      summary: Create List Custom Event
      description: Use this endpoint to create a new custom event.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Custom_Event_Create'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The custom event has been saved successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List Custom Event
  /organizations/{organization}/lists/{api_name}/customevents/{custom_event_name}:
    get:
      operationId: List_RetrieveCustomEvent
      summary: Get List Custom Event
      description: Use this endpoint to get custom event details based on list API name and custom event name.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/custom_event_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Custom_Event_Retrieve'
      tags:
        - List Custom Event
    put:
      operationId: List_UpdateCustomEvent
      summary: Update List Custom Event
      description: Use this endpoint to update a custom event.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/custom_event_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Custom_Event_Update'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The custom event has been updated successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List Custom Event
    delete:
      operationId: List_DeleteCustomEvent
      summary: Delete List Custom Event by name
      description: Use this endpoint to delete a custom event by its name in the given organization.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/custom_event_name'
        - $ref: '#/components/parameters/drop_table'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The custom event has been deleted successfully
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to delete custom event.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - List Custom Event
  /organizations/{organization}/lists/{api_name}/customevents/{custom_event_name}/trigger:
    post:
      operationId: List_TriggerCustomEventResolverJourney
      summary: Trigger custom event Data processing
      description: Use this endpoint to trigger the system, to process all incoming data on the custom event.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/custom_event_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: trigger custom event request accepted and waiting to be processed.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                message: triggering a custom event has failed
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to trigger the custom event.
                result_code: Failed
      tags:
        - List Custom Event
  /organizations/{organization}/lists/{api_name}/customevents/{custom_event_name}/fields:
    get:
      operationId: List_RetrieveCustomEventFields
      summary: Get custom event fields
      description: Use this endpoint to get custom event fields based on list API name and custom event name.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/custom_event_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Custom_Event_Fields_Retrieve'
              example:
                fields:
                  - name: field_1
                    length: 50
                    data_type: Text
                    description: This is a field of type text.
                    allow_null: false
                    content: Free
                  - name: field_2
                    data_type: Numeric
                    description: This is a field of type numeric.
                    allow_null: false
                    content: Free
                  - name: field_3
                    length: 50
                    data_type: Text
                    description: This is a field of type text with text optionlist association.
                    allow_null: true
                    content: Multi
                    optionlist: Optionlist_Text_ApiName
                  - name: field_4
                    data_type: Numeric
                    description: This is a field of type numeric with numeric optionlist association.
                    allow_null: false
                    content: Single
                    optionlist: Optionlist_Numeric_ApiName
                  - name: field_5
                    data_type: Boolean
                    description: This is a field of type boolean.
                    allow_null: false
                    content: Free
                  - name: field_6
                    length: 50
                    data_type: Text
                    description: This is a field of type text.
                    allow_null: true
                    content: ComputedPersisted
                    value_definition: '[%[MASTER.ID]%]'
                  - name: field_7
                    data_type: Json
                    description: This is a field of type json.
                    allow_null: true
                    content: Free
                    json_schema:
                      - name: TextElement
                        input_type: Text
                        required: true
                      - name: DateElement
                        input_type: Date
                        required: true
                      - name: ArrayElement
                        input_type: Array
                        required: true
                        child_data:
                          - name: SubProperty1
                            input_type: Text
                            required: true
                          - name: SubProperty2
                            input_type: Boolean
                            required: true
      tags:
        - List Custom Event
    post:
      operationId: List_CreateCustomEventFields
      summary: Create custom event field
      description: Use this endpoint to create a custom event fields.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/custom_event_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Custom_Event_Fields_Create'
            example:
              fields:
                - name: field_1
                  length: 50
                  data_type: Text
                  description: This is a field of type text.
                  allow_null: false
                  content: Free
                - name: field_2
                  data_type: Numeric
                  description: This is a field of type numeric.
                  allow_null: false
                  content: Free
                - name: field_3
                  length: 50
                  data_type: Text
                  description: This is a field of type text with text optionlist association.
                  allow_null: true
                  content: Multi
                  optionlist: Optionlist_Text_ApiName
                - name: field_4
                  data_type: Numeric
                  description: This is a field of type numeric with numeric optionlist association.
                  allow_null: false
                  content: Single
                  optionlist: Optionlist_Numeric_ApiName
                - name: field_5
                  data_type: Boolean
                  description: This is a field of type boolean.
                  allow_null: false
                  content: Free
                - name: field_6
                  length: 50
                  data_type: Text
                  description: This is a field of type text.
                  allow_null: true
                  content: ComputedPersisted
                  value_definition: '[%[MASTER.ID]%]'
                - name: field_7
                  data_type: Json
                  description: This is a field of type json.
                  allow_null: true
                  content: Free
                  json_schema:
                    - name: TextElement
                      input_type: Text
                      required: true
                    - name: DateElement
                      input_type: Date
                      required: true
                    - name: ArrayElement
                      input_type: Array
                      required: true
                      child_data:
                        - name: SubProperty1
                          input_type: Text
                          required: true
                        - name: SubProperty2
                          input_type: Boolean
                          required: true
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Fields created successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List Custom Event
  /organizations/{organization}/lists/{api_name}/customevents/{custom_event_name}/fields/{name}:
    delete:
      operationId: List_DeleteCustomEventField
      summary: Delete Custom Event field
      description: Use this endpoint to delete a custom event field based on list's API name, custom event name and name of the field.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/custom_event_name'
        - $ref: '#/components/parameters/field_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The custom event field has been deleted successfully
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to delete custom event field.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - List Custom Event
  /organizations/{organization}/lists/{api_name}/customevents/{custom_event_name}/fields/{field_name}:
    put:
      operationId: List_UpdateCustomEventField
      summary: Update list custom event field
      description: Use this endpoint to update a custom event field.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/custom_event_name'
        - $ref: '#/components/parameters/field_name_2'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Custom_Event_Field_Body'
            example:
              name: FIELD
              description: This is FIELD with text optionlist association.
              content: Free
              optionlist: option_list_api_name
              json_schema:
                - name: TextElement
                  input_type: Text
                  required: true
                - name: DateElement
                  input_type: Date
                  required: true
                - name: ArrayElement
                  input_type: Array
                  required: true
                  child_data:
                    - name: SubProperty1
                      input_type: Text
                      required: true
                    - name: SubProperty2
                      input_type: Boolean
                      required: true
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The custom event field has been updated successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to update the field.
                result_code: Failed
                message: Error message
      tags:
        - List Custom Event
  /organizations/{organization}/lists/{api_name}/fields:
    get:
      operationId: List_GetListFields
      summary: Get list fields
      description: Use this endpoint to get list fields based on API name of list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Fields_Retrieve'
              example:
                fields:
                  - name: field_1
                    length: 50
                    data_type: Text
                    description: This is a field of type text.
                    allow_null: false
                    content: Free
      tags:
        - List field
    post:
      operationId: List_CreateListFields
      summary: Create list fields
      description: Use this endpoint to create list fields.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Fields_Create'
            example:
              fields:
                - allow_null: false
                  data_type: Text
                  description: Some text field
                  length: 50
                  name: TextField
                - allow_null: true
                  data_type: Boolean
                  description: Some boolean field
                  name: BooleanField
                - allow_null: true
                  data_type: Date
                  description: Some date field
                  name: DateField
                - allow_null: true
                  data_type: DateTime
                  description: Some date time field
                  name: DateTimeField
                - allow_null: true
                  data_type: Float
                  description: Some float field
                  name: FloatField
                - allow_null: true
                  data_type: Long
                  description: Some long field
                  name: LongField
                - allow_null: true
                  data_type: LongText
                  description: Some long text field
                  name: LongTextField
                - allow_null: true
                  data_type: Numeric
                  description: Some numeric field
                  name: NumericField
                - allow_null: false
                  data_type: Numeric
                  description: Some numeric field
                  name: NumericFieldWithNumericOptionList
                  content: Single
                  optionlist: Optionlist_Numeric_ApiName
                - allow_null: true
                  data_type: Text
                  length: 50
                  description: Some text field
                  name: TextFieldWithTextOptionList
                  content: Multi
                  optionlist: Optionlist_Text_ApiName
                - allow_null: true
                  data_type: Boolean
                  description: Some boolean field
                  name: BooleanFieldWithContentFree
                  content: Free
                - allow_null: true
                  data_type: Text
                  description: Some field
                  name: ComputedNonPersistedField
                  content: ComputedNonPersisted
                  value_definition: '[%[MASTER.NAME]%]'
                - allow_null: true
                  data_type: Text
                  description: Some field
                  name: ComputedPersistedField
                  content: ComputedPersisted
                  value_definition: '[%lower( [MASTER.NAME] )%]'
                - allow_null: true
                  data_type: Text
                  length: 50
                  name: TextFieldWithIdentifiers
                  description: The type Lookup is used for a 'Data Selection Identifiers Set' field
                  content: Lookup
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Fields created successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List field
  /organizations/{organization}/lists/{api_name}/fields/{name}:
    put:
      operationId: List_UpdateListField
      summary: Update list field
      description: Use this endpoint to update an existing field of list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/field_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        description: Parameter for details containing the new field information.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Field_Update'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The field has been updated successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to update the field.
                result_code: Failed
                message: Error message
      tags:
        - List field
    delete:
      operationId: List_DeleteListField
      summary: Delete list field
      description: Use this endpoint to delete a list field based on list's API name and name of the field
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/field_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: List field deleted successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to delete field.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - List field
  /organizations/{organization}/lists/{api_name}/records:
    get:
      operationId: List_GetListRecordsCount
      summary: List record count
      description: Use this endpoint to get records count by API name of list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    description: the count of records in the list.
                    type: integer
                    format: int32
                    example: 4761
      tags:
        - List record
  /organizations/{organization}/lists/{api_name}/records/{record_id}:
    delete:
      operationId: List_DeleteListRecord
      summary: Delete record
      description: Use this endpoint to delete single record by its record Id.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - name: record_id
          in: path
          description: Required Parameter to specify if the associated record is to be deleted.
          required: true
          schema:
            type: integer
            format: int64
            example: 4761
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to delete list record.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - List record
  /organizations/{organization}/lists/{api_name}/relations:
    get:
      operationId: List_GetRelations
      summary: List list relations
      description: Use this endpoint to get all relations associated with a list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - name: filter
          in: query
          description: Filter relations by relation type.
          schema:
            type: string
            example: OneToOne, OneToMany
            enum:
              - OneToOne
              - OneToMany
              - ManyToOne
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Relations'
              example:
                relations:
                  - type: ManyToOne
                    scope: SCOPE_1
                    source_list_api_name: source_list_api_name
                    destination_list_api_name: destination_list_1_api_name
                  - type: OneToMany
                    scope: SCOPE_2
                    source_list_api_name: source_list_api_name
                    destination_list_api_name: destination_list_2_api_name
      tags:
        - List relation
    post:
      operationId: List_CreateListRelations
      summary: Create list relations
      description: Use this endpoint to create relations between 2 lists.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Relations_Create'
            example:
              relations:
                - type: OneToMany
                  scope: SCOPE1
                  masterlist_field_name: masterlist_field_name
                  slavelist_api_name: slavelist_api_name
                  slavelist_field_name: slavelist_field_name
                  constraints:
                    - list1: MASTER
                      field1: master_field
                      operator: EqualTo
                      list2: EXTENSION
                      field2: extension_field
                    - list1: MASTER
                      field1: master_field
                      operator: EqualTo
                      value: '10'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: null
                errors: []
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to create list relation.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - List relation
  /organizations/{organization}/lists/{api_name}/relations/{scope}:
    get:
      operationId: List_GetRelationDetails
      summary: Get list relation
      description: Use this endpoint to get relation details based on API name of the list and name of the relation.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/scope'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Relation_Retrieve'
              example:
                scope_name: RELATION
                relation_type: OneToMany
                master_list_api_name: master_list
                master_list_field_name: master_field
                slave_list_api_name: extension_list
                slave_list_field_name: extension_field
                constraints:
                  - source_list: MASTER
                    source_field: master_field
                    operator: EqualTo
                    destination_list: EXTENSION
                    destination_field: extension_field
                    field_value: null
                  - source_list: MASTER
                    source_field: master_field
                    operator: EqualTo
                    destination_list: null
                    destination_field: null
                    field_value: '10'
      tags:
        - List relation
    put:
      operationId: List_UpdateListRelation
      summary: Update list relation
      description: Use this endpoint to update an existing relation between the given list and a linked list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/scope'
        - $ref: '#/components/parameters/organization'
      requestBody:
        description: Object to specify updates to a relation. Partial updates are allowed; omit properties you do not wish to update.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Relation_Update'
            example:
              scope: NEW_RELATION_NAME
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The relation was successfully updated.
                errors: []
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: Failed
                    description: an error has occurred
                result_code: Failed
                message: Error message
      tags:
        - List relation
    delete:
      operationId: List_DeleteRelation
      summary: Delete list relation
      description: Use this endpoint to delete a relation between this list and another.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/scope'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The relation has been deleted successfully
                errors: []
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_FAILED
                    description: Failed to delete list relation.
                result_code: Failed
                message: Request Failed
      tags:
        - List relation
  /organizations/{organization}/lists/{api_name}/segments:
    get:
      operationId: List_GetListSegments
      summary: Get list segments
      description: Get an overview of the segments defined on the given list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - name: filter
          in: query
          description: Filter segment by type.
          schema:
            type: string
            example: Static,Dynamic
            enum:
              - Static
              - Dynamic
              - External
              - Unknown
        - name: take
          in: query
          description: The maximum amount of items to return.
          schema:
            type: integer
            format: int32
            example: 50
            default: -1
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Segments'
              example:
                segments:
                  - segment_type: Dynamic
                    api_name: segment_1
                  - segment_type: External
                    api_name: segment_2
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/segments/{segment_api_name}:
    get:
      operationId: List_GetListSegment
      summary: Get list segment
      description: Use this endpoint to get segment details based on list API name and segment API name.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/segment_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Segment_Retrieve'
      tags:
        - List segment
    delete:
      operationId: List_DeleteSegment
      summary: Delete list segment
      description: Use this endpoint to delete a segment by its API name in the given organization.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/segment_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The segment has been deleted successfully
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_LIST_VALIDATION
                    description: Failed to delete segment.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/segments/dynamic:
    post:
      operationId: List_CreateDynamicSegment
      summary: Create dynamic segment
      description: Create dynamic segment for the given list API name.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Segment_Dynamic_Create'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The dynamic segment has been created successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/segments/dynamic/{segment_api_name}:
    put:
      operationId: List_UpdateDynamicSegment
      summary: Update dynamic segment
      description: Update dynamic segment based on list API name and Segment API name
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
        - $ref: '#/components/parameters/segment_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Segment_Dynamic_Update'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The dynamic segment has been created successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/segments/static:
    post:
      operationId: List_CreateStaticSegment
      summary: Create static segment
      description: Create static segment based on list API name and provided segment info parameters.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Segment_Static'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The static segment has been created successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/interest/{channel}/structure:
    get:
      operationId: List_GetInterestListStructure
      summary: Get interest structure
      description: This endpoint will return the interest list structure for specified channel type for an user list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/channel'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Interest_Structure_Retrieve'
              example:
                fields:
                  - name: ID
                    data_type: Numeric
                    allow_null: false
                  - name: USERID
                    data_type: Numeric
                    allow_null: true
                  - name: TOP_TAG_1
                    data_type: Text
                    length: 255
                    allow_null: true
                  - name: TOP_TAG_2
                    data_type: Text
                    length: 255
                    allow_null: true
                  - name: TOP_TAG_3
                    data_type: Text
                    length: 255
                    allow_null: true
                  - name: TOP_TAG_4
                    data_type: Text
                    length: 255
                    allow_null: true
                  - name: TOP_TAG_5
                    data_type: Text
                    length: 255
                    allow_null: true
                  - name: TAG_CLICK_TOTAL
                    data_type: Numeric
                    allow_null: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_LIST_VALIDATION_RETRIEVEINTERESTLISTSTRUCTUREFAILED
                    description: Failed to retrieve interest list structure.
                result_code: ValidationFailed
      tags:
        - List interest
  /organizations/{organization}/lists/{api_name}/engagement/{channel}/structure:
    get:
      operationId: List_GetEngagementListStructure
      summary: Get List engagement structure
      description: This endpoint will return the engagement list structure for specified channel type for a user list.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/channel'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Engagement_Structure_Retrieve'
              example:
                fields:
                  - name: ID
                    data_type: Numeric
                    allow_null: false
                    length: null
                  - name: USERID
                    data_type: Numeric
                    allow_null: true
                    length: null
                  - name: DELIVERED
                    data_type: Numeric
                    allow_null: true
                    length: null
                  - name: CLICKED
                    data_type: Numeric
                    allow_null: true
                    length: null
                  - name: VIEWED
                    data_type: Numeric
                    allow_null: true
                    length: null
                  - name: DELIVERED_LASTDT
                    data_type: DateTime
                    allow_null: true
                  - name: VIEWED_LASTDT
                    data_type: DateTime
                    allow_null: true
                  - name: CLICKED_LASTDT
                    data_type: DateTime
                    allow_null: true
                  - name: DELIVERY_RATE
                    data_type: Float
                    allow_null: true
                  - name: VIEW_RATE
                    data_type: Float
                    allow_null: true
                  - name: CLICK_RATE_CTR
                    data_type: Float
                    allow_null: true
                  - name: DESKTOP_ENGAGEMENTS
                    data_type: Numeric
                    allow_null: true
                    length: null
                  - name: MOBILE_ENGAGEMENTS
                    data_type: Numeric
                    allow_null: true
                    length: null
                  - name: TABLET_ENGAGEMENTS
                    data_type: Numeric
                    allow_null: true
                    length: null
                  - name: MOBILE_USAGE_RATE
                    data_type: Float
                    allow_null: true
                  - name: TABLET_USAGE_RATE
                    data_type: Float
                    allow_null: true
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_LIST_VALIDATION_RETRIEVEENGAGEMENTLISTSTRUCTUREFAILED
                    description: Failed to retrieve engagement list structure.
                result_code: ValidationFailed
      tags:
        - List engagement
  /organizations/{organization}/lists/{api_name}/interest/{channel}/data/{record_id}:
    get:
      operationId: Data_GetInterestListRecord
      summary: Get interest record
      description: Use this endpoint to retrieve interest list record data for specified channel type and master list record.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/channel'
        - name: record_id
          in: path
          description: Parameter for record id associated with a list.
          required: true
          schema:
            type: integer
            format: int32
            example: 1
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Interest_Record_Retrieve'
              example:
                record:
                  ID: 1
                  USERID: 1
                  TOP_TAG_1: Tag 1
                  TOP_TAG_2: Tag 2
                  TOP_TAG_3: Tag 3
                  TOP_TAG_4: Tag 4
                  TOP_TAG_5: Tag 5
                  TAG_CLICK_TOTAL: 10
      tags:
        - List interest
  /organizations/{organization}/lists/{api_name}/segments/{segment_api_name}/data:
    delete:
      operationId: Data_DeleteSegmentData
      summary: Delete data from a static segment
      description: |-
        Use this endpoint to delete data in bulk from a specific static segment. Records are matched for deletion using the `keyFields` parameter.

        **Key-field index requirement:** The destination list table must have a **unique** index whose key columns cover all specified `keyFields`. When no compatible unique index exists:

        - Requests against tables with **≥ 5,000,000 rows** are rejected immediately (`400 ValidationFailed`, code `LOAD_RECORDS_FAILED_BY_MISSING_INDEX`).
        - Requests against smaller tables are allowed but aborted once **100,000 records** have been streamed.

        Use `PUT /organizations/{organization}/lists/{api_name}/businesskey` to provision a unique index via the API, or create a DBA-managed unique index directly on the underlying table.

        **Per-list concurrency limit:** Only one bulk operation per list is permitted at a time. A second concurrent request against the same list is rejected immediately with `429 Too Many Requests`. Retry once the in-flight operation has completed.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/segment_api_name'
        - $ref: '#/components/parameters/keyfields'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/mode'
        - $ref: '#/components/parameters/deduplication'
        - name: errorHandling
          in: query
          description: Parameter indicates error handling options whether to stop on error or continue on error.
          schema:
            type: string
            example: ContinueOnError
            default: StopOnError
            enum:
              - None
              - StopOnError
              - ContinueOnError
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Segment_Data_Response'
              example:
                result_code: PartiallySucceeded
                number_of_deleted_records: 48
                number_of_duplicate_records: 0
                number_of_failed_records: 2
                number_of_records_not_found: 0
                invalid_records:
                  - record_index: 17
                    message: Record contains incorrect number of fields
                    validation_code: InvalidFieldCount
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Segment_Data_Response'
              examples:
                InvalidPayload:
                  summary: Invalid payload
                  value:
                    errors:
                      - error_code: INVALIDPAYLOAD
                        description: Invalid payload detected when loading.
                    result_code: ValidationFailed
                    number_of_deleted_records: 0
                    number_of_duplicate_records: 0
                    number_of_failed_records: 0
                    number_of_records_not_found: 0
                    invalid_records: null
                MissingIndex:
                  summary: No unique index on key fields
                  value:
                    errors:
                      - error_code: LOAD_RECORDS_FAILED_BY_MISSING_INDEX
                        description: 'Table ''DATA_SUBSCRIPTIONS'' has ~8000000 rows and no index on key fields [USERID, BULK_MAIL_TYPE]. Threshold: 5000000.'
                    result_code: ValidationFailed
                    number_of_deleted_records: 0
                    number_of_duplicate_records: 0
                    number_of_failed_records: 0
                    number_of_records_not_found: 0
                    invalid_records: null
        '429':
          description: A bulk operation is already in progress on this list. Retry once the in-flight operation has completed.
          content:
            text/plain:
              schema:
                type: string
              example: API calls quota exceeded!
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/segments/{segment_api_name}/data/clear:
    delete:
      operationId: Data_ClearStaticSegmentData
      summary: Clear Static segment data
      description: Use this endpoint to clear static segment data.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/segment_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The data has been cleared successfully.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to clear static segment data.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/segments/{segment_api_name}/data/load:
    post:
      operationId: Data_LoadSegmentData
      summary: Create / Update data static segment
      description: |-
        Use this endpoint to load data in bulk into a specific static segment. Records are upserted using the `keyFields` parameter to match existing rows.

        **Key-field index requirement:** The destination list table must have a **unique** index whose key columns cover all specified `keyFields`. When no compatible unique index exists:

        - Requests against tables with **≥ 5,000,000 rows** are rejected immediately (`400 ValidationFailed`, code `LOAD_RECORDS_FAILED_BY_MISSING_INDEX`).
        - Requests against smaller tables are allowed but aborted once **100,000 records** have been streamed.

        Use `PUT /organizations/{organization}/lists/{api_name}/businesskey` to provision a unique index via the API, or create a DBA-managed unique index directly on the underlying table.

        **Per-list concurrency limit:** Only one bulk operation per list is permitted at a time. A second concurrent request against the same list is rejected immediately with `429 Too Many Requests`. Retry once the in-flight operation has completed.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/segment_api_name'
        - $ref: '#/components/parameters/keyfields'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/mode'
        - $ref: '#/components/parameters/deduplication'
        - name: errorHandling
          in: query
          description: Parameter indicates error handling options whether to stop on error or continue on error.
          schema:
            type: string
            example: ContinueOnError
            default: StopOnError
            enum:
              - None
              - StopOnError
              - ContinueOnError
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Segment_Load_Response'
              example:
                errors: []
                result_code: PartiallySucceeded
                number_of_inserted_records: 50
                number_of_failed_records: 2
                number_of_updated_records: 48
                number_of_duplicate_records: 0
                number_of_records_not_found: 0
                invalid_records:
                  - record_index: 10
                    field_name: SOMESTRING
                    message: Length of string (53) exceeds maximum field length (50)
                    validation_code: MaxStringLengthExceeded
                  - record_index: 17
                    message: Record contains incorrect number of fields
                    validation_code: InvalidFieldCount
                number_of_deleted_records: 0
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Segment_Load_Response'
              examples:
                InvalidPayload:
                  summary: Invalid payload
                  value:
                    errors:
                      - error_code: INVALIDPAYLOAD
                        description: Invalid payload detected when loading.
                    result_code: ValidationFailed
                    number_of_inserted_records: 0
                    number_of_failed_records: 0
                    number_of_updated_records: 0
                    number_of_duplicate_records: 0
                    number_of_records_not_found: 0
                    invalid_records: null
                MissingIndex:
                  summary: No unique index on key fields
                  value:
                    errors:
                      - error_code: LOAD_RECORDS_FAILED_BY_MISSING_INDEX
                        description: 'Table ''DATA_SUBSCRIPTIONS'' has ~8000000 rows and no index on key fields [USERID, BULK_MAIL_TYPE]. Threshold: 5000000.'
                    result_code: ValidationFailed
                    number_of_inserted_records: 0
                    number_of_failed_records: 0
                    number_of_updated_records: 0
                    number_of_duplicate_records: 0
                    number_of_records_not_found: 0
                    invalid_records: null
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: string
        '429':
          description: A bulk operation is already in progress on this list. Retry once the in-flight operation has completed.
          content:
            text/plain:
              schema:
                type: string
              example: API calls quota exceeded!
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/segments/{segment_api_name}/data/search:
    post:
      operationId: Data_SearchSegmentData
      summary: Search List Segment records
      description: Use this endpoint to search for data records within a segment of a specific table.\r\nSearching data can be done synchronous or streamed.\r\nThe data in the response will be in a Json format.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/segment_api_name'
        - $ref: '#/components/parameters/mode'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Segment_Search'
            example:
              fields:
                - MASTER.FIELD1
                - FIELD2
                - SCOPE.FIELD_X
                - SYSTEM.SELLIGENTID
              filters:
                - field_name: MASTER.FIELD1
                  operator: EqualTo
                  field_value: VALUE
              skip: 20
              take: 20
              order_by: MASTER.FIELD2
              order_by_direction: ASC
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Segment_Search_Response'
      tags:
        - List segment
  /organizations/{organization}/lists/{api_name}/businesskey:
    put:
      operationId: List_SetListBusinessKey
      summary: Set (upsert) the business key of a list
      description: |-
        Define or replace the business key of a list. A list has at most one business key,
        composed of 1–3 fields. The declaration is stored as metadata and, when no compatible
        unique index already exists on the underlying table, a `UNIQUE NONCLUSTERED` index is
        created automatically by the platform. Existing DBA-managed unique indexes that cover
        the declared fields are honored as-is (no new index is created).

        This endpoint has upsert semantics — it replaces whatever key is currently declared (or
        declares the first one) and always returns `200 OK` on success.

        **Guards:**

        - The list must be empty when no existing unique index already covers the requested fields.
          Use `GET /organizations/{organization}/lists/{api_name}/businesskey` to check the current
          declaration, and `DELETE` to remove it before redefining on a non-empty list.
        - Fields must exist on the list with indexable types.
        - The combined key size must fit within SQL Server's 900-byte unique-index budget.

        The response `fields` array is sorted alphabetically (case-insensitive). The supplied
        field order only controls the physical index column order at creation time.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      requestBody:
        description: Fields composing the business key (1–3 fields). Order affects physical index column order but is not preserved in GET responses.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_BusinessKey_Request'
            example:
              fields:
                - CUSTOMER_ID
                - COUNTRY
        required: true
      responses:
        '200':
          description: Business key set successfully (created or replaced).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_BusinessKey_Response'
              example:
                result_code: Succeeded
                business_key:
                  fields:
                    - COUNTRY
                    - CUSTOMER_ID
        '400':
          description: Guard failed — list is not empty, fields are invalid, or key size exceeds limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_BusinessKey_Response'
              examples:
                ListNotEmpty:
                  summary: List is not empty and no existing unique index covers the requested fields
                  value:
                    errors:
                      - error_code: ERR_LIST_BUSINESS_KEY_LIST_NOT_EMPTY
                        description: Cannot set a business key on a non-empty list when no unique index already covers the requested fields.
                    result_code: ValidationFailed
                    error_code: list_not_empty
                InvalidFields:
                  summary: One or more fields do not exist or have non-indexable types
                  value:
                    errors:
                      - error_code: ERR_LIST_BUSINESS_KEY_INVALID_FIELDS
                        description: Field 'UNKNOWN_FIELD' does not exist on the list.
                    result_code: ValidationFailed
                    error_code: invalid_fields
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: The list was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_BusinessKey_Response'
              example:
                errors:
                  - error_code: ERR_LIST_NOT_FOUND
                    description: The list was not found.
                result_code: NotFound
                error_code: list_not_found
        '429':
          description: Too many requests
      tags:
        - List
    get:
      operationId: List_GetListBusinessKey
      summary: Get the business key of a list
      description: |-
        Retrieve the current business key declaration for a list. The key is modeled as a
        composite member of the list resource.

        - When a business key is declared, `business_key.fields` contains the field names sorted
          alphabetically (case-insensitive).
        - When no business key is declared, `business_key.fields` is an empty array.
        - `404` is only returned if the list itself does not exist.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: The current business key of the list (empty `fields` array when none is declared).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_BusinessKey_Response'
              examples:
                WithKey:
                  summary: List has a business key declared
                  value:
                    result_code: Succeeded
                    business_key:
                      fields:
                        - COUNTRY
                        - CUSTOMER_ID
                NoKey:
                  summary: List exists but no business key is declared
                  value:
                    result_code: Succeeded
                    business_key:
                      fields: []
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: The list was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_BusinessKey_Response'
              example:
                errors:
                  - error_code: ERR_LIST_NOT_FOUND
                    description: The list was not found.
                result_code: NotFound
                error_code: list_not_found
        '429':
          description: Too many requests
      tags:
        - List
    delete:
      operationId: List_DeleteListBusinessKey
      summary: Delete the business key of a list
      description: |-
        Remove the business key declaration from a list. Clears the metadata flags and drops
        the backing platform-managed index (`UK_KEYDECL_*`) when one exists. DBA-managed unique
        indexes are left untouched.

        This operation is safe at any row count — `DROP INDEX` is cheap and does not lock the table
        for the duration of the operation. The key-field index guard on bulk import endpoints will
        re-apply on the next import if no other covering unique index remains.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '204':
          description: The business key was deleted successfully.
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '404':
          description: The list or the business key was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_BusinessKey_Response'
              example:
                errors:
                  - error_code: ERR_LIST_NOT_FOUND
                    description: The list was not found.
                result_code: NotFound
                error_code: list_not_found
        '429':
          description: Too many requests
      tags:
        - List
  /organizations/{organization}/lists/{api_name}/data:
    post:
      operationId: Data_SaveListData
      summary: Create / Update data record
      description: Use this endpoint to create or update a single record with data on a 1:1 relation.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/keyfields'
        - $ref: '#/components/parameters/organization'
        - name: data_import_option
          in: path
          description: Indicates the data import option during an import data.
          schema:
            type: string
            example: InsertAndUpdate
            default: InsertAndUpdate
            enum:
              - InsertAndUpdate
              - OnlyInsert
              - OnlyUpdate
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Data_Record_Create'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/Success'
                  - type: object
                    properties:
                      record_status:
                        type: string
                        enum:
                          - None
                          - Inserted
                          - Updated
              example:
                result_code: Succeeded
                message: Record ID 13 inserted on List DataApiOneToOne_A.
                record_status: Inserted
      tags:
        - List data
    delete:
      operationId: Data_DeleteData
      summary: Delete list data records
      description: |-
        Use this endpoint to delete data in bulk from a specific list table. Records are matched for deletion using the `keyFields` parameter.

        **Key-field index requirement:** The destination table must have a **unique** index whose key columns cover all specified `keyFields`. When no compatible unique index exists:

        - Requests against tables with **≥ 5,000,000 rows** are rejected immediately (`400 ValidationFailed`, code `LOAD_RECORDS_FAILED_BY_MISSING_INDEX`).
        - Requests against smaller tables are allowed but aborted once **100,000 records** have been streamed.

        Use `PUT /organizations/{organization}/lists/{api_name}/businesskey` to provision a unique index via the API, or create a DBA-managed unique index directly on the underlying table.

        **Per-list concurrency limit:** Only one bulk operation per list is permitted at a time. A second concurrent request against the same list is rejected immediately with `429 Too Many Requests`. Retry once the in-flight operation has completed.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/keyfields'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/mode'
        - name: errorHandling
          in: query
          description: Parameter indicates error handling options whether to stop on error or continue on error. (None, StopOnError or ContinueOnError)
          schema:
            type: string
            example: StopOnError
            default: StopOnError
            enum:
              - StopOnError
              - ContinueOnError
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Data_Response'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Data_Response'
              example:
                result_code: ValidationFailed
                error_code: LOAD_RECORDS_FAILED_BY_MISSING_INDEX
                message: 'Table ''DATA_SUBSCRIPTIONS'' has ~8000000 rows and no index on key fields [USERID, BULK_MAIL_TYPE]. Threshold: 5000000.'
        '429':
          description: A bulk operation is already in progress on this list. Retry once the in-flight operation has completed.
          content:
            text/plain:
              schema:
                type: string
              example: API calls quota exceeded!
      tags:
        - List data
  /organizations/{organization}/lists/{api_name}/data/load:
    post:
      operationId: Data_LoadData
      summary: Create / update List data
      description: |-
        Use this endpoint to load data in bulk into a specific list table. Records are upserted using the `keyFields` parameter to match existing rows.

        **Key-field index requirement:** The destination table must have a **unique** index whose key columns cover all specified `keyFields`. When no compatible unique index exists:

        - Requests against tables with **≥ 5,000,000 rows** are rejected immediately (`400 ValidationFailed`, code `LOAD_RECORDS_FAILED_BY_MISSING_INDEX`).
        - Requests against smaller tables are allowed but aborted once **100,000 records** have been streamed.

        Use `PUT /organizations/{organization}/lists/{api_name}/businesskey` to provision a unique index via the API, or create a DBA-managed unique index directly on the underlying table.

        **Per-list concurrency limit:** Only one bulk operation per list is permitted at a time. A second concurrent request against the same list is rejected immediately with `429 Too Many Requests`. Retry once the in-flight operation has completed.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/keyfields'
        - $ref: '#/components/parameters/fields'
        - $ref: '#/components/parameters/mode'
        - $ref: '#/components/parameters/deduplication'
        - name: data_import_option
          in: query
          description: Indicates the data import option during an import data.
          schema:
            type: string
            example: InsertAndUpdate
            default: InsertAndUpdate
            enum:
              - InsertAndUpdate
              - OnlyInsert
              - OnlyUpdate
        - name: create_segment_name
          in: query
          description: Indicates the name of segment at the time of segment creation.
          schema:
            type: string
            example: Segment name
            default: null
        - name: create_segment_api_name
          in: query
          description: Indicates the api name of segment at the time of segment creation.
          schema:
            type: string
            example: segment_api_name
            default: null
        - name: errorHandling
          in: query
          description: 'Parameter indicates error handling options: whether to stop on error or continue on error.'
          schema:
            type: string
            example: StopOnError
            enum:
              - StopOnError
              - ContinueOnError
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              type: object
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Data_Load_Response'
              example:
                result_code: PartiallySucceeded
                number_of_inserted_records: 50
                number_of_failed_records: 2
                number_of_updated_records: 48
                number_of_duplicate_records: 0
                number_of_records_not_found: 0
                invalid_records:
                  - record_index: 10
                    field_name: SOMESTRING
                    message: Length of string (53) exceeds maximum field length (50)
                    validation_code: MaxStringLengthExceeded
                  - record_index: 17
                    message: Record contains incorrect number of fields
                    validation_code: InvalidFieldCount
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Data_Load_Response'
              example:
                result_code: ValidationFailed
                number_of_inserted_records: 0
                number_of_failed_records: 0
                number_of_updated_records: 0
                number_of_duplicate_records: 0
                number_of_records_not_found: 0
                invalid_records: null
                error_code: LOAD_RECORDS_FAILED_BY_MISSING_INDEX
                message: 'Table ''DATA_SUBSCRIPTIONS'' has ~8000000 rows and no index on key fields [USERID, BULK_MAIL_TYPE]. Threshold: 5000000.'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: string
        '429':
          description: A bulk operation is already in progress on this list. Retry once the in-flight operation has completed.
          content:
            text/plain:
              schema:
                type: string
              example: API calls quota exceeded!
      tags:
        - List data
  /organizations/{organization}/lists/{api_name}/data/search:
    post:
      operationId: Data_SearchData
      summary: Search List records
      description: Use this endpoint to search for data records in a specific table. Searching data can be done synchronous or streamed. The data in the response will be in a Json format.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/mode'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/List_Data_Search_Create'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Data_Search_Response'
              example:
                fields:
                  - FIELD1
                  - MASTER.ID
                data:
                  - - RECORD1_FIELD1_VALUE
                    - 1
                  - - RECORD2_FIELD1_VALUE
                    - 2
                  - - RECORD3_FIELD1_VALUE
                    - 3
                result_code: Succeeded
                errors: []
      tags:
        - List data
  /organizations/{organization}/lists/{api_name}/engagement/{channel}/data/{record_id}:
    get:
      operationId: Data_GetEngagementListRecord
      summary: List Engagement data
      description: Get engagement list record data for specified channel type and master list record.
      parameters:
        - $ref: '#/components/parameters/list_api_name'
        - $ref: '#/components/parameters/channel'
        - name: record_id
          in: path
          description: Parameter for record id associated with a list.
          required: true
          schema:
            type: integer
            format: int32
            example: 1
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/List_Engagement_Record_Retrieve'
      tags:
        - List engagement
  /taglists:
    get:
      operationId: TagList_GetTagLists
      summary: List tag lists
      description: Returns Tag lists filtered on the given criteria.
      parameters:
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/take'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag_Lists'
      tags:
        - Tag list
    post:
      operationId: TagList_CreateTagList
      summary: Create tag list
      description: Create a new tag list.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Tag_List_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Tag list created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_TAGLIST_VALIDATION
                    description: Failed to create Tag list.
                result_code: ValidationFailed
                message: null
      tags:
        - Tag list
  /taglists/{api_name}:
    get:
      operationId: TagList_GetTagList
      summary: Get tag list
      description: Use this endpoint to get details of Tag list with given API name.
      parameters:
        - $ref: '#/components/parameters/tag_list_api_name'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tag_List_Retrieve'
        '404':
          description: Not found
      tags:
        - Tag list
    put:
      operationId: TagList_UpdateTagList
      summary: Update tag list
      description: Update an existing Tag list.
      parameters:
        - $ref: '#/components/parameters/tag_list_api_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Tag_List_Update'
        required: true
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Tag list updated successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_TAGLIST_VALIDATION
                    description: Failed to update Tag list.
                result_code: ValidationFailed
                message: null
      tags:
        - Tag list
    delete:
      operationId: TagList_DeleteTagList
      summary: Delete tag list
      description: Delete an existing Tag list.
      parameters:
        - $ref: '#/components/parameters/tag_list_api_name'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The Tag list has been deleted successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_TAGLIST_VALIDATION
                    description: Failed to delete Tag list.
                result_code: ValidationFailed
                message: null
      tags:
        - Tag list
  /organizations/{organization}/taglists:
    get:
      operationId: TagList_GetOrganizationTagLists
      summary: List Organization tag lists
      description: List Tag lists associated to an organization.
      parameters:
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/take'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Organization_Tag_Lists'
        '404':
          description: Not found
      tags:
        - Tag list
  /organizations/{organization}/tasks:
    get:
      operationId: Task_GetTasks
      summary: List tasks
      description: Get list of tasks based on the provided criteria, in the provided organization.
      parameters:
        - name: filter
          in: query
          description: Filter by task type. Leave empty to return all available task types.
          schema:
            type: string
            example: Import,Export
            enum:
              - Sql
              - Import
              - Export
              - Batch
        - name: search
          in: query
          description: Search with a specific name or description. Leave empty to return everything.
          schema:
            type: string
            example: marigold_1
            default: null
        - $ref: '#/components/parameters/skip'
        - name: take
          in: query
          description: The maximum amount of items to return. Use a negative value to retrieve all available items. Used only if `skip` is non-negative.
          schema:
            type: integer
            format: int32
            example: 50
            default: -1
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Tasks'
      tags:
        - Task
  /organizations/{organization}/tasks/{api_name}:
    get:
      operationId: Task_GetTask
      summary: Get task
      description: Get details of an existing task.
      parameters:
        - $ref: '#/components/parameters/task_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task_Retrieve'
      tags:
        - Task
    delete:
      operationId: Task_Delete
      summary: Delete task
      description: Delete task with the given api name, if it exists in the given organization.
      parameters:
        - $ref: '#/components/parameters/task_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The task has been deleted successfully
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_VALIDATION
                    description: Failed to delete task.
                result_code: ValidationFailed
                message: Request Failed
      tags:
        - Task
  /organizations/{organization}/tasks/{api_name}/actions:
    get:
      operationId: Task_GetTaskActions
      summary: List task actions
      description: Get actions of an existing task.
      parameters:
        - $ref: '#/components/parameters/task_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Task_Actions'
      tags:
        - Task
  /organizations/{organization}/tasks/{api_name}/actions/disable:
    post:
      operationId: Task_DisableTask
      summary: Disable task
      description: Disable an existing Task.
      parameters:
        - $ref: '#/components/parameters/task_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Disabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Task disabled successfully
                errors: []
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Failed
                message: null
                errors:
                  - error_code: ERR_TASKVALIDATION_TASKNOTFOUND
                    description: Task not found
      tags:
        - Task
  /organizations/{organization}/tasks/{api_name}/actions/enable:
    post:
      operationId: Task_EnableTask
      summary: Enable task
      description: Enable an existing Task.
      parameters:
        - $ref: '#/components/parameters/task_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Enabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Task enabled successfully.
                errors: []
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Failed
                message: null
                errors:
                  - error_code: ERR_TASKVALIDATION_TASKNOTFOUND
                    description: Task not found
      tags:
        - Task
  /organizations/{organization}/tasks/{api_name}/actions/run:
    post:
      operationId: Task_RunTask
      summary: Run task
      description: Run an existing Task
      parameters:
        - $ref: '#/components/parameters/task_api_name'
        - $ref: '#/components/parameters/organization'
      responses:
        '200':
          description: Running Task
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Task has run successfully
                errors: []
        '404':
          description: Failed to run the task.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_TASKVALIDATION_RUNTASKFAILED
                    description: Failed to run the task
                result_code: Failed
      tags:
        - Task
  /organizations/{organization}/tasks/batch:
    post:
      operationId: Task_CreateBatchTask
      summary: Create batch task
      description: Create a new task of type batch.
      parameters:
        - $ref: '#/components/parameters/enable_after_creation'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task_Batch_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Task task_name created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Task
  /organizations/{organization}/tasks/export:
    post:
      operationId: Task_CreateExportTask
      summary: Create export task
      description: Create a new task of type export.
      parameters:
        - $ref: '#/components/parameters/enable_after_creation'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task_Export_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Task task_name created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Task
  /organizations/{organization}/tasks/import:
    post:
      operationId: Task_CreateImportTask
      summary: Create import task
      description: Create a new task of type import.
      parameters:
        - $ref: '#/components/parameters/enable_after_creation'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task_Import_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Task task_name created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Task
  /organizations/{organization}/tasks/sql:
    post:
      operationId: Task_CreateSqlTask
      summary: Create SQL task
      description: Create a new task of type SQL.
      parameters:
        - $ref: '#/components/parameters/enable_after_creation'
        - $ref: '#/components/parameters/organization'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Task_Sql_Create'
        required: true
      responses:
        '200':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Task task_name created successfully.
                errors: []
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: Request Failed
      tags:
        - Task
  /status:
    get:
      operationId: Status_Get
      summary: Get API status
      description: This endpoint will only return an http-status-code. If this is 200 the API is up and running.
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
      tags:
        - Status
  /storedprocedures:
    get:
      operationId: StoredProcedure_GetStoredProcedures
      summary: List stored procedures
      description: List stored procedures satisfying the provided criteria, under the provided organization.
      parameters:
        - $ref: '#/components/parameters/filter_stored_procedure'
        - $ref: '#/components/parameters/search'
        - $ref: '#/components/parameters/skip'
        - $ref: '#/components/parameters/take'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stored_Procedures'
      tags:
        - Stored Procedure
    post:
      operationId: StoredProcedure_CreateStoredProcedure
      summary: Create stored procedure
      description: Create a new stored procedure in the organization.
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stored_Procedure_Create'
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Stored procedure created successfully.
                errors: []
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: null
      tags:
        - Stored Procedure
  /storedprocedures/{name}:
    get:
      operationId: StoredProcedure_GetStoredProcedureDetails
      summary: Get stored procedure
      description: Get details of stored procedure by the specified name.
      parameters:
        - $ref: '#/components/parameters/stored_procedure_name'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Stored_Procedure_Retrieve'
        '404':
          description: Not found
      tags:
        - Stored Procedure
    put:
      operationId: StoredProcedure_UpdateStoredProcedure
      summary: Update stored procedure
      description: Update an existing stored procedure.
      parameters:
        - $ref: '#/components/parameters/stored_procedure_name'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Stored_Procedure_Update'
        required: true
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: Stored procedure updated successfully.
                errors: []
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR
                    description: Incorrect data provided.
                result_code: Failed
                message: null
      tags:
        - Stored Procedure
    delete:
      operationId: StoredProcedure_Delete
      summary: Delete stored procedure
      description: Delete a existing stored procedure.
      parameters:
        - $ref: '#/components/parameters/stored_procedure_name'
      responses:
        '200':
          description: ok
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Success'
              example:
                result_code: Succeeded
                message: The stored procedure has been deleted successfully.
                errors: []
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Failed'
              example:
                errors:
                  - error_code: ERR_STOREDPROCEDURE_VALIDATION
                    description: Failed to delete stored procedure.
                result_code: ValidationFailed
                message: null
      tags:
        - Stored Procedure
components:
  parameters:
    channel:
      name: channel
      in: path
      description: Channel type.
      required: true
      schema:
        type: string
        example: Email
        enum:
          - Email
          - Sms
          - Mobile
          - Web
          - Mms
    cim_request_id:
      name: requestId
      in: path
      description: Id of the Customer information Management request.
      required: true
      schema:
        type: string
        example: '1'
    content_api_name:
      name: api_name
      in: path
      description: API name of the content.
      required: true
      schema:
        type: string
        example: email_1
    custom_event_name:
      name: custom_event_name
      in: path
      description: Name of the custom event.
      required: true
      schema:
        type: string
        example: custom_event_1
    data_export_api_name:
      name: api_name
      in: path
      description: API name of the data export.
      required: true
      schema:
        type: string
        example: data_export_1
    data_import_api_name:
      name: api_name
      in: path
      description: API name of the data import.
      required: true
      schema:
        type: string
        example: data_export_1
    deduplication:
      name: deduplication
      in: query
      description: The de-duplication option  to use.
      schema:
        type: string
        example: ImportLastMatch
        default: ImportLastMatch
        enum:
          - None
          - ImportLastMatch
          - ImportFirstMatch
    dictionary_api_name:
      name: api_name
      in: path
      description: API name of the dictionary.
      required: true
      schema:
        type: string
        example: dictionary_1
    drop_table:
      name: dropTable
      in: query
      description: Specify if the associated table is to be deleted.
      schema:
        type: boolean
        example: false
        default: false
    enable_after_creation:
      name: enable_after_creation
      in: query
      description: Define if the task should be enabled after its creation.
      schema:
        type: boolean
        example: true
        default: false
    field_name:
      name: name
      in: path
      description: Name of the field.
      required: true
      schema:
        type: string
        example: storedprocedure_1
    field_name_2:
      name: field_name
      in: path
      description: Name of the field.
      required: true
      schema:
        type: string
        example: field_1
    fields:
      name: fields
      in: query
      description: A comma-separated list of the fields that are in the provided data records. Make sure that this list contains ALL fields (including the key fields) in the correct order. If this parameter is not provided, the first row of the provided data records will be used to determine the fields.
      schema:
        type: string
        example: field1,field2
    filter:
      name: filter
      in: query
      description: Filter mediums by medium type.
      schema:
        type: string
        example: AmazonS3
        enum:
          - Ftp
          - Url
          - AmazonS3
          - AzureBlob
          - GoogleCloud
          - Repository
          - PredefinedMedium
          - SelligentCloud
    filter_stored_procedure:
      name: filter
      in: query
      description: Filter stored procedures by type.
      schema:
        type: string
        example: General
        enum:
          - General
          - Bounce
    journey_api_name:
      name: api_name
      in: path
      description: API name of the journey.
      required: true
      schema:
        type: string
        example: newsletter_1
    keyfields:
      name: keyFields
      in: query
      description: |-
        A comma-separated list of fields used to identify records for upsert or delete matching.

        **Index requirement (bulk endpoints):** The destination list table must have a **unique** index whose key columns cover all specified fields. A non-unique index does not satisfy this requirement. When no compatible unique index exists, bulk operations return `400 ValidationFailed` with code `LOAD_RECORDS_FAILED_BY_MISSING_INDEX`. Use `PUT /organizations/{organization}/lists/{api_name}/businesskey` to provision a unique index via the API.
      required: true
      schema:
        type: string
        example: USERID,BULK_MAIL_TYPE
    label:
      name: label
      in: path
      description: Identifier of the label.
      required: true
      schema:
        type: string
    list_api_name:
      name: api_name
      in: path
      description: API name of the list.
      required: true
      schema:
        type: string
        example: list_1
    medium_api_name:
      name: api_name
      in: path
      description: API name of the medium.
      required: true
      schema:
        type: string
        example: medium_1
    mode:
      name: mode
      in: query
      description: The mode of data transfer.
      schema:
        type: string
        default: Sync
        enum:
          - Sync
          - Stream
    notification_group_api_name:
      name: api_name
      in: path
      description: API name of the notification group.
      required: true
      schema:
        type: string
        example: notification_group_1
    organization:
      name: organization
      in: path
      description: Name of the organization to work in.
      required: true
      schema:
        type: string
        example: marigold_1
    publish:
      name: publish
      in: query
      description: Indicate if the content should be published.
      schema:
        type: boolean
        default: false
    scope:
      name: scope
      in: path
      description: Scope name of the relation.
      required: true
      schema:
        type: string
        example: RELATION_1
    search:
      name: search
      in: query
      description: Search with a specific name, api_name, description or tag(s).
      schema:
        type: string
        example: marigold_1
    segment_api_name:
      name: segment_api_name
      in: path
      description: API name of the segment.
      required: true
      schema:
        type: string
        example: api_name_segment
    skip:
      name: skip
      in: query
      description: The index to start from, skipping all the previous results.
      schema:
        type: integer
        format: int32
        example: 100
        default: 0
    stored_procedure_name:
      name: name
      in: path
      description: Name of the stored procedure.
      required: true
      schema:
        type: string
        example: storedprocedure_1
    sync:
      name: sync
      in: query
      description: Weither or now we should sync the labels with their translations.
      schema:
        type: boolean
        example: false
        default: false
    tag_list_api_name:
      name: api_name
      in: path
      description: API name of the Tag list.
      required: true
      schema:
        type: string
        example: taglist_1
    take:
      name: take
      in: query
      description: The maximum amount of items to return.
      schema:
        type: integer
        format: int32
        example: 50
        default: 0
    task_api_name:
      name: api_name
      in: path
      description: API name of the task.
      required: true
      schema:
        type: string
        example: task_1
    user_list_api_name:
      name: api_name
      in: path
      description: API name of the user list.
      required: true
      schema:
        type: string
        example: user_list_1
  schemas:
    type:
      description: Type of the medium.
      type: string
      example: Ftp
      enum:
        - Ftp
        - Repository
        - Url
        - AzureBlob
        - AmazonS3
        - GoogleCloud
        - PredefinedMedium
        - SelligentCloud
    api_name:
      description: API Name of the medium.
      type: string
      example: medium_1
    Mediums_Retrieve:
      description: Collection of mediums
      type: object
      properties:
        mediums:
          description: Collection of mediums.
          type: array
          items:
            type: object
            properties:
              type:
                $ref: '#/components/schemas/type'
              api_name:
                $ref: '#/components/schemas/api_name'
      example:
        mediums:
          - type: Ftp
            api_name: medium_ftp
          - type: Url
            api_name: medium_url
          - type: Repository
            api_name: medium_repository
          - type: AmazonS3
            api_name: medium_amazonS3
          - type: AzureBlob
            api_name: medium_azureBlob
          - type: GoogleCloud
            api_name: medium_googleCloud
    error:
      type: object
      properties:
        error_code:
          description: Specific error code.
          type: string
          example: Failed
        description:
          description: A better description of the error.
          type: string
          example: Message with api name 'message_1' doesn't exists
    Errors:
      description: List of errors.
      type: array
      items:
        $ref: '#/components/schemas/error'
    result_code:
      description: Resulting code for this request.
      type: string
      example: PartiallySucceeded
      enum:
        - Failed
        - Succeeded
        - PartiallySucceeded
        - ValidationFailed
        - NotFound
        - ServiceUnavailable
        - InternalServerError
        - ProtocolError
        - RequestEntityTooLarge
        - Conflict
      readOnly: true
    message:
      description: Human readable information.
      type: string
      example: Success
      nullable: true
    Failed:
      type: object
      properties:
        errors:
          $ref: '#/components/schemas/Errors'
        result_code:
          example: Failed
          $ref: '#/components/schemas/result_code'
        message:
          $ref: '#/components/schemas/message'
    organizations:
      description: List of organizations linked to the object.
      type: array
      items:
        type: string
      example:
        - Organization_1
        - Organization_2
    not_accessible_organizations_count:
      description: Number of organizations associated with the object, That cannot be access via the API.
      type: integer
      format: int32
      example: 1
      readOnly: true
    Medium:
      type: object
      properties:
        api_name:
          $ref: '#/components/schemas/api_name'
        name:
          description: Name of the medium.
          type: string
          example: Medium One
        organizations:
          $ref: '#/components/schemas/organizations'
        description:
          description: Description of the medium.
          type: string
          example: A storage medium.
        not_accessible_organizations_count:
          example: 0
          $ref: '#/components/schemas/not_accessible_organizations_count'
        type:
          type: string
          example: repository
          $ref: '#/components/schemas/type'
    Medium_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Medium'
        - type: object
          properties:
            type:
              $ref: '#/components/schemas/type'
    Medium_Repository:
      allOf:
        - type: object
          properties:
            subfolder:
              description: SubFolder to access on the server.
              type: string
          example:
            description: A  Repository storage medium.
            subfolder: sub_folder_1
    Medium_Repository_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Medium_Retrieve'
        - $ref: '#/components/schemas/Medium_Repository'
        - type: object
          properties:
            data_exchange_type:
              description: Data exchange type.
              type: string
              enum:
                - Selligent
                - DataOut
                - DataIn
          example:
            data_exchange_type: Selligent
    Medium_Url:
      allOf:
        - type: object
          properties:
            url:
              description: URL for accessing the server.
              type: string
              example: https://www.testurl.com
            login:
              description: Login for accessing the server.
              type: string
              example: Admin
            password:
              description: Password associated with the Login to access the server.
              type: string
              example: Password
    Medium_Url_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Medium_Retrieve'
        - $ref: '#/components/schemas/Medium_Url'
    Medium_Ftp:
      allOf:
        - type: object
          properties:
            ftp_type:
              description: Type of ftp mediums (FTPS / FTPSIMPLICIT / SFTP / UNKNOWN)
              type: string
              example: Ftps
              enum:
                - Unknown
                - Ftps
                - FtpsImplicit
                - Sftp
            server:
              description: Address of the FTP server.
              type: string
              example: An Ftp medium.
            login:
              description: Login for accessing FTP server.
              type: string
              example: Admin
            password:
              description: Password associated with the Login to access the FTP server.
              type: string
              example: Password
            subfolder:
              description: Path of a subfolder on FTP server.
              type: string
              example: sub_folder_1
    Medium_Ftp_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Medium_Retrieve'
        - $ref: '#/components/schemas/Medium_Ftp'
    Credentials_AzureBlob:
      type: object
      properties:
        connection_string:
          description: Azure blob connection string.
          type: string
        container_name:
          description: Azure blob container name.
          type: string
      example:
        connection_string: DefaultEndpointsProtocol=https;AccountName=teamstorage;AccountKey=the/account/key;EndpointSuffix=core.windows.net
        container_name: my_container
    Medium_AzureBlob:
      allOf:
        - type: object
          properties:
            subfolder:
              description: SubFolder to access the server.
              type: string
          example:
            description: An Microsoft Azureblob storage medium.
            subfolder: sub_folder_1
        - type: object
          properties:
            credentials:
              $ref: '#/components/schemas/Credentials_AzureBlob'
    Medium_AzureBlob_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Medium_Retrieve'
        - $ref: '#/components/schemas/Medium_AzureBlob'
        - type: object
    Success:
      type: object
      properties:
        result_code:
          $ref: '#/components/schemas/result_code'
        message:
          $ref: '#/components/schemas/message'
        errors:
          $ref: '#/components/schemas/Errors'
    Medium_Create:
      properties:
        api_name:
          $ref: '#/components/schemas/api_name'
        name:
          description: Name of the medium.
          type: string
          example: Medium One
        organizations:
          $ref: '#/components/schemas/organizations'
        description:
          description: Description of the medium.
          type: string
          example: A storage medium.
        not_accessible_organizations_count:
          example: 0
          $ref: '#/components/schemas/not_accessible_organizations_count'
      required:
        - api_name
        - name
        - organizations
    subfolder:
      description: SubFolder to access on the server.
      type: string
      example: sub_folder_1
    Credentials_AmazonS3:
      type: object
      properties:
        access_key_id:
          description: Access key id.
          type: string
        secret_access_key:
          description: Secret access key.
          type: string
        region_endpoint_code:
          description: Region endpoint code.
          type: string
        bucket_name:
          description: Bucket name.
          type: string
      example:
        access_key_id: '12345678901234567890'
        secret_access_key: ABCDEFGHIJKLMNOPQRSTUVWXYZ
        region_endpoint_code: eu-central-1
        bucket_name: my_bucket
    Medium_AmazonS3:
      allOf:
        - type: object
          properties:
            subfolder:
              $ref: '#/components/schemas/subfolder'
          example:
            description: An Amazon storage medium.
            subfolder: sub_folder_1
        - type: object
          properties:
            credentials:
              $ref: '#/components/schemas/Credentials_AmazonS3'
    Medium_AmazonS3_Create:
      allOf:
        - $ref: '#/components/schemas/Medium_Create'
        - $ref: '#/components/schemas/Medium_AmazonS3'
        - type: object
          properties:
            description:
              default: null
            subfolder:
              default: null
            credentials:
              allOf:
                - $ref: '#/components/schemas/Credentials_AmazonS3'
              required:
                - access_key_id
                - bucket_name
                - region_endpoint_code
                - secret_access_key
    Medium_Update:
      type: object
      properties:
        api_name:
          $ref: '#/components/schemas/api_name'
        name:
          description: Name of the medium.
          type: string
          example: Medium One
        organizations:
          $ref: '#/components/schemas/organizations'
        description:
          description: Description of the medium.
          type: string
          example: A storage medium.
    Medium_AmazonS3_Update:
      allOf:
        - $ref: '#/components/schemas/Medium_Update'
        - $ref: '#/components/schemas/Medium_AmazonS3'
        - type: object
          properties:
            credentials:
              allOf:
                - $ref: '#/components/schemas/Credentials_AmazonS3'
    Medium_AzureBlob_Create:
      allOf:
        - $ref: '#/components/schemas/Medium_Create'
        - $ref: '#/components/schemas/Medium_AzureBlob'
        - type: object
          properties:
            description:
              default: null
            credentials:
              allOf:
                - $ref: '#/components/schemas/Credentials_AzureBlob'
              required:
                - connection_string
                - container_name
      required:
        - subfolder
    Medium_AzureBlob_Update:
      allOf:
        - $ref: '#/components/schemas/Medium_Update'
        - $ref: '#/components/schemas/Medium_AzureBlob'
    Medium_Ftp_Create:
      allOf:
        - $ref: '#/components/schemas/Medium_Create'
        - $ref: '#/components/schemas/Medium_Ftp'
        - type: object
          properties:
            description:
              default: null
            subfolder:
              default: ''
      required:
        - ftp_type
        - login
        - password
        - server
    Medium_Ftp_Update:
      allOf:
        - $ref: '#/components/schemas/Medium_Update'
        - $ref: '#/components/schemas/Medium_Ftp'
    Credentials_GoogleCloud:
      type: object
      properties:
        type:
          description: Credentials type.
          type: string
        project_id:
          description: Google project id.
          type: string
        private_key_id:
          description: Private key id.
          type: string
        private_key:
          description: Private key.
          type: string
        client_email:
          description: Client email.
          type: string
        client_id:
          description: client_id.
          type: string
        auth_uri:
          description: Authorization uri.
          type: string
        token_uri:
          description: Token uri.
          type: string
        auth_provider_x509_cert_url:
          description: Provider X509 certificate url.
          type: string
        client_x509_cert_url:
          description: Client X509 certificate url.
          type: string
        bucket_name:
          description: Bucket name.
          type: string
      example:
        type: service_account
        project_id: my_project_id
        private_key_id: '1234567890123456789012345678901234567890'
        private_key: '-----BEGIN PRIVATE KEY-----1234567890...1234567890-----END PRIVATE KEY-----'
        client_email: dev@example.iam.geserviceaccount.com
        client_id: '12345678901234567890'
        auth_uri: https://accounts.google.com/o/oauth2/auth
        token_uri: https://oauth2.googleapis.com/token
        auth_provider_x509_cert_url: https://www.googleapis.com/oauth2/v1/certs
        client_x509_cert_url: https://www.googleapis.com/robot/v1/metadata/x509/dev%40example.iam.gserviceaccount.com
        bucket_name: my_bucket
    Medium_GoogleCloud:
      allOf:
        - type: object
          properties:
            subfolder:
              $ref: '#/components/schemas/subfolder'
          example:
            description: An google Cloud storage medium.
            subfolder: sub_folder_1
        - type: object
          properties:
            credentials:
              $ref: '#/components/schemas/Credentials_GoogleCloud'
    Medium_GoogleCloud_Create:
      allOf:
        - $ref: '#/components/schemas/Medium_Create'
        - $ref: '#/components/schemas/Medium_GoogleCloud'
        - type: object
          properties:
            description:
              default: null
            subfolder:
              default: null
            credentials:
              allOf:
                - $ref: '#/components/schemas/Credentials_GoogleCloud'
              required:
                - auth_provider_x509_cert_url
                - auth_uri
                - bucket_name
                - client_email
                - client_id
                - client_x509_cert_url
                - private_key
                - private_key_id
                - project_id
                - token_uri
                - type
    Medium_GoogleCloud_Update:
      allOf:
        - $ref: '#/components/schemas/Medium_Update'
        - $ref: '#/components/schemas/Medium_GoogleCloud'
    Medium_Repository_Create:
      allOf:
        - $ref: '#/components/schemas/Medium_Create'
        - $ref: '#/components/schemas/Medium_Repository'
        - type: object
          properties:
            description:
              default: null
            subfolder:
              default: null
    Medium_Repository_Update:
      allOf:
        - $ref: '#/components/schemas/Medium_Update'
        - $ref: '#/components/schemas/Medium_Repository'
    Medium_Url_Create:
      allOf:
        - $ref: '#/components/schemas/Medium_Create'
        - $ref: '#/components/schemas/Medium_Url'
        - type: object
          properties:
            description:
              default: null
      required:
        - login
        - password
        - url
    Medium_Url_Update:
      allOf:
        - $ref: '#/components/schemas/Medium_Update'
        - $ref: '#/components/schemas/Medium_Url'
    organization:
      type: object
      properties:
        name:
          description: Name of the organization.
          type: string
          example: My First Organization
        image_reference:
          description: The image reference.
          type: string
          example: ref_1
          nullable: true
        image_type:
          description: The type of image.
          type: string
          example: png
          nullable: true
        languages:
          description: These are the languages supported by the organization.
          type: array
          items:
            type: object
            properties:
              name:
                description: The name of the language.
                type: string
                example: English
              code:
                description: The code of the language.
                type: string
                example: en
              locale:
                description: The locale of the language.
                type: string
                example: en-US
          example:
            - name: English
              code: en
              locale: en-US
            - name: French
              code: fr
              locale: fr-FR
        audiences:
          description: These are the audiences of organization.
          type: array
          items:
            type: object
            properties:
              api_name:
                description: The apiname of audience.
                type: string
                example: main_user_list
        campaign_data_sources:
          description: These are the campaign data sources of organization.
          type: array
          items:
            type: object
            properties:
              name:
                description: The name of data source.
                type: string
          example:
            - DataSource list_1
            - DataSource list_2
        default_languages:
          description: These are the default languages of organization.
          type: array
          items:
            type: string
          example:
            - English
            - French
        default_maildomain:
          description: The default maildomain of organization.
          type: string
          example: zetaglobal.com
        sms_endpoint:
          description: The default sms endpoint of organization.
          type: string
          example: SMS
        mms_endpoint:
          description: The default mms endpoint of organization.
          type: string
          example: MMS
        mobile_push_endpoint:
          description: The default mobile endpoint of organization.
          type: string
          example: Mobile
        facebook_endpoint:
          description: The default facebook endpoint of organization.
          type: string
          example: Facebook
        google_customer_match_endpoint:
          description: The default google customer match endpoint of organization.
          type: string
          example: Google
        snapchat_endpoint:
          description: The default snapchat endpoint of organization.
          type: string
          example: Snapchat
        twitter_endpoint:
          description: The default twitter endpoint of organization.
          type: string
          example: Twitter
        linkedin_endpoint:
          description: The default Linked In endpoint of organization.
          type: string
          example: LinkedIn
          nullable: true
        whatsapp_template_endpoint:
          description: The default WhatsApp Template endpoint of organization.
          type: string
          example: WhatsApp
          nullable: true
        trackers:
          description: These are the tracker of organization.
          type: array
          items:
            type: object
            properties:
              name:
                description: The name of tracker.
                type: string
          example:
            - name: Shopping Tracker
            - name: Basket Tracker
        connector_instances:
          description: These are the connector instances of organization.
          type: array
          items:
            type: object
            properties:
              name:
                description: The apiname of connector instance.
                type: string
          example:
            - name: Connector Tracker 1
            - name: Salesforce Connector
        mediums:
          description: These are the mediums of organization.
          type: array
          items:
            type: object
            properties:
              api_name:
                description: The apiname of medium.
                type: string
          example:
            - api_name: ftp_medium_1
            - api_name: url_medium_2
        taglists:
          description: These are the Tag lists of organization.
          type: array
          items:
            type: object
            properties:
              api_name:
                description: The apiname of Tag list.
                type: string
          example:
            - api_name: Sports_Taglist
            - api_name: Food_Taglist
    CIM_Filter:
      type: object
      properties:
        field:
          description: Field on the user list to filter on.
          type: string
          example: email
        value:
          description: Value of the field to filter on.
          type: string
          example: user@gmail.xyz
      required:
        - field
        - value
    CIM:
      description: Filters to apply on the given user list, on which the relevant action (COLLECT / OPTOUT / REMOVE) will be executed.
      type: object
      properties:
        filters:
          description: List of filters to apply.
          type: array
          items:
            $ref: '#/components/schemas/CIM_Filter'
      required:
        - filters
    CIM_Create:
      allOf:
        - $ref: '#/components/schemas/CIM'
    CIM_Result:
      description: The id of the request.
      type: object
      properties:
        id:
          description: The ID of the request.
          type: integer
          example: 123
    CIM_Result_Retrieve:
      allOf:
        - $ref: '#/components/schemas/CIM_Result'
    CIM_State:
      description: Information about the state of the request.
      type: object
      properties:
        state:
          description: State of the request.
          type: string
          example: Finished
          enum:
            - New
            - Failed
            - NoMatch
            - Finished
            - Pending
    CIM_State_Retrieve:
      allOf:
        - $ref: '#/components/schemas/CIM_State'
    tags:
      description: Labels of the object.
      type: array
      items:
        type: string
      example:
        - addresses
        - footer
        - email
        - holiday
      default: []
    Content_Base:
      type: object
      properties:
        name:
          description: Name of the message.
          type: string
          example: Email Message
        description:
          description: Description of the message.
          type: string
          example: Description for the message.
        api_name:
          description: API name of the message.
          type: string
          example: message_1
        tags:
          $ref: '#/components/schemas/tags'
    Content:
      allOf:
        - $ref: '#/components/schemas/Content_Base'
        - type: object
          properties:
            type:
              description: Channel type of the Content.
              type: string
              enum:
                - Unknown
                - Email
                - Page
                - MobilePush
                - Sms
          example:
            type: Email
    Content_Lock_State:
      type: object
      properties:
        lockstate:
          description: State of the lock.
          type: string
          example: locked
          enum:
            - locked
            - unlocked
    Content_Lock_State_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Content_Lock_State'
    folder_id:
      description: Folder ID. The root folder has ID `0`.
      type: string
      format: int64
      example: '106'
      writeOnly: true
    Content_Property:
      allOf:
        - $ref: '#/components/schemas/Content_Base'
        - type: object
          properties:
            languages:
              description: langauges for this message. Note that for messages only one language can be provided at this time.
              type: array
              items:
                type: string
              example:
                - EN_US
                - FR
            default_language:
              description: Default language to send this message in if a recipient's language does not match any of this message's languages. If left empty, no message will be scheduled to recipients that do not match this message's languages.
              type: string
              example: EN
            empty_language:
              description: Fallback language to send this message in if a recipient has no language defined. If left empty, no message will be scheduled to recipients with no set language.
              type: string
              example: FR
            audience_api_name:
              description: API name of the Audience list.
              type: string
              example: audience_1
            folder:
              $ref: '#/components/schemas/folder_id'
    Email_Header:
      type: object
      properties:
        from_domain:
          description: Sending domain for this email.
          type: string
          example: zetaglobal.com
        from_alias:
          description: Friendly name for the sender.
          type: string
          example: Selligent
        reply_email:
          description: Reply-to email address.
          type: string
          example: help@zetaglobal.com
        reply_alias:
          description: Reply-to Friendly name.
          type: string
          example: Selligent Help
        to_alias:
          description: Friendly name of receiver.
          type: string
          example: John Doe
        preheader:
          description: Preheader of the email.
          type: string
          example: Your preheader text
        subject:
          description: Subject of the email.
          type: string
          example: Your subjectline
        from_address:
          description: Email address of the sender.
          type: string
          example: info@zetaglobal.com
        deliverygroup_api_name:
          description: Delivery group to use for this email.
          type: string
          example: delivery_group_1
    Email_Content:
      type: object
      properties:
        text:
          description: Text version of the mail.
          type: string
          example: Hello World!
        html:
          description: HTML content of the mail.
          type: string
          example: '<html> <head> <style> h1  color: red;  p  color: blue;  </style> </head> <body> <h1>Hello World!</h1> <p>This is Rahul</p> </body> </html>'
    Email:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/Content_Property'
        headers:
          type: object
          additionalProperties:
            x-additionalPropertiesName: language
            type: array
            items:
              $ref: '#/components/schemas/Email_Header'
        content:
          $ref: '#/components/schemas/Email_Content'
    Content_Base_Create:
      allOf:
        - $ref: '#/components/schemas/Content_Base'
        - type: object
          required:
            - name
            - api_name
    Content_Property_Create:
      allOf:
        - $ref: '#/components/schemas/Content_Base_Create'
        - $ref: '#/components/schemas/Content_Property'
        - type: object
          required:
            - languages
            - audience_api_name
    Email_Header_Create:
      allOf:
        - $ref: '#/components/schemas/Email_Header'
        - type: object
          required:
            - from_domain
            - from_alias
            - to_alias
            - preheader
            - subject
    Email_Content_Create:
      allOf:
        - $ref: '#/components/schemas/Email_Content'
        - type: object
          required:
            - html
            - text
    Email_Create:
      allOf:
        - $ref: '#/components/schemas/Email'
        - type: object
          properties:
            properties:
              $ref: '#/components/schemas/Content_Property_Create'
            headers:
              type: object
              additionalProperties:
                x-additionalPropertiesName: language
                type: array
                items:
                  $ref: '#/components/schemas/Email_Header_Create'
            content:
              $ref: '#/components/schemas/Email_Content_Create'
          required:
            - properties
            - headers
            - content
    Mms_My_Language_Code_Content:
      type: object
      properties:
        text:
          description: Text content of MMS.
          type: string
          example: Hello world!
        media_type:
          description: The media type of the MMS.
          type: string
          example: IMAGE
          enum:
            - IMAGE
            - VIDEO
            - AUDIO
            - VCARD
            - NONE
        media_url:
          description: The URL linking to the media you want to send in the MMS message. (Required when media_type not is 'NONE')
          type: string
          example: URL to the media
    Mms_Content:
      type: object
      items:
        $ref: '#/components/schemas/Mms_My_Language_Code_Content'
    Mms:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/Content_Property'
        content:
          $ref: '#/components/schemas/Mms_Content'
    Mms_My_Language_Code_Content_Create:
      allOf:
        - $ref: '#/components/schemas/Mms_My_Language_Code_Content'
        - type: object
          required:
            - text
            - media_type
    Mms_Content_Create:
      allOf:
        - $ref: '#/components/schemas/Mms_Content'
        - type: object
          properties:
            my_language_code:
              $ref: '#/components/schemas/Mms_My_Language_Code_Content_Create'
    Mms_Create:
      allOf:
        - $ref: '#/components/schemas/Mms'
        - type: object
          properties:
            properties:
              $ref: '#/components/schemas/Content_Property_Create'
            content:
              $ref: '#/components/schemas/Mms_Content_Create'
          required:
            - properties
            - content
    Content_Mobile_Property:
      allOf:
        - $ref: '#/components/schemas/Content_Property'
        - type: object
          properties:
            mobile_app_api_name:
              description: API name of the mobile device list. If left empty, the default mobile device list for the organization will be used.
              type: string
              example: mobile_device_list_1
    Mobile_Property:
      type: object
      properties:
        distribution_type:
          description: Type of mobile message.
          type: string
          example: MobilePush
          enum:
            - Unknown
            - MobilePushAndInApp
            - InApp
            - InAppIfPushUnavailable
            - MobilePush
        custom_in_app_content:
          description: Enable Custom in app content for this message.
          type: boolean
          example: true
        in_app_content_type:
          description: Type of in app content.
          type: string
          example: Image
          enum:
            - Unknown
            - Text
            - Url
            - Image
            - Page
            - SmartBlock
        rich_push_content_enabled:
          description: Enable rich push for this message.
          type: boolean
          example: true
        rich_push_content_type:
          description: Type of rich push content.
          type: string
          example: Image
          enum:
            - Unknown
            - Image
            - SmartBlock
        expiration_date:
          description: Date when message should no longer be shown
          type: string
          example: '2025-01-01'
    Mobile_Push:
      type: object
      properties:
        title:
          description: Title of the Push message
          type: string
          example: Check this out!
        content:
          description: Content of the body of the Push message
          example: Isn't this great as a body text?
          type: string
    Mobile_In_App_Content:
      type: object
      properties:
        text:
          description: Text of the in app message.
          type: string
          example: Great message!
        url:
          description: link to use.
          type: string
          example: https://zetaglobal.com
    Mobile_Link:
      type: object
      properties:
        type:
          description: Type of link
          type: string
          example: Simple
          enum:
            - Url
            - Flow
            - Journey
            - Sms
            - App
            - Mail
            - Custom
            - Telephone
            - OpenPassbook
            - OpenStore
            - DeepLink
            - Simple
        target:
          description: URL destination
          type: string
          example: https://zetaglobal.com
    Mobile_Action_Button:
      type: object
      properties:
        label:
          description: Label for the action.
          type: string
          example: buy_1
        link:
          $ref: '#/components/schemas/Mobile_Link'
    Mobile_In_App:
      type: object
      properties:
        title:
          description: Title of the in app message.
          type: string
          example: We have news!
        content:
          $ref: '#/components/schemas/Mobile_In_App_Content'
        in_app_buttons:
          $ref: '#/components/schemas/Mobile_Action_Button'
      required:
        - content
        - title
    Mobile_Rich_Push_Content:
      type: object
      properties:
        image:
          description: Image of the rich push
          type: string
          example: https://zetaglobal.com/assets/logo/zeta_logoLandscape_1Color_WHITE.png
    Mobile_Rich_Push:
      type: object
      properties:
        content:
          $ref: '#/components/schemas/Mobile_Rich_Push_Content'
    Mobile_Content:
      type: object
      properties:
        mobile_push:
          $ref: '#/components/schemas/Mobile_Push'
        in_app:
          $ref: '#/components/schemas/Mobile_In_App'
        rich_push:
          $ref: '#/components/schemas/Mobile_Rich_Push'
        banner_buttons:
          type: array
          items:
            $ref: '#/components/schemas/Mobile_Action_Button'
        main_action:
          $ref: '#/components/schemas/Mobile_Link'
    Mobile:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/Content_Mobile_Property'
        mobile_properties:
          $ref: '#/components/schemas/Mobile_Property'
        content:
          additionalProperties:
            x-additionalPropertiesName: language
            type: array
            items:
              $ref: '#/components/schemas/Mobile_Content'
          type: object
    Content_Mobile_Property_Create:
      allOf:
        - $ref: '#/components/schemas/Content_Property_Create'
        - $ref: '#/components/schemas/Content_Mobile_Property'
    Mobile_Property_Create:
      allOf:
        - $ref: '#/components/schemas/Mobile_Property'
        - type: object
          required:
            - distribution_type
            - custom_in_app_content
    Mobile_Content_Create:
      allOf:
        - $ref: '#/components/schemas/Mobile_Content'
    Mobile_Create:
      allOf:
        - $ref: '#/components/schemas/Mobile'
        - type: object
          properties:
            properties:
              $ref: '#/components/schemas/Content_Mobile_Property_Create'
            mobile_properties:
              $ref: '#/components/schemas/Mobile_Property_Create'
            content:
              additionalProperties:
                x-additionalPropertiesName: language
                type: array
                items:
                  $ref: '#/components/schemas/Mobile_Content_Create'
              type: object
          required:
            - properties
            - mobile_properties
            - content
    Page_Content:
      type: object
      properties:
        html:
          description: HTML content of the page.
          type: string
          example: '<html> <head> <style> h1  color: red;  p  color: blue;  </style> </head> <body> <h1>Hello World!</h1> <p>This is Rahul</p> </body> </html>'
    Page:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/Content_Property'
        content:
          $ref: '#/components/schemas/Page_Content'
    Page_Content_Create:
      allOf:
        - $ref: '#/components/schemas/Page_Content'
        - type: object
          required:
            - html
    Page_Create:
      allOf:
        - $ref: '#/components/schemas/Page'
        - type: object
          properties:
            properties:
              $ref: '#/components/schemas/Content_Property_Create'
            content:
              $ref: '#/components/schemas/Page_Content_Create'
          required:
            - properties
            - content
    Rcs_Button_Url:
      type: object
      properties:
        type:
          type: string
          enum:
            - url
        text:
          description: The display text for the button
          type: string
        url:
          type: string
          format: uri
      required:
        - type
        - text
        - url
    Rcs_Button_Reply:
      type: object
      properties:
        type:
          type: string
          enum:
            - reply
        text:
          description: The display text for the button
          type: string
        reply:
          type: string
      required:
        - type
        - text
        - reply
    Rcs_Button_AddToCalendar:
      type: object
      properties:
        type:
          type: string
          enum:
            - add_to_calendar
        text:
          description: The display text for the button
          type: string
        title:
          type: string
        description:
          type: string
        location:
          type: string
        start_time:
          description: ISO 8601 format or expression
          type: string
          format: date-time
        end_time:
          description: ISO 8601 format or expression
          type: string
          format: date-time
        fallback_url:
          type: string
          format: uri
        reply:
          type: string
      required:
        - type
        - text
        - title
        - start_time
        - end_time
    Rcs_Button_DialNumber:
      type: object
      properties:
        type:
          type: string
          enum:
            - dial_number
        text:
          description: The display text for the button
          type: string
        number:
          description: Phone number to dial
          type: string
        fallback_url:
          type: string
          format: uri
        reply:
          type: string
      required:
        - type
        - text
        - number
    Rcs_Button_ViewLocation:
      type: object
      properties:
        type:
          type: string
          enum:
            - view_location
        text:
          description: The display text for the button
          type: string
        latitude:
          description: Latitude coordinate
          type: string
        longitude:
          description: Longitude coordinate
          type: string
        label:
          description: Location label
          type: string
        fallback_url:
          type: string
          format: uri
        reply:
          type: string
      required:
        - type
        - text
        - latitude
        - longitude
        - label
    Rcs_Button_ShareLocation:
      type: object
      properties:
        type:
          type: string
          enum:
            - share_location
        text:
          description: The display text for the button
          type: string
        reply:
          type: string
      required:
        - type
        - text
    Rcs_Button_UrlInWebview:
      type: object
      properties:
        type:
          type: string
          enum:
            - url_in_webview
        text:
          description: The display text for the button
          type: string
        url:
          type: string
          format: uri
        description:
          type: string
        application:
          type: string
        webview_mode:
          type: string
        reply:
          type: string
      required:
        - type
        - text
        - url
    Rcs_Button:
      type: object
      properties:
        type:
          type: string
          enum:
            - url
            - reply
            - add_to_calendar
            - dial_number
            - view_location
            - share_location
            - url_in_webview
        text:
          description: The display text for the button
          type: string
      example:
        type: url
        text: Visit our website
        url: https://www.example.com
      discriminator:
        propertyName: type
        mapping:
          url: '#/components/schemas/Rcs_Button_Url'
          reply: '#/components/schemas/Rcs_Button_Reply'
          add_to_calendar: '#/components/schemas/Rcs_Button_AddToCalendar'
          dial_number: '#/components/schemas/Rcs_Button_DialNumber'
          view_location: '#/components/schemas/Rcs_Button_ViewLocation'
          share_location: '#/components/schemas/Rcs_Button_ShareLocation'
          url_in_webview: '#/components/schemas/Rcs_Button_UrlInWebview'
      oneOf:
        - $ref: '#/components/schemas/Rcs_Button_Url'
        - $ref: '#/components/schemas/Rcs_Button_Reply'
        - $ref: '#/components/schemas/Rcs_Button_AddToCalendar'
        - $ref: '#/components/schemas/Rcs_Button_DialNumber'
        - $ref: '#/components/schemas/Rcs_Button_ViewLocation'
        - $ref: '#/components/schemas/Rcs_Button_ShareLocation'
        - $ref: '#/components/schemas/Rcs_Button_UrlInWebview'
      required:
        - type
        - text
    Rcs_Card:
      type: object
      properties:
        text:
          description: Text content of RCS.
          type: string
          example: Hello world!
        title:
          description: Title of the message.
          type: string
          example: Hello
        media_url:
          description: URL of media to display
          type: string
          example: http://my_website.com/videos/some_video.mp4
        media_thumbnail:
          description: URL of media thumbnail if media_url points to video
          type: string
          example: http://my_website.com/videos/some_video_preview.jpg
        buttons:
          type: array
          items:
            $ref: '#/components/schemas/Rcs_Button'
    Rcs_My_Language_Code_Content:
      type: object
      properties:
        cards:
          type: array
          items:
            $ref: '#/components/schemas/Rcs_Card'
        fallback_sms:
          description: Content of fallback SMS to be sent if RCS is undeliverable.
          type: string
          example: We could not send an RCS, so here is SMS content.
        chips:
          type: array
          items:
            $ref: '#/components/schemas/Rcs_Button'
    Rcs_Content:
      type: object
      items:
        $ref: '#/components/schemas/Rcs_My_Language_Code_Content'
    Rcs:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/Content_Property'
        content:
          $ref: '#/components/schemas/Rcs_Content'
        rcs_type:
          description: |
            * `TEXT`: Provide one card with a `text` field. Buttons are not supported.
            * `RICH_CARD`: Provide one card with optional `buttons`. `media_url` is required.
            * `CAROUSEL`: Provide multiple cards with optional `buttons`. `media_url` is required.
            * `PDF`: Provide one card with a `media_url` field pointing to a publicly accessible PDF file.
          type: string
          example: RICH_CARD
          enum:
            - TEXT
            - RICH_CARD
            - CAROUSEL
            - PDF
    Rcs_Button_Create:
      allOf:
        - $ref: '#/components/schemas/Rcs_Button'
        - type: object
          required:
            - button_url
    Rcs_Card_Create:
      allOf:
        - $ref: '#/components/schemas/Rcs_Card'
        - type: object
          properties:
            buttons:
              items:
                $ref: '#/components/schemas/Rcs_Button_Create'
    Rcs_My_Language_Code_Content_Create:
      allOf:
        - $ref: '#/components/schemas/Rcs_My_Language_Code_Content'
        - type: object
          required:
            - cards
            - fallback_sms
          properties:
            cards:
              items:
                $ref: '#/components/schemas/Rcs_Card_Create'
    Rcs_Content_Create:
      allOf:
        - $ref: '#/components/schemas/Rcs_Content'
        - type: object
          properties:
            my_language_code:
              $ref: '#/components/schemas/Rcs_My_Language_Code_Content_Create'
    Rcs_Create:
      allOf:
        - $ref: '#/components/schemas/Rcs'
        - type: object
          properties:
            properties:
              $ref: '#/components/schemas/Content_Property_Create'
            content:
              $ref: '#/components/schemas/Rcs_Content_Create'
          required:
            - properties
            - content
            - rcs_type
    Sms_Content:
      type: object
      properties:
        text:
          description: text content of SMS.
          type: string
          example: Hello world!
    Sms:
      type: object
      properties:
        properties:
          $ref: '#/components/schemas/Content_Property'
        content:
          $ref: '#/components/schemas/Sms_Content'
    Sms_Content_Create:
      allOf:
        - $ref: '#/components/schemas/Sms_Content'
        - type: object
          required:
            - text
    Sms_Create:
      allOf:
        - $ref: '#/components/schemas/Sms'
        - type: object
          properties:
            properties:
              $ref: '#/components/schemas/Content_Property_Create'
            content:
              $ref: '#/components/schemas/Sms_Content_Create'
          required:
            - properties
            - content
    Dictionary_Base:
      type: object
      properties:
        api_name:
          description: API name of the dictionary.
          type: string
          example: dictionary_1
    Dictionaries:
      type: object
      properties:
        dictionaries:
          description: Collection of dictionaries.
          type: array
          items:
            $ref: '#/components/schemas/Dictionary_Base'
    Dictionary:
      allOf:
        - $ref: '#/components/schemas/Dictionary_Base'
        - type: object
          properties:
            name:
              description: Name of the dictionary.
              type: string
              example: Email Message
            description:
              description: Description of the dictionary.
              type: string
              example: Description for the dictionary.
            tags:
              $ref: '#/components/schemas/tags'
            organizations:
              $ref: '#/components/schemas/organizations'
            not_accessible_organizations_count:
              $ref: '#/components/schemas/not_accessible_organizations_count'
    Dictionary_Create:
      allOf:
        - $ref: '#/components/schemas/Dictionary'
        - type: object
          properties:
            description:
              default: null
            tags:
              default: null
            organizations:
              default: null
          required:
            - name
            - api_name
    Dictionary_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Dictionary'
    Dictionary_Update:
      allOf:
        - $ref: '#/components/schemas/Dictionary_Base'
        - type: object
          properties:
            description:
              description: Description of the dictionary.
              type: string
              example: Description for the dictionary.
            tags:
              $ref: '#/components/schemas/tags'
            organizations:
              $ref: '#/components/schemas/organizations'
            not_accessible_organizations_count:
              $ref: '#/components/schemas/not_accessible_organizations_count'
        - required:
            - api_name
    Label:
      type: object
      properties:
        label:
          description: Name of the label.
          type: string
          example: label_1
        translations:
          description: A set of translations consisting of key value pairs where key is a language code and value is translation for that language code.
          type: object
          example:
            EN: Label1_English
            DE: Label1_Dutch
          additionalProperties:
            x-additionalPropertiesName: language
            type: string
    Labels:
      type: object
      properties:
        labels:
          description: Collection of labels.
          type: array
          items:
            $ref: '#/components/schemas/Label'
    Label_Create:
      allOf:
        - $ref: '#/components/schemas/Label'
        - type: object
          required:
            - label
            - translations
    Label_Update:
      allOf:
        - $ref: '#/components/schemas/Label'
        - type: object
          properties:
            label:
              type: string
              readOnly: true
          required:
            - translations
    Notification_Group_Base:
      type: object
      properties:
        api_name:
          description: API name of the notification group.
          type: string
          example: notification_group_1
    Notification_Groups:
      type: object
      properties:
        notification_groups:
          description: List of notification groups defined.
          type: array
          items:
            $ref: '#/components/schemas/Notification_Group_Base'
    Notification_Group:
      allOf:
        - $ref: '#/components/schemas/Notification_Group_Base'
        - type: object
          properties:
            name:
              description: Name of the notification group.
              type: string
              example: Notification Group 1
            email_addresses:
              description: list of recipients of the notification group.
              type: array
              items:
                type: string
                description: Email address of the recipient of the notification.
              example:
                - john.doe@example.com
                - john.doe1@example.com
            users:
              description: list of users linked to this notification group.
              type: array
              items:
                type: string
                description: User name.
              example:
                - John Doe
                - Johanna Doe
              readOnly: true
    Notification_Group_Create:
      allOf:
        - $ref: '#/components/schemas/Notification_Group'
    Notification_Group_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Notification_Group'
    Notification_Group_Update:
      allOf:
        - $ref: '#/components/schemas/Notification_Group'
    Folder:
      type: object
      properties:
        id:
          description: The id of the created folder. Folder id 0 is the root folder.
          type: integer
          format: int64
          example: 1
          readOnly: true
        name:
          description: The name of the folder.
          type: string
          example: folder_1
        parent_folder_id:
          description: ID of the parent folder, under which we will create this folder. 0 stands for the root folder.
          type: integer
          format: int64
          example: 1
          default: 0
          writeOnly: true
    Folder_Create:
      allOf:
        - $ref: '#/components/schemas/Folder'
      required:
        - name
    Folder_Response:
      description: the created folder
      type: object
      properties:
        folder:
          description: Created folder Information.
          type: object
          $ref: '#/components/schemas/Folder'
    Folder_Item_Base:
      description: Details about an asset or folder.
      type: object
      properties:
        name:
          description: Name of the item.
          type: string
        type:
          description: |
            SubType of the asset:
              * `TMP` - Content templates (pages, emails, mobile)
              * `EXEC` - Journeys
              * `LIST` - Lists 
              * `SEGMENT` - Segment
              * `TASK` - Task
              * `FOLDER` - General folder 
              * `SEGMENTFOLDER` - Folder in the Segments folder structure
              * `CONTENTBLOCK` - Content block 
              * `LABEL` - Asset Label 
              * `IMPORT` - Import task
              * `EXPORT` - Export task
              * `CRMDATASYNC` - CRM data sync task
              * `CUSTOMCOMPONENTS` - Custom component or channel
              * `INBOUND` - Inbound event
              * `CUSTOMEVENT` - Custom event
              * `CADENCE` - Cadence plan
          type: string
          example: journey
          enum:
            - TMP
            - EXEC
            - LIST
            - SEGMENT
            - TASK
            - FOLDER
            - SEGMENTFOLDER
            - CONTENTBLOCK
            - LABEL
            - IMPORT
            - EXPORT
            - CRMDATASYNC
            - CUSTOMCOMPONENTS
    Folder_Item_Folder:
      allOf:
        - $ref: '#/components/schemas/Folder_Item_Base'
        - type: object
          properties:
            id:
              description: Id of the Folder.
              type: integer
              example: 1
    Folder_Item_Asset:
      allOf:
        - $ref: '#/components/schemas/Folder_Item_Base'
        - type: object
          properties:
            api_name:
              description: Api name of the asset
              type: string
              example: asset_1
            leaf_type:
              description: |
                Leaf Type of the asset:
                  * `Custom` - Custom Journey. Only for type `EXEC`
                  * `SingleBatch` - Single Batch Journey. Only for type `EXEC`
                  * `RecurringBatch` - Recurring Batch Journey. Only for type `EXEC`
                  * `Transactional` - Transactional Journey. Only for type `EXEC`
                  * `CustomEventResolver` - Instant custom event based Journey. Only for type `EXEC`
                  * `CustomEventScheduler` - Scheduled custom event based Journey. Only for type `EXEC`
                  * `Userlist` - user List. Only for type `LIST`
                  * `Datalist` - Datalist List. Only for type `LIST`
                  * `Optionlist` - Option List. Only for type `LIST`
                  * `Devicelist` - Mobile device List. Only for type `LIST`
                  * `Email` - Email. Only for type `TMP`
                  * `Template` - Email Tempalte. Only for type `TMP`
                  * `Message` - Message. Only for type `TMP`
                  * `Page` - Page. Only for type `TMP`
                  * `MobilePush` - Mobile Push message. Only for type `TMP`
                  * `Sms` - SMS. Only for type `TMP`
                  * `Mms` - MMS. Only for type `TMP`
                  * `EmailBlueprint` - Email Quick Start. Only for type `TMP`
                  * `PageBlueprint` - Page Quick Start. Only for type `TMP`
                  * `MobilePushBlueprint` - Mobile Push Quick Start. Only for type `TMP`
                  * `SmsBlueprint` - SMS Quick Start. Only for type `TMP`
                  * `MmsBlueprint` - MMS Quick Start. Only for type `TMP`
                  * `Unknown` - Task type Unknown. Only for type `TASK`
                  * `Sql` - SQL task. Only for type `TASK`
                  * `DataExport` - Data export task. Only for type `EXPORT`
                  * `DataImport` - Data import task. Only for type `IMPORT`
                  * `Batch` - Batch task. Only for type `EXPORT`
                  * `Http` - Http task. Only for type `TASK`
                  * `TriggerJourney` - task that triggers a journey. Only for type `TASK`
                  * `ImportConfig` - Import config tasks. Only for type `TASK`
                  * `ExportConfig` - Export config tasks. Only for type `TASK`
                  * `TriggerRebuildStaticSegment` - Task that triggers a static segment rebuild. Only for type `TASK`
                  * `Static` - Static segment. Only for type `SEGMENT`
                  * `Dynamic` - Dynamic segment. Only for type `SEGMENT`
                  * `ContentBlock` - Content block. Only for type `CONTENTBLOCK`
                  * `Label` - Label. Only for type `LABEL`
                  * `CRMDataSync` - CRM data sync. Only for type `CRMDATASYNC`
                  * `CustomComponent` - Custom Component. Only for type `CUSTOMCOMPONENTS`
              type: string
              example: singleBatch
              enum:
                - Custom
                - SingleBatch
                - SingleBatchAB
                - RecurringBatch
                - Transactional
                - CustomEventResolver
                - CustomEventScheduler
                - Userlist
                - Datalist
                - Optionlist
                - Devicelist
                - Email
                - Template
                - Message
                - Page
                - MobilePush
                - Sms
                - Mms
                - EmailBlueprint
                - PageBlueprint
                - MobilePushBlueprint
                - SmsBlueprint
                - MmsBlueprint
                - Unknown
                - Sql
                - DataExport
                - DataImport
                - Batch
                - Http
                - TriggerJourney
                - ImportConfig
                - ExportConfig
                - TriggerRebuildStaticSegment
                - Static
                - Dynamic
                - ContentBlock
                - Label
                - CRMDataSync
                - CustomComponent
              nullable: true
    Folder_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Folder'
        - type: object
          properties:
            result_code:
              $ref: '#/components/schemas/result_code'
            children:
              description: List of assets in this folder. This can be Content assets, Journey assets, list assets, other folders etc.
              type: array
              items:
                discriminator:
                  propertyName: type
                  mapping:
                    folder: '#/components/schemas/Folder_Item_Folder'
                    other assets: '#/components/schemas/Folder_Item_Asset'
                anyOf:
                  - $ref: '#/components/schemas/Folder_Item_Folder'
                  - $ref: '#/components/schemas/Folder_Item_Asset'
    JourneyType:
      description: the type of the journey.
      type: string
      example: singlebatch
      enum:
        - unknown
        - singlebatch
        - transactional
        - ab
        - ab_subject
        - recurring
        - custom
      readOnly: true
    Journey_Base:
      type: object
      properties:
        api_name:
          description: the api name for the journey.
          type: string
          example: journey_1
        type:
          $ref: '#/components/schemas/JourneyType'
    Journeys:
      type: object
      properties:
        journeys:
          description: A collection of journeys.
          type: array
          items:
            $ref: '#/components/schemas/Journey_Base'
    Journey:
      allOf:
        - $ref: '#/components/schemas/Journey_Base'
        - type: object
          properties:
            name:
              description: Name of the journey.
              type: string
              example: journey_1
            description:
              description: Description of the journey.
              type: string
              example: this is the description.
    Ab_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Journey'
    Deduplication:
      description: This can be used to check your audience for duplicate contacts before targeting them. By default, this check is not performed.
      type: object
      properties:
        fields:
          description: Fields to use to deduplicate on. Contacts are considered duplicates if all fields match.
          type: array
          items:
            type: string
          example:
            - MASTER.NAME
            - MASTER.EMAIL
        sort_field:
          description: Sorting field for the deduplication. First Entry via this sorting will be kept.
          type: string
          example: MASTER.ID
        sort_descending:
          description: Direction of the sorting.
          type: boolean
          example: true
      required:
        - fields
        - sort_field
        - sort_descending
    launch_state:
      description: |-
        The state of the journey.
        * `none` - Journey is not launched.
        * `launch` - Journey is launched immediately.
        * `schedule` - Journey is scheduled at a specified time.
      type: string
      example: launch
      enum:
        - none
        - launch
        - schedule
    Scheduling:
      type: object
      properties:
        launch_date:
          description: Launch date and time of the journey.
          type: string
          format: date-time
          example: '2023-12-15T10:11:17.9968156Z'
    SeedGroup:
      type: object
      properties:
        send_to_all_available_groups:
          description: Enable to always include all available seed groups.
          type: boolean
          example: false
          default: false
          nullable: true
        segment_api_names:
          description: Array of API names for segments to be used as seed groups
          type: array
          items:
            type: string
          example:
            - seedgroup_segment_apiname_1
            - seedgroup_segment_apiname_2
          default: []
          nullable: true
    Journey_AB_Base:
      type: object
      properties:
        api_name:
          description: Api name of the journey
          type: string
        name:
          description: Name of the journey.
          type: string
          example: Christmas Campaign 1
        campaign_analytics_tag:
          description: The campaign_analytics_tag of the journey.
          type: string
          example: christmas_2424
        deduplication:
          $ref: '#/components/schemas/Deduplication'
          writeOnly: true
        disable_tracking:
          description: Do not add tracking parameters to external URLs generated for clicks in this journey. Trackers are defined in the Data Integration section of the Admin Configuration.
          type: boolean
          example: true
          default: false
        launch_state:
          $ref: '#/components/schemas/launch_state'
        scheduling:
          type: object
          allOf:
            - $ref: '#/components/schemas/Scheduling'
            - description: Required if `launch_state==schedule`
        seed_group:
          $ref: '#/components/schemas/SeedGroup'
      required:
        - api_name
        - name
    Segmenting:
      type: object
      properties:
        segment_api_name:
          description: Limit audience to the segment with this API name. If left empty, no such filtering is applied.
          type: string
          example: segment_1
          writeOnly: true
        audience_filter:
          description: 'Filter audience with this condition. For example: `endswith([MASTER.MAIL], ''@my_company.com'')` to only schedule to users with an email address on the my_company.com domain.'
          type: string
          example: endswith([MASTER.MAIL], '@my_company.com')
          writeOnly: true
    Message:
      type: object
      properties:
        api_name:
          description: API name of the message.
          type: string
          example: message_1
      required:
        - api_name
    Test_Distribution:
      description: Define the behaviour for selecting the winner of a test, and which criteria to use.
      type: object
      properties:
        test_group_size:
          description: The percentage of the audience that should be used to decide the winner.
          type: integer
          example: 10
          maximum: 100
          minimum: 1
        interval:
          description: The interval at which we should evaluate the test. Used together with `interval_type`.
          type: integer
          example: 1
        interval_type:
          description: the spread at which we should evaluate the test. Used together with `interval`.
          type: string
          example: Days
          enum:
            - Minutes
            - Hours
            - Days
            - Months
        criterium:
          description: The criterium to use to decide the winner.
          type: string
          example: Clicks
          enum:
            - Views
            - Clicks
            - Revenue
            - OrderCount
      required:
        - test_group_size
        - interval
        - interval_type
        - criterium
    Ab_Create:
      type: object
      properties:
        journey:
          allOf:
            - $ref: '#/components/schemas/Journey_AB_Base'
            - $ref: '#/components/schemas/Segmenting'
        messages:
          description: The messages that you want to use for this AB journey.
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Message'
              - type: object
                properties:
                  message_analytics_tag:
                    description: The message analytics tag for this content.
                    type: string
                    example: batch_2
          writeOnly: true
        test_settings:
          $ref: '#/components/schemas/Test_Distribution'
        folder:
          $ref: '#/components/schemas/folder_id'
        result_code:
          $ref: '#/components/schemas/result_code'
      required:
        - journey
        - messages
        - test_settings
        - folder
    Wave_Waves:
      allOf:
        - $ref: '#/components/schemas/Wave'
      required:
        - type
        - items_per_wave
        - interval_in_minutes
    Wave_Items:
      allOf:
        - $ref: '#/components/schemas/Wave'
      required:
        - type
        - number_of_waves
        - interval_in_minutes
    Wave:
      description: This can be used if you want to spread out the delivery of your message over time. By default, all selected contacts will be targeted at the same time.
      type: object
      properties:
        type:
          description: You can split up the audience in either a set amount of waves or a set amount of contacts per wave.
          type: string
          example: Waves
          enum:
            - Waves
            - Items
        interval_in_minutes:
          description: Time between the different waves, in minutes.
          type: integer
          format: int32
          example: 60
          default: 5
        number_of_waves:
          description: Number of waves to create.
          type: integer
          format: int32
          example: 5
        items_per_wave:
          description: Number of contacts to target per wave.
          type: integer
          format: int32
          example: 50000
    Top_Absolute:
      allOf:
        - type: object
          properties:
            count:
              description: Target at most this amount of contacts.
              type: integer
              format: int32
              example: 1000
          required:
            - count
        - $ref: '#/components/schemas/Top_Base'
    Top_Relative:
      allOf:
        - type: object
          properties:
            percentage:
              description: Target only this percentage of your contact selection.
              type: number
              format: float
              example: 15
          required:
            - percentage
        - $ref: '#/components/schemas/Top_Base'
    Top_Base:
      description: This can be used to further limit your audience after all other filtering has been applied.
      type: object
      properties:
        type:
          description: You can limit your audience to at most an `Absolute` amount of contacts, or reduce the audience to a `Relative` percentage of who remains after applying all other filtering.
          type: string
          example: Absolute
          enum:
            - Absolute
            - Relative
        sort_selection:
          description: Determines if the contacts should be random or sorted before selection.
          type: string
          example: Sorted
          enum:
            - Sorted
            - Random
        sort_field:
          description: Required if `sort_selection` = `Sorted`. Sort contacts by this field before selecting the first contacts.
          type: string
          example: MASTER.ID
        sort_descending:
          description: Required if `sort_selection` = `Sorted`. Determines the sort order.
          type: boolean
          example: true
      required:
        - type
        - sort_selection
    Journey_Trigger_Base:
      type: object
      properties:
        name:
          description: Name of the journey.
          type: string
          example: Christmas Campaign 1
        campaign_analytics_tag:
          description: The campaign_analytics_tag of the journey.
          type: string
          example: christmas_2424
        deduplication:
          $ref: '#/components/schemas/Deduplication'
          writeOnly: true
        send_in_waves:
          type: object
          discriminator:
            propertyName: type
            mapping:
              Waves: '#/components/schemas/Wave_Waves'
              Items: '#/components/schemas/Wave_Items'
          oneOf:
            - $ref: '#/components/schemas/Wave_Items'
            - $ref: '#/components/schemas/Wave_Waves'
          title: send_in_waves
          writeOnly: true
        sending_limit:
          discriminator:
            propertyName: type
            mapping:
              Absolute: '#/components/schemas/Top_Absolute'
              Relative: '#/components/schemas/Top_Relative'
          oneOf:
            - $ref: '#/components/schemas/Top_Relative'
            - $ref: '#/components/schemas/Top_Absolute'
          writeOnly: true
        disable_tracking:
          description: Do not add tracking parameters to external URLs generated for clicks in this journey. Trackers are defined in the Data Integration section of the Admin Configuration.
          type: boolean
          example: true
          default: false
        launch_state:
          $ref: '#/components/schemas/launch_state'
        seed_group:
          $ref: '#/components/schemas/SeedGroup'
      required:
        - api_name
        - name
    Single_Batch_Trigger:
      allOf:
        - $ref: '#/components/schemas/Journey_Base'
        - $ref: '#/components/schemas/Journey_Trigger_Base'
        - type: object
          properties:
            scheduling:
              $ref: '#/components/schemas/Scheduling'
              writeOnly: true
            message_analytics_tag:
              description: The message analytics tag for this content.
              type: string
              example: batch_2
            disable_flags:
              description: Do not store interaction data for user interactions from this journey.
              type: boolean
              example: true
              default: false
    Single_Batch:
      allOf:
        - $ref: '#/components/schemas/Single_Batch_Trigger'
        - $ref: '#/components/schemas/Segmenting'
    Single_Batch_Success:
      type: object
      properties:
        journey:
          $ref: '#/components/schemas/Single_Batch'
        result_code:
          $ref: '#/components/schemas/result_code'
        errors:
          $ref: '#/components/schemas/Errors'
    Single_Batch_Error:
      type: object
      properties:
        journey:
          $ref: '#/components/schemas/Single_Batch'
        errors:
          $ref: '#/components/schemas/Errors'
        result_code:
          description: Result response code for the request
          type: string
          example: Failed
    Scheduling_Required:
      type: object
      properties:
        launch_date:
          description: Launch date and time of the journey.
          type: string
          format: date-time
          example: '2023-12-15T10:11:17.9968156Z'
      required:
        - launch_date
    Single_Batch_Launch_Required_Schedule:
      type: object
      properties:
        launch_state:
          $ref: '#/components/schemas/launch_state'
        scheduling:
          $ref: '#/components/schemas/Scheduling_Required'
          writeOnly: true
      required:
        - scheduling
    Single_Batch_Launch:
      type: object
      properties:
        launch_state:
          $ref: '#/components/schemas/launch_state'
        scheduling:
          $ref: '#/components/schemas/Scheduling'
          writeOnly: true
    Ab_Subject:
      type: object
      properties:
        journey:
          allOf:
            - $ref: '#/components/schemas/Journey_AB_Base'
            - $ref: '#/components/schemas/Segmenting'
        message:
          description: The message that you want to use for this AB journey.
          $ref: '#/components/schemas/Message'
          writeOnly: true
        subjects:
          description: The subject lines you want to test for this journey.
          type: array
          items:
            type: object
            properties:
              message_analytics_tag:
                description: The message analytics tag for this content.
                type: string
                example: batch_2
              text:
                description: configuration for each language for the subject lines
                type: object
                additionalProperties:
                  x-additionalPropertiesName: language
                  type: string
                  example: This is a subject line
          writeOnly: true
        test_settings:
          $ref: '#/components/schemas/Test_Distribution'
        folder:
          $ref: '#/components/schemas/folder_id'
        result_code:
          $ref: '#/components/schemas/result_code'
      required:
        - journey
        - message
        - subjects
        - test_settings
        - folder
    Custom:
      allOf:
        - $ref: '#/components/schemas/Journey'
    Entrypoint:
      type: object
      properties:
        info:
          description: Can contain some important system information.
          type: string
          example: some optional system information about the entry point.
        model:
          type: object
          properties:
            entry_point_type:
              description: type of entrypoint.
              type: string
              example: Input
              enum:
                - Input
            name:
              description: name of entrypoint.
              type: string
              example: Entrypoint 1
            api_name:
              description: API name of the entrypoint.
              type: string
              example: entrypoint_1
    Entrypoints:
      type: object
      properties:
        journeys:
          description: A collection of entrypoints.
          type: array
          items:
            $ref: '#/components/schemas/Entrypoint'
    Entrypoint_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Entrypoint'
        - type: object
          properties:
            parameters:
              description: Parameters defined for this entrypoint.
              items:
                type: object
                properties:
                  name:
                    description: Name of the parameter to be provided on this input.
                    type: string
                    example: USERNAME
                  required:
                    description: Indicates if this parameter is required.
                    type: boolean
                    example: true
              type: array
    Trigger:
      type: object
      properties:
        user_id:
          description: The id of the user on the current context (eg. default 0 same as Anonymous)
          type: integer
          format: int64
          example: 1
        parameter_values:
          description: The parameter and the value of that parameter that needs to be processed.
          type: object
          example:
            USERNAME: Bob
            OPTIN: true
          additionalProperties:
            type: string
    Entrypoint_Trigger_Response:
      type: object
      properties:
        result_code:
          $ref: '#/components/schemas/result_code'
        result_type:
          description: Resulting body type from the entry call.
          type: string
          example: Content
          enum:
            - None
            - Content
            - Redirect
            - Validation
            - Error
        body:
          description: The returned data from the entrypoint.
          type: string
          example: <html></html>
    Recurring:
      allOf:
        - $ref: '#/components/schemas/Journey'
    Single_Batches:
      type: object
      properties:
        journeys:
          type: array
          items:
            $ref: '#/components/schemas/Journey_Base'
          example:
            - api_name: api_name_1
              type: singlebatch
            - api_name: api_name_2
              type: singlebatch
    Single_Batch_Create:
      type: object
      properties:
        journey:
          $ref: '#/components/schemas/Single_Batch'
        message:
          description: The message that you want to use for this journey. if the message is of type TEMPLATE you can also provide data selection information.
          $ref: '#/components/schemas/Message'
          writeOnly: true
        folder:
          $ref: '#/components/schemas/folder_id'
        result_code:
          $ref: '#/components/schemas/result_code'
      required:
        - journey
        - message
        - folder
    Single_Batch_Retrieve:
      type: object
      properties:
        journey:
          type: object
          $ref: '#/components/schemas/Single_Batch'
    Single_Batch_Trigger_Required_Schedule:
      allOf:
        - $ref: '#/components/schemas/Journey_Base'
        - $ref: '#/components/schemas/Journey_Trigger_Base'
        - type: object
          properties:
            message_analytics_tag:
              description: The message analytics tag for this content.
              type: string
              example: batch_2
            scheduling:
              $ref: '#/components/schemas/Scheduling_Required'
              writeOnly: true
            disable_flags:
              description: Do not store interaction data for user interactions from this journey.
              type: boolean
              example: true
              default: false
      required:
        - scheduling
    Single_Batch_Trigger_Create:
      type: object
      properties:
        journey:
          discriminator:
            propertyName: launch_state
            mapping:
              scheduled: '#/components/schemas/Single_Batch_Trigger_Required_Schedule'
              launch: '#/components/schemas/Single_Batch_Trigger'
              none: '#/components/schemas/Single_Batch_Trigger'
          oneOf:
            - $ref: '#/components/schemas/Single_Batch_Trigger'
            - $ref: '#/components/schemas/Single_Batch_Trigger_Required_Schedule'
    Single_Batch_Email:
      type: object
      properties:
        journey_model:
          $ref: '#/components/schemas/Single_Batch'
        message_model:
          description: The Email that you want to use for this journey.
          $ref: '#/components/schemas/Email_Create'
          writeOnly: true
        folder:
          $ref: '#/components/schemas/folder_id'
      required:
        - journey
        - message
        - folder
    Single_Batch_Mobile:
      type: object
      properties:
        journey_model:
          $ref: '#/components/schemas/Single_Batch'
        mobile_message_model:
          description: The Mobile message that you want to use for this journey.
          $ref: '#/components/schemas/Mobile_Create'
          writeOnly: true
        folder:
          $ref: '#/components/schemas/folder_id'
      required:
        - journey
        - message
        - folder
    Single_Batch_Sms:
      type: object
      properties:
        journey_model:
          $ref: '#/components/schemas/Single_Batch'
        sms_model:
          description: The SMS that you want to use for this journey.
          $ref: '#/components/schemas/Sms_Create'
          writeOnly: true
        folder:
          $ref: '#/components/schemas/folder_id'
      required:
        - journey
        - message
        - folder
    Transactionals:
      type: object
      properties:
        journeys:
          type: array
          items:
            $ref: '#/components/schemas/Journey_Base'
          example:
            - api_name: api_name_1
              type: transactional
            - api_name: api_name_2
              type: transactional
    Transactional:
      allOf:
        - $ref: '#/components/schemas/Journey_Base'
        - type: object
          properties:
            launch_state:
              $ref: '#/components/schemas/launch_state'
            name:
              description: Name of the journey.
              type: string
              example: Christmas Campaign 1
            campaign_analytics_tag:
              description: Analytics tag for this journey.
              type: string
            message_analytics_tag:
              description: Analytics tag for this message. Omitted if empty.
              type: string
          example:
            api_name: journey_1
            type: transactional
            launch_state: none
            name: Christmas Campaign 1
            campaign_analytics_tag: christmas_campaign
            message_analytics_tag: christmas_campaign_message
    Transactional_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Transactional'
    Transactional_Data_Selection:
      type: object
      properties:
        data_selection:
          description: the name of the Data selection as defined on the Content. Check the content definition for this information.
          type: string
          example: Data_selection_1
        content:
          description: a list of objects of key Value pairs, where the KEY is a keyfield on the data selection and the VALUE is the corresponding value to filter on.
          example:
            - id: '1'
            - id: '2'
          items:
            type: object
            additionalProperties:
              x-additionalPropertiesName: key_value_pairs
              type: object
          type: array
    Transactional_Lookup:
      description: Determines how the `recipient` field should be interpreted. By default, it will match on `MASTER.MAIL`.
      type: object
      properties:
        scope:
          description: Scope name for the lookup. Only the `MASTER` scope is currently allowed.
          type: string
          example: MASTER
        field:
          description: A field that exists for the given scope. Only supported values are `ID` and `MAIL`.
          type: string
          example: MAIL
      required:
        - field
        - scope
    sg_external_id:
      description: A uuid you can use to trace this message. This is an accepted input for the [Transactional_GetStatus](#tag/Transactional-journey/operation/Transactional_GetStatus) call.
      type: string
      format: uuid
      example: c1379533-b642-48ee-968a-b952c042ed94
    Transactional_Send:
      type: object
      properties:
        email:
          description: Deprecated Use recipient instead.
          type: string
          example: john.doe@doe.com
          deprecated: true
        recipient:
          description: Recipient to which the message should be sent. Depending on `lookup`, this can either be a user id or an email address.
          type: string
          example: john.doe@doe.com
        language:
          description: Language in which the message should be sent. This is only applied when targeting users that do not yet exist in your audience.
          type: string
          example: en-US
        data:
          description: Data that is configured on the Transactional data and that should be passed or is optional. Check the definition of your transactional journey for this schema.
          type: object
          example:
            required_string_1: John
            optional_integer_1: 1
            required_integer_1: 5
        dtsdata:
          description: Data on the defined Data selections for this journey. Selection of key ID fields with the corresponding values to select.
          type: array
          items:
            $ref: '#/components/schemas/Transactional_Data_Selection'
        lookup:
          $ref: '#/components/schemas/Transactional_Lookup'
        sg_external_id:
          $ref: '#/components/schemas/sg_external_id'
    Transactional_Trigger_Create:
      type: object
      properties:
        items:
          allOf:
            - $ref: '#/components/schemas/Transactional_Send'
            - type: object
              required:
                - recipient
                - language
    Transactional_Trigger_Response:
      type: object
      properties:
        result_code:
          $ref: '#/components/schemas/result_code'
        errors:
          $ref: '#/components/schemas/Errors'
        response_data:
          description: List of provided initial data.
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/Transactional_Send'
              - type: object
                properties:
                  errors:
                    $ref: '#/components/schemas/Errors'
        messages:
          type: array
          items:
            type: object
            description: List of messages that where sent.
            properties:
              id:
                description: Message ID of the newly sent messages. Either these `id`s or the user-supplied `sg_external_id`s can be used as input for the [Transactional_GetStatusById](#tag/Transactional-journey/operation/Transactional_GetStatusById) and [Transactional_GetStatus](#tag/Transactional-journey/operation/Transactional_GetStatus) calls.
                type: string
                format: uuid
                example: e82d48e6-f083-4a88-a842-524b3d8992de
    Transactional_Profile_Scope:
      type: object
      properties:
        scope:
          description: Name of the Scope, MASTER for example to use the main list or the name of related lists. This is always relative to the user list defined for this journey.
          type: string
          example: MASTER
        fields:
          description: A key/value list of fields to update on the specified scope.
          type: object
          example:
            NAME: John
            PREFERENCE: Food
      required:
        - scope
    Transactional_Profile:
      description: Profile of the user. You can update items on the main list or related lists.
      type: array
      items:
        $ref: '#/components/schemas/Transactional_Profile_Scope'
    Transactional_Update_Send:
      allOf:
        - $ref: '#/components/schemas/Transactional_Send'
        - type: object
          properties:
            profile:
              $ref: '#/components/schemas/Transactional_Profile'
    Transactional_Update_and_Trigger:
      type: object
      properties:
        items:
          allOf:
            - $ref: '#/components/schemas/Transactional_Update_Send'
            - type: object
              required:
                - recipient
                - language
    Transactional_Status_Request:
      type: object
      properties:
        ids:
          description: List of message IDs to look for. These are system-generated and returned by the [Send](#tag/Transactional-journey/operation/Transactional_Send) and [UpdateProfileAndSend](#tag/Transactional-journey/operation/TransactionalShortcut_UpdateProfileAndSendTransactional) calls.
          type: array
          items:
            type: string
            format: uuid
          example:
            - 055979c7-d2ec-4d83-abb4-fde70cc1aac5
            - 754c4ea5-621c-4a9d-9932-53ef68542945
        sg_external_ids:
          description: List of External IDs to look for. This is useful if you supplied those in the [Send](#tag/Transactional-journey/operation/Transactional_Send) or [UpdateProfileAndSend](#tag/Transactional-journey/operation/TransactionalShortcut_UpdateProfileAndSendTransactional) call.
          type: array
          items:
            type: string
            format: uuid
          example:
            - c1379533-b642-48ee-968a-b952c042ed94
            - 7efd3f07-3eb4-4bce-b26c-672603ea7f20
    Transactional_Status:
      type: object
      properties:
        id:
          description: ID of the message.
          type: string
          format: uuid
          example: 7aba31fe-490c-46f0-bd5e-82a0bc5648fc
        sg_external_id:
          $ref: '#/components/schemas/sg_external_id'
        status:
          description: status code of the message.
          type: integer
          format: int32
          example: 30
        status_message:
          description: Readable version of the message status.
          type: string
          example: Mail was sent
    Transactional_Statuses:
      type: array
      items:
        $ref: '#/components/schemas/Transactional_Status'
    Transactional_Status_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Transactional_Status'
    List_Base:
      type: object
      properties:
        api_name:
          description: API name for a list.
          type: string
          example: list_1
        name:
          description: Name of the list.
          type: string
          example: List 1
    List_Type:
      description: Type of the list.
      type: string
      example: Userlist
      enum:
        - Unknown
        - Userlist
        - Datalist
        - DataSelectionList
        - Optionlist
        - Devicelist
    Lists:
      type: object
      properties:
        list:
          description: Collection of lists.
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/List_Base'
              - type: object
                properties:
                  id:
                    description: ID of the list.
                    type: integer
                    format: int64
                    example: 1
                    readOnly: true
                  type:
                    allOf:
                      - $ref: '#/components/schemas/List_Type'
    List_Minimal:
      allOf:
        - $ref: '#/components/schemas/List_Base'
        - type: object
          properties:
            tags:
              $ref: '#/components/schemas/tags'
            description:
              description: A description of what this list is about.
              type: string
              example: This is my first userlist
              default: ''
              writeOnly: true
            enforce_segment_selection:
              description: Enforce segment selection for user lists (Only applicable for user lists)
              type: boolean
              example: true
              default: false
            organizations:
              allOf:
                - $ref: '#/components/schemas/organizations'
                - readOnly: true
            not_accessible_organizations_count:
              $ref: '#/components/schemas/not_accessible_organizations_count'
    List_Create:
      allOf:
        - $ref: '#/components/schemas/List_Minimal'
        - type: object
          properties:
            folder:
              description: Folder id to store the list in.
              type: string
              example: folder_1
              default: '0'
            optionlist_codetype:
              description: Option list code type for option lists (Only applicable for option lists)
              type: string
              example: Text
              default: Text
              enum:
                - Unknown
                - Text
                - Numeric
            type:
              allOf:
                - $ref: '#/components/schemas/List_Type'
                - writeOnly: true
      required:
        - api_name
        - name
        - type
    List_Email_Quality_Action:
      type: object
      properties:
        field_name:
          description: Name of the field to update the value of.
          type: string
          example: OPTOUT
        field_value:
          description: Value to update the field with.
          type: string
          example: 10
    List_Email_Quality:
      type: object
      properties:
        email_quality_type:
          description: The email quality type setting, configures options for the email quality checks.
          type: string
          example: Normal
          enum:
            - Defensive
            - Normal
            - Aggressive
            - Custom
        invalid_email_syntax:
          description: Amount of occurrences of invalid email syntax before email quality control is triggered.
          type: integer
          format: int32
          example: 1
          readOnly: true
        non_existing_domain:
          description: Amount of occurrences of non-existing domain before email quality control is triggered.
          type: integer
          format: int32
          example: 1
          readOnly: true
        hard_bounce:
          description: Amount of hard bounces before email quality control is triggered.
          type: integer
          format: int32
          example: 1
          readOnly: true
        soft_bounce:
          description: Amount of soft bounces before email quality control is triggered.
          type: integer
          format: int32
          example: 3
          readOnly: true
        bounce_scope:
          description: Name of the relation to the list that holds the bounce counters.
          type: string
          example: MASTER
        email_quality_actions:
          type: array
          items:
            $ref: '#/components/schemas/List_Email_Quality_Action'
        bounce_stored_procedures:
          description: List of stored procedures to be executed when email quality control is triggered.
          type: array
          items:
            type: string
          example:
            - SP_HANDLE_EMAIL_QUALITY_CONTROL
    List:
      allOf:
        - $ref: '#/components/schemas/List_Minimal'
        - type: object
          properties:
            email_quality_configuration:
              $ref: '#/components/schemas/List_Email_Quality'
            taglist_api_name:
              description: API name of Tag list.
              type: string
              example: tag_list_1
              readOnly: true
            organizations:
              allOf:
                - $ref: '#/components/schemas/organizations'
                - readOnly: true
            not_accessible_organizations_count:
              $ref: '#/components/schemas/not_accessible_organizations_count'
            type:
              $ref: '#/components/schemas/List_Type'
    List_Retrieve:
      allOf:
        - $ref: '#/components/schemas/List'
    List_Update:
      allOf:
        - $ref: '#/components/schemas/List_Minimal'
        - type: object
          properties:
            taglist_api_name:
              description: API name of Tag list.
              type: string
              example: tag_list_1
            email_quality_configuration:
              $ref: '#/components/schemas/List_Email_Quality'
            type:
              allOf:
                - $ref: '#/components/schemas/List_Type'
                - writeOnly: true
    List_Custom_Event_Base:
      type: object
      properties:
        name:
          description: Name of the custom event.
          type: string
          example: Custom event 1
    List_Custom_Events:
      allOf:
        - type: object
          properties:
            custom_events:
              description: the custom events matching the criteria on the specified list.
              type: array
              items:
                $ref: '#/components/schemas/List_Custom_Event_Base'
    List_Custom_Event_Minimal:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Base'
        - type: object
          properties:
            tags:
              allOf:
                - $ref: '#/components/schemas/tags'
                - writeOnly: true
            description:
              description: A description of what this custom event is about.
              type: string
              example: This is my first custom event
              default: ''
    List_Custom_Event_Type:
      description: Type of the custom event.
      type: string
      example: Streaming
      enum:
        - Streaming
        - Scheduled
    List_Custom_Event:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Minimal'
        - type: object
          properties:
            type:
              $ref: '#/components/schemas/List_Custom_Event_Type'
            transaction_field:
              description: Represents Transaction Field of the custom event
              type: string
              example: USER_ID
              readOnly: true
    List_Custom_Event_Create:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event'
      required:
        - name
        - type
    List_Custom_Event_Retrieve:
      type: object
      properties:
        custom_event:
          $ref: '#/components/schemas/List_Custom_Event'
    List_Custom_Event_Update:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Minimal'
        - type: object
          properties:
            transaction_field:
              description: field on the Linked list to connect the custom event to
              type: string
              example: USER_ID
    List_Custom_Event_Field_Simple:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Base'
        - type: object
          title: Simple field
    List_Custom_Event_Field_Computed:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Base'
        - type: object
          title: Computed field
          properties:
            value_definition:
              description: definition of the value when this is a Computed field
              type: string
              example: '[%[MASTER.ID]%]'
      required:
        - value_definition
    List_Custom_Event_Field_OptionList:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Base'
        - type: object
          title: Lookup field
          properties:
            optionlist:
              description: API name of the option list if content = LOOKUP
              type: string
              example: option_list_1
    data_type:
      description: Data type of the field.
      type: string
      example: Text
      enum:
        - Unknown
        - Boolean
        - Numeric
        - Long
        - Float
        - Date
        - DateTime
        - Text
        - LongText
        - Json
        - UniqueIdentifier
    List_Custom_Event_Field_Base:
      type: object
      properties:
        name:
          description: Name of the field.
          type: string
          example: field 1
        length:
          description: The length of the field.
          type: integer
          format: int32
          example: 56
          default: 50
        data_type:
          $ref: '#/components/schemas/data_type'
        description:
          description: Description about the field.
          type: string
          example: This is a text field.
          default: ''
        allow_null:
          description: Allow null values for this field.
          type: boolean
          example: true
          default: true
        content:
          description: The type of field stored.
          enum:
            - Unknown
            - Free
            - Single
            - Multi
            - ComputedNonPersisted
            - ComputedPersisted
            - Lookup
          example: Lookup
          type: string
      required:
        - name
        - data_type
    List_Custom_Event_Field:
      discriminator:
        propertyName: content
        mapping:
          Other: '#/components/schemas/List_Custom_Event_Field_Simple'
          ComputedNonPersisted: '#/components/schemas/List_Custom_Event_Field_Computed'
          ComputedPersisted: '#/components/schemas/List_Custom_Event_Field_Computed'
          Lookup: '#/components/schemas/List_Custom_Event_Field_OptionList'
      oneOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Simple'
        - $ref: '#/components/schemas/List_Custom_Event_Field_Computed'
        - $ref: '#/components/schemas/List_Custom_Event_Field_OptionList'
    List_Custom_Event_Field_Json:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Base'
        - type: object
          title: Json field
          properties:
            json_schema:
              description: Json schema, only used if data_type=Json.
              type: array
              items:
                type: object
                description: objects of fields storied in the json object.
                properties:
                  name:
                    description: Name of the json field.
                    type: string
                  required:
                    description: Indicates whether the value of json field required or not.
                    type: boolean
                  input_type:
                    description: Input type of json field.
                    type: string
                    enum:
                      - Unknown
                      - Boolean
                      - Numeric
                      - Long
                      - Float
                      - Date
                      - DateTime
                      - Text
                      - LongText
                      - Array
                  child_data:
                    description: Child data for Array type of json field.
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          description: Name of the json field.
                          type: string
                        required:
                          description: Indicates whether the value of json field required or not.
                          type: boolean
                        input_type:
                          description: Input type of json field.
                          type: string
                          enum:
                            - Unknown
                            - Boolean
                            - Numeric
                            - Long
                            - Float
                            - Date
                            - DateTime
                            - Text
                            - LongText
                            - Array
                      description: Represents json field schema api model.
                      required:
                        - input_type
                        - name
                required:
                  - input_type
                  - name
    List_Custom_Event_Fields_Retrieve:
      description: an Array of field matching the criteria.
      type: object
      properties:
        fields:
          description: List of fields to create on the custom event.
          type: array
          items:
            allOf:
              - oneOf:
                  - $ref: '#/components/schemas/List_Custom_Event_Field'
                  - $ref: '#/components/schemas/List_Custom_Event_Field_Json'
                discriminator:
                  propertyName: data_type
                  mapping:
                    Unknown: '#/components/schemas/List_Custom_Event_Field'
                    Boolean: '#/components/schemas/List_Custom_Event_Field'
                    Numeric: '#/components/schemas/List_Custom_Event_Field'
                    Long: '#/components/schemas/List_Custom_Event_Field'
                    Float: '#/components/schemas/List_Custom_Event_Field'
                    Date: '#/components/schemas/List_Custom_Event_Field'
                    DateTime: '#/components/schemas/List_Custom_Event_Field'
                    Text: '#/components/schemas/List_Custom_Event_Field'
                    LongText: '#/components/schemas/List_Custom_Event_Field'
                    UniqueIdentifier: '#/components/schemas/List_Custom_Event_Field'
                    Json: '#/components/schemas/List_Custom_Event_Field_Json'
    List_Custom_Event_Fields_Create:
      description: an Array of fields To create.
      type: object
      properties:
        fields:
          description: List of fields to create on the custom event.
          type: array
          items:
            allOf:
              - oneOf:
                  - $ref: '#/components/schemas/List_Custom_Event_Field'
                  - $ref: '#/components/schemas/List_Custom_Event_Field_Json'
                discriminator:
                  propertyName: data_type
                  mapping:
                    Unknown: '#/components/schemas/List_Custom_Event_Field'
                    Boolean: '#/components/schemas/List_Custom_Event_Field'
                    Numeric: '#/components/schemas/List_Custom_Event_Field'
                    Long: '#/components/schemas/List_Custom_Event_Field'
                    Float: '#/components/schemas/List_Custom_Event_Field'
                    Date: '#/components/schemas/List_Custom_Event_Field'
                    DateTime: '#/components/schemas/List_Custom_Event_Field'
                    Text: '#/components/schemas/List_Custom_Event_Field'
                    LongText: '#/components/schemas/List_Custom_Event_Field'
                    UniqueIdentifier: '#/components/schemas/List_Custom_Event_Field'
                    Json: '#/components/schemas/List_Custom_Event_Field_Json'
      required:
        - fields
    List_Custom_Event_Field_Update:
      discriminator:
        propertyName: content
        mapping:
          Other: '#/components/schemas/List_Custom_Event_Field_Simple_Update'
          ComputedNonPersisted: '#/components/schemas/List_Custom_Event_Field_Computed_Update'
          ComputedPersisted: '#/components/schemas/List_Custom_Event_Field_Computed_Update'
          Lookup: '#/components/schemas/List_Custom_Event_Field_OptionList_Update'
      oneOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Simple_Update'
        - $ref: '#/components/schemas/List_Custom_Event_Field_Computed_Update'
        - $ref: '#/components/schemas/List_Custom_Event_Field_OptionList_Update'
    List_Custom_Event_Field_Json_Update:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Base_Update'
        - type: object
          title: Json field
          properties:
            json_schema:
              description: Json schema, only used if data_type=Json.
              type: array
              items:
                type: object
                description: objects of fields storied in the json object.
                properties:
                  name:
                    description: Name of the json field.
                    type: string
                  required:
                    description: Indicates whether the value of json field required or not.
                    type: boolean
                  input_type:
                    description: Input type of json field.
                    type: string
                    enum:
                      - Unknown
                      - Boolean
                      - Numeric
                      - Long
                      - Float
                      - Date
                      - DateTime
                      - Text
                      - LongText
                      - Array
                  child_data:
                    description: Child data for Array type of json field.
                    type: array
                    items:
                      type: object
                      properties:
                        name:
                          description: Name of the json field.
                          type: string
                        required:
                          description: Indicates whether the value of json field required or not.
                          type: boolean
                        input_type:
                          description: Input type of json field.
                          type: string
                          enum:
                            - Unknown
                            - Boolean
                            - Numeric
                            - Long
                            - Float
                            - Date
                            - DateTime
                            - Text
                            - LongText
                            - Array
                      description: Represents json field schema api model.
    List_Custom_Event_Field_Simple_Update:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Base_Update'
        - type: object
          title: Simple field
    List_Custom_Event_Field_Computed_Update:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Base_Update'
        - type: object
          title: Computed field
          properties:
            value_definition:
              description: definition of the value when this is a Computed field
              type: string
              example: '[%[MASTER.ID]%]'
    List_Custom_Event_Field_OptionList_Update:
      allOf:
        - $ref: '#/components/schemas/List_Custom_Event_Field_Base_Update'
        - type: object
          title: Lookup field
          properties:
            optionlist:
              description: API name of the option list if content = LOOKUP
              type: string
              example: option_list_1
    List_Custom_Event_Field_Base_Update:
      type: object
      properties:
        name:
          description: Name of the field.
          type: string
          example: field 1
        data_type:
          description: Data type of the field.
          type: string
          example: Text
          enum:
            - Unknown
            - Boolean
            - Numeric
            - Long
            - Float
            - Date
            - DateTime
            - Text
            - LongText
            - Json
            - UniqueIdentifier
          readOnly: true
        description:
          description: Description about the field.
          type: string
          example: This is a text field.
        content:
          description: The type of field stored.
          enum:
            - Unknown
            - Free
            - Single
            - Multi
            - ComputedNonPersisted
            - ComputedPersisted
            - Lookup
          example: Lookup
          type: string
    List_Custom_Event_Field_Body:
      allOf:
        - oneOf:
            - $ref: '#/components/schemas/List_Custom_Event_Field_Update'
            - $ref: '#/components/schemas/List_Custom_Event_Field_Json_Update'
          discriminator:
            propertyName: data_type
            mapping:
              Unknown: '#/components/schemas/List_Custom_Event_Field_Update'
              Boolean: '#/components/schemas/List_Custom_Event_Field_Update'
              Numeric: '#/components/schemas/List_Custom_Event_Field_Update'
              Long: '#/components/schemas/List_Custom_Event_Field_Update'
              Float: '#/components/schemas/List_Custom_Event_Field_Update'
              Date: '#/components/schemas/List_Custom_Event_Field_Update'
              DateTime: '#/components/schemas/List_Custom_Event_Field_Update'
              Text: '#/components/schemas/List_Custom_Event_Field_Update'
              LongText: '#/components/schemas/List_Custom_Event_Field_Update'
              UniqueIdentifier: '#/components/schemas/List_Custom_Event_Field_Update'
              Json: '#/components/schemas/List_Custom_Event_Field_Json_Update'
    List_Field_Simple:
      allOf:
        - $ref: '#/components/schemas/List_Field_Base'
        - type: object
          title: Simple field
    List_Field_Computed:
      allOf:
        - $ref: '#/components/schemas/List_Field_Base'
        - type: object
          title: Computed field
          properties:
            value_definition:
              description: definition of the value when this is a Computed field
              type: string
              example: '[%[MASTER.ID]%]'
      required:
        - value_definition
    List_Field_OptionList:
      allOf:
        - $ref: '#/components/schemas/List_Field_Base'
        - type: object
          title: Lookup field
          properties:
            optionlist:
              description: API name of the option list if content = LOOKUP
              type: string
              example: option_list_1
      required:
        - optionlist
    List_Field_Base:
      type: object
      properties:
        name:
          description: Name of the field.
          type: string
          example: field 1
        length:
          description: The length of the field.
          type: integer
          format: int32
          example: 56
          default: 50
        data_type:
          description: Data type of the field.
          type: string
          example: Text
          enum:
            - Unknown
            - Boolean
            - Numeric
            - Long
            - Float
            - Date
            - DateTime
            - Text
            - LongText
            - Json
            - UniqueIdentifier
        description:
          description: Description about the field.
          type: string
          example: This is a text field.
          default: ''
        allow_null:
          description: Allow null values for this field.
          type: boolean
          example: true
          default: true
        content:
          default: Free
          description: The type of field stored.
          enum:
            - Unknown
            - Free
            - Single
            - Multi
            - ComputedNonPersisted
            - ComputedPersisted
            - Lookup
          example: Lookup
          type: string
      required:
        - name
        - data_type
    List_Field:
      anyOf:
        - $ref: '#/components/schemas/List_Field_Simple'
        - $ref: '#/components/schemas/List_Field_Computed'
        - $ref: '#/components/schemas/List_Field_OptionList'
      discriminator:
        propertyName: content
        mapping:
          Other: '#/components/schemas/List_Field_Simple'
          ComputedNonPersisted: '#/components/schemas/List_Field_Computed'
          ComputedPersisted: '#/components/schemas/List_Field_Computed'
          Lookup: '#/components/schemas/List_Field_OptionList'
    List_Fields_Retrieve:
      description: an Array of field matching the criteria.
      type: object
      properties:
        fields:
          description: List of fields to create on the custom event.
          type: array
          items:
            $ref: '#/components/schemas/List_Field'
    List_Fields_Create:
      description: an Array of fields To create.
      type: object
      properties:
        fields:
          description: List of fields to create on the custom event.
          type: array
          items:
            $ref: '#/components/schemas/List_Field'
      required:
        - fields
    List_Field_Simple_Update:
      allOf:
        - $ref: '#/components/schemas/List_Field_Base_Update'
        - type: object
          title: Simple field
    List_Field_Computed_Update:
      allOf:
        - $ref: '#/components/schemas/List_Field_Base_Update'
        - type: object
          title: Computed field
          properties:
            value_definition:
              description: definition of the value when this is a Computed field
              type: string
              example: '[%[MASTER.ID]%]'
    List_Field_OptionList_Update:
      allOf:
        - $ref: '#/components/schemas/List_Field_Base_Update'
        - type: object
          title: Lookup field
          properties:
            optionlist:
              description: API name of the option list if content = LOOKUP
              type: string
              example: option_list_1
    List_Field_Base_Update:
      type: object
      properties:
        name:
          description: Name of the field.
          type: string
          example: field 1
        data_type:
          description: Data type of the field.
          type: string
          example: Text
          enum:
            - Unknown
            - Boolean
            - Numeric
            - Long
            - Float
            - Date
            - DateTime
            - Text
            - LongText
            - Json
            - UniqueIdentifier
          readOnly: true
        description:
          description: Description about the field.
          type: string
          example: This is a text field.
        content:
          description: The type of field stored.
          enum:
            - Unknown
            - Free
            - Single
            - Multi
            - ComputedNonPersisted
            - ComputedPersisted
            - Lookup
          example: Lookup
          type: string
    List_Field_Update:
      discriminator:
        propertyName: content
        mapping:
          Other: '#/components/schemas/List_Field_Simple_Update'
          ComputedNonPersisted: '#/components/schemas/List_Field_Computed_Update'
          ComputedPersisted: '#/components/schemas/List_Field_Computed_Update'
          Lookup: '#/components/schemas/List_Field_OptionList_Update'
      oneOf:
        - $ref: '#/components/schemas/List_Field_Simple_Update'
        - $ref: '#/components/schemas/List_Field_Computed_Update'
        - $ref: '#/components/schemas/List_Field_OptionList_Update'
    List_Relation_Base:
      type: object
      properties:
        type:
          description: The type of the relation.
          type: string
          example: OneToMany
          enum:
            - OneToOne
            - OneToMany
            - ManyToOne
        scope:
          description: The scope name for a relation.
          type: string
          example: SCOPE_1
        source_list_api_name:
          description: API name of the source list.
          type: string
          example: source_list_api_name
        destination_list_api_name:
          description: API name of the destination list.
          type: string
          example: destination_list_1_api_name
    List_Relations:
      type: object
      properties:
        relations:
          description: list of relations connected to this list.
          type: array
          items:
            $ref: '#/components/schemas/List_Relation_Base'
    List_Relation_Constraint_2:
      type: object
      properties:
        list1:
          description: Source list for constraint.
          type: string
          example: MASTER
          enum:
            - MASTER
            - EXTENSION
        field1:
          description: Source field for constraint.
          type: string
          example: CATEGORY
        operator:
          description: |
            Operator on the constraint.
            <details>
            <summary>Expand for more info:</summary>

            - `Unknown`: Invalid. Do not use this.

            Compare source field to destination field or fixed value:

            - `EqualTo`
            - `NotEqualTo`
            - `GreaterThan`
            - `GreaterThanOrEqualTo`
            - `LessThan`
            - `LessThanOrEqualTo`

            Compare source field to a fixed value:

            - `Like`: Requires `value`. This constraint is true if the source field contains the `value`.

            Constraint applies only to `field1`. Do not specify `list2`, `field2` or `value`:

            - `IsNull`: Returns true if the `field1` is (database) null. This will be false if `field1` contains an empty string or 0.
            - `IsNotNull`: Inverse of the above.
            - `IsEmpty`: Returns true if `field1` is empty. This can be null, an empty string or 0.
            - `IsNotEmpty`: Inverse of the above.

            </details>
          type: string
          example: EqualTo
          enum:
            - Unknown
            - EqualTo
            - NotEqualTo
            - GreaterThan
            - GreaterThanOrEqualTo
            - LessThan
            - LessThanOrEqualTo
            - Like
            - IsNull
            - IsNotNull
            - IsEmpty
            - IsNotEmpty
        list2:
          description: Destination list for constraint. Mutually exclusive with `value`. Fill in `list2` and `field2` to compare the source field to this destination field.
          type: string
          example: EXTENSION
          enum:
            - null
            - MASTER
            - EXTENSION
        field2:
          description: Destination field for constraint. Mutually exclusive with `value`. Fill in `list2` and `field2` to compare the source field to this destination field.
          type: string
          example: INTEREST
        value:
          description: Value of source field of the constraint. Mutually exclusive with `list2` and `field2`. Fill in `value` to compare the source field to this fixed value.
          type: string
          example: '10'
      required:
        - list1
        - field1
        - operator
    List_Relation_Details:
      type: object
      properties:
        scope:
          description: Name of the relation.
          type: string
          example: RELATION_1
        type:
          description: Type of the relation.
          type: string
          example: ManyToOne
          enum:
            - OneToOne
            - OneToMany
            - ManyToOne
        masterlist_field_name:
          description: Field name of master list.
          type: string
          example: master_field
        slavelist_api_name:
          description: API name of extension list.
          type: string
          example: extension_list
        slavelist_field_name:
          description: Field name of the extension list.
          type: string
          example: extension_field
        constraints:
          description: Constraints of the relation.
          type: array
          items:
            $ref: '#/components/schemas/List_Relation_Constraint_2'
    List_Relations_Create:
      type: object
      properties:
        relations:
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/List_Relation_Details'
              - required:
                  - masterlist_field_name
                  - scope
                  - slavelist_api_name
                  - slavelist_field_name
                  - type
      required:
        - relations
    List_Relation_Constraint:
      type: object
      properties:
        source_list:
          description: Source list for constraint.
          type: string
          example: LIST_1
        source_field:
          description: Source field for constraint.
          type: string
          example: Category
        operator:
          description: Operator on the constraint.
          type: string
          example: EqualTo
          enum:
            - Unknown
            - EqualTo
            - NotEqualTo
            - GreaterThan
            - GreaterThanOrEqualTo
            - LessThan
            - LessThanOrEqualTo
            - Like
            - IsNull
            - IsNotNull
            - IsEmpty
            - IsNotEmpty
        destination_list:
          description: Destination list for constraint.
          type: string
          example: null
          nullable: true
        destination_field:
          description: Destination field for constraint.
          type: string
          example: null
          nullable: true
        field_value:
          description: Value of source field of the constraint.
          type: string
          example: sports
          nullable: true
    List_Relation:
      type: object
      properties:
        scope_name:
          description: Name of the relation.
          type: string
          example: RELATION_1
        relation_type:
          description: Type of the relation.
          type: string
          example: ManyToOne
          enum:
            - OneToOne
            - OneToMany
            - ManyToOne
        master_list_api_name:
          description: API name of master list.
          type: string
          example: master_list
          readOnly: true
        master_list_field_name:
          description: Field name of master list.
          type: string
          example: master_field
        slave_list_api_name:
          description: API name of extension list.
          type: string
          example: extension_list
        slave_list_field_name:
          description: Field name of the extension list.
          type: string
          example: extension_field
        constraints:
          description: Constraints of the relation.
          type: array
          items:
            $ref: '#/components/schemas/List_Relation_Constraint'
    List_Relation_Retrieve:
      allOf:
        - $ref: '#/components/schemas/List_Relation'
    List_Relation_Update:
      type: object
      properties:
        scope:
          description: Name of the relation.
          type: string
          example: RELATION_1
          default: null
          nullable: true
        type:
          description: Type of the relation.
          type: string
          example: ManyToOne
          default: null
          enum:
            - null
            - OneToOne
            - OneToMany
            - ManyToOne
          nullable: true
        masterlist_field_name:
          description: Field name of master list.
          type: string
          example: master_field
          default: null
          nullable: true
        slavelist_api_name:
          description: API name of extension list.
          type: string
          example: extension_list
          default: null
          nullable: true
        slavelist_field_name:
          description: Field name of the extension list.
          type: string
          example: extension_field
          default: null
          nullable: true
        constraints:
          description: Constraints of the relation. You must either leave this empty to retain the original constraints, or specify all constraints you wish for the relation to contain.
          type: array
          items:
            $ref: '#/components/schemas/List_Relation_Constraint_2'
          default: null
          nullable: true
    List_Segment_Base:
      type: object
      properties:
        api_name:
          description: Segment API name.
          type: string
          example: segment_1
    List_Segment_Type:
      description: Type of the segment.
      type: string
      example: Dynamic
      enum:
        - Unknown
        - Dynamic
        - Static
        - External
    List_Segments:
      type: object
      properties:
        segments:
          description: Collection of segments under this list matching the Criteria.
          type: array
          items:
            allOf:
              - $ref: '#/components/schemas/List_Segment_Base'
              - type: object
                properties:
                  segment_type:
                    $ref: '#/components/schemas/List_Segment_Type'
    List_Segment:
      allOf:
        - $ref: '#/components/schemas/List_Segment_Base'
        - type: object
          properties:
            type:
              allOf:
                - $ref: '#/components/schemas/List_Segment_Type'
                - readOnly: true
            name:
              description: Name of the segment.
              type: string
              example: Segment 1
            description:
              description: Description of the segment.
              type: string
              example: My first segment
    List_Segment_Retrieve:
      allOf:
        - $ref: '#/components/schemas/List_Segment'
        - type: object
          properties:
            expression:
              description: The constraint syntax for this segment. Null if the segment is of type static. Check our [guide](../../guides/smc/dynamic-segments/) for more information on the syntax for this field.
              type: string
              example: gt([MASTER.ID], toint('1'))
              nullable: true
    List_Segment_Dynamic:
      allOf:
        - $ref: '#/components/schemas/List_Segment'
        - type: object
          properties:
            folder:
              description: Folder path to store the segment in.
              type: string
              example: folder_1
            tags:
              $ref: '#/components/schemas/tags'
            constraint:
              description: The constraint syntax for this Segment. Check our [guide](../../guides/smc/dynamic-segments/) for more information on the syntax for this field.
              type: string
              example: gt([MASTER.ID], toint('1'))
    List_Segment_Dynamic_Create:
      allOf:
        - $ref: '#/components/schemas/List_Segment_Dynamic'
      required:
        - api_name
        - name
        - constraint
    List_Segment_Dynamic_Update:
      allOf:
        - $ref: '#/components/schemas/List_Segment_Dynamic'
    List_Segment_Static:
      allOf:
        - $ref: '#/components/schemas/List_Segment'
        - type: object
          properties:
            folder:
              description: Folder path to store the segment in.
              type: string
              example: folder_1
            tags:
              $ref: '#/components/schemas/tags'
      required:
        - api_name
        - name
    List_Interest_Structure:
      type: object
      properties:
        name:
          description: Name of the field.
          type: string
          example: ID
        data_type:
          $ref: '#/components/schemas/data_type'
        length:
          description: Length of list field.
          type: integer
          format: int32
          example: 32
          nullable: true
        allow_null:
          description: Flag indicating if the field is nullable or not.
          type: boolean
          example: false
    List_Interest_Structure_Retrieve:
      type: object
      properties:
        fields:
          description: Structure of the list fields.
          items:
            $ref: '#/components/schemas/List_Interest_Structure'
    List_Engagement_Structure:
      type: object
      properties:
        name:
          description: Name of the field.
          type: string
          example: ID
        data_type:
          $ref: '#/components/schemas/data_type'
        length:
          description: Length of list field.
          type: integer
          format: int32
          example: 32
          nullable: true
        allow_null:
          description: Flag indicating if the field is nullable or not.
          type: boolean
          example: false
    List_Engagement_Structure_Retrieve:
      type: object
      properties:
        fields:
          description: Structure of the list fields.
          items:
            $ref: '#/components/schemas/List_Engagement_Structure'
    List_Interest_Record:
      type: object
      properties:
        record:
          description: Record data.
          type: object
          additionalProperties:
            type: string
            x-additionalPropertiesName: tag
            description: the Tag keys. with corresponding values
          properties:
            ID:
              description: ID of the record.
              type: integer
              example: 1
            USERID:
              description: ID of the user.
              type: integer
              example: 1
            TAG_CLICK_TOTAL:
              description: Number of total tag clicks for this user.
              type: integer
              example: 10
    List_Interest_Record_Retrieve:
      allOf:
        - $ref: '#/components/schemas/List_Interest_Record'
    Data_Load_Invalid:
      type: object
      properties:
        record_index:
          description: Index of the invalid record.
          type: integer
          format: int32
          example: 17
        field_name:
          description: Name of the field that contains the invalid data, if applicable.
          type: string
          example: EMAIL
        message:
          description: Message containing information about the error.
          type: string
          example: Record contains incorrect number of fields
        validation_code:
          description: Validation code indicating the error.
          type: string
          example: InvalidFieldCount
          enum:
            - Unknown
            - InvalidFieldCount
            - MaxStringLengthExceeded
            - InvalidType
    Data_Load:
      type: object
      properties:
        errors:
          description: In case deleting the data fails, this property contains the list of validation errors.
          type: array
          items:
            $ref: '#/components/schemas/error'
        result_code:
          description: Indicates the resultCode for the request.
          type: string
          example: PartiallySucceeded
          enum:
            - Failed
            - Succeeded
            - PartiallySucceeded
            - ValidationFailed
            - NotFound
            - ServiceUnavailable
            - InternalServerError
            - ProtocolError
            - RequestEntityTooLarge
            - Conflict
        number_of_duplicate_records:
          description: When the data deletion succeeded, this property contains the number of duplicate records
          type: integer
          format: int64
          example: 0
        number_of_failed_records:
          description: When the data deletion partially succeeded, this property contains the number of failed records
          type: integer
          format: int64
          example: 2
        number_of_records_not_found:
          type: integer
          format: int64
          example: 0
        invalid_records:
          description: When the data deletion partially succeeded, this property contains information about the invalid records
          type: array
          items:
            $ref: '#/components/schemas/Data_Load_Invalid'
          nullable: true
    List_Segment_Data_Response:
      allOf:
        - $ref: '#/components/schemas/Data_Load'
        - type: object
          properties:
            number_of_deleted_records:
              description: When the data deletion succeeded, this property contains the number of deleted records
              type: integer
              format: int64
              example: 48
    List_Segment_Load_Response:
      allOf:
        - $ref: '#/components/schemas/Data_Load'
        - type: object
          properties:
            number_of_inserted_records:
              description: When the data load succeeded, this property contains the number of inserted records
              type: integer
              format: int64
              example: 50
    Data_Search_Filter:
      type: object
      properties:
        field_name:
          description: Name of the field to check against.
          type: string
          example: MASTER.EMAIL
        operator:
          type: string
          example: Like
          enum:
            - Unknown
            - EqualTo
            - NotEqualTo
            - GreaterThan
            - GreaterThanOrEqualTo
            - LessThan
            - LessThanOrEqualTo
            - Like
            - IsNull
            - IsNotNull
            - IsEmpty
            - IsNotEmpty
        field_value:
          description: the value to compaire against.
          type: string
          example: VALUE
    Data_Search:
      type: object
      properties:
        fields:
          description: An array of fields to be returned for a record.
          type: array
          items:
            type: string
            additionalProperties:
              x-additionalPropertiesName: scope
              description: The scope to return.
          example:
            - MASTER.FIELD_1
            - MASTER.EMAIL
            - SCOPE_1.FIELD_1
            - SYSTEM.SELLIGENTID
        filters:
          description: filters to apply for the search. Works as an AND.
          type: array
          items:
            $ref: '#/components/schemas/Data_Search_Filter'
          writeOnly: true
        skip:
          description: The index to start from, skipping all the previous results.
          type: integer
          format: int32
          example: 1
          writeOnly: true
        take:
          description: The maximum amount of items to return.
          type: integer
          format: int32
          example: 1
          writeOnly: true
        order_by:
          description: Field to order the results on.
          type: string
          example: MASTER.NAME
          writeOnly: true
        order_by_direction:
          description: Irdening direction of the results.
          type: string
          example: ASC
          enum:
            - ASC
            - DESC
          writeOnly: true
        errors:
          description: In case deleting the data fails, this property contains the list of validation errors.
          type: array
          items:
            $ref: '#/components/schemas/error'
          readOnly: true
    List_Segment_Search:
      allOf:
        - $ref: '#/components/schemas/Data_Search'
      required:
        - fields
    List_Segment_Search_Response:
      allOf:
        - $ref: '#/components/schemas/Data_Search'
        - type: object
          properties:
            data:
              description: List of records
              type: array
              items:
                type: array
                description: list of fields for the record.
                items:
                  type: string
                  description: a field name or value
                  example:
                    - RECORD1_FIELD1_VALUE
                    - 1
            result_code:
              $ref: '#/components/schemas/result_code'
    List_BusinessKey:
      type: object
      properties:
        fields:
          description: |-
            Column names composing the business key, sorted alphabetically (case-insensitive).
            An empty array means no business key is declared on this list.
          type: array
          items:
            type: string
          nullable: true
      additionalProperties: false
    List_BusinessKey_Response:
      type: object
      properties:
        errors:
          $ref: '#/components/schemas/Errors'
        result_code:
          $ref: '#/components/schemas/result_code'
        error_code:
          description: |-
            Machine-readable short code identifying the failure reason.
            Possible values: `list_not_empty`, `invalid_fields`, `invalid_column_type`,
            `business_key_not_found`, `list_not_found`. `null` on success.
          type: string
          nullable: true
        business_key:
          $ref: '#/components/schemas/List_BusinessKey'
      additionalProperties: false
    List_BusinessKey_Request:
      type: object
      properties:
        fields:
          description: |-
            1–3 field names composing the business key. Order determines the physical index
            column order at creation time but is not preserved in GET responses (returned
            sorted alphabetically, case-insensitive).
          type: array
          items:
            type: string
          example:
            - CUSTOMER_ID
            - COUNTRY
          maxItems: 3
          minItems: 1
      additionalProperties: false
      required:
        - fields
    List_Data_Record:
      description: An object of fields for the record.
      type: object
      example:
        id: '1'
        mail: john.doe@gmail.com
        master.name: Doe
        scope1.field: someValue
        scope2.field: someOtherValue
      additionalProperties:
        x-additionalPropertiesName: scope
        description: The value for the specific field.
    List_Data_Record_Create:
      allOf:
        - $ref: '#/components/schemas/List_Data_Record'
    List_Data_Response:
      allOf:
        - $ref: '#/components/schemas/Data_Load'
        - type: object
          properties:
            number_of_deleted_records:
              description: When the data deletion succeeded, this property contains the number of deleted records
              type: integer
              format: int64
              example: 48
    List_Data_Load_Response:
      allOf:
        - $ref: '#/components/schemas/Data_Load'
        - type: object
          properties:
            number_of_inserted_records:
              description: When the data load succeeded, this property contains the number of inserted records
              type: integer
              format: int64
              example: 50
    List_Data_Search_Filter:
      type: object
      properties:
        field_name:
          description: Name of the field to check against.
          type: string
          example: MASTER.EMAIL
        operator:
          type: string
          example: Like
          enum:
            - Unknown
            - EqualTo
            - NotEqualTo
            - GreaterThan
            - GreaterThanOrEqualTo
            - LessThan
            - LessThanOrEqualTo
            - Like
            - IsNull
            - IsNotNull
            - IsEmpty
            - IsNotEmpty
        field_value:
          description: the value to compaire against.
          type: string
          example: VALUE
    List_Data_Search:
      type: object
      properties:
        fields:
          description: An array of fields to be returned for a record.
          type: array
          items:
            type: string
            additionalProperties:
              x-additionalPropertiesName: scope
              description: The scope to return.
          example:
            - MASTER.FIELD_1
            - MASTER.EMAIL
            - SCOPE_1.FIELD_1
            - SYSTEM.SELLIGENTID
        filters:
          description: filters to apply for the search. Works as an AND.
          type: array
          items:
            $ref: '#/components/schemas/List_Data_Search_Filter'
          default: []
          writeOnly: true
        skip:
          description: The index to start from, skipping all the previous results.
          type: integer
          format: int32
          example: 1
          default: 0
          writeOnly: true
        take:
          description: The maximum amount of items to return. By Default all items are returned.
          type: integer
          format: int32
          example: 1
          default: null
          writeOnly: true
        order_by:
          description: Field to order the results on.
          type: string
          example: MASTER.NAME
          default: MASTER.ID
          writeOnly: true
        order_by_direction:
          description: Order direction of the results.
          type: string
          example: ASC
          default: ASC
          enum:
            - ASC
            - DESC
          writeOnly: true
    List_Data_Search_Create:
      allOf:
        - $ref: '#/components/schemas/List_Data_Search'
      required:
        - fields
    List_Data_Search_Response:
      allOf:
        - $ref: '#/components/schemas/Data_Search'
        - type: object
          properties:
            data:
              description: List of records
              type: array
              items:
                type: array
                description: list of fields for the record.
                items:
                  type: string
                  description: a field name or value
                  example:
                    - RECORD1_FIELD1_VALUE
                    - 1
            result_code:
              $ref: '#/components/schemas/result_code'
    List_Engagement_Record:
      title: List_Engagement_Record
      type: object
      properties:
        record:
          description: Record data.
          type: object
          properties:
            ID:
              description: ID of the record.
              type: integer
              example: 1
            USERID:
              description: ID of the user.
              type: integer
              example: 1
            DELIVERED:
              description: Number of delivered items for this channel.
              type: integer
              example: 100
            VIEWED:
              description: Number of viewed items for this channel.
              type: integer
            CLICKED:
              description: Number of Clicked items for this channel.
              type: integer
            DELIVERED_LASTDT:
              description: last time user received a message on this channel.
              type: string
              format: date-time
              example: '2023-09-11T10:01:03.01'
            VIEWED_LASTDT:
              description: last time user viewed a message on this channel.
              type: string
              format: date-time
              example: '2023-09-12T11:10:03.02'
            CLICKED_LASTDT:
              description: last time user clicked a message on this channel.
              type: string
              format: date-time
              example: '2023-09-13T14:25:04.03'
            DELIVERY_RATE:
              description: Percentage of message on this channel that are delivered to the user.
              type: integer
              example: 95
            VIEW_RATE:
              description: Percentage of message on this channel that are viewed by the user.
              type: integer
              example: 90
            CLICK_RATE_CTR:
              description: Percentage of message on this channel that are clicked by the user.
              type: integer
              example: 85
    List_Engagement_Record_Retrieve:
      allOf:
        - $ref: '#/components/schemas/List_Engagement_Record'
    Tag_List_Base:
      type: object
      properties:
        api_name:
          description: API name of the Tag list.
          type: string
          example: tag_list_1
    Tag_Lists:
      title: Task_Lists_Retrieve
      type: object
      properties:
        taglists:
          description: List of tag lists matching the criteria.
          type: array
          items:
            $ref: '#/components/schemas/Tag_List_Base'
    Tag:
      type: object
      properties:
        tag:
          description: Tag value.
          type: string
          example: TAG1
        description:
          description: Description of tag. Description can contain only alphanumeric characters, underscore (_), hyphen (-), and space.
          type: string
          example: a_great_tag
    Tag_List:
      allOf:
        - $ref: '#/components/schemas/Tag_List_Base'
        - type: object
          properties:
            name:
              description: Name of Tag list.
              type: string
              example: Tag List 1
            description:
              description: Description of Tag list.
              type: string
              example: My first tag list
            tags:
              description: Tags associated with Tag list.
              type: array
              items:
                $ref: '#/components/schemas/Tag'
              example:
                - tag: TAG1
                  description: a_great_first_tag
                - tag: TAG2
                  description: a_great_second_tag
            organizations:
              $ref: '#/components/schemas/organizations'
            not_accessible_organizations_count:
              $ref: '#/components/schemas/not_accessible_organizations_count'
            lists:
              description: Represents api names of lists that the Tag list is associated to.
              type: array
              items:
                type: string
              example:
                - list_1
                - list_2
              readOnly: true
    Tag_List_Create:
      title: Task_List_Create
      allOf:
        - $ref: '#/components/schemas/Tag_List'
      required:
        - name
        - api_name
    Tag_List_Retrieve:
      title: Task_List_Retrieve
      allOf:
        - $ref: '#/components/schemas/Tag_List'
    Tag_List_Update:
      title: Task_List_Update
      allOf:
        - $ref: '#/components/schemas/Tag_List_Base'
        - type: object
          properties:
            name:
              description: Name of Tag list.
              type: string
              example: Tag List 1
            description:
              description: Description of Tag list.
              type: string
              example: My first tag list
            tags:
              description: Tags associated with Tag list. (While updating the tag 1. If tags are not specified then existing tags would be retained. 2. If tags are specified as an empty array then all existing tags would be deleted. 3. If tags are specified then those would be added/updated.)
              type: array
              items:
                $ref: '#/components/schemas/Tag'
              example:
                - tag: TAG1
                  description: a_great_first_tag
                - tag: TAG2
                  description: a_great_second_tag
            organizations:
              description: List of organizations linked to the object. (While updating Organizations 1. If Oraganizations are not provided or provided as null, it remains unchanged. 2. If Organizations are provided as empty array, Tag list will be unlinked from all organizations.)
              type: array
              items:
                type: string
              example:
                - Organization_1
                - Organization_2
    Organization_Tag_Lists:
      type: object
      properties:
        taglists:
          description: List of tag lists matching the criteria within the organization.
          type: array
          items:
            $ref: '#/components/schemas/Tag_List_Base'
    Task_Base:
      type: object
      properties:
        type:
          description: The type of the task.
          type: string
          example: Batch
          enum:
            - Unknown
            - Sql
            - Export
            - Import
            - Batch
          readOnly: true
        api_name:
          description: The API name for a task.
          type: string
          example: task_1
    Tasks:
      type: object
      properties:
        tasks:
          description: List of tasks matching the criteria.
          type: array
          items:
            $ref: '#/components/schemas/Task_Base'
    Task_Schedule:
      description: Configure a schedule for this task. If not specified, this task can only be manually triggered.
      type: object
      properties:
        start_date:
          description: Start date for the schedule. When not specified, the schedule would immediately be active.
          type: string
          format: date-time
          example: '2023-11-12T00:00:00Z'
          default: null
        end_date:
          description: End date of the schedule. When not specified, the schedule will remain active until the end of time.
          type: string
          format: date-time
          example: '2025-12-12T00:00:00Z'
          default: null
        schedule_type:
          description: interval on which this schedule should run.
          type: string
          example: Monthly
          enum:
            - Unknown
            - Daily
            - Weekly
            - Monthly
            - Periodically
      default: null
      required:
        - schedule_type
    Task_Schedule_Daily:
      allOf:
        - $ref: '#/components/schemas/Task_Schedule'
        - type: object
          properties:
            hours:
              description: Hours on which this task should be executed.
              type: array
              items:
                type: integer
                format: int32
                minimum: 0
                maximum: 23
              example:
                - 10
                - 13
          required:
            - hours
    Task_Schedule_Weekly:
      allOf:
        - $ref: '#/components/schemas/Task_Schedule'
        - type: object
          properties:
            days:
              description: Weekdays on which this task should be executed. The week starts with Sunday `0` and ends with Saturday `6`.
              type: array
              items:
                type: integer
                format: int32
                minimum: 0
                maximum: 6
              example:
                - 1
                - 4
            start_time:
              description: The time at which this task should be executed.
              type: string
              example: '10:30:00'
          required:
            - days
            - start_time
    Task_Schedule_Monthly:
      allOf:
        - $ref: '#/components/schemas/Task_Schedule'
        - type: object
          properties:
            days:
              description: Days of the month on which this task should be executed. Note that this starts from `0` instead of `1`.
              type: array
              items:
                type: integer
                format: int32
                minimum: 0
                maximum: 30
              example:
                - 1
                - 4
            start_time:
              description: The time at which this task should be executed.
              type: string
              example: '10:30:00'
          required:
            - days
            - start_time
    Task_Schedule_Periodically:
      allOf:
        - $ref: '#/components/schemas/Task_Schedule'
        - type: object
          properties:
            period:
              description: Desired time in minutes between executions of this task.
              type: integer
              format: int32
              example: 10
              enum:
                - 10
                - 20
                - 30
                - 40
                - 50
                - 60
          required:
            - period
    Task_Notification:
      type: object
      properties:
        type:
          description: |
            State for which this notification should trigger.
              - NoFile: Failed due to a missing file.
              - Error: Task succeeded with errors.
              - Failure: Task failed.
              - Complete: Task succeeded.
          type: string
          example: Complete
          enum:
            - Unknown
            - NoFile
            - Error
            - Failure
            - Complete
        groups:
          description: API names of the notification groups that should be informed when this state occurs. Notification groups are configured in the Admin Configuration under Access Management. It is mandatory to list at least one notification group or at least one email.
          type: array
          items:
            type: string
          example:
            - group_1
            - group_2
        emails:
          description: Email address of recipients that should be informed when this state occurs. It is mandatory to list at least one notification group or at least one email.
          type: array
          items:
            type: string
          example:
            - john.doe@zetaglobal.com
            - john.deer@zetaglobal.com
        include_process_details:
          description: provide process details in the notification.
          type: boolean
          example: false
          default: false
      required:
        - type
    Task:
      title: Task_Base
      allOf:
        - $ref: '#/components/schemas/Task_Base'
        - type: object
          properties:
            name:
              description: Name of the task.
              type: string
              example: Task 1
            description:
              description: Description about the task.
              type: string
              example: A very nice task.
            tags:
              $ref: '#/components/schemas/tags'
            execution_status:
              description: Status of last execution of task.
              type: string
              example: Running
              enum:
                - Failed
                - Success
                - Running
                - None
              readOnly: true
            last_execution:
              description: Last Execution Date of the task.
              type: string
              format: date-time
              example: '2023-12-14T11:11:18.3086+01:00'
              readOnly: true
            next_execution:
              description: Next Execution Date of the task.
              type: string
              format: date-time
              example: '2023-12-16T11:11:18.3086+01:00'
              readOnly: true
        - type: object
          properties:
            scheduler:
              description: Id of the scheduler to use.
              type: integer
              format: int32
              example: 0
              default: 0
              writeOnly: true
            schedule:
              anyOf:
                - $ref: '#/components/schemas/Task_Schedule'
                - $ref: '#/components/schemas/Task_Schedule_Daily'
                - $ref: '#/components/schemas/Task_Schedule_Weekly'
                - $ref: '#/components/schemas/Task_Schedule_Monthly'
                - $ref: '#/components/schemas/Task_Schedule_Periodically'
              discriminator:
                propertyName: schedule_type
                mapping:
                  Unknown: '#/components/schemas/Task_Schedule'
                  Daily: '#/components/schemas/Task_Schedule_Daily'
                  Weekly: '#/components/schemas/Task_Schedule_Weekly'
                  Monthly: '#/components/schemas/Task_Schedule_Monthly'
                  Periodically: '#/components/schemas/Task_Schedule_Periodically'
              writeOnly: true
            notifications:
              description: Configure which execution statuses should result in a notification being sent. At most one entry may be given per `type`. A notification for `type=Failure` is mandatory.
              type: array
              items:
                $ref: '#/components/schemas/Task_Notification'
              writeOnly: true
            folder:
              $ref: '#/components/schemas/folder_id'
              writeOnly: true
    Task_Retrieve:
      title: Task_Base_Retrieve
      allOf:
        - $ref: '#/components/schemas/Task'
    Task_Actions:
      type: object
      properties:
        taskaction:
          description: The available actions for the task.
          type: array
          items:
            type: string
            description: An action for this task
            enum:
              - Run
              - Enable
              - Disable
          example:
            - Run
            - Enable
    Task_Batch_Batch:
      type: object
      properties:
        id:
          description: |
            Choose a unique positive integer as `id` for this task within this batch. This ID can be referred to from the `on_success` or `on_fail` of other tasks in this same batch. 

            Only one task may exist where its `id` isn't referred to from any other task. That task will be the first task to be executed in this batch.
          type: integer
          format: int32
          example: 1
        api_name:
          description: API name of the task.
          type: string
          example: task_1
        on_success:
          description: |
            If this task ran successfully, then run the `on_success` task. This must be 
              - the `id` of another task in this batch,
              - `0` to halt execution and consider the batch a success or 
              - `-1` to halt execution and consider the batch a failure.
          type: integer
          format: int32
          example: 2
        on_fail:
          description: |
            If this task failed, then run the `on_fail` task. This must be 
              - the `id` of another task, 
              - `0` to halt execution and consider the batch a success or 
              - `-1` to halt execution and consider the batch a failure.
          type: integer
          format: int32
          example: 3
        type:
          description: Type of the task.
          type: string
          example: Export
          enum:
            - Unknown
            - Task
            - Import
            - Export
      required:
        - api_name
        - id
        - on_fail
        - on_success
    Task_Batch:
      title: Task_Batch
      allOf:
        - $ref: '#/components/schemas/Task'
        - type: object
          properties:
            tasks:
              type: array
              items:
                $ref: '#/components/schemas/Task_Batch_Batch'
    Task_Batch_Create:
      title: Task_Batch_Create
      allOf:
        - $ref: '#/components/schemas/Task_Batch'
      required:
        - api_name
        - name
        - notifications
        - tasks
    Task_Stored_Procedure_Fail_Constraint:
      description: Define when a stored procedure should be considered to have failed based on its returned value.
      type: object
      properties:
        operator:
          description: Operator to apply.
          type: string
          example: EqualTo
          enum:
            - Unknown
            - EqualTo
            - NotEqualTo
            - GreaterThan
            - GreaterThanOrEqualTo
            - LessThan
            - LessThanOrEqualTo
        value:
          description: Value to check the stored procedure's returned value against.
          type: integer
          format: int32
          example: 5
      required:
        - operator
        - value
    Task_Stored_Procedure_Parameter_Value:
      type: object
      properties:
        name:
          description: Name of the parameter.
          type: string
          example: PARAM1
        value:
          description: Value the parameter should have.
          type: string
          example: VAL1
      required:
        - name
        - value
    Task_Stored_Procedure:
      type: object
      properties:
        sp_name:
          description: A name for the stored procedure. The name should start with the prefix 'ST_' and can contain only alphanumerical characters and _ (underscore).
          type: string
          example: ST_1.
        fail_constraint:
          $ref: '#/components/schemas/Task_Stored_Procedure_Fail_Constraint'
        parameter_values:
          description: Input parameters for the stored procedure.
          type: array
          items:
            $ref: '#/components/schemas/Task_Stored_Procedure_Parameter_Value'
      required:
        - sp_name
    Task_Export_Data_Source:
      allOf:
        - type: object
          description: Data source for the export.
          properties:
            include_selligent_id_column:
              description: Add an additional column to the exported data containing a unique ID to identify the exported record.
              type: boolean
              example: true
              default: false
            selligent_id_column:
              description: If `include_selligent_id_column=true`, this is the name of the column to be added to the exported data.
              type: string
              example: column_1
        - $ref: '#/components/schemas/Task_Stored_Procedure'
      required:
        - sp_name
    encoding:
      description: Specify the file encoding.
      type: string
      example: X_MAC_CE
      default: UTF_8
      enum:
        - Unknown
        - BIG5
        - CP866
        - CP875
        - EUC_JP
        - EUC_KR
        - GB2312
        - IBM037
        - IBM1026
        - IBM290
        - IBM437
        - IBM500
        - IBM737
        - IBM775
        - IBM850
        - IBM852
        - IBM855
        - IBM857
        - IBM860
        - IBM861
        - IBM863
        - IBM865
        - IBM869
        - ISO_2022_JP
        - ISO_8859_1
        - ISO_8859_13
        - ISO_8859_15
        - ISO_8859_2
        - ISO_8859_4
        - ISO_8859_5
        - ISO_8859_7
        - ISO_8859_9
        - JOHAB
        - KOI8_R
        - KOI8_U
        - KS_C_5601_1987
        - MACINTOSH
        - UNICODEFFFE
        - US_ASCII
        - UTF_16
        - UTF_8
        - WINDOWS_1250
        - WINDOWS_1251
        - WINDOWS_1252
        - WINDOWS_1253
        - WINDOWS_1254
        - WINDOWS_1255
        - WINDOWS_1256
        - WINDOWS_1257
        - WINDOWS_1258
        - WINDOWS_874
        - X_CHINESE_CNS
        - X_CP20261
        - X_CP20936
        - X_CP20949
        - X_CP21027
        - X_MAC_CE
        - X_MAC_CHINESESIMP
        - X_MAC_CHINESETRAD
        - X_MAC_CROATIAN
        - X_MAC_CYRILLIC
        - X_MAC_GREEK
        - X_MAC_ICELANDIC
        - X_MAC_JAPANESE
        - X_MAC_KOREAN
        - X_MAC_ROMANIAN
        - X_MAC_TURKISH
        - X_MAC_UKRAINIAN
    Task_File_Options:
      description: file options to use.
      type: object
      properties:
        encoding:
          $ref: '#/components/schemas/encoding'
        delimiter:
          description: delimiter to use.
          type: string
          example: ;
          default: ;
        use_text_quotes:
          description: qoute all values.
          type: boolean
          example: true
          default: false
        first_line_has_column_names:
          description: specify if file should be with column names or without.
          type: boolean
          example: true
          default: true
        max_file_size:
          description: Max file size in MB before a new file should be written. Unlimited filesize if no positive value is set.
          type: integer
          format: int32
          example: 100
          default: 0
        line_break:
          description: type of line break to use.
          type: string
          example: Windows
          default: Windows
          enum:
            - Unknown
            - Windows
            - Unix
    Task_Export_File_Options:
      allOf:
        - $ref: '#/components/schemas/Task_File_Options'
        - type: object
          properties:
            skip_bom:
              description: skip BOM
              type: boolean
              example: false
              default: false
    Task_Export_Output:
      type: object
      properties:
        file_name:
          description: Name of the file.
          type: string
          example: file_1
        file_options:
          $ref: '#/components/schemas/Task_Export_File_Options'
      required:
        - file_name
        - file_options
    Task_Advanced_Options:
      type: object
      properties:
        include_sequence_number:
          description: Include a column with the sequence number.
          type: boolean
          example: true
          default: false
        sequence_number:
          description: Sequence number to start from.
          type: integer
          format: int32
          example: 5
          default: 0
        overwrite_existing_file:
          description: Overwrite if a file already exists in the target folder.
          type: boolean
          example: false
          default: true
        no_data_handling:
          description: What to do in case there is no data to export.
          type: string
          example: Skip
          default: Continue
          enum:
            - Unknown
            - Continue
            - Skip
            - Fail
    Task_Export_Trigger_File:
      description: This configures exporting to a secondary file that could be used to inform external processes that your export has completed. If not specified, this secondary export will not be performed.
      type: object
      properties:
        data_source:
          $ref: '#/components/schemas/Task_Export_Data_Source'
        extension:
          description: extension to use.
          type: string
          example: .trg
        file_options:
          $ref: '#/components/schemas/Task_Export_File_Options'
      default: null
      required:
        - extension
    Task_Export_Zip_Encrypt:
      description: Encryption or zip mode to use.
      type: object
      properties:
        mode:
          description: What to do with the file.
          type: string
          example: Zip
          enum:
            - Unknown
            - Zip
            - Encrypt
            - ZipAndEncrypt
            - EncryptAndZip
        zip_archive:
          type: object
          properties:
            generate_file_name:
              description: Auto generate a file name.
              type: boolean
              example: false
              default: false
            file_name:
              description: The file name to use if not auto-generated.
              type: string
              example: file.zip
        pgp_encryption:
          description: Pretty Good Privacy encryption definition.
          type: object
          properties:
            recipient:
              description: email of the recipient.
              type: string
              example: sec@zetaglobal.com
          required:
            - recipient
    Task_Export:
      allOf:
        - $ref: '#/components/schemas/Task'
        - type: object
          properties:
            data_source:
              $ref: '#/components/schemas/Task_Export_Data_Source'
            output:
              $ref: '#/components/schemas/Task_Export_Output'
            options:
              $ref: '#/components/schemas/Task_Advanced_Options'
            trigger_file:
              $ref: '#/components/schemas/Task_Export_Trigger_File'
            zip_and_encrypt:
              $ref: '#/components/schemas/Task_Export_Zip_Encrypt'
            destination:
              description: the API name of the medium to target for this export.
              type: string
              example: medium_1
            subfolder:
              description: the subfolder in the destination for the export.
              type: string
              example: exports
          required:
            - output
    Task_Export_Create:
      title: Task_Export_Create
      allOf:
        - $ref: '#/components/schemas/Task_Export'
      required:
        - destination
        - name
        - api_name
        - notifications
    Task_Trigger_Custom_Event:
      type: object
      properties:
        list:
          description: API name of the list.
          type: string
          example: list_1
        custom_event:
          description: API name of the custom event on the given list.
          type: string
          example: custom_event_1
      required:
        - custom_event
        - list
    TaskWithTriggers:
      allOf:
        - $ref: '#/components/schemas/Task'
        - type: object
          properties:
            trigger_journey_after_execution:
              description: API name of a journey to trigger after this task completes successfully. Leave empty to not trigger any journey.
              type: string
              example: journey_1
              default: null
              writeOnly: true
            trigger_custom_event_after_execution:
              allOf:
                - $ref: '#/components/schemas/Task_Trigger_Custom_Event'
                - type: object
                  writeOnly: true
                  description: Trigger a custom event after this task completes successfully. Leave empty to not trigger any custom event.
    Task_Import_Column_Mapping:
      type: object
      properties:
        name:
          description: Name of the column.
          type: string
          example: column_1
        type:
          description: the type of data that is in the column.
          type: string
          example: Text
          enum:
            - Unknown
            - Boolean
            - Numeric
            - Long
            - Float
            - Date
            - DateTime
            - Text
            - LongText
      required:
        - name
        - type
    Task_Import_Column_Mapping_Text:
      allOf:
        - $ref: '#/components/schemas/Task_Import_Column_Mapping'
        - type: object
          properties:
            length:
              description: Length of this field.
              type: integer
              format: int32
              example: 256
              maximum: 999999999
              minimum: 1
          required:
            - length
    Task_import_Processing_Folders:
      description: the different folders to store info in based on the result.
      type: object
      properties:
        processing:
          description: Folder when the processing is in progress.
          type: string
          example: Processing Folder
        completed:
          description: Folder when the processing is completed.
          type: string
          example: Completion Folder
        failed:
          description: Folder when processing failed.
          type: string
          example: Failed Folder
      required:
        - completed
        - failed
        - processing
    Task_Import_File_Options:
      allOf:
        - $ref: '#/components/schemas/Task_File_Options'
        - type: object
          properties:
            check_md5:
              description: Define if we need to check MD5.
              type: boolean
              example: false
              default: false
            max_column_count:
              description: Max number of columns to allow.
              type: integer
              format: int32
              example: 10
              default: 0
    Task_Import_Reject_Management:
      description: Export rejected records. If not configured, these records will be ignored.
      type: object
      properties:
        destination:
          description: API name of the medium to use when the import is rejected.
          type: string
          example: medium_1
        subfolder:
          description: subfolder to store the file in.
          type: string
          example: SUBFOLDER_1
          default: ''
        file_options:
          $ref: '#/components/schemas/Task_Import_File_Options'
        create_when_no_records_rejected:
          description: Create a reject export even if no records have been rejected.
          type: boolean
          example: false
          default: false
      required:
        - destination
    Task_Import_Advanced_Options:
      type: object
      properties:
        file_filter:
          description: Filter to use to get the relevant file(s).
          type: string
          example: '*.dat'
          default: ''
        trigger_file:
          description: |
            Only execute this import if a file with this extension and the same name as the to be imported file exists.

            For example, say your import is configured to import all files that match `*.csv` and uses `trg` as `trigger_file`. If your data source contains these files:
            - file1.csv
            - file1.trg
            - file2.csv

            Then, due to the trigger file requirement, only `file1.csv` will be processed. `file2.csv` will be ignored until a file `file2.trg` is present.
          type: string
          example: trg
          default: ''
        allow_multiple_imports:
          description: Allow multiple imports of the same file. Normally, the import process keeps track of the name of the files it has imported already and will not import a file with the same name again. This property can be used to disable this.
          type: boolean
          example: false
          default: false
        fail_if_no_file:
          description: Fail the import if we cannot find a file.
          type: boolean
          example: false
          default: false
        fail_if_empty_file:
          description: Fail the import if the file is empty.
          type: boolean
          example: false
          default: false
        delete_after_processing:
          description: Deleted the file once processing is done.
          type: boolean
          example: false
          default: true
        process_files_one_by_one:
          description: Process files all at once or one-by-one.
          type: boolean
          example: false
          default: false
        invalid_data_handling:
          description: Action to take when data is invalid.
          type: string
          example: Stop
          default: Reject
          enum:
            - Unknown
            - Stop
            - Keep
            - Skip
            - Reject
    Task_Import_Unzip_Decrypt:
      description: Decryption or unpackaging mode to use.
      type: object
      properties:
        mode:
          description: How to unpack the file..
          type: string
          example: Unzip
          enum:
            - Unknown
            - Unzip
            - Decrypt
            - UnzipAndDecrypt
            - DecryptAndUnzip
        unzip_filter:
          description: file extension to filter on in the server.
          type: string
          example: '*.dat'
        pgp_decryption:
          description: Pretty Good Privacy definitioncryption definition.
          type: object
          properties:
            recipient:
              description: email of the recipient.
              type: string
              example: sec@zetaglobal.com
            passphrase:
              description: passphrase to use.
              type: string
              example: encryptionpassword
    Task_Import_Destination:
      type: object
      properties:
        table_name:
          description: Table name in the Selligent SQL database to import data into.
          type: string
          example: DATA_IMPORT
        include_user_identified_column:
          description: Adds an `INT` column `MAID` to the imported table. Your import procedure could use this column to store the ID of a record it matches against.
          type: boolean
          example: false
          default: false
      required:
        - table_name
    Task_Import:
      allOf:
        - $ref: '#/components/schemas/TaskWithTriggers'
        - type: object
          properties:
            column_mapping:
              description: Mapping information for the different columns. At least one mapping must be specified.
              type: array
              items:
                anyOf:
                  - $ref: '#/components/schemas/Task_Import_Column_Mapping'
                  - $ref: '#/components/schemas/Task_Import_Column_Mapping_Text'
                discriminator:
                  propertyName: type
                  mapping:
                    Unknown: '#/components/schemas/Task_Import_Column_Mapping'
                    Boolean: '#/components/schemas/Task_Import_Column_Mapping'
                    Numeric: '#/components/schemas/Task_Import_Column_Mapping'
                    Long: '#/components/schemas/Task_Import_Column_Mapping'
                    Float: '#/components/schemas/Task_Import_Column_Mapping'
                    Date: '#/components/schemas/Task_Import_Column_Mapping'
                    DateTime: '#/components/schemas/Task_Import_Column_Mapping'
                    Text: '#/components/schemas/Task_Import_Column_Mapping_Text'
                    LongText: '#/components/schemas/Task_Import_Column_Mapping'
            processing_folders:
              $ref: '#/components/schemas/Task_import_Processing_Folders'
            data_processing:
              $ref: '#/components/schemas/Task_Stored_Procedure'
            reject_management:
              $ref: '#/components/schemas/Task_Import_Reject_Management'
            options:
              $ref: '#/components/schemas/Task_Import_Advanced_Options'
            unzip_and_decrypt:
              $ref: '#/components/schemas/Task_Import_Unzip_Decrypt'
            destination:
              $ref: '#/components/schemas/Task_Import_Destination'
            subfolder:
              description: the subfolder in the destination for the export.
              type: string
              example: exports
            source:
              description: the API name of the medium to use for this import.
              type: string
              example: medium_1
            file_type:
              description: File type to be imported.
              type: string
              example: Excel
              enum:
                - Unknown
                - Delimited
                - Json
                - Xml
                - Excel
                - Rss
            file_options:
              $ref: '#/components/schemas/Task_Import_File_Options'
          required:
            - api_name
            - destination
            - name
            - notifications
            - source
            - file_type
            - column_mapping
    Task_Import_Json:
      allOf:
        - $ref: '#/components/schemas/Task_Import'
        - type: object
          properties:
            file_descriptor:
              description: |
                Readable description for the system to understand the format of the file.
                <details><summary>Read more:</summary>
                Provide a format Descriptor of the following format:

                ```xml
                <LOADFORMAT>
                      <TABLE PATH="" NAME="ORGANISATION" ROOTTABLE="1">
                           <TABLE PATH="Employees">
                                    <COLUMN PATH="Name" />
                                    <COLUMN PATH="Function" />
                                    <COLUMN PATH="Address.Street" NAME="ADDRESS_STREET"/>
                                    <COLUMN PATH="Address.ZipCode" NAME="ADDRESS_ZIPCODE"/>
                                    <COLUMN PATH="Address.City" NAME="ADDRESS_CITY"/>
                          </TABLE>
                           <COLUMN PATH="Name" NAME="ORGANISATION_NAME"/>
                     </TABLE>
                </LOADFORMAT>
                ```

                The above descriptor describes this input Json:

                ```json
                {
                  "Name": "Selligent",
                  "Employees": [
                    {
                      "Name": "Name 1",
                      "Function": "Function 1",
                      "Address": {
                        "Street": "Street 1",
                        "ZipCode": "1000",
                        "City": "City 1"
                      }
                    },
                    {
                      "Name": "Name 2",
                      "Function": "Function 2",
                      "Address": {
                        "Street": "Street 2",
                        "ZipCode": "1001",
                        "City": "City 2"
                      }
                    }
                  ]
                }
                ```

                The above format descriptor and Json will eventually be parsed and loaded as following table:

                ```plain
                JOB_34_ORGANISATION
                ---
                Name: Name 1
                Function: Function 1
                ADDRESS_STREET: Street 1
                ADDRESS_ZIPCODE: 1000
                ADDRESS_CITY: City 1
                ORGANISATION_NAME: Selligent
                ---
                Name: Name 2
                Function: Function 2
                ADDRESS_STREET: Street 2
                ADDRESS_ZIPCODE: 1001
                ADDRESS_CITY: City 2
                ORGANISATION_NAME: Selligent
                ```
                </details>
              type: string
              example: <LOADFORMAT><TABLE PATH="" NAME="ORGANISATION" ROOTTABLE="1"><TABLE PATH="Employees"><COLUMN PATH="Name" /><COLUMN PATH="Function" /><COLUMN PATH="Address.Street" NAME="ADDRESS_STREET"/><COLUMN PATH="Address.ZipCode" NAME="ADDRESS_ZIPCODE"/><COLUMN PATH="Address.City" NAME="ADDRESS_CITY"/></TABLE><COLUMN PATH="Name" NAME="ORGANISATION_NAME"/></TABLE></LOADFORMAT>
          required:
            - file_descriptor
    Task_Import_Xml:
      allOf:
        - $ref: '#/components/schemas/Task_Import'
        - type: object
          properties:
            file_descriptor:
              description: |
                Readable description for the system to understand the format of the file.
                <details><summary>Read more:</summary>
                Provide a format Descriptor of the following format:
                  
                ```xml
                <XMLLOADFORMAT NODE="XML">
                  <TABLELIST NODE="PARAMETERS">
                     <TABLE NODE="PARAMETER" NAME="@NAME">
                       <ROW NODE= "ARTICLE" KEY="ID" >
                         <COLUMNLIST TYPE="BOTH">
                           <COLUMN ATTR="ID"/>
                           <COLUMN NODE="IMAGE" ATTR="WIDTH" NAME="IMAGEWIDTH"/>
                           <COLUMN NODE="IMAGE" ATTR="HEIGHT"/>
                           <COLUMN NODE="LANG" NAME="LANGUAGE"/>
                         </COLUMNLIST>
                         <TABLELIST>
                           <TABLE NODE="OTHERARTICLEURLS">
                             <ROW NODE="OTHERARTICLEURL">
                               <COLUMNLIST TYPE="NODE" />
                             </ROW>
                          </TABLE>
                        </TABLELIST>
                      </ROW>
                    </TABLE>
                  </TABLELIST>
                </XMLLOADFORMAT>
                ```

                The above descriptor describes this input XML:

                ```xml
                <XML>
                  <PARAMETERS>
                    <PARAMETER NAME="ARTICLES">
                      <ARTICLE ID="1422">
                        <URL>http://citysecrets.lavenir.net/bruxelles/n/1422</URL>
                         <TITLE>Comment survivre au Blue Monday � Bruxelles ?</TITLE>
                        <DESCRIPTION>Notre conseil ..</DESCRIPTION>
                        <INTRO>Blue Monday .. </INTRO>
                        <POSTCODE>1000</POSTCODE>
                        <IMAGE WIDTH="300" HEIGHT="228">http://.. </IMAGE>
                        <OTHERARTICLEURLS>
                          <OTHERARTICLEURL>http://..</OTHERARTICLEURL>
                          <OTHERARTICLEURL>http://..</OTHERARTICLEURL>
                       </OTHERARTICLEURLS>
                        <LANG>FR</LANG>
                        <MAINLOCATION>1000</MAINLOCATION>
                        <AREA>1000,1020</AREA>
                         <ITEM_CREATED_DT>2012-01-16 14:25:11</ITEM_CREATED_DT>
                      </ARTICLE>
                    </PARAMETER>
                  </PARAMETERS>
                </XML>
                ```

                The above format descriptor and xml will eventually be parsed and loaded as following tables:

                ```plain
                JOB_34_ARTICLES
                ---
                ID: 1422
                IMAGEWIDTH: 300
                IMAGE_HEIGHT: 228
                LANGUAGE: FR
                ```

                ```plain
                JOB_34_ARTICLES_OTHERARTICLESURLS
                ---
                OTHERARTICLEURL: http://...
                ID: 1
                PARENT_ID: 1422
                ---
                OTHERARTICLEURL: http://...
                ID: 2
                PARENT_ID: 1422
                ```
                </details>
              type: string
              example: <XMLLOADFORMAT NODE="XML"><TABLELIST NODE="PARAMETERS"><TABLE NODE="PARAMETER" NAME="@NAME"><ROW NODE= "ARTICLE" KEY="ID" ><COLUMNLIST TYPE="BOTH"><COLUMN ATTR="ID"/><COLUMN NODE="IMAGE" ATTR="WIDTH" NAME="IMAGEWIDTH"/><COLUMN NODE="IMAGE" ATTR="HEIGHT"/><COLUMN NODE="LANG" NAME="LANGUAGE"/></COLUMNLIST><TABLELIST><TABLE NODE="OTHERARTICLEURLS"><ROW NODE="OTHERARTICLEURL"><COLUMNLIST TYPE="NODE" /></ROW></TABLE></TABLELIST></ROW></TABLE></TABLELIST></XMLLOADFORMAT>
          required:
            - file_descriptor
    Task_Import_File_Options_Excel:
      allOf:
        - $ref: '#/components/schemas/Task_Import_File_Options'
        - type: object
          properties:
            sheet_name:
              description: Name of the excel sheet to import.
              type: string
              example: sheet_1
              default: ''
            rows_to_skip:
              description: Skip the first few excel rows after the optional header before importing data.
              type: integer
              format: int32
              example: 5
              default: 0
    Task_Import_Excel:
      allOf:
        - $ref: '#/components/schemas/Task_Import'
        - type: object
          properties:
            file_options:
              $ref: '#/components/schemas/Task_Import_File_Options_Excel'
    Task_Import_File_Options_Rss:
      allOf:
        - $ref: '#/components/schemas/Task_Import_File_Options'
        - type: object
          properties:
            root_node:
              description: Name of the Root node to import from in case of RSS feed. By default, the importer looks for a "channel" node and defaults to the global root if not found.
              type: string
              example: ROOT
              default: ''
    Task_Import_Rss:
      allOf:
        - $ref: '#/components/schemas/Task_Import'
        - type: object
          properties:
            file_options:
              $ref: '#/components/schemas/Task_Import_File_Options_Rss'
    Task_Import_Create:
      title: Task_Import_Create
      anyOf:
        - $ref: '#/components/schemas/Task_Import'
        - $ref: '#/components/schemas/Task_Import_Xml'
        - $ref: '#/components/schemas/Task_Import_Json'
        - $ref: '#/components/schemas/Task_Import_Excel'
        - $ref: '#/components/schemas/Task_Import_Rss'
      discriminator:
        propertyName: file_type
        mapping:
          Unknown: '#/components/schemas/Task_Import'
          Delimited: '#/components/schemas/Task_Import'
          Json: '#/components/schemas/Task_Import_Json'
          Xml: '#/components/schemas/Task_Import_Xml'
          Excel: '#/components/schemas/Task_Import_Excel'
          Rss: '#/components/schemas/Task_Import_Rss'
    Task_Sql_Procedure:
      allOf:
        - type: object
          properties:
            id:
              description: |
                Choose a unique positive integer as `id` for this stored procedure. This ID can be referred to from the `on_success` or `on_fail` of other stored procedures in this list. 

                Only one stored procedure may exist where its `id` isn't referred to from any other stored procedure. That stored procedure will be the first one to be executed.
              type: integer
              format: int32
              example: 1
            on_success:
              description: |
                If this stored procedure ran successfully, then run the `on_success` procedure. This must be 
                  - the `id` of another stored procedure,
                  - `0` to halt execution and consider this sql task a success or 
                  - `-1` to halt execution and consider this sql task a failure.
              type: integer
              format: int32
              example: 2
            on_fail:
              description: |
                If this stored procedure failed, then run the `on_fail` procedure. This must be 
                - the `id` of another stored procedure, 
                - `0` to halt execution and consider this sql task a success or 
                - `-1` to halt execution and consider this sql task a failure.
              type: integer
              format: int32
              example: -1
        - $ref: '#/components/schemas/Task_Stored_Procedure'
      required:
        - id
    Task_Sql:
      allOf:
        - $ref: '#/components/schemas/TaskWithTriggers'
        - type: object
          properties:
            procedures:
              description: list of procedures to run with this task.
              type: array
              items:
                $ref: '#/components/schemas/Task_Sql_Procedure'
            scheduler:
              description: Id of the scheduler to use.
              type: integer
              format: int32
              example: 1
            schedule:
              $ref: '#/components/schemas/Task_Schedule'
            notifications:
              description: list of notifications to configure for this task.
              type: array
              items:
                $ref: '#/components/schemas/Task_Notification'
            folder:
              description: Folder path to store the task in.
              type: string
              example: main/tasks
    Task_Sql_Create:
      allOf:
        - $ref: '#/components/schemas/Task_Sql'
      required:
        - procedures
        - name
        - api_name
        - notifications
    Stored_Procedure_Base:
      type: object
      properties:
        type:
          description: Type of the stored procedure.
          type: string
          example: Bounce
          enum:
            - Unknown
            - General
            - Bounce
        name:
          description: Name of the stored procedure. The name should start with the prefix 'ST_' and can contain only alphanumerical characters and _ (underscore).
          type: string
          example: ST_1
    Stored_Procedures:
      type: object
      properties:
        stored_procedures:
          description: List of stored procedures defined matching the given criteria.
          type: array
          items:
            $ref: '#/components/schemas/Stored_Procedure_Base'
    Stored_Procedure:
      allOf:
        - $ref: '#/components/schemas/Stored_Procedure_Base'
        - type: object
          properties:
            description:
              description: A Description explaining this stored procedure.
              type: string
              example: General Stored Procedure
            body:
              description: The to be executed code for this stored procedure.
              type: string
              example: SELECT 'some result' as RESULT;
    Stored_Procedure_Create:
      allOf:
        - $ref: '#/components/schemas/Stored_Procedure'
      required:
        - name
        - body
        - type
    Stored_Procedure_Retrieve:
      allOf:
        - $ref: '#/components/schemas/Stored_Procedure'
    Stored_Procedure_Update:
      allOf:
        - type: object
          properties:
            description:
              description: A Description explaining this stored procedure.
              type: string
              example: General Stored Procedure
            body:
              description: The to be executed code for this stored procedure.
              type: string
              example: SELECT 'some result' as RESULT;
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-ApiKey
      description: '{{apiKey}}:{{apiSecret}}. These values can be found in your Selligent admin section.'
x-tagGroups:
  - name: Content
    tags:
      - Content
      - Dictionary
      - Dictionary Labels
  - name: Journeys
    tags:
      - Journey
      - Single Batch journey
      - AB journey
      - AB subject line journey
      - Recurring journey
      - Transactional journey
      - Transactional Bulk journey
      - Custom journey
      - Custom journey entrypoint
  - name: Lists
    tags:
      - List
      - List Custom Event
      - List data
      - List engagement
      - List field
      - List interest
      - List record
      - List relation
      - List segment
  - name: Data Exchange
    tags:
      - Data Import
      - Data Export
      - CIM
      - Notification Group
      - Stored Procedure
      - Task
  - name: Organizations
    tags:
      - Organization
      - Medium
      - Tag list
      - Folder
      - Status
