openapi: 3.1.0
info:
  title: ows-text-campaigns
  description: Text Campaigns
  version: 1.0.0
servers:
- url: https://qa-ows-text-campaigns.theorchard.io
paths:
  /hello/:
    get:
      tags:
      - Infra
      summary: Hello
      operationId: hello
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HelloResponse'
  /artist-settings/by-phone-number/{phoneNumber}:
    get:
      tags:
      - Artist Settings
      summary: Get Artist Settings By Phone Number
      operationId: getArtistSettingsByPhoneNumber
      parameters:
      - name: phoneNumber
        in: path
        required: true
        schema:
          type: string
          title: Phonenumber
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettingsByPhoneNumber'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettingsNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /artist-settings/{globalParticipantId}:
    get:
      tags:
      - Artist Settings
      summary: Get Artist Settings
      operationId: getArtistSettings
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: globalParticipantId
        in: path
        required: true
        schema:
          type: string
          title: Globalparticipantid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettings'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettingsNotFoundError'
          description: Not Found
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistNotInRosterError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Artist Settings
      summary: Create Or Update Artist Settings
      operationId: createOrUpdateArtistSettings
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: globalParticipantId
        in: path
        required: true
        schema:
          type: string
          title: Globalparticipantid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateOrUpdateArtistSettingsInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettings'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ArtistTwilioAccountError'
                - $ref: '#/components/schemas/InvalidContentTypeError'
                - $ref: '#/components/schemas/InvalidFileSizeError'
                - $ref: '#/components/schemas/InvalidImageSizeError'
                - $ref: '#/components/schemas/InvalidArtistImageError'
                title: Response 400 Createorupdateartistsettings
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistNotInRosterError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Artist Settings
      summary: Update Artist Settings
      operationId: updateArtistSettings
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: globalParticipantId
        in: path
        required: true
        schema:
          type: string
          title: Globalparticipantid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateArtistSettingsInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettings'
        '404':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ArtistSettingsNotFoundError'
                - $ref: '#/components/schemas/AssetNotFoundError'
                title: Response 404 Updateartistsettings
          description: Not Found
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistNotInRosterError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /artist-settings/{globalParticipantId}/image:
    post:
      tags:
      - Artist Settings
      summary: Create Artist Image
      operationId: createArtistImage
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: globalParticipantId
        in: path
        required: true
        schema:
          type: string
          title: Globalparticipantid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateArtistImageInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettingsNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/InvalidContentTypeError'
                - $ref: '#/components/schemas/InvalidFileSizeError'
                - $ref: '#/components/schemas/InvalidImageSizeError'
                - $ref: '#/components/schemas/InvalidArtistImageError'
                title: Response 400 Createartistimage
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistNotInRosterError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Artist Settings
      summary: Delete Artist Image
      operationId: deleteArtistImage
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: globalParticipantId
        in: path
        required: true
        schema:
          type: string
          title: Globalparticipantid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettings'
        '404':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ArtistSettingsNotFoundError'
                - $ref: '#/components/schemas/AssetNotFoundError'
                title: Response 404 Deleteartistimage
          description: Not Found
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistNotInRosterError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /artist-settings/{globalParticipantId}/image/upload/credentials:
    post:
      tags:
      - Artist Settings
      summary: Create Artist Image Upload Credentials
      operationId: createArtistImageUploadCredentials
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: globalParticipantId
        in: path
        required: true
        schema:
          type: string
          title: Globalparticipantid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateArtistImageUploadCredentialsInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadCredentials'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettingsNotFoundError'
          description: Not Found
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistNotInRosterError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /artist-settings/{globalParticipantId}/content/scan:
    post:
      tags:
      - Artist Settings
      summary: Scan Artist Content
      operationId: scanArtistContent
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: globalParticipantId
        in: path
        required: true
        schema:
          type: string
          title: Globalparticipantid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanArtistContentInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanArtistContentOutput'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistSettingsNotFoundError'
          description: Not Found
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ArtistNotInRosterError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /domains:
    get:
      tags:
      - Url Domains
      summary: Get Url Domains
      operationId: getUrlDomains
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: vendorId
        in: query
        required: true
        schema:
          type: integer
          title: Vendorid
      - name: subaccountId
        in: query
        required: true
        schema:
          type: integer
          title: Subaccountid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/UrlDomain'
                title: Response Geturldomains
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns:
    get:
      tags:
      - Campaigns
      summary: Get Campaigns
      operationId: getCampaigns
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: search
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Search
      - name: vendorId
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Vendorid
      - name: subaccountId
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
          - type: 'null'
          title: Subaccountid
      - name: globalParticipantIds
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            uniqueItems: true
            items:
              type: string
          - type: 'null'
          title: Globalparticipantids
      - name: statuses
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              $ref: '#/components/schemas/CampaignStatus'
          - type: 'null'
          title: Statuses
      - name: orderBy
        in: query
        required: false
        schema:
          anyOf:
          - type: array
            items:
              enum:
              - name.asc
              - name.desc
              - sendAt.asc
              - sendAt.desc
              - status.asc
              - status.desc
              - createdAt.asc
              - createdAt.desc
              - updatedAt.asc
              - updatedAt.desc
              type: string
          - type: 'null'
          title: Orderby
      - name: limit
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            maximum: 200
            minimum: 1
          - type: 'null'
          title: Limit
      - name: offset
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            minimum: 0
          - type: 'null'
          title: Offset
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LimitOffsetPage_Campaign_'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Campaigns
      summary: Create Campaign
      operationId: createCampaign
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/InvalidGlobalParticipantIdError'
                - $ref: '#/components/schemas/InvalidAccountError'
                - $ref: '#/components/schemas/CampaignUniqueNameError'
                - $ref: '#/components/schemas/ArtistNotConfiguredError'
                title: Response 400 Createcampaign
          description: Bad Request
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MainRepArtistOnlyAllowedError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}:
    get:
      tags:
      - Campaigns
      summary: Get Campaign
      operationId: getCampaign
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    delete:
      tags:
      - Campaigns
      summary: Delete Campaign
      operationId: deleteCampaignContent
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '204':
          description: Successful Response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignMustBeDraftError'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Campaigns
      summary: Update Campaign
      operationId: updateCampaign
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaignInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/CampaignMustBeDraftError'
                - $ref: '#/components/schemas/CampaignUniqueNameError'
                - $ref: '#/components/schemas/InvalidGlobalParticipantIdError'
                - $ref: '#/components/schemas/InvalidAudienceIdError'
                - $ref: '#/components/schemas/ArtistNotConfiguredError'
                - $ref: '#/components/schemas/ArchivedAudienceError'
                - $ref: '#/components/schemas/NotSupportedAudienceTargetError'
                - $ref: '#/components/schemas/EmptyAudienceError'
                title: Response 400 Updatecampaign
          description: Bad Request
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MalformedCampaignError'
          description: Internal Server Error
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MainRepArtistOnlyAllowedError'
          description: Forbidden
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/content:
    get:
      tags:
      - Campaigns
      summary: Get Campaign Content
      operationId: getCampaignContent
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignContent'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    patch:
      tags:
      - Campaigns
      summary: Update Campaign Content
      operationId: updateCampaignContent
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCampaignContentInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignContent'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/CampaignMustBeDraftError'
                - $ref: '#/components/schemas/CampaignAttachmentLimitExceededError'
                - $ref: '#/components/schemas/InvalidShortLinkTagError'
                title: Response 400 Updatecampaigncontent
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/content/scan:
    post:
      tags:
      - Campaigns
      summary: Scan Campaign Content
      operationId: scanCampaignContent
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScanCampaignContentInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScanCampaignContentOutput'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/duplicate:
    post:
      tags:
      - Campaigns
      summary: Duplicate Campaign
      operationId: duplicateCampaign
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DuplicateCampaignInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Campaign'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignUniqueNameError'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/attachments:
    get:
      tags:
      - Campaigns
      summary: Get Campaign Attachments
      operationId: getCampaignAttachments
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Asset'
                title: Response Getcampaignattachments
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    post:
      tags:
      - Campaigns
      summary: Create Campaign Attachment
      operationId: createCampaignAttachment
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignAttachmentInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Asset'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/InvalidContentTypeError'
                - $ref: '#/components/schemas/InvalidFileSizeError'
                - $ref: '#/components/schemas/InvalidImageSizeError'
                - $ref: '#/components/schemas/InvalidCampaignAttachmentError'
                title: Response 400 Createcampaignattachment
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/attachments/upload/credentials:
    post:
      tags:
      - Campaigns
      summary: Create Campaign Attachment Upload Credentials
      operationId: createCampaignAttachmentUploadCredentials
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCampaignAttachmentUploadCredentialsInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadCredentials'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/shortened-urls:
    get:
      tags:
      - Campaigns
      summary: Get Campaign Shortened Urls
      operationId: getCampaignShortenedUrls
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ShortenedUrl'
                title: Response Getcampaignshortenedurls
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/shortened-urls/validate:
    post:
      tags:
      - Campaigns
      summary: Validate Campaign Shortened Url
      operationId: validateCampaignShortenedUrl
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ValidateCampaignShortenedUrlInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortenedUrl'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/InvalidUrlDomainIdError'
                - $ref: '#/components/schemas/ShorteningPathIsNotAvailableError'
                title: Response 400 Validatecampaignshortenedurl
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/schedule:
    post:
      tags:
      - Campaigns
      summary: Schedule Campaign
      operationId: scheduleCampaign
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCampaignInput'
      responses:
        '204':
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ArtistNotConfiguredError'
                - $ref: '#/components/schemas/ArtistTwilioAccountNotConfiguredError'
                - $ref: '#/components/schemas/CampaignMustBeDraftError'
                - $ref: '#/components/schemas/CampaignSendAtMustBeFutureError'
                - $ref: '#/components/schemas/EmptyCampaignContentError'
                - $ref: '#/components/schemas/InvalidAudienceIdError'
                - $ref: '#/components/schemas/ArchivedAudienceError'
                - $ref: '#/components/schemas/NotSupportedAudienceTargetError'
                - $ref: '#/components/schemas/EmptyAudienceError'
                title: Response 400 Schedulecampaign
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    put:
      tags:
      - Campaigns
      summary: Edit Campaign Schedule
      operationId: editCampaignSchedule
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCampaignInput'
      responses:
        '204':
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ArtistNotConfiguredError'
                - $ref: '#/components/schemas/CampaignMustBeScheduledError'
                - $ref: '#/components/schemas/CampaignAlreadyQueuedError'
                - $ref: '#/components/schemas/CampaignSendAtMustBeFutureError'
                - $ref: '#/components/schemas/EmptyCampaignContentError'
                - $ref: '#/components/schemas/InvalidAudienceIdError'
                - $ref: '#/components/schemas/ArchivedAudienceError'
                - $ref: '#/components/schemas/NotSupportedAudienceTargetError'
                - $ref: '#/components/schemas/EmptyAudienceError'
                title: Response 400 Editcampaignschedule
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/unschedule:
    post:
      tags:
      - Campaigns
      summary: Unschedule Campaign
      operationId: unscheduleCampaign
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '204':
          description: Successful Response
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/CampaignMustBeScheduledError'
                - $ref: '#/components/schemas/CampaignAlreadyQueuedError'
                title: Response 400 Unschedulecampaign
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/analytics:
    get:
      tags:
      - Campaigns
      summary: Get Campaign Analytics
      operationId: getCampaignAnalytics
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignDetailedAnalytics'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/analytics/links:
    get:
      tags:
      - Campaigns
      summary: Get Campaign Link Analytics
      operationId: getCampaignLinkAnalytics
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CampaignLinkAnalytics'
                title: Response Getcampaignlinkanalytics
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/messages/batch-render:
    post:
      tags:
      - Campaigns
      - Internal
      summary: Render messages for a campaign with personalized attributes.
      operationId: renderCampaignMessagesBatch
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RenderCampaignMessagesBatchInput'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RenderCampaignMessagesBatchOutput'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PersonalizedAttributesLimitExceededError'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/messages/preview:
    get:
      tags:
      - Campaigns
      - Internal
      summary: Get Campaign Message Preview
      operationId: getCampaignMessagePreview
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      - name: channel
        in: query
        required: true
        schema:
          $ref: '#/components/schemas/MessageChannel'
      - name: includeUnsubscribeText
        in: query
        required: false
        schema:
          type: boolean
          default: true
          title: Includeunsubscribetext
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCampaignMessagePreviewOutput'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/messages/send-test:
    post:
      tags:
      - Campaigns
      summary: Send Campaign Test Message
      operationId: sendCampaignTestMessage
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SendTestCampaignInput'
      responses:
        '204':
          description: Successful Response
        '400':
          content:
            application/json:
              schema:
                anyOf:
                - $ref: '#/components/schemas/ArtistNotConfiguredError'
                - $ref: '#/components/schemas/ArtistTwilioAccountNotConfiguredError'
                - $ref: '#/components/schemas/EmptyCampaignContentError'
                title: Response 400 Sendcampaigntestmessage
          description: Bad Request
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/status:
    get:
      tags:
      - Campaigns
      summary: Get Campaign Live Status
      operationId: getCampaignLiveStatus
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCampaignLiveStatusOutput'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/pricing-estimation:
    get:
      tags:
      - Campaigns
      summary: Get Campaign Pricing Estimation
      operationId: getCampaignPricingEstimation
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      - name: replyShare
        in: query
        required: true
        schema:
          type: number
          maximum: 1.0
          minimum: 0.0
          title: Replyshare
      - name: segmentsCount
        in: query
        required: false
        schema:
          anyOf:
          - type: integer
            minimum: 1
          - type: 'null'
          title: Segmentscount
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCampaignPricingEstimationResponse'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignAudienceRequiredError'
          description: Bad Request
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /campaigns/{campaignId}/send-timezones:
    get:
      tags:
      - Campaigns
      summary: Get Campaign Send Timezones
      operationId: getCampaignSendTimezones
      security:
      - JWT authorization: []
      - OrchardIdentityId: []
      parameters:
      - name: campaignId
        in: path
        required: true
        schema:
          type: string
          title: Campaignid
      - name: sendAt
        in: query
        required: true
        schema:
          type: string
          format: date-time
          title: Sendat
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetCampaignSendTimezonesOutput'
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CampaignNotFoundError'
          description: Not Found
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /twilio/sync-pricing:
    post:
      tags:
      - Twilio
      - Internal
      summary: Sync messaging pricing for TWILIO. Internal use only.
      operationId: syncTwilioPricing
      responses:
        '204':
          description: Successful Response
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TwilioConnectionError'
  /twilio/inbound:
    post:
      tags:
      - Twilio
      summary: Handle inbound message from Twilio.
      operationId: TwilioInboundMessage
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TwilioInboundMessageBody'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema: {}
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AgeRange:
      type: string
      enum:
      - FROM_13_TO_17
      - FROM_18_TO_22
      - FROM_23_TO_30
      - FROM_31_TO_40
      - FROM_41_TO_51
      - FROM_52_TO_60
      - FROM_61
      title: AgeRange
    ArchivedAudienceError:
      properties:
        code:
          type: string
          const: archived_audience
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ArchivedAudienceError
    ArtistNotConfiguredError:
      properties:
        code:
          type: string
          const: artist_not_configured
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ArtistNotConfiguredError
    ArtistNotFoundError:
      properties:
        code:
          type: string
          const: artist_not_found
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ArtistNotFoundError
    ArtistNotInRosterError:
      properties:
        code:
          type: string
          const: artist_not_in_roster
          title: Code
        message:
          type: string
          title: Message
        globalParticipantId:
          type: string
          title: Globalparticipantid
      type: object
      required:
      - code
      - message
      - globalParticipantId
      title: ArtistNotInRosterError
    ArtistPhoneNumber:
      properties:
        phoneNumber:
          type: string
          title: Phonenumber
        countryCode:
          type: string
          title: Countrycode
      type: object
      required:
      - phoneNumber
      - countryCode
      title: ArtistPhoneNumber
    ArtistSettings:
      properties:
        welcomeMessage:
          type: string
          title: Welcomemessage
        welcomeMessageInstructions:
          anyOf:
          - type: string
          - type: 'null'
          title: Welcomemessageinstructions
        optInMessage:
          type: string
          title: Optinmessage
        optInMessageTerms:
          anyOf:
          - type: string
          - type: 'null'
          title: Optinmessageterms
        imageUrl:
          anyOf:
          - type: string
          - type: 'null'
          title: Imageurl
        phoneNumbers:
          items:
            $ref: '#/components/schemas/ArtistPhoneNumber'
          type: array
          title: Phonenumbers
        welcomeMessageScanResult:
          anyOf:
          - $ref: '#/components/schemas/ContentRecommendations'
          - type: 'null'
        optInMessageScanResult:
          anyOf:
          - $ref: '#/components/schemas/ContentRecommendations'
          - type: 'null'
      type: object
      required:
      - welcomeMessage
      - optInMessage
      - phoneNumbers
      - welcomeMessageScanResult
      - optInMessageScanResult
      title: ArtistSettings
    ArtistSettingsByPhoneNumber:
      properties:
        artistName:
          type: string
          title: Artistname
        globalParticipantId:
          type: string
          title: Globalparticipantid
        optInMessage:
          type: string
          title: Optinmessage
        optInMessageTerms:
          type: string
          title: Optinmessageterms
        reOptInMessage:
          type: string
          title: Reoptinmessage
        welcomeMessage:
          type: string
          title: Welcomemessage
        welcomeMessageInstructions:
          type: string
          title: Welcomemessageinstructions
        infoMessage:
          type: string
          title: Infomessage
        vCardUrl:
          anyOf:
          - type: string
          - type: 'null'
          title: Vcardurl
      type: object
      required:
      - artistName
      - globalParticipantId
      - optInMessage
      - optInMessageTerms
      - reOptInMessage
      - welcomeMessage
      - welcomeMessageInstructions
      - infoMessage
      title: ArtistSettingsByPhoneNumber
    ArtistSettingsNotFoundError:
      properties:
        code:
          type: string
          const: artist_settings_not_found
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ArtistSettingsNotFoundError
    ArtistTwilioAccountError:
      properties:
        code:
          type: string
          const: invalid_artist_twilio_account
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ArtistTwilioAccountError
    ArtistTwilioAccountNotConfiguredError:
      properties:
        code:
          type: string
          const: artist_twilio_account_not_configured
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ArtistTwilioAccountNotConfiguredError
    Asset:
      properties:
        id:
          type: string
          title: Id
        originalFilename:
          type: string
          title: Originalfilename
        key:
          type: string
          title: Key
        url:
          type: string
          title: Url
        contentType:
          type: string
          title: Contenttype
        extension:
          type: string
          title: Extension
        fileSize:
          type: integer
          title: Filesize
        createdAt:
          type: string
          format: date-time
          title: Createdat
        createdBy:
          anyOf:
          - type: string
          - type: 'null'
          title: Createdby
      type: object
      required:
      - id
      - originalFilename
      - key
      - url
      - contentType
      - extension
      - fileSize
      - createdAt
      - createdBy
      title: Asset
    AssetNotFoundError:
      properties:
        code:
          type: string
          const: asset_not_found
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: AssetNotFoundError
    Audience:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        fanCount:
          type: integer
          title: Fancount
        isArchived:
          type: boolean
          title: Isarchived
        target:
          $ref: '#/components/schemas/AudienceTarget'
      type: object
      required:
      - id
      - name
      - fanCount
      - isArchived
      - target
      title: Audience
    AudienceTarget:
      type: string
      enum:
      - ADS
      - TEXT
      - EMAIL
      title: AudienceTarget
    Campaign:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        vendorId:
          type: integer
          title: Vendorid
        subaccountId:
          type: integer
          title: Subaccountid
        globalParticipantId:
          type: string
          title: Globalparticipantid
        status:
          $ref: '#/components/schemas/CampaignStatus'
        audienceId:
          anyOf:
          - type: string
          - type: 'null'
          title: Audienceid
        audience:
          anyOf:
          - $ref: '#/components/schemas/Audience'
          - type: 'null'
        channel:
          $ref: '#/components/schemas/MessageChannel'
        sendAt:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Sendat
        sendAtTimezone:
          anyOf:
          - type: string
          - type: 'null'
          title: Sendattimezone
        recipientsCount:
          anyOf:
          - type: integer
          - type: 'null'
          title: Recipientscount
        cancelReason:
          anyOf:
          - $ref: '#/components/schemas/CampaignCancelReason'
          - type: 'null'
        cancelledAt:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Cancelledat
        createdAt:
          type: string
          format: date-time
          title: Createdat
        createdBy:
          type: string
          title: Createdby
        updatedAt:
          type: string
          format: date-time
          title: Updatedat
        updatedBy:
          type: string
          title: Updatedby
        analytics:
          anyOf:
          - $ref: '#/components/schemas/CampaignAnalytics'
          - type: 'null'
        contentScanResult:
          anyOf:
          - $ref: '#/components/schemas/ContentRecommendations'
          - type: 'null'
      type: object
      required:
      - id
      - name
      - vendorId
      - subaccountId
      - globalParticipantId
      - status
      - audienceId
      - audience
      - channel
      - sendAt
      - sendAtTimezone
      - recipientsCount
      - cancelReason
      - cancelledAt
      - createdAt
      - createdBy
      - updatedAt
      - updatedBy
      - contentScanResult
      title: Campaign
    CampaignAlreadyQueuedError:
      properties:
        code:
          type: string
          const: campaign_already_queued
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: CampaignAlreadyQueuedError
    CampaignAnalytics:
      properties:
        clicks:
          type: integer
          title: Clicks
        clickThroughRate:
          type: number
          title: Clickthroughrate
      type: object
      required:
      - clicks
      - clickThroughRate
      title: CampaignAnalytics
    CampaignAttachmentLimitExceededError:
      properties:
        code:
          type: string
          const: campaign_attachment_limit_exceeded
          title: Code
        message:
          type: string
          title: Message
        maxAllowedLimit:
          type: integer
          title: Maxallowedlimit
      type: object
      required:
      - code
      - message
      - maxAllowedLimit
      title: CampaignAttachmentLimitExceededError
    CampaignAudienceRequiredError:
      properties:
        code:
          type: string
          const: campaign_audience_required
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: CampaignAudienceRequiredError
    CampaignCancelReason:
      type: string
      enum:
      - NO_FANS
      title: CampaignCancelReason
    CampaignContent:
      properties:
        content:
          anyOf:
          - type: string
          - type: 'null'
          title: Content
      type: object
      required:
      - content
      title: CampaignContent
    CampaignDemographicsAnalytics:
      properties:
        availableFansShare:
          anyOf:
          - type: number
          - type: 'null'
          title: Availablefansshare
        data:
          items:
            $ref: '#/components/schemas/CampaignDemographicsAnalyticsDataItem'
          type: array
          title: Data
      type: object
      required:
      - availableFansShare
      - data
      title: CampaignDemographicsAnalytics
    CampaignDemographicsAnalyticsDataItem:
      properties:
        id:
          $ref: '#/components/schemas/Gender'
        total:
          type: integer
          title: Total
        items:
          items:
            $ref: '#/components/schemas/CampaignDemographicsAnalyticsItem'
          type: array
          title: Items
      type: object
      required:
      - id
      - total
      - items
      title: CampaignDemographicsAnalyticsDataItem
    CampaignDemographicsAnalyticsItem:
      properties:
        label:
          $ref: '#/components/schemas/AgeRange'
        value:
          type: integer
          title: Value
      type: object
      required:
      - label
      - value
      title: CampaignDemographicsAnalyticsItem
    CampaignDetailedAnalytics:
      properties:
        sends:
          type: integer
          title: Sends
        clicks:
          anyOf:
          - type: integer
          - type: 'null'
          title: Clicks
        clickThroughRate:
          anyOf:
          - type: number
          - type: 'null'
          title: Clickthroughrate
        unsubscribeRate:
          anyOf:
          - type: number
          - type: 'null'
          title: Unsubscriberate
        unsubscribeRateChange:
          anyOf:
          - type: number
          - type: 'null'
          title: Unsubscriberatechange
        deliveryRate:
          type: number
          title: Deliveryrate
        deliveryRateChange:
          anyOf:
          - type: number
          - type: 'null'
          title: Deliveryratechange
        deliveryFailedRate:
          type: number
          title: Deliveryfailedrate
        deliveryFailedRateChange:
          anyOf:
          - type: number
          - type: 'null'
          title: Deliveryfailedratechange
        locations:
          anyOf:
          - items:
              $ref: '#/components/schemas/CampaignLocationAnalytics'
            type: array
          - type: 'null'
          title: Locations
      type: object
      required:
      - sends
      - clicks
      - clickThroughRate
      - unsubscribeRate
      - unsubscribeRateChange
      - deliveryRate
      - deliveryRateChange
      - deliveryFailedRate
      - deliveryFailedRateChange
      - locations
      title: CampaignDetailedAnalytics
    CampaignLinkAnalytics:
      properties:
        url:
          type: string
          title: Url
        linkType:
          $ref: '#/components/schemas/LinkType'
        totalSends:
          type: integer
          title: Totalsends
        totalClicks:
          anyOf:
          - type: integer
          - type: 'null'
          title: Totalclicks
        clickthroughRate:
          anyOf:
          - type: number
          - type: 'null'
          title: Clickthroughrate
        clickthroughRateChange:
          anyOf:
          - type: number
          - type: 'null'
          title: Clickthroughratechange
        demographics:
          anyOf:
          - $ref: '#/components/schemas/CampaignDemographicsAnalytics'
          - type: 'null'
        locations:
          anyOf:
          - items:
              $ref: '#/components/schemas/CampaignLocationAnalytics'
            type: array
          - type: 'null'
          title: Locations
      type: object
      required:
      - url
      - linkType
      - totalSends
      - totalClicks
      - clickthroughRate
      - clickthroughRateChange
      - demographics
      - locations
      title: CampaignLinkAnalytics
    CampaignLocationAnalytics:
      properties:
        countryCode:
          type: string
          title: Countrycode
        sends:
          type: integer
          title: Sends
        clicks:
          anyOf:
          - type: integer
          - type: 'null'
          title: Clicks
      type: object
      required:
      - countryCode
      - sends
      - clicks
      title: CampaignLocationAnalytics
    CampaignMustBeDraftError:
      properties:
        code:
          type: string
          const: campaign_must_be_draft
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: CampaignMustBeDraftError
    CampaignMustBeScheduledError:
      properties:
        code:
          type: string
          const: campaign_must_be_scheduled
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: CampaignMustBeScheduledError
    CampaignNotFoundError:
      properties:
        code:
          type: string
          const: campaign_not_found
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: CampaignNotFoundError
    CampaignSendAtMustBeFutureError:
      properties:
        code:
          type: string
          const: campaign_send_at_must_be_future
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: CampaignSendAtMustBeFutureError
    CampaignSendCountry:
      properties:
        countryCode:
          type: string
          title: Countrycode
        timezones:
          items:
            $ref: '#/components/schemas/CampaignSendTimezone'
          type: array
          title: Timezones
      type: object
      required:
      - countryCode
      - timezones
      title: CampaignSendCountry
    CampaignSendTimezone:
      properties:
        ianaTzId:
          type: string
          title: Ianatzid
        utcOffsetStd:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Utcoffsetstd
        stateProvinces:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Stateprovinces
        quietHoursMin:
          type: string
          title: Quiethoursmin
        quietHoursMax:
          type: string
          title: Quiethoursmax
        nextSafeTime:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Nextsafetime
        isInSafeHours:
          type: boolean
          title: Isinsafehours
        isAdjusted:
          type: boolean
          title: Isadjusted
          default: false
        sendAtLocal:
          type: string
          format: date-time
          title: Sendatlocal
          description: Local time
      type: object
      required:
      - ianaTzId
      - utcOffsetStd
      - stateProvinces
      - quietHoursMin
      - quietHoursMax
      - nextSafeTime
      - isInSafeHours
      - sendAtLocal
      title: CampaignSendTimezone
    CampaignStatus:
      type: string
      enum:
      - DRAFT
      - SCHEDULED
      - IN_PROGRESS
      - CANCELLED
      - SENT
      title: CampaignStatus
    CampaignUniqueNameError:
      properties:
        code:
          type: string
          const: campaign_unique_name
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: CampaignUniqueNameError
    ChannelPricing:
      properties:
        name:
          $ref: '#/components/schemas/MessageChannel'
        numberOfFans:
          type: integer
          title: Numberoffans
        outboundCost:
          $ref: '#/components/schemas/Cost'
        inboundCost:
          $ref: '#/components/schemas/Cost'
      type: object
      required:
      - name
      - numberOfFans
      - outboundCost
      - inboundCost
      title: ChannelPricing
    ContentRecommendations:
      properties:
        sensitiveWords:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Sensitivewords
        includedArtistName:
          anyOf:
          - type: boolean
          - type: 'null'
          title: Includedartistname
      type: object
      title: ContentRecommendations
    Cost:
      properties:
        min:
          type: number
          title: Min
        max:
          type: number
          title: Max
      type: object
      required:
      - min
      - max
      title: Cost
    CountryPricing:
      properties:
        name:
          type: string
          title: Name
        channels:
          items:
            $ref: '#/components/schemas/ChannelPricing'
          type: array
          title: Channels
      type: object
      required:
      - name
      - channels
      title: CountryPricing
    CreateArtistImageInput:
      properties:
        imageKey:
          type: string
          title: Imagekey
      type: object
      required:
      - imageKey
      title: CreateArtistImageInput
    CreateArtistImageUploadCredentialsInput:
      properties:
        filename:
          type: string
          title: Filename
      type: object
      required:
      - filename
      title: CreateArtistImageUploadCredentialsInput
    CreateCampaignAttachmentInput:
      properties:
        attachmentKey:
          type: string
          title: Attachmentkey
      type: object
      required:
      - attachmentKey
      title: CreateCampaignAttachmentInput
    CreateCampaignAttachmentUploadCredentialsInput:
      properties:
        filename:
          type: string
          title: Filename
      type: object
      required:
      - filename
      title: CreateCampaignAttachmentUploadCredentialsInput
    CreateCampaignInput:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        vendorId:
          type: integer
          title: Vendorid
        subaccountId:
          type: integer
          title: Subaccountid
        globalParticipantId:
          type: string
          title: Globalparticipantid
        channel:
          anyOf:
          - $ref: '#/components/schemas/MessageChannel'
          - type: 'null'
        audienceId:
          anyOf:
          - type: string
          - type: 'null'
          title: Audienceid
      type: object
      required:
      - name
      - vendorId
      - subaccountId
      - globalParticipantId
      title: CreateCampaignInput
    CreateOrUpdateArtistSettingsInput:
      properties:
        welcomeMessage:
          anyOf:
          - type: string
          - type: 'null'
          title: Welcomemessage
        optInMessage:
          anyOf:
          - type: string
          - type: 'null'
          title: Optinmessage
        artistName:
          anyOf:
          - type: string
          - type: 'null'
          title: Artistname
        phoneNumbers:
          items:
            type: string
            format: phone
          type: array
          minItems: 1
          title: Phonenumbers
        twilioAccountSid:
          type: string
          title: Twilioaccountsid
        twilioAuthToken:
          type: string
          format: password
          title: Twilioauthtoken
          writeOnly: true
        twilioMessagingServiceSid:
          type: string
          title: Twiliomessagingservicesid
        refreshApiKey:
          type: boolean
          title: Refreshapikey
          default: false
      type: object
      required:
      - phoneNumbers
      - twilioAccountSid
      - twilioAuthToken
      - twilioMessagingServiceSid
      title: CreateOrUpdateArtistSettingsInput
    DuplicateCampaignInput:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
      type: object
      required:
      - name
      title: DuplicateCampaignInput
    EmptyAudienceError:
      properties:
        code:
          type: string
          const: empty_audience
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: EmptyAudienceError
    EmptyCampaignContentError:
      properties:
        code:
          type: string
          const: empty_campaign_content
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: EmptyCampaignContentError
    FanRenderedMessage:
      properties:
        fan_id:
          type: string
          title: Fan Id
        channel:
          $ref: '#/components/schemas/MessageChannel'
        recipient:
          type: string
          title: Recipient
        sender:
          type: string
          title: Sender
        message:
          type: string
          title: Message
        media_url:
          anyOf:
          - type: string
          - items:
              type: string
            type: array
          - type: 'null'
          title: Media Url
      type: object
      required:
      - fan_id
      - channel
      - recipient
      - sender
      - message
      - media_url
      title: FanRenderedMessage
    Gender:
      type: string
      enum:
      - MALE
      - FEMALE
      - PREFER_NOT_TO_ANSWER
      - NON_BINARY_OTHER
      title: Gender
    GetCampaignLiveStatusOutput:
      properties:
        status:
          $ref: '#/components/schemas/CampaignStatus'
        messagesToSend:
          type: integer
          title: Messagestosend
        sentMessages:
          type: integer
          title: Sentmessages
      type: object
      required:
      - status
      - messagesToSend
      - sentMessages
      title: GetCampaignLiveStatusOutput
    GetCampaignMessagePreviewOutput:
      $ref: '#/components/schemas/MessagePreview'
      title: GetCampaignMessagePreviewOutput
    GetCampaignPricingEstimationResponse:
      properties:
        totalCost:
          $ref: '#/components/schemas/Cost'
        countries:
          items:
            $ref: '#/components/schemas/CountryPricing'
          type: array
          title: Countries
      type: object
      required:
      - totalCost
      - countries
      title: GetCampaignPricingEstimationResponse
    GetCampaignSendTimezonesOutput:
      properties:
        sendAt:
          type: string
          format: date-time
          title: Sendat
        countries:
          items:
            $ref: '#/components/schemas/CampaignSendCountry'
          type: array
          title: Countries
      type: object
      required:
      - sendAt
      - countries
      title: GetCampaignSendTimezonesOutput
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        message:
          title: Message
          type: string
        code:
          title: Error code
          type: string
        fieldErrors:
          title: Field errors
          type: object
          additionalProperties:
            $ref: '#/components/schemas/FieldError'
      required:
      - message
      - code
      - fields
      example:
        message: Invalid input
        code: invalid_input
        fieldErrors:
          name:
            message: Cannot be blank
            code: missing
          email:
            message: Not valid email
            code: invalid_email
    HelloResponse:
      properties:
        status:
          type: string
          title: Status
          default: ok
      type: object
      title: HelloResponse
    InvalidAccountError:
      properties:
        code:
          type: string
          const: invalid_account
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: InvalidAccountError
    InvalidArtistImageError:
      properties:
        code:
          type: string
          const: invalid_artist_image
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: InvalidArtistImageError
    InvalidAudienceIdError:
      properties:
        code:
          type: string
          const: invalid_audience_id
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: InvalidAudienceIdError
    InvalidCampaignAttachmentError:
      properties:
        code:
          type: string
          const: invalid_campaign_attachment
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: InvalidCampaignAttachmentError
    InvalidContentTypeError:
      properties:
        code:
          type: string
          const: invalid_content_type
          title: Code
        message:
          type: string
          title: Message
        contentType:
          type: string
          title: Contenttype
        allowedContentTypes:
          items:
            type: string
          type: array
          title: Allowedcontenttypes
      type: object
      required:
      - code
      - message
      - contentType
      - allowedContentTypes
      title: InvalidContentTypeError
    InvalidFileSizeError:
      properties:
        code:
          type: string
          const: invalid_file_size
          title: Code
        message:
          type: string
          title: Message
        size:
          type: integer
          title: Size
        minSize:
          type: integer
          title: Minsize
        maxSize:
          type: integer
          title: Maxsize
      type: object
      required:
      - code
      - message
      - size
      - minSize
      - maxSize
      title: InvalidFileSizeError
    InvalidGlobalParticipantIdError:
      properties:
        code:
          type: string
          const: invalid_global_participant_id
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: InvalidGlobalParticipantIdError
    InvalidImageSizeError:
      properties:
        code:
          type: string
          const: invalid_image_size
          title: Code
        message:
          type: string
          title: Message
        width:
          type: integer
          title: Width
        height:
          type: integer
          title: Height
        minWidth:
          type: integer
          title: Minwidth
        minHeight:
          type: integer
          title: Minheight
      type: object
      required:
      - code
      - message
      - width
      - height
      - minWidth
      - minHeight
      title: InvalidImageSizeError
    InvalidShortLinkTagError:
      properties:
        code:
          type: string
          const: invalid_short_link_tag
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: InvalidShortLinkTagError
    InvalidUrlDomainIdError:
      properties:
        code:
          type: string
          const: invalid_url_domain_id
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: InvalidUrlDomainIdError
    LimitOffsetPage_Campaign_:
      properties:
        total:
          type: integer
          title: Total
        items:
          items:
            $ref: '#/components/schemas/Campaign'
          type: array
          title: Items
        limit:
          type: integer
          title: Limit
        offset:
          type: integer
          title: Offset
      type: object
      required:
      - total
      - items
      - limit
      - offset
      title: LimitOffsetPage[Campaign]
    LinkType:
      type: string
      enum:
      - PERSONALIZED
      - STANDARD
      - LONG
      title: LinkType
    MainRepArtistOnlyAllowedError:
      properties:
        code:
          type: string
          const: main_rep_artist_only_allowed
          title: Code
        message:
          type: string
          title: Message
        globalParticipantId:
          type: string
          title: Globalparticipantid
      type: object
      required:
      - code
      - message
      - globalParticipantId
      title: MainRepArtistOnlyAllowedError
    MalformedCampaignError:
      properties:
        code:
          type: string
          const: malformed_campaign
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: MalformedCampaignError
    MessageChannel:
      type: string
      enum:
      - SMS
      - WHATSAPP
      title: MessageChannel
    MessageInfo:
      properties:
        encoding:
          type: string
          title: Encoding
        numberOfCharacters:
          type: integer
          title: Numberofcharacters
        numberOfUnicodeScalars:
          type: integer
          title: Numberofunicodescalars
        segmentsCount:
          type: integer
          title: Segmentscount
      type: object
      required:
      - encoding
      - numberOfCharacters
      - numberOfUnicodeScalars
      - segmentsCount
      title: MessageInfo
    MessagePreview:
      properties:
        message:
          type: string
          title: Message
        info:
          $ref: '#/components/schemas/MessageInfo'
      type: object
      required:
      - message
      - info
      title: MessagePreview
    NotSupportedAudienceTargetError:
      properties:
        code:
          type: string
          const: not_supported_audience_target
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: NotSupportedAudienceTargetError
    PersonalizedAttributesLimitExceededError:
      properties:
        code:
          type: string
          const: personalized_attributes_limit_exceeded
          title: Code
        message:
          type: string
          title: Message
        maxAllowedLimit:
          type: integer
          title: Maxallowedlimit
      type: object
      required:
      - code
      - message
      - maxAllowedLimit
      title: PersonalizedAttributesLimitExceededError
    RenderCampaignMessagesBatchInput:
      properties:
        personalized_attributes:
          items:
            $ref: '#/components/schemas/ShortenedUrlPersonalizedAttributes'
          type: array
          maxItems: 1000
          title: Personalized Attributes
      type: object
      required:
      - personalized_attributes
      title: RenderCampaignMessagesBatchInput
    RenderCampaignMessagesBatchOutput:
      items:
        $ref: '#/components/schemas/FanRenderedMessage'
      type: array
      title: RenderCampaignMessagesBatchOutput
    ScanArtistContentInput:
      properties:
        optInMessage:
          type: string
          minLength: 1
          title: Optinmessage
        welcomeMessage:
          type: string
          minLength: 1
          title: Welcomemessage
      type: object
      required:
      - optInMessage
      - welcomeMessage
      title: ScanArtistContentInput
    ScanArtistContentOutput:
      properties:
        optInMessage:
          $ref: '#/components/schemas/ScanCampaignContentOutput'
        welcomeMessage:
          $ref: '#/components/schemas/ScanCampaignContentOutput'
      type: object
      required:
      - optInMessage
      - welcomeMessage
      title: ScanArtistContentOutput
    ScanCampaignContentInput:
      properties:
        content:
          type: string
          minLength: 1
          title: Content
      type: object
      required:
      - content
      title: ScanCampaignContentInput
    ScanCampaignContentOutput:
      properties:
        sensitiveWords:
          items:
            type: string
          type: array
          title: Sensitivewords
        includedArtistName:
          type: boolean
          title: Includedartistname
      type: object
      required:
      - sensitiveWords
      - includedArtistName
      title: ScanCampaignContentOutput
    ScheduleCampaignInput:
      properties:
        sendAt:
          type: string
          format: date-time
          title: Sendat
        timezone:
          type: string
          maxLength: 255
          minLength: 1
          title: Timezone
        adjustments:
          anyOf:
          - items:
              $ref: '#/components/schemas/TimezoneAdjustment'
            type: array
          - type: 'null'
          title: Adjustments
      type: object
      required:
      - sendAt
      - timezone
      title: ScheduleCampaignInput
    SendTestCampaignInput:
      properties:
        phoneNumber:
          type: string
          format: phone
          title: Phonenumber
      type: object
      required:
      - phoneNumber
      title: SendTestCampaignInput
    ShortenedUrl:
      properties:
        id:
          type: string
          title: Id
        url:
          type: string
          title: Url
        method:
          $ref: '#/components/schemas/ShorteningMethod'
        domain:
          type: string
          title: Domain
        path:
          type: string
          title: Path
        previewUrl:
          type: string
          title: Previewurl
      type: object
      required:
      - id
      - url
      - method
      - domain
      - path
      - previewUrl
      title: ShortenedUrl
    ShortenedUrlPersonalizedAttributes:
      properties:
        fan_id:
          type: string
          title: Fan Id
        phone_number:
          type: string
          title: Phone Number
        channel:
          $ref: '#/components/schemas/MessageChannel'
      type: object
      required:
      - fan_id
      - phone_number
      - channel
      title: ShortenedUrlPersonalizedAttributes
    ShorteningMethod:
      type: string
      enum:
      - PERSONALIZED
      - STANDARD
      title: ShorteningMethod
    ShorteningPathIsNotAvailableError:
      properties:
        code:
          type: string
          const: shortening_path_is_not_available
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ShorteningPathIsNotAvailableError
    TimezoneAdjustment:
      properties:
        countryCode:
          type: string
          title: Countrycode
        ianaTzId:
          type: string
          title: Ianatzid
      type: object
      required:
      - countryCode
      - ianaTzId
      title: TimezoneAdjustment
    TwilioConnectionError:
      properties:
        code:
          type: string
          const: twilio_connection_error
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: TwilioConnectionError
    TwilioInboundMessageBody:
      properties:
        AccountSid:
          type: string
          title: Accountsid
        To:
          type: string
          title: To
        From:
          type: string
          title: From
        Body:
          type: string
          title: Body
        OptOutType:
          anyOf:
          - type: string
          - type: 'null'
          title: Optouttype
      additionalProperties: true
      type: object
      required:
      - AccountSid
      - To
      - From
      - Body
      title: TwilioInboundMessageBody
    UpdateArtistSettingsInput:
      properties:
        welcomeMessage:
          anyOf:
          - type: string
          - type: 'null'
          title: Welcomemessage
        optInMessage:
          anyOf:
          - type: string
          - type: 'null'
          title: Optinmessage
        assetId:
          anyOf:
          - type: string
          - type: 'null'
          title: Assetid
      type: object
      title: UpdateArtistSettingsInput
    UpdateCampaignContentInput:
      properties:
        content:
          anyOf:
          - type: string
            format: base64
          - type: 'null'
          title: Content
        assetIds:
          anyOf:
          - items:
              type: string
            type: array
          - type: 'null'
          title: Assetids
      type: object
      title: UpdateCampaignContentInput
    UpdateCampaignInput:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        vendorId:
          type: integer
          title: Vendorid
        subaccountId:
          type: integer
          title: Subaccountid
        globalParticipantId:
          type: string
          title: Globalparticipantid
        channel:
          $ref: '#/components/schemas/MessageChannel'
        audienceId:
          anyOf:
          - type: string
          - type: 'null'
          title: Audienceid
      type: object
      required:
      - name
      - vendorId
      - subaccountId
      - globalParticipantId
      - channel
      title: UpdateCampaignInput
    UploadCredentials:
      properties:
        key:
          type: string
          title: Key
        bucket:
          type: string
          title: Bucket
        region:
          type: string
          title: Region
        accessKeyId:
          type: string
          title: Accesskeyid
        secretAccessKey:
          type: string
          title: Secretaccesskey
        sessionToken:
          type: string
          title: Sessiontoken
        expiresAt:
          type: string
          format: date-time
          title: Expiresat
      type: object
      required:
      - key
      - bucket
      - region
      - accessKeyId
      - secretAccessKey
      - sessionToken
      - expiresAt
      title: UploadCredentials
    UrlDomain:
      properties:
        id:
          type: string
          title: Id
        domain:
          type: string
          title: Domain
        brand:
          type: string
          title: Brand
      type: object
      required:
      - id
      - domain
      - brand
      title: UrlDomain
    ValidateCampaignShortenedUrlInput:
      properties:
        id:
          anyOf:
          - type: string
          - type: 'null'
          title: Id
        url:
          type: string
          maxLength: 2083
          minLength: 1
          format: uri
          title: Url
        method:
          $ref: '#/components/schemas/ShorteningMethod'
        domain:
          type: string
          title: Domain
        path:
          type: string
          minLength: 5
          pattern: ^[0-9a-zA-Z-]+$
          title: Path
      type: object
      required:
      - url
      - method
      - domain
      - path
      title: ValidateCampaignShortenedUrlInput
    FieldError:
      title: FieldError
      type: object
      properties:
        message:
          title: Message
          type: string
        code:
          title: Error code
          type: string
      required:
      - message
      - code
  securitySchemes:
    JWT authorization:
      type: http
      scheme: bearer
    OrchardIdentityId:
      type: apiKey
      in: header
      name: Orchard-Identity-Id
