openapi: 3.0.1
info:
  title: MasCommunications API
  description: I am MasCommunications API. My intention is to provide the necessary
    functionality to allow the management and sending of multi-channel and multi-language
    communications to the organization customers
  contact:
    name: MasCommunications Squad
    email: cuco@masmovil.com
  version: "2.25"
servers:
- url: https://communications.masstack.com/v2
  description: Production
  variables: {}
- url: https://communications.sta.masstack.com/v2
  description: Staging
  variables: {}
tags:
- name: CMS
  description: A CMS resource represents the management of content for various communication
    channels
- name: Communications
  description: Communications Blacklist defines the endpoint to delete entries from
    the blacklist
- name: Short URLs
  description: This resource describes the shortened links and the metadata associated
    to them
- name: Communication Types
  description: "Communication types define the available communications catalog in\
    \ the product in terms of the purpose of the communication and regardless the\
    \ different templates implementations (depending on channel, language or organization)\
    \ that can exist for that type"
- name: Examples
  description: "An example resource represents the expected communication data given\
    \ a template (defined by its type, organization, language and channel) and some\
    \ specific input arguments"
- name: Templates
  description: "A template resource represents the specific implementation of a template\
    \ for a given communication type, organization, language and channel"
- name: Communication Types Beta
  description: "Communication types define the available communications catalog in\
    \ the product in terms of the purpose of the communication and regardless the\
    \ different templates implementations (depending on channel, language or organization)\
    \ that can exist for that type"
- name: Examples Beta
  description: "An example resource represents the expected communication data given\
    \ a template (defined by its type, organization, language and channel) and some\
    \ specific input arguments"
- name: Templates Beta
  description: "A template resource represents the specific implementation of a template\
    \ for a given communication type, organization, language and channel"
paths:
  /orgs/{org}/cms/managedFolders:
    post:
      tags:
      - CMS
      summary: Create Managed Folder
      description: Creates a new managed folder in a specific bucket for a given organization.
      operationId: POST-orgs/:org/cms/managedFolders
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Managed Folder creation values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ManagedFolderRequestDto'
            example:
              folderPath: check/
              user: John_doe@example.com
        required: true
      responses:
        "201":
          description: Managed folder successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedFolderResponse'
              example:
                commit: v2.0.0
                data:
                  id: mas-comms-cms-yoigo/check/
                  name: check/
                  bucket: mas-comms-cms-yoigo
                  metadata:
                    user: John_doe@example.com
                  createTime: 2024-08-08T07:14:49.262Z
                  updateTime: 2024-08-08T07:14:49.262Z
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] Error creating a managed folder"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    delete:
      tags:
      - CMS
      summary: Delete Managed Folder
      description: Deletes a folder for CMS
      operationId: DELETE-orgs/:org/cms/managedFolders
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: user
        in: query
        description: User
        required: true
        schema:
          type: string
        example: John_doe@example.com
      - name: name
        in: query
        description: Folder Name
        required: true
        schema:
          type: string
        example: folderName
      responses:
        "200":
          description: Folder deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ManagedFolderResponse'
              example:
                commit: v2.0.0
                data:
                  bucket: comms-cms-dev
                  name: testDelete
                  metadata:
                    user: John_doe@example.com
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-06T12:33:51.087Z
        "400":
          description: User is not the owner hence not allowed to delete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] User is not the folder owner"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Folder created within 24 hours
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] Folder created within 24 hours"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/cms/object:
    get:
      tags:
      - CMS
      summary: Get Object
      description: Retrieves a CMS object based on the provided object name.
      operationId: GET-orgs/:org/cms/object
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: objectName
        in: query
        description: Name of the CMS object to retrieve
        required: true
        schema:
          type: string
        example: tenant/logos/logo.png
      responses:
        "200":
          description: Successfully retrieved the CMS object
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponse'
              example:
                commit: v2.0.0
                data:
                  id: bucket/logos/image.png/1716975751629429
                  selfLink: logo
                  bucket: bucket-test
                  name: logos/image.png
                  size: "0"
                  generation: "1716975751629429"
                  metageneration: "1"
                  timeCreated: "1716975751630"
                  updated: "1716975751630"
                  metadata:
                    user: John_doe@example.com
                  mediaLink: media
        "404":
          description: Object not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] Object is not found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] Internal Server Error"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    put:
      tags:
      - CMS
      summary: Update Object
      description: Updates an existing CMS object based on the provided object name
        and user information.
      operationId: PUT-orgs/:org/cms/object
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Update the CMS object values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateObjectRequestDto'
            example:
              updatedObjectName: B_testTes.png
              sourceObjectName: image.png
              user: John_doe@example.com
        required: true
      responses:
        "200":
          description: CMS object successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponse'
              example:
                commit: v2.0.0
                data:
                  id: bucket/logos/image.png/1716975751629429
                  selfLink: logo
                  bucket: bucket-test
                  name: logos/image.png
                  size: "0"
                  generation: "1716975751629429"
                  metageneration: "1"
                  timeCreated: "1716975751630"
                  updated: "1716975751630"
                  metadata:
                    user: John_doe@example.com
                  mediaLink: media
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] Error updating the object"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    post:
      tags:
      - CMS
      summary: Create Object
      description: "Creates a new object inside a specific bucket (and inside a specific\
        \ folder if required), based on Cloud Storage buckets inside the Google Cloud\
        \ project. This service can only be called by MasCommunications administration\
        \ service accounts"
      operationId: POST-orgs/:org/cms/object
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: CMS values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ResourceObjectRequestDto'
            example:
              user: John_doe@example.com
              objectName: test.png
              fileContent: UmVzZXQgeW91ciBwYXNzd29yZA==
        required: true
      responses:
        "201":
          description: CMS object successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponse'
              example:
                commit: v2.0.0
                data:
                  id: bucket/logos/image.png/1716975751629429
                  selfLink: logo
                  bucket: bucket-test
                  name: logos/image.png
                  size: "0"
                  generation: "1716975751629429"
                  metageneration: "1"
                  timeCreated: "1716975751630"
                  updated: "1716975751630"
                  metadata:
                    user: John_doe@example.com
                  mediaLink: media
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] A resource with the same name already exist"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    delete:
      tags:
      - CMS
      summary: Delete Object
      description: Delete Object for CMS
      operationId: DELETE-orgs/:org/cms/object
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: objectName
        in: query
        description: Name of the CMS object to retrieve
        required: true
        schema:
          type: string
        example: tenant/logos/logo.png
      - name: user
        in: query
        description: User
        required: true
        schema:
          type: string
        example: John_doe@example.com
      responses:
        "200":
          description: Object deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ObjectResponse'
              example:
                commit: v2.0.0
                data:
                  id: bucket/logos/image.png/1716975751629429
                  selfLink: logo
                  bucket: bucket-test
                  name: logos/image.png
                  size: "0"
                  generation: "1716975751629429"
                  metageneration: "1"
                  timeCreated: "1716975751630"
                  updated: "1716975751630"
                  metadata:
                    user: John_doe@example.com
                  mediaLink: media
        "500":
          description: Object created within 24 hours
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] Object created within 24 hours"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "400":
          description: User is not the owner hence not allowed to delete
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] User is not the object owner"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/cms/contentTree:
    get:
      tags:
      - CMS
      summary: Get Content Tree
      description: Retrieves the content tree for the CMS.
      operationId: GET-orgs/:org/cms/contentTree
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      responses:
        "200":
          description: Successfully retrieved the CMS content tree
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContentTreeResponse'
              example:
                commit: N/A
                data:
                  name: mas-comms-cms-yoigo
                  creationDate: 2024-10-17T14:08:51.530Z
                  treeList:
                  - name: E2ETesting/E2E.png
                    publicUrl: https://url/download/storage/v1/b/image.png
                    type: image/png
                    creationDate: 2024-10-17T14:08:51.531Z
                    updatedDate: 2024-10-17T14:08:51.531Z
                    metadata:
                      user: John_doe@example.com
        "500":
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_3XX
                  title: CMS_X_X_X
                  details: "[CMS] Internal Server Error"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /blacklist:
    get:
      tags:
      - Communications
      summary: Search entries in blacklist
      description: Search entries in the communications blacklist
      operationId: GET-blacklist
      parameters:
      - name: type
        in: query
        description: Type of blacklist entry to filter
        schema:
          type: string
        example: email
      - name: countryCode
        in: query
        description: Country code to filter phone blacklist entries
        schema:
          type: string
        example: ES
      - name: search
        in: query
        description: Search term to filter blacklist entries
        schema:
          type: string
        example: user@example.com
      responses:
        "200":
          description: Blacklist entries retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlacklistResponse'
              examples:
                Successful Response without filters:
                  description: Successful Response without filters
                  value:
                    commit: N/A
                    data:
                      items:
                      - id: c17a2a8e-452e-4ec2-a1db-e426e42634ae
                        type: PHONE
                        value: "946625112"
                        countryCode: +34
                        reason: User unsubscribed via marketing campaign.
                        date: 2025-11-20T12:02:34.800019Z
                      - id: e085960c-0e78-4add-863c-f79ce6d7b565
                        type: EMAIL
                        value: example@example.com
                        reason: User unsubscribed via marketing campaign.
                        date: 2025-11-20T11:16:09.062901Z
                      limit: 2
                      offset: 0
                      total: 34
                Successful Response with filters:
                  description: Successful Response with filters
                  value:
                    commit: N/A
                    data:
                      type: phone
                      value: "9466"
                      countryCode: +34
                      items:
                      - id: c17a2a8e-452e-4ec2-a1db-e426e42634ae
                        type: PHONE
                        value: "946625112"
                        countryCode: +34
                        reason: User unsubscribed via marketing campaign.
                        date: 2025-11-20T12:02:34.800019Z
                      limit: 1
                      offset: 0
                      total: 14
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              examples:
                Invalid Query Parameter:
                  description: Invalid Query Parameter
                  value:
                    errors:
                    - code: COMMS_016
                      title: QUERY_PARAM_NOT_SUPPORTED
                      details: "[BLACKLIST] Parameter 'searcha' not supported for\
                        \ queries"
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_006
                  title: INTERNAL_SERVER_ERROR
                  details: "[BLACKLIST] Internal Server Error: Some persistence error\
                    \ occurred"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
    post:
      tags:
      - Communications
      summary: Add entry to blacklist
      description: Adds a new entry to the communications blacklist
      operationId: POST-blacklist
      requestBody:
        description: Blacklist entry to add
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlacklistEntryRequestDto'
            examples:
              Email blacklist entry:
                description: Email blacklist entry
                value:
                  type: EmaiL
                  value: user@example.com
                  reason: User unsubscribed via marketing campaign.
              Phone blacklist entry:
                description: Phone blacklist entry
                value:
                  type: pHoNe
                  value: "946625112"
                  countryCode: +34
                  reason: User unsubscribed via marketing campaign.
        required: true
      responses:
        "201":
          description: Blacklist entry created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlacklistEntryResponse'
              examples:
                Email blacklist entry:
                  description: Email blacklist entry
                  value:
                    commit: N/A
                    data:
                      id: f878ebbf-a710-4f75-a211-ebe681530ca5
                      type: EMAIL
                      value: user@example.com
                      reason: User unsubscribed via marketing campaign.
                Phone blacklist entry:
                  description: Phone blacklist entry
                  value:
                    commit: N/A
                    data:
                      id: ea195c84-c8fc-4a30-bfbf-90fac977c671
                      type: PHONE
                      value: "946621009"
                      countryCode: +34
                      reason: User unsubscribed via marketing campaign.
        "200":
          description: Blacklist entry already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BlacklistEntryResponse'
              examples:
                Phone blacklist entry:
                  description: Phone blacklist entry
                  value:
                    commit: N/A
                    data:
                      id: 382ba66d-a6fb-4155-b53d-a7605b5d3bb3
                      type: PHONE
                      value: "946621007"
                      countryCode: +34
                      reason: User unsubscribed via marketing campaign.
                Email blacklist entry:
                  description: Email blacklist entry
                  value:
                    commit: N/A
                    data:
                      id: 073beda6-e924-419d-93fb-e51f0e05ba8e
                      type: EMAIL
                      value: example@example.com
                      reason: User unsubscribed via marketing campaign.
        "400":
          description: Bad Request - Invalid or missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              examples:
                Missing type field:
                  description: Missing type field
                  value:
                    errors:
                    - code: COMMS_237
                      title: BLACKLIST_TYPE_MANDATORY
                      details: "[BLACKLIST] The type field is mandatory"
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
                Missing value field:
                  description: Missing value field
                  value:
                    errors:
                    - code: COMMS_238
                      title: BLACKLIST_VALUE_MANDATORY
                      details: "[BLACKLIST] The value field is mandatory"
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
                Invalid type field:
                  description: Invalid type field
                  value:
                    errors:
                    - code: COMMS_239
                      title: BLACKLIST_INVALID_TYPE
                      details: "[BLACKLIST] The type provided is not valid"
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
                Invalid email format:
                  description: Invalid email format
                  value:
                    errors:
                    - code: COMMS_243
                      title: BLACKLIST_INVALID_EMAIL_FORMAT
                      details: "[BLACKLIST] Invalid email format"
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
                Invalid phone format:
                  description: Invalid phone format
                  value:
                    errors:
                    - code: COMMS_244
                      title: BLACKLIST_INVALID_PHONE_FORMAT
                      details: "[BLACKLIST] Invalid phone format"
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
    delete:
      tags:
      - Communications
      summary: Delete a blacklist entry
      description: "Removes an entry from the blacklist (e.g., if a user re-subscribes).\
        \ The entry is identified by its type and value. If the entry does not exist,\
        \ a 404 error is returned."
      operationId: DELETE-blacklist-entry
      requestBody:
        description: Blacklist entry details to delete
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BlacklistEntryRequestDto'
            examples:
              Email blacklist entry:
                description: Email blacklist entry
                value:
                  type: email
                  value: user@example.com
                  reason: User unsubscribed via marketing campaign.
        required: true
      responses:
        "204":
          description: Blacklist entry deleted successfully (No Content)
        "400":
          description: Bad Request - Invalid or missing required fields
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              examples:
                Missing type field:
                  description: Missing type field
                  value:
                    errors:
                    - code: COMMS_237
                      title: BLACKLIST_TYPE_MANDATORY
                      detail: "[blacklist-service] The type field is mandatory"
                      status: 400
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
                Missing value field:
                  description: Missing value field
                  value:
                    errors:
                    - code: COMMS_238
                      title: BLACKLIST_VALUE_MANDATORY
                      detail: "[blacklist-service] The value field is mandatory"
                      status: 400
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
                Invalid JSON:
                  description: Invalid JSON
                  value:
                    errors:
                    - code: COMMS_011
                      title: MALFORMED_JSON
                      detail: "[blacklist-service] Client Error: Malformed JSON"
                      status: 400
                      ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Blacklist entry not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_904
                  title: BLACKLIST_ENTRY_NOT_FOUND
                  detail: "[blacklist-service] Entry not found"
                  status: 404
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_006
                  title: INTERNAL_SERVER_ERROR
                  detail: "[blacklist-service] Internal Server Error"
                  status: 500
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/communications:
    get:
      tags:
      - Communications
      summary: Search communications
      description: "This service returns the list of sent communications for the given\
        \ filters, ordered by request time in descending order"
      operationId: GET-ALL-orgs/:org/communications
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: destinationEmail
        in: query
        description: Queried communication's email destination address
        required: true
        schema:
          type: string
        example: diego.mateos@masmovil.com
      - name: terminatingNumber
        in: query
        description: Queried communication's SMS terminating number without country
          code
        required: true
        schema:
          type: integer
          format: int64
        example: 666123123
      - name: countryCode
        in: query
        description: Queried communication's SMS country code without + symbol
        schema:
          type: integer
          format: int64
        example: 34
      - name: "requestTime[gt]"
        in: query
        description: Return requests with request time greater (later) than the one
          specified
        schema:
          type: string
        example: 2020-01-01T14:00:00+01:00
      - name: "requestTime[lt]"
        in: query
        description: Return requests with request time lower (earlier) than the one
          specified
        schema:
          type: string
        example: 2020-12-01T14:00:00+01:00
      - name: clientId
        in: query
        description: Queried communication's client id taken from audience header
        schema:
          type: string
        example: mysim-sa
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
        example: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          format: int64
        example: 0
      - name: externalId
        in: query
        description: Internal reference provided by the client system that could be
          used in later queries
        required: true
        schema:
          type: string
        example: sale-12512321
      - name: channel
        in: query
        description: Template channel
        schema:
          type: string
        example: sms
      responses:
        "200":
          description: Successful communications search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationListResponse'
              example:
                commit: v2.0.0
                data:
                  items:
                  - id: 12123434-5717-4562-b3fc-2c963f66afa6
                    type: password_reset
                    language: en
                    clientId: cuco.test-sa
                    agentId: N/A
                    requestTime: 2021-01-01T14:00:00.000000Z
                    scheduledTime: 2021-01-03T14:00:00.000000Z
                    usingDraft: false
                    sms:
                      id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      senderInfo: YOIGO
                      countryCode: "34"
                      terminatingNumber: "623196241"
                      content: "Hi Juan, enter https://password.com/reset/123456 to\
                        \ reset password"
                      realTimeRequired: true
                      updatedTime: 2021-01-01T14:00:00.000000Z
                      deliveryStatus: SUBMITTED
                      sendingType: DEFAULT
                    email:
                      id: 123e4567-e89b-12d3-a456-426655440000
                      from:
                        email: noreply@masmovil.com
                        name: Masmovil info
                      to:
                        email: recipient@masmovil.com
                        name: Masmovil
                      subject: Reset your password
                      mimeType: text/html
                      content: Hi! This is an example
                      deliveryStatus: SUBMITTED
                      updatedTime: 2021-01-01T14:00:00.000000Z
                    whatsapp:
                      id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                      terminatingNumber: "623196241"
                      updatedTime: 2021-01-01T14:00:00.000000Z
                      deliveryStatus: SUBMITTED
                      code: 202
                  - id: 557e2df4-68d7-4bc7-b62f-2b7d66397a29
                    type: one_time_password3new
                    language: ru
                    clientId: cuco.test-sa
                    agentId: N/A
                    requestTime: 2026-02-02T07:46:26.416618Z
                    scheduledTime: null
                    usingDraft: true
                    sms:
                      id: adb63e01-852c-4214-8896-1c65d04e7e96
                      senderInfo: YOIGO
                      countryCode: "34"
                      terminatingNumber: "604173330"
                      content: "Your link : yoigo.link/*******"
                      realTimeRequired: true
                      updatedTime: 2026-02-02T07:46:27.667323Z
                      deliveryStatus: REGISTERED
                      sendingType: DEFAULT
                  limit: 5
                  offset: 0
                  total: 2
                  type: null
                  clientId: cuco.test-sa
                  countryCode: "34"
                  terminatingNumber: "604173330"
                  destinationEmail: recipient@masmovil.com
        "400":
          description: Client error on request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_030\",\"title\": \"FILTER_NOT_SPECIFIED\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ At least one filter must be specified\"}]}"
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_031\",\"title\": \"FILTER_NOT_SPECIFIED\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ Database temporary unavailable\"}]}"
      security:
      - AuthnToken: []
    post:
      tags:
      - Communications
      summary: Send communication
      description: Send a communication of certain type in the specified language
        via the required channels
      operationId: POST-orgs/:org/communications
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Information needed to send a communication
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommunicationRequestDto'
            example:
              type: password_reset
              language: en
              channels:
              - sms
              - email
              - whatsapp
              smsInput:
                terminatingNumber: "623196241"
              whatsAppInput:
                terminatingNumber: "623196241"
              emailInput:
                destinationEmail: recipient@masmovil.com
                destinationName: Juan
              arguments:
                name: Juan
                subscriptions:
                - ftth
                - mobile
                - health
                resetLink: https://password.com/reset/123456
                birthDate: 2022-04-25 12:00:00
                vipClient: false
                balance: 45.7
                birthCountry: US
                attached.txt: SG9sYSBQYWJsbyA6KQo=
                embedded_image_png: iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
                qrArgument: Text to convert into QR Code
                fruitsAndColors:
                  apple: red
                  banana: yellow
                  pear: green
                pdfAttachments:
                  apple.pdf: VGhpcyBpcyBhIFBERiBjb250ZW50
                  pear.pdf: VGhpcyBpcyBhIFBERiBjb250ZW50
                usingDraft: true
        required: true
      responses:
        "202":
          description: Successfully sent communication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationResponse'
              example:
                id: 12123434-5717-4562-b3fc-2c963f66afa6
                commit: v2.0.0
                data:
                  id: 12123434-5717-4562-b3fc-2c963f66afa6
                  type: password_reset
                  language: en
                  clientId: cuco.test-sa
                  agentId: cuco.agentId@test.auth.masmovil.com
                  requestTime: 2021-01-01T14:00:00.000000Z
                  smsInput:
                    senderInfo: YOIGO
                    countryCode: "34"
                    terminatingNumber: "623196241"
                    content: "Hi Juan, enter https://password.com/reset/123456 to\
                      \ reset password"
                    realTimeRequired: true
                    scheduledTime: 2021-01-03T14:00:00.000000Z
                    updatedTime: 2021-01-01T14:00:00.000000Z
                    deliveryStatus: SUBMITTED
                    code: 202
                  email:
                    id: 123e4567-e89b-12d3-a456-426655440000
                    from:
                      email: noreply@masmovil.com
                      name: Masmovil info
                    to:
                      email: recipient@masmovil.com
                      name: Masmovil
                    subject: Reset your password
                    mimeType: text/html
                    content: <p>Welcome to MasMovil!</p>
                    deliveryStatus: SUBMITTED
                    attachments:
                    - embedded_image_png
                    - pdfFile.pdf
                    - code_qr_png
                    updatedTime: 2021-01-01T14:00:00.000000Z
                    code: 202
                  whatsapp:
                    id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    countryCode: "34"
                    terminatingNumber: "623196241"
                    updatedTime: 2021-01-01T14:00:00.000000Z
                    deliveryStatus: SUBMITTED
                    code: 202
        "206":
          description: "Communication sent with with some kind of failure, e.g:the\
            \ e-mail and whatsapp have been successfully sent but the SMS failed in\
            \ a multi-channel communication"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationResponse'
        "400":
          description: The response for client error when some field in the request
            is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_026\",\"title\": \"TYPE_MANDATORY\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ The type is mandatory\"}]}"
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_027\",\"title\": \"SMS_TEMPORARY_UNAVAILABLE\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ SMS service temporary unavailable\"}]}"
      security:
      - AuthnToken: []
  /orgs/{org}/communications/{communicationId}/attachments:
    get:
      tags:
      - Communications
      summary: Get communication attachments
      description: Retrieve attachments for a given communication
      operationId: GET-orgs/:org/communications/:communicationId/attachments
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: communicationId
        in: path
        description: The communication identifier
        required: true
        schema:
          type: string
        example: 57cff118-984f-473c-a6ad-5ba51baed0dd
      responses:
        "200":
          description: Successfully found attachments
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationAttachmentResponse'
              example:
                id: 12123434-5717-4562-b3fc-2c963f66afa6
                commit: v2.0.0
                data:
                  communicationId: 12123434-5717-4562-b3fc-2c963f66afa6
                  attachments:
                    document.pdf: https://example.com/files/document.pdf
                    image.png: https://example.com/files/image.png
        "404":
          description: Communication not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_004\",\"title\": \"NOT_FOUND\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ Not Found\"}]}"
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_004\",\"title\": \"NOT_FOUND\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ Error getting communication attachments\"}]}"
      security:
      - AuthnToken: []
  /qr:
    get:
      tags:
      - Communications
      summary: Get communication qr image
      description: Retrieve a qr image related to a sent communication
      operationId: GET-qr
      parameters:
      - name: qrToken
        in: query
        description: The communication encrypted data for generating QR Image
        required: true
        schema:
          type: string
        example: bqzmxvphwrtgdycsolna
      responses:
        "200":
          description: Successfully created QR code image
          content:
            image/png: {}
        "400":
          description: "Invalid, missing or expired QR token"
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_001
                  title: COMMUNICATIONS_X_X_X
                  details: "[COMMUNICATIONS] Bad request: QR code expired or malformed"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server error while retrieving image
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_006
                  title: COMMUNICATIONS_X_X_X
                  details: "[COMMUNICATIONS] Internal Server Error: Error retrieving\
                    \ image"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/communications/{communicationId}:
    get:
      tags:
      - Communications
      summary: Get communication
      description: Get latest info of a sent communication
      operationId: GET-orgs/:org/communications/:communicationId
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: communicationId
        in: path
        description: The communication identifier
        required: true
        schema:
          type: string
        example: 57cff118-984f-473c-a6ad-5ba51baed0dd
      responses:
        "200":
          description: Successfully found communication
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationResponse'
              example:
                id: 12123434-5717-4562-b3fc-2c963f66afa6
                commit: v2.0.0
                data:
                  id: 12123434-5717-4562-b3fc-2c963f66afa6
                  type: password_reset
                  language: en
                  clientId: cuco.test-sa
                  agentId: cuco.agentId@test.auth.masmovil.com
                  requestTime: 2021-01-01T14:00:00.000000Z
                  scheduledTime: 2021-01-03T14:00:00.000000Z
                  usingDraft: false
                  sms:
                    id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    senderInfo: YOIGO
                    countryCode: "34"
                    terminatingNumber: "623196241"
                    content: "Hi Juan, enter https://password.com/reset/123456 to\
                      \ reset password"
                    realTimeRequired: true
                    updatedTime: 2021-01-01T14:00:00.000000Z
                    deliveryStatus: SUBMITTED
                    sendingType: DEFAULT
                  email:
                    id: 123e4567-e89b-12d3-a456-426655440000
                    from:
                      email: noreply@masmovil.com
                      name: Masmovil info
                    to:
                      email: recipient@masmovil.com
                      name: Masmovil
                    subject: Reset your password
                    mimeType: text/html
                    content: Hi! This is an example
                    deliveryStatus: SUBMITTED
                    updatedTime: 2021-01-01T14:00:00.000000Z
                  whatsapp:
                    id: 3fa85f64-5717-4562-b3fc-2c963f66afa6
                    terminatingNumber: "623196241"
                    updatedTime: 2021-01-01T14:00:00.000000Z
                    deliveryStatus: SUBMITTED
                    code: 202
        "404":
          description: Sent communication not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_004\",\"title\": \"NOT_FOUND\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ Not Found\"}]}"
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_006\",\"title\": \"INTERNAL_SERVER_ERROR\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ Internal Server Error: Error getting communication SMS\"}]}"
      security:
      - AuthnToken: []
  /validate/fixed:
    post:
      tags:
      - Communications
      summary: Validate fixed phone number
      description: Validates if the fixed number is correct
      operationId: POST-validate/fixed
      requestBody:
        description: Phone number to validate
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FixedPhoneNumberValidationRequestDto'
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FixedPhoneNumberValidationResponse'
              example:
                commit: N/A
                data:
                  message: The phone number is valid
                  valid: true
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
  /validate/mobile:
    post:
      tags:
      - Communications
      summary: Validate mobile phone number
      description: Validates if the mobile number is correct
      operationId: POST-validate/mobile
      requestBody:
        description: Phone number to validate
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MobilePhoneNumberValidationRequestDto'
        required: true
      responses:
        "200":
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MobilePhoneNumberValidationResponse'
              example:
                commit: N/A
                data:
                  message: The phone number is not valid
                  valid: false
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
  /orgs/{org}/communications/preview:
    post:
      tags:
      - Communications
      summary: Preview a communication
      description: Preview a communication of certain type in the specified language
        for provided channels
      operationId: POST-orgs/:org/communications/preview
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Information needed to preview a communication
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommunicationRequestDto'
            example:
              type: password_reset
              language: en
              channels:
              - sms
              - email
              - whatsapp
              arguments:
                name: Juan
                subscriptions:
                - ftth
                - mobile
                - health
                resetLink: https://password.com/reset/123456
                birthDate: 2022-04-25 12:00:00
                vipClient: false
                balance: 45.7
                birthCountry: US
                attached.txt: SG9sYSBQYWJsbyA6KQo=
                embedded_image_png: iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
                qrArgument: Text to convert into QR Code
                fruitsAndColors:
                  apple: red
                  banana: yellow
                  pear: green
                usingDraft: true
        required: true
      responses:
        "200":
          description: Communication previewed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationPreviewResponse'
              example: "{\n  \"commit\": \"v2.0.0\",\n  \"data\": {\n    \"type\"\
                : \"password_reset\",\n    \"language\": \"en\",\n    \"sms\": {\n\
                \      \"senderInfo\": \"YOIGO\",\n      \"content\": \"Hi Juan, enter\
                \ https://password.com/reset/123456 to reset password\",\n      \"\
                realTimeRequired\": true\n    },\n    \"whatsapp\": {\n      \"content\"\
                : \"YOIGO_PASSWORD_RESET_EN\",\n    },\n    \"email\": {\n      \"\
                from\": {\n        \"email\": \"noreply@masmovil.com\",\n        \"\
                name\": \"Masmovil info\"\n      },\n      \"subject\": \"Reset your\
                \ password\",\n      \"mimeType\": \"text/html\",\n      \"content\"\
                : \"<p>Welcome to MasMovil!</p>\"\n    }\n  }\n}"
        "206":
          description: The request could be successfully processed but some alteration
            in the process
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationPreviewResponse'
              example:
                commit: v2.0.0
                data:
                  type: password_reset
                  language: en
                  warning: Accepted replacing language
                  email:
                    from:
                      email: noreply@masmovil.com
                      name: Masmovil info
                    subject: Reset your password
                    mimeType: text/html
                    content: <p>Welcome to MasMovil!</p>
        "400":
          description: The response for client error when some field in the request
            is missing or invalid
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_026\",\"title\": \"TYPE_MANDATORY\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ The type is mandatory\"}]}"
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example: "{\"errors\":\"[{\"code\":\"COMMS_026\",\"title\": \"TEMPORARY_UNAVAILABLE\"\
                ,\"ref\": \"http://ref.link.com/\",\"details\":\"[COMMUNICATIONS]\
                \ Service temporary unavailable\"}]}"
      security:
      - AuthnToken: []
  /orgs/{org}/short-urls:
    get:
      tags:
      - Short URLs
      summary: Search Short URLs
      description: Returns the list of registered URLs with provided filters
      operationId: GET_ALL-orgs/:org/short-urls
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: customSuffix
        in: query
        description: Filter for customSuffixed Short-URL
        schema:
          type: boolean
        example: true
      - name: longUrl
        in: query
        description: Filter for long URL shortened
        schema:
          type: string
        example: https://masmovil.com/
      - name: updatedAgent
        in: query
        description: Filter for last updated agentId
        schema:
          type: string
        example: loli@cuco.com
      - name: "updatedTime[eq]"
        in: query
        description: Filter for last updated timestamp (equals)
        schema:
          type: string
        example: 2023-02-10T09:03:52.765073Z
      - name: "updatedTime[gt]"
        in: query
        description: Filter for last updated timestamp (greater/later than)
        schema:
          type: string
        example: 2023-02-10T09:03:52.765073Z
      - name: "updatedTime[gte]"
        in: query
        description: Filter for last updated timestamp (greater/later than or equal
          to)
        schema:
          type: string
        example: 2023-02-10T09:03:52.765073Z
      - name: "updatedTime[lt]"
        in: query
        description: Filter for last updated timestamp (less/sooner than)
        schema:
          type: string
        example: 2023-02-10T09:03:52.765073Z
      - name: "updatedTime[lte]"
        in: query
        description: Filter for last updated timestamp (less/sooner than or equal
          to)
        schema:
          type: string
        example: 2023-02-10T09:03:52.765073Z
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
        example: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          format: int64
        example: 0
      responses:
        "200":
          description: Successful URL search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortUrlResponse'
              example:
                commit: v2.0.0
                data:
                  items:
                  - id: masmovil.link/rvdlGnk
                    longUrl: https://www.masmovil.es/ayuda-clientes/e-sim
                    link: https://masmovil.link/rvdlGnk
                    createdTime: 2023-02-10T09:03:52.765073Z
                    updatedTime: 2023-02-10T09:03:52.765073Z
                    createdClientId: cuco.test-sa
                    createdAgentId: N/A
                    updatedClientId: cuco.test-sa
                    updatedAgentId: N/A
                    customSuffix: false
                  longUrl: null
                  customSuffix: null
                  updatedAgent: null
                  limit: 50
                  offset: 0
        "400":
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_600
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL] Parameter 'ABC' not supported for queries"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_601
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL] URL Shortening service not available"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    post:
      tags:
      - Short URLs
      summary: Shorten URL
      description: A shortened URL is returned for the provided long URL
      operationId: POST-orgs/:org/short-urls
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Long URL to be shortened
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateShortUrlRequestDto'
            example:
              longUrl: https://google.es
              customSuffix: googleWeb
        required: true
      responses:
        "200":
          description: Already shortened URL
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortUrlResponse'
              example:
                commit: N/A
                id: masmovil.link/tAQWFwn
                data:
                  id: masmovil.link/tAQWFwn
                  longUrl: http://llamaya.com
                  link: https://masmovil.link/tAQWFwn
                  createdTime: 2022-08-05T10:16:14.925156Z
                  updatedTime: 2022-08-05T10:16:14.925156Z
                  createdClientId: cuco.test-sa
                  createdAgentId: N/A
                  updatedClientId: cuco.test-sa
                  updatedAgentId: N/A
                  customSuffix: false
        "201":
          description: Successful URL shortening
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortUrlResponse'
              example:
                commit: N/A
                id: masmovil.link/zrk9tee
                data:
                  id: masmovil.link/zrk9tee
                  longUrl: http://llamaya.com
                  link: https://masmovil.link/zrk9tee
                  createdClientId: cuco.test-sa
                  createdAgentId: N/A
                  updatedClientId: cuco.test-sa
                  updatedAgentId: N/A
                  createdTime: 2022-07-15T11:49:31.170960Z
                  updatedTime: 2022-07-15T11:49:31.170960Z
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_600
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL] Invalid URL provided"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_601
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL] URL Shortening service not available"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/short-urls/{linkDomain}/{linkSuffix}:
    get:
      tags:
      - Short URLs
      summary: Get Short URL
      description: Returns the persisted URL with the provided ID
      operationId: GET-orgs/:org/short-urls/:linkDomain/:linkSuffix
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: linkDomain
        in: path
        description: Domain of link
        required: true
        schema:
          type: string
        example: masstack.link
      - name: linkSuffix
        in: path
        description: Suffix of link
        required: true
        schema:
          type: string
        example: 1234567
      responses:
        "200":
          description: Successful URL search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortUrlResponse'
              example:
                commit: N/A
                id: masmovil.link/zrk9tee
                data:
                  id: masmovil.link/zrk9tee
                  longUrl: http://llamaya.com
                  link: https://masmovil.link/zrk9tee
                  createdClientId: cuco.test-sa
                  createdAgentId: N/A
                  updatedClientId: mas-comms.test-sa
                  updatedAgentId: N/A
                  createdTime: 2022-07-15T11:49:31.170960Z
                  updatedTime: 2022-07-15T11:49:31.170960Z
                  customSuffix: false
        "404":
          description: URL not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_600
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL]  The requested URL was not found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_601
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL] URL Shortening service not available"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    put:
      tags:
      - Short URLs
      summary: Update URL
      description: An updated short link is returned for the provided ID with requested
        long URL
      operationId: PUT-orgs/:org/short-urls/:linkDomain/:linkSuffix
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: linkDomain
        in: path
        description: Domain of link
        required: true
        schema:
          type: string
        example: masstack.link
      - name: linkSuffix
        in: path
        description: Suffix of link
        required: true
        schema:
          type: string
        example: 1234567
      requestBody:
        description: Long URL to update current one
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateShortUrlRequestDto'
            example:
              longUrl: https://google.es
        required: true
      responses:
        "200":
          description: Successful URL update
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShortUrlResponse'
              example:
                commit: N/A
                id: masmovil.link/rvdlGnk
                data:
                  id: masmovil.link/rvdlGnk
                  longUrl: https://yoigo.com
                  link: https://masmovil.link/rvdlGnk
                  createdTime: 2023-02-10T09:03:52.765073Z
                  updatedTime: 2023-02-10T09:10:55.619669Z
                  createdClientId: cuco.test-sa
                  createdAgentId: N/A
                  updatedClientId: cuco.test-sa
                  updatedAgentId: N/A
                  customSuffix: false
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_600
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL] Invalid URL provided"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: URL not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_601
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL] The requested URL was not found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_602
                  title: SHORT_URL_X_X_X
                  details: "[SHORT_URL] URL Shortening service not available"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /types/{typeCode}:
    get:
      tags:
      - Communication Types
      summary: Get communication type
      description: Get info of a communication type according to its code
      operationId: GET-types/:typeCode
      parameters:
      - name: typeCode
        in: path
        description: The communication type code
        required: true
        schema:
          type: string
        example: password_reset
      responses:
        "202":
          description: Found communication type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeResponse'
              example:
                commit: v2.0.0
                data:
                  code: password_reset
                  description: Provides the user a link to reset his password
                  realTimeRequired: true
                  deliveryWindows: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-09T08:22:35.000Z
                  arguments:
                    name: String
                    resetLink: Link
        "404":
          description: Communication type not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    put:
      tags:
      - Communication Types
      summary: Update communication type
      description: This service allows the modification of communication type's fields
        and add new arguments
      operationId: PUT-types/:typeCode
      parameters:
      - name: typeCode
        in: path
        description: The communication type code
        required: true
        schema:
          type: string
        example: password_reset
      requestBody:
        description: Communication type values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommunicationTypeRequestDto'
        required: true
      responses:
        "200":
          description: Communication type successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeResponse'
              example:
                commit: v2.0.0
                id: 123
                data:
                  id: 123
                  code: password_reset
                  description: Provides the user a link to reset his password
                  realTimeRequired: true
                  deliveryWindow: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-09T08:22:35.000Z
                  arguments:
                    name: String
                    resetLink: Link
                    birthCountry: LocaleRegion
                    attached.pdf: Attachment
                    image_png: EmbeddedImage
                    qrCodeImage: QrInfo
        "400":
          description: Client error in the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Unrecognized object to modify"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    delete:
      tags:
      - Communication Types
      summary: Delete communication type
      description: Deletes the communication type according to its code
      operationId: DELETE-types/:typeCode
      parameters:
      - name: typeCode
        in: path
        description: The communication type code
        required: true
        schema:
          type: string
        example: password_reset
      responses:
        "200":
          description: Communication type deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeResponse'
              example:
                commit: v2.0.0
                data:
                  code: password_reset
                  description: Provides the user a link to reset his password
                  realTimeRequired: true
                  sendingType: DEFAULT
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-06T12:33:51.087Z
                  arguments:
                    name: String
                    resetLink: Link
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Communication type still in use"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Communication type not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /types:
    get:
      tags:
      - Communication Types
      summary: Get all communication types
      description: Get all communication types in mas-comms database
      operationId: GET-types
      parameters:
      - name: type
        in: query
        description: "Communication type. Allows EQ (type=password_reset), IN (type[in]=password_reset,portability_ok),\
          \ and CONTAINS(type[contains]=reset) operations"
        schema:
          type: string
        example: password_reset
      - name: description
        in: query
        description: "Description for communication type. Allows CONTAINS (description[contains]=password)\
          \ operation"
        schema:
          type: string
        example: password
      - name: realTimeRequired
        in: query
        description: Realtime sending of communication type. Allows EQ (realTimeRequired=true)
          operation
        schema:
          type: boolean
        example: true
      - name: deliveryWindow
        in: query
        description: "Delivery window of communication type. Allows EQ (deliveryWindow=ANYDAY_ANYTIME),\
          \ and IN (delivery_window[in]=ANYDAY_ANYTIME,ANYDAY_8AM8PM) operations"
        schema:
          type: string
        example: ANYDAY_ANYTIME
      - name: sendingType
        in: query
        description: Sending provider for communication type. Allows EQ (sendingType=DEFAULT)
          operation
        schema:
          type: string
        example: DEFAULT
      - name: argument
        in: query
        description: "Argument present in communication type. Allows EQ (argument=name),\
          \ and CONTAINS (argument[contains]=nam) operations"
        schema:
          type: string
        example: name
      - name: sensitive
        in: query
        description: Sensitive argument present in communication type. Allows EQ (sensitive=true)
          operations
        schema:
          type: string
        example: true
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
        example: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          format: int64
        example: 0
      responses:
        "202":
          description: Requested types
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeListResponseDto'
              example:
                commit: N/A
                items:
                - code: test
                  description: Test
                  realTimeRequired: true
                  deliveryWindow: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  arguments: {}
                  createdTime: 2022-06-20T08:13:53.614826Z
                  updatedTime: 2022-06-20T08:13:53.614826Z
                  newArguments: {}
                - code: password_recovery
                  description: Communication to retrieve lost password
                  realTimeRequired: true
                  deliveryWindow: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  arguments: {}
                  createdTime: 2022-06-20T08:17:29.435355Z
                  updatedTime: 2022-06-20T08:17:29.435355Z
                  newArguments: {}
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    post:
      tags:
      - Communication Types
      summary: Create communication type
      description: This service allows the creation of new communication types to
        be used in any organization.This service can be call only by MasCommunications
        administration service accounts
      operationId: POST-types
      requestBody:
        description: Communication type values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommunicationTypeRequestDto'
        required: true
      responses:
        "202":
          description: Communication type successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeResponse'
              example:
                commit: v2.0.0
                data:
                  id: 123
                  code: password_reset
                  description: Provides the user a link to reset his password
                  realTimeRequired: true
                  deliveryWindows: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-06T12:33:51.087Z
                  arguments:
                    name: String
                    resetLink: Link
                    birthCountry: LocaleRegion
                    attached.pdf: Attachment
                    image_png: EmbeddedImage
                    qrCodeImage: QrInfo
        "400":
          description: Client error in the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] The code is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/examples/{exampleId}:
    get:
      tags:
      - Examples
      summary: Get example
      description: Get an example by its Id
      operationId: GET-orgs/:org/examples/:exampleId
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: exampleId
        in: path
        description: The example Id
        required: true
        schema:
          type: string
        example: c8036149-f8e4-442e-8e98-90fd3a6ec352
      responses:
        "202":
          description: Example found and returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleResponse'
        "404":
          description: Example not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    put:
      tags:
      - Examples
      summary: Update example
      description: Updates an existing example
      operationId: PUT-orgs/:org/examples/:exampleId
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: exampleId
        in: path
        description: The example Id
        required: true
        schema:
          type: string
        example: c8036149-f8e4-442e-8e98-90fd3a6ec352
      requestBody:
        description: Request body to create an example in JSON format
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExampleRequestDto'
        required: true
      responses:
        "200":
          description: Communication example successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleResponse'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Subject max length exceeded"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Templates service temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    delete:
      tags:
      - Examples
      summary: Delete example
      description: Deletes an example by its ID
      operationId: DELETE-orgs/:org/examples/:exampleId
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: exampleId
        in: path
        description: The example Id
        required: true
        schema:
          type: string
        example: c8036149-f8e4-442e-8e98-90fd3a6ec352
      responses:
        "200":
          description: Deleted example
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleResponse'
        "404":
          description: Example not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/examples:
    get:
      tags:
      - Examples
      summary: Search examples
      description: This service returns the list of communication examples for the
        given filters
      operationId: GET-ALLorgs/:org/examples
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: type
        in: query
        description: "Communication type. Allows EQ (type=password_reset), and CONTAINS\
          \ (type[contains]=password) operations"
        schema:
          type: string
        example: password_reset
      - name: language
        in: query
        description: Template language
        schema:
          type: string
        example: en
      - name: channel
        in: query
        description: Template channel
        schema:
          type: string
        example: sms
      - name: description
        in: query
        description: "Example description. Allows EQ (description=Shipping in transit),\
          \ and CONTAINS (description[contains]=shipping) operations"
        schema:
          type: string
        example: Shipping in transit
      - name: requestRef
        in: query
        description: "Example request reference. Allows EQ (requestRef=https://jira.com/CUCO-123),\
          \ and CONTAINS (requestRef[contains]=CUCO-123) operations"
        schema:
          type: string
        example: https://jira.com/CUCO-123
      - name: subject
        in: query
        description: "Email example expected subject. Allows EQ (subject=Welcome to\
          \ masmovil), and CONTAINS (subject[contains]=Welcome) operations"
        schema:
          type: string
        example: Welcome to masmovil
      - name: content
        in: query
        description: "Expected content for example. Allows EQ (content=Your portability\
          \ is done), and CONTAINS (content[contains]=portability) operations"
        schema:
          type: string
        example: Your portability is done
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
        example: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          format: int64
        example: 0
      responses:
        "202":
          description: Found examples
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleListResponse'
              example:
                commit: v2.25.0
                data:
                  items:
                  - type: test_communication_type
                    language: es
                    channel: sms
                    requestRef: CUCO-TEST
                    description: Test comm for behaviour validation
                    arguments:
                      date: 2023-06-20T08:27:56.962771Z
                      number: 3
                      boolean: true
                      stringList:
                      - value1
                      - value2
                      name: Pepe
                      link: https://masmovil.es/
                      stringMap:
                        key1: argument1
                        key2: argument2
                    expectedOutput:
                      senderInfo: Test
                      content: Hello! This is a test
                    createdTime: 2023-06-28T11:47:15.210302Z
                    updatedTime: 2023-06-28T11:47:15.210302Z
                  - type: test_communication_type
                    language: es
                    channel: email
                    requestRef: CUCO-TEST
                    description: Test comm for behaviour validation
                    arguments:
                      date: 2023-06-20T08:27:56.962771Z
                      number: 3
                      boolean: true
                      stringList:
                      - value1
                      - value2
                      name: Pepe
                      link: https://masmovil.es/
                      stringMap:
                        key1: argument1
                        key2: argument2
                    expectedOutput:
                      from:
                        email: test@cuco.com
                        name: MasMovil
                      subject: Test email communication
                    createdTime: 2023-06-28T11:51:03.956124Z
                    updatedTime: 2023-06-28T11:51:03.956124Z
                  - type: test_communication_type
                    language: es
                    channel: whatsapp
                    requestRef: CUCO-TEST
                    description: Test comm for behaviour validation
                    arguments:
                      number: 3
                      name: Pepe
                      link: https://masmovil.es/
                    expectedOutput:
                      content: "{\n                        \"handoffId\": \"MASMOVIL_TEST_COMMUNICATION_TYPE_ES\"\
                        ,\n                        \"1\": 3,\n                   \
                        \     \"2\": \"Pepe\",\n                        \"3\": \"\
                        https://masmovil.es/\"\n                    }"
                    createdTime: 2023-06-28T11:47:15.210302Z
                    updatedTime: 2023-06-28T11:47:15.210302Z
                  offset: "0"
                  limit: "50"
                  total: "3"
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_006
                  title: COMMUNICATIONS_X_X_X
                  details: "[COMMUNICATIONS] Internal Server Error: Database temporary\
                    \ unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    post:
      tags:
      - Examples
      summary: Add example
      description: "Adds a new example of a specific type, channel, language and set\
        \ of arguments. This service can only be called by MasCommunications administration\
        \ service accounts"
      operationId: POST-orgs/:org/examples
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Request body to create an example in JSON format
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExampleRequestDto'
        required: true
      responses:
        "202":
          description: Communication example successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleResponse'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] The communication type is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Templates service temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/examples/{exampleId}/validate:
    post:
      tags:
      - Examples
      summary: Validate example
      description: Validate an example against its previously loaded template
      operationId: POST-orgs/:org/examples/:exampleId/validate
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: exampleId
        in: path
        description: The example Id
        required: true
        schema:
          type: string
        example: c8036149-f8e4-442e-8e98-90fd3a6ec352
      responses:
        "200":
          description: Example validated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleValidationResponse'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Template not defined"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Example not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Not found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Templates service temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/templates:
    get:
      tags:
      - Templates
      summary: Search templates
      description: "Search templates that matches criteria (channel, type, etc...)\
        \ provided in the query"
      operationId: GET-orgs/:org/templates
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: type
        in: query
        description: "Communication type. Allows EQ (type=password_reset), and CONTAINS\
          \ (type[contains]=password) operations"
        schema:
          type: string
        example: password_reset
      - name: channel
        in: query
        description: Template channel
        schema:
          type: string
        example: sms
      - name: language
        in: query
        description: Template language
        schema:
          type: string
        example: en
      - name: subject
        in: query
        description: Subject for email templates
        schema:
          type: string
        example: Shipping in transit
      - name: content
        in: query
        description: Search template by partial content
        schema:
          type: string
        example: shipping is in transit
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
        example: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          format: int64
        example: 0
      responses:
        "200":
          description: SMS templates successful search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplatesResponseDto'
              example:
                commit: v2.0.0
                items:
                - type: password_reset
                  language: en
                  channel: sms
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-08T11:36:30.099Z
                  data:
                    senderInfo: YOIGO
                    content: "Hi [(${name})], enter [(${resetLink})] to reset password"
                - type: password_reset
                  language: en
                  channel: email
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-08T11:36:30.099Z
                  data:
                    from:
                      email: noreply@masmovil.com
                      name: Masmovil info
                    subject: Reset your password
                    mimeType: text/html
                    content: "<h1>Hi [(${name})]!</h1> <p>Enter [(${resetLink})] to\
                      \ reset your password</p>"
                - type: password_reset
                  language: en
                  channel: whatsapp
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-08T11:36:30.099Z
                  data:
                    content: "{\n           \"handoffId\": \"MASMOVIL_PASSWORD_RESET_TYPE_ES\"\
                      ,\n           \"1\": \"Hi ${name}\",\n           \"2\": \"${resetLink}\"\
                      \n        }"
                type: password_reset
                channel: sms
                limit: "20"
                offset: "0"
                total: "3"
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Missing query param 'type'"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    put:
      tags:
      - Templates
      summary: Update template
      description: "Updates the template uniquely associated with provided type, channel\
        \ and language. This service can be call only by MasCommunications administration\
        \ service accounts"
      operationId: PUT-orgs/:org/templates
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequestDto'
        required: true
      responses:
        "200":
          description: Communication template successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponseDto'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] The type is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    post:
      tags:
      - Templates
      summary: Create template
      description: "Creates a new template of a specific type, channel and language.\
        \ This service can be call only by MasCommunications administration service\
        \ accounts"
      operationId: POST-orgs/:org/templates
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequestDto'
        required: true
      responses:
        "202":
          description: Communication template successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponseDto'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] The type is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    delete:
      tags:
      - Templates
      summary: Delete template
      description: "Delete the template with type, language and channel provided in\
        \ the query"
      operationId: DELETE-orgs/:org/templates
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: type
        in: query
        description: Communication type
        required: true
        schema:
          type: string
        example: password_reset
      - name: channel
        in: query
        description: Template channel
        required: true
        schema:
          type: string
        example: sms
      - name: language
        in: query
        description: Template language
        required: true
        schema:
          type: string
        example: en
      responses:
        "200":
          description: Template successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponseDto'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Missing query param 'type'"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/templates/preview:
    post:
      tags:
      - Templates
      summary: Preview a template
      description: "Returns a preview of the template for provided type, channel,\
        \ language and given arguments"
      operationId: POST-orgs/:org/templates/preview
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequestDto'
        required: true
      responses:
        "200":
          description: Template processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponseDto'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] The type is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/templates/preview/validate:
    post:
      tags:
      - Templates
      summary: Validate template preview
      description: Validates a template preview checking against its examples
      operationId: POST-orgs/:org/templates/preview/validate
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequestDto'
        required: true
      responses:
        "202":
          description: Template validated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateValidationResponse'
              example:
                commit: v2.0.0
                type: password_reset
                language: en
                channel: sms
                pass: "true"
                report:
                - id: 44423434-5717-4562-b3fc-2c963f66afa6
                  description: Example description 1
                  pass: "true"
                - id: a4e6ab9d-ccdb-4b4d-b3c3-07a387e31eff
                  description: Example description 2
                  pass: "false"
                  errors:
                  - field: content
                    expected: "Ya puedes restaurar tu [PASS]word"
                    returned: "Ya puedes restaurar tu [pass]word"
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Validation examples missing"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /orgs/{org}/templates/validate:
    post:
      tags:
      - Templates
      summary: Validate template
      description: Validates a template against its examples
      operationId: POST-orgs/:org/templates/validate
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template filters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateValidateRequestDto'
            example:
              type: password_reset
              language: en
              channel: sms
        required: true
      responses:
        "202":
          description: Template validated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateValidationResponse'
              example:
                commit: v2.0.0
                type: password_reset
                language: en
                channel: sms
                pass: "true"
                report:
                - id: 44423434-5717-4562-b3fc-2c963f66afa6
                  description: Example description 1
                  pass: "true"
                - id: a4e6ab9d-ccdb-4b4d-b3c3-07a387e31eff
                  description: Example description 2
                  pass: "false"
                  errors:
                  - field: content
                    expected: "Ya puedes restaurar tu [PASS]word"
                    returned: "Ya puedes restaurar tu [pass]word"
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Validation examples missing"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/commit:
    post:
      tags:
      - Templates Commit Beta
      summary: Validate template
      description: Validates a template against its examples
      operationId: POST-beta/commit
      requestBody:
        description: Template commit filters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommitRequestDto'
            example:
              commitItems:
              - objectId: "2"
                objectType: sms_template
              - objectId: 1cd1d6c9-3188-4f12-bb55-1aa4a157ff86
                objectType: sms_example
              - objectId: "2"
                objectType: communication_type
              deletedItems:
              - objectId: "1"
                objectType: sms_template
              - objectId: 0ab1d6c9-2166-4f12-aa55-1aa4a157ff86
                objectType: sms_example
              - objectId: "1"
                objectType: communication_type
        required: true
      responses:
        "202":
          description: Template commit successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateCommitResponseDto'
              example:
                commit: v2.0.0
                commitItems:
                - objectId: "2"
                  objectType: sms_template
                - objectId: 0cb1d6c9-2166-4f12-aa55-1aa4a157ff83
                  objectType: sms_example
                - objectId: "2"
                  objectType: communication_type
                promoteDeletedItemsToArchivedItem: []
                itemsNotCommitted: []
                deletedItemsNotCommitted: []
        "404":
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/commit/validation:
    post:
      tags:
      - Templates Commit Beta
      summary: Validate commType/template/example
      description: "Implement an API endpoint to validate modified templates and related\
        \ artifacts before deployment, with an option for targeted validation based\
        \ on specific criteria."
      operationId: POST-beta/orgs/:org/commit/validation
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Validation values not mandatory
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommitValidationRequestDTO'
      responses:
        "200":
          description: Returned a list of elements validated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommitValidationResponseDTO'
              example:
                commit: v3.2.0
                items:
                - type: fixed_ip_setup
                  typeId: 1
                  objectType: communication_type
                  changeType: stable
                  channel: sms
                  typeItems:
                  - objectId: f51efd29-c44e-4497-919b-dfddaab25f74
                    objectType: sms_example
                    language: es
                    changeType: draft
                    errors:
                    - field: null
                      expected: Template not defined
                      returned: null
                    content: "Recupera tu contraseña de acceso a tu área privada YO\
                      \ SOY MAS pinchando aquí: [(${linkVar.shorten(7)})]. Por tu\
                      \ seguridad, te recomendamos no compartir tus contraseñas con\
                      \ nadie. V5"
                    eligibleForDeployment: false
                  description: Invoice with the bill for last month
                  eligibleForDeployment: false
                - type: fixed_ip_setup_x1
                  typeId: 3
                  objectType: communication_type
                  changeType: validated
                  channel: sms
                  typeItems:
                  - objectId: "1"
                    objectType: sms_template
                    language: es
                    changeType: validated
                    content: "Your link : [(${link.shorten(20)})]"
                    eligibleForDeployment: true
                  - objectId: 918381fe-2740-4299-80ef-012f51044b62
                    objectType: sms_example
                    language: es
                    changeType: validated
                    content: "Your link : yoigo.link/randomSuffix"
                    eligibleForDeployment: true
                  description: Confirmation for activation of service without a new
                    router needed for provision of service
                  eligibleForDeployment: true
                - type: fixed_ip_setup_x1
                  typeId: 3
                  objectType: communication_type
                  changeType: validated
                  channel: email
                  typeItems:
                  - objectId: "1"
                    objectType: email_template
                    language: es
                    changeType: draft
                    errors:
                    - field: fromAddress
                      expected: "noreply[1]@yoigo.com"
                      returned: noreply@yoigo.com
                    content: UmVjdXBlcmFjacOzbiBkZSBjb250cmFzZcOxYSBbJHtsaW5rfV0=
                    eligibleForDeployment: false
                  - objectId: 0815a4c9-e7f1-4852-8d7f-31b01c85fadd
                    objectType: email_example
                    language: es
                    changeType: draft
                    errors:
                    - field: fromAddress
                      expected: "noreply[1]@yoigo.com"
                      returned: noreply@yoigo.com
                    content: Factura YOIGO noviembre 2022
                    eligibleForDeployment: false
                  - objectId: 0815a4c9-e7f1-4852-8d7f-31b01c85fadc
                    objectType: email_example
                    language: es
                    changeType: validated
                    content: Factura YOIGO noviembre 2022
                    eligibleForDeployment: true
                  - objectId: 1af12ddb-81e9-4994-b6e1-8aca474338e9
                    objectType: email_example
                    language: es
                    changeType: validated
                    content: Factura YOIGO noviembre 2023
                    eligibleForDeployment: true
                  description: Confirmation for activation of service without a new
                    router needed for provision of service
                  eligibleForDeployment: true
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                commit: v3.2.0
                error:
                  message: Provided organization 'mas' does not exist
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                commit: v3.2.0
                error:
                  message: Database temporary unavailable
      security:
      - AuthnToken: []
  /beta/types/{typeCode}:
    get:
      tags:
      - Communication Types Beta
      summary: Get communication type
      description: Get info of a communication type according to its code
      operationId: GET-beta/types/:typeCode
      parameters:
      - name: changeType
        in: query
        description: "Example changeType. Values can be 'draft', 'archived' or 'deleted'.Defaults\
          \ is stable."
        schema:
          type: string
        example: draft
      - name: typeCode
        in: path
        description: The communication type code
        required: true
        schema:
          type: string
        example: password_reset
      responses:
        "202":
          description: Found communication type
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeV2Response'
              example:
                commit: v2.0.0
                data:
                  objectId: "2"
                  objectType: communication_type
                  code: password_reset
                  description: Provides the user a link to reset his password
                  realTimeRequired: true
                  deliveryWindows: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-09T08:22:35.000Z
                  arguments:
                  - name: link
                    type: Link
                    sensitive: true
                  changeType: draft
                  version: "1.0"
        "404":
          description: Communication type not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    put:
      tags:
      - Communication Types Beta
      summary: Update communication type
      description: This service allows the modification of communication type's fields
        and add new arguments
      operationId: PUT-beta/types/:typeCode
      parameters:
      - name: typeCode
        in: path
        description: The communication type code
        required: true
        schema:
          type: string
        example: password_reset
      requestBody:
        description: Communication type values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommunicationTypeRequestDto'
        required: true
      responses:
        "200":
          description: Communication type successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeV2Response'
              example:
                commit: v2.0.0
                id: "123"
                data:
                  objectId: "123"
                  objectType: communication_type
                  code: password_reset
                  description: Provides the user a link to reset his password
                  realTimeRequired: true
                  deliveryWindow: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-09T08:22:35.000Z
                  arguments:
                  - name: link
                    type: Link
                    sensitive: true
                  - name: userEmail
                    type: String
                    sensitive: false
                  - name: request
                    type: Boolean
                    sensitive: false
                  changeType: draft
        "400":
          description: Client error in the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Unrecognized object to modify"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    delete:
      tags:
      - Communication Types Beta
      summary: Delete communication type
      description: Deletes the communication type according to its code
      operationId: DELETE-beta/types/:typeCode
      parameters:
      - name: changeType
        in: query
        description: Example changeType. Values can be 'draft'.Defaults to including
          'stable' and 'draft'.
        schema:
          type: string
        example: draft
      - name: typeCode
        in: path
        description: The communication type code
        required: true
        schema:
          type: string
        example: password_reset
      responses:
        "200":
          description: Communication type deleted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeV2Response'
              example:
                commit: v2.0.0
                data:
                  objectId: "2"
                  objectType: communication_type
                  code: password_reset
                  description: Provides the user a link to reset his password
                  realTimeRequired: true
                  sendingType: DEFAULT
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-06T12:33:51.087Z
                  arguments:
                  - name: link
                    type: Link
                    sensitive: true
                  - name: userEmail
                    type: String
                    sensitive: false
                  - name: request
                    type: Boolean
                    sensitive: false
                  changeType: draft
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Communication type still in use"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Communication type not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/types:
    get:
      tags:
      - Communication Types Beta
      summary: Get all communication types
      description: Get all communication types in mas-comms database
      operationId: GET-beta/types
      parameters:
      - name: type
        in: query
        description: "Communication type. Allows EQ (type=password_reset), IN (type[in]=password_reset,portability_ok),\
          \ and CONTAINS(type[contains]=reset) operations"
        schema:
          type: string
        example: password_reset
      - name: description
        in: query
        description: "Description for communication type. Allows CONTAINS (description[contains]=password)\
          \ operation"
        schema:
          type: string
        example: password
      - name: realTimeRequired
        in: query
        description: Realtime sending of communication type. Allows EQ (realTimeRequired=true)
          operation
        schema:
          type: boolean
        example: true
      - name: deliveryWindow
        in: query
        description: "Delivery window of communication type. Allows EQ (deliveryWindow=ANYDAY_ANYTIME),\
          \ and IN (delivery_window[in]=ANYDAY_ANYTIME,ANYDAY_8AM8PM) operations"
        schema:
          type: string
        example: ANYDAY_ANYTIME
      - name: sendingType
        in: query
        description: Sending provider for communication type. Allows EQ (sendingType=DEFAULT)
          operation
        schema:
          type: string
        example: DEFAULT
      - name: argument
        in: query
        description: "Argument present in communication type. Allows EQ (argument=name),\
          \ and CONTAINS (argument[contains]=nam) operations"
        schema:
          type: string
        example: name
      - name: sensitive
        in: query
        description: Sensitive argument present in communication type. Allows EQ (sensitive=true)
          operations
        schema:
          type: string
        example: true
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
        example: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          format: int64
        example: 0
      - name: changeType
        in: query
        description: "Communication changeType. Values can be 'draft', 'stable', 'archived'\
          \ or 'deleted'.Defaults is stable."
        schema:
          type: string
        example: stable
      responses:
        "202":
          description: Requested types
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeListResponseDto'
              example:
                commit: N/A
                items:
                - objectId: "1"
                  objectType: communication_type
                  code: test
                  description: Test
                  realTimeRequired: true
                  deliveryWindow: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  arguments: []
                  createdTime: 2022-06-20T09:13:53.614826Z
                  updatedTime: 2022-06-20T09:13:53.614826Z
                  changeType: stable
                  version: "1.1"
                - objectId: "1"
                  objectType: communication_type
                  code: test
                  description: Test
                  realTimeRequired: true
                  deliveryWindow: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  arguments: []
                  createdTime: 2022-06-20T08:13:53.614826Z
                  updatedTime: 2022-06-20T09:13:53.614826Z
                  changeType: archived
                  version: "1.0"
                - objectId: "2"
                  objectType: communication_type
                  code: password_recovery
                  description: Communication to retrieve lost password
                  realTimeRequired: true
                  deliveryWindow: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  arguments: []
                  createdTime: 2022-06-20T08:17:29.435355Z
                  updatedTime: 2022-06-20T08:17:29.435355Z
                  changeType: draft
                  version: "1.1"
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    post:
      tags:
      - Communication Types Beta
      summary: Create communication type
      description: This service allows the creation of new communication types to
        be used in any organization.This service can be call only by MasCommunications
        administration service accounts
      operationId: POST-beta/types
      requestBody:
        description: Communication type values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CommunicationTypeRequestDto'
        required: true
      responses:
        "202":
          description: Communication type successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CommunicationTypeV2Response'
              example:
                commit: v2.0.0
                data:
                  objectId: "123"
                  objectType: communication_type
                  code: password_reset
                  description: Provides the user a link to reset his password
                  realTimeRequired: true
                  deliveryWindows: ANYDAY_ANYTIME
                  sendingType: DEFAULT
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-06T12:33:51.087Z
                  arguments:
                  - name: link
                    type: Link
                    sensitive: true
                  changeType: draft
        "400":
          description: Client error in the request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] The code is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | CommType] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/examples/{exampleId}:
    get:
      tags:
      - Examples Beta
      summary: Get example
      description: Get an example by its Id
      operationId: GET-beta/orgs/:org/examples/:exampleId
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: changeType
        in: query
        description: "Example changeType. Values can be 'draft', 'stable', 'archived'\
          \ or 'deleted'Defaults is stable."
        schema:
          type: string
        example: draft
      - name: exampleId
        in: path
        description: The example Id
        required: true
        schema:
          type: string
        example: c8036149-f8e4-442e-8e98-90fd3a6ec352
      responses:
        "202":
          description: Example found and returned
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleV2Response'
        "404":
          description: Example not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    put:
      tags:
      - Examples Beta
      summary: Update example
      description: Updates an existing example
      operationId: PUT-beta/orgs/:org/examples/:exampleId
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: exampleId
        in: path
        description: The example Id
        required: true
        schema:
          type: string
        example: c8036149-f8e4-442e-8e98-90fd3a6ec352
      requestBody:
        description: Request body to create an example in JSON format
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExampleRequestDto'
        required: true
      responses:
        "200":
          description: Communication example successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleV2Response'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Subject max length exceeded"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Templates service temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    delete:
      tags:
      - Examples Beta
      summary: Delete example
      description: Deletes an example by its ID
      operationId: DELETE-beta/orgs/:org/examples/:exampleId
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: changeType
        in: query
        description: Example changeType. Values can be 'draft'.Defaults to including
          'stable' and 'draft'.
        schema:
          type: string
        example: draft
      - name: exampleId
        in: path
        description: The example Id
        required: true
        schema:
          type: string
        example: c8036149-f8e4-442e-8e98-90fd3a6ec352
      responses:
        "200":
          description: Deleted example
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleV2Response'
        "404":
          description: Example not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/examples:
    get:
      tags:
      - Examples Beta
      summary: Search examples
      description: This service returns the list of communication examples for the
        given filters
      operationId: GET-ALLbeta/orgs/:org/examples
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: type
        in: query
        description: "Communication type. Allows EQ (type=password_reset), and CONTAINS\
          \ (type[contains]=password) operations"
        schema:
          type: string
        example: password_reset
      - name: language
        in: query
        description: Template language
        schema:
          type: string
        example: en
      - name: channel
        in: query
        description: Template channel
        schema:
          type: string
        example: sms
      - name: description
        in: query
        description: "Example description. Allows EQ (description=Shipping in transit),\
          \ and CONTAINS (description[contains]=shipping) operations"
        schema:
          type: string
        example: Shipping in transit
      - name: requestRef
        in: query
        description: "Example request reference. Allows EQ (requestRef=https://jira.com/CUCO-123),\
          \ and CONTAINS (requestRef[contains]=CUCO-123) operations"
        schema:
          type: string
        example: https://jira.com/CUCO-123
      - name: subject
        in: query
        description: "Email example expected subject. Allows EQ (subject=Welcome to\
          \ masmovil), and CONTAINS (subject[contains]=Welcome) operations"
        schema:
          type: string
        example: Welcome to masmovil
      - name: content
        in: query
        description: "Expected content for example. Allows EQ (content=Your portability\
          \ is done), and CONTAINS (content[contains]=portability) operations"
        schema:
          type: string
        example: Your portability is done
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
        example: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          format: int64
        example: 0
      - name: changeType
        in: query
        description: "Example changeType. Values can be 'draft', 'stable', 'archived'\
          \ or 'deleted'.Defaults is stable."
        schema:
          type: string
        example: stable
      responses:
        "202":
          description: Found examples
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleListV2Response'
              example:
                commit: v2.25.0
                data:
                  items:
                  - objectId: ec169be3-f9e1-4927-b5dc-fe8e7f07ba0e
                    objectType: sms_example
                    id: ec169be3-f9e1-4927-b5dc-fe8e7f07ba0e
                    type: test_communication_type
                    language: es
                    channel: sms
                    requestRef: CUCO-TEST
                    description: Test comm for behaviour validation
                    arguments:
                      date: 2023-06-20T08:27:56.962771Z
                      number: 3
                      boolean: true
                      stringList:
                      - value1
                      - value2
                      name: Pepe
                      link: https://masmovil.es/
                      stringMap:
                        key1: argument1
                        key2: argument2
                    expectedOutput:
                      senderInfo: Test
                      content: Hello! This is a test
                    createdTime: 2023-06-28T12:48:15.210302Z
                    updatedTime: 2023-06-28T12:48:15.210302Z
                    changeType: draft
                    version: "1.1"
                  - objectId: ec169be3-f9e1-4927-b5dc-fe8e7f07ba0e
                    objectType: sms_example
                    id: ec169be3-f9e1-4927-b5dc-fe8e7f07ba0e
                    type: test_communication_type
                    language: es
                    channel: sms
                    requestRef: CUCO-TEST
                    description: Test comm for behaviour validation
                    arguments:
                      date: 2023-06-20T08:27:56.962771Z
                      number: 3
                      boolean: true
                      stringList:
                      - value1
                      - value2
                      name: Pepe
                      link: https://masmovil.es/
                      stringMap:
                        key1: argument1
                        key2: argument2
                    expectedOutput:
                      senderInfo: Test
                      content: Hello! This is a test!
                    createdTime: 2023-06-28T11:47:15.210302Z
                    updatedTime: 2023-06-28T11:47:15.210302Z
                    deletedTime: 2023-06-28T12:48:15.210302Z
                    changeType: deleted
                    version: "1.0"
                  - objectId: ab169ce3-f9e1-4927-b5dc-fe8e7f07ba0e
                    objectType: email_example
                    id: ab169ce3-f9e1-4927-b5dc-fe8e7f07ba0e
                    type: test_communication_type
                    language: es
                    channel: email
                    requestRef: CUCO-TEST
                    description: Test comm for behaviour validation
                    arguments:
                      date: 2023-06-20T08:27:56.962771Z
                      number: 3
                      boolean: true
                      stringList:
                      - value1
                      - value2
                      name: Pepe
                      link: https://masmovil.es/
                      stringMap:
                        key1: argument1
                        key2: argument2
                    expectedOutput:
                      from:
                        email: test@cuco.com
                        name: MasMovil
                      subject: Test email communication
                    createdTime: 2023-06-28T11:51:03.956124Z
                    updatedTime: 2023-06-28T11:51:03.956124Z
                    changeType: stable
                    version: "1.0"
                  - objectId: eq123ce3-f9e1-4927-b5dc-fe8e7f07ba0e
                    objectType: whatsapp_example
                    type: test_communication_type
                    language: es
                    channel: whatsapp
                    requestRef: CUCO-TEST
                    description: Test comm for behaviour validation
                    arguments:
                      number: 3
                      name: Pepe
                      link: https://masmovil.es/
                    expectedOutput:
                      content: "{\n                        \"handoffId\": \"MASMOVIL_TEST_COMMUNICATION_TYPE_ES\"\
                        ,\n                        \"1\": 3,\n                   \
                        \     \"2\": \"Pepe\",\n                        \"3\": \"\
                        https://masmovil.es/\"\n                    }"
                    createdTime: 2023-06-28T11:47:15.210302Z
                    updatedTime: 2023-06-28T11:47:15.210302Z
                    changeType: stable
                    version: "1.0"
                  offset: "0"
                  limit: "50"
                  total: "4"
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_006
                  title: COMMUNICATIONS_X_X_X
                  details: "[COMMUNICATIONS] Internal Server Error: Database temporary\
                    \ unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    post:
      tags:
      - Examples Beta
      summary: Add example
      description: "Adds a new example of a specific type, channel, language and set\
        \ of arguments. This service can only be called by MasCommunications administration\
        \ service accounts"
      operationId: POST-beta/orgs/:org/examples
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Request body to create an example in JSON format
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExampleRequestDto'
        required: true
      responses:
        "202":
          description: Communication example successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleV2Response'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] The communication type is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Templates service temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/examples/{exampleId}/validate:
    post:
      tags:
      - Examples Beta
      summary: Validate example
      description: Validate an example against its previously loaded template
      operationId: POST-beta/orgs/:org/examples/:exampleId/validate
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: changeType
        in: query
        description: Example changeType. Values can be 'draft'.Defaults is 'stable'.
        schema:
          type: string
        example: draft
      - name: exampleId
        in: path
        description: The example Id
        required: true
        schema:
          type: string
        example: c8036149-f8e4-442e-8e98-90fd3a6ec352
      responses:
        "200":
          description: Example validated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ExampleValidationV2Response'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Template not defined"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Example not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Not found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES | Examples] Templates service temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/templates:
    get:
      tags:
      - Templates Beta
      summary: Search templates
      description: "Search templates that matches criteria (channel, type, etc...)\
        \ provided in the query"
      operationId: GET-beta/orgs/:org/templates
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: type
        in: query
        description: "Communication type. Allows EQ (type=password_reset), and CONTAINS\
          \ (type[contains]=password) operations"
        schema:
          type: string
        example: password_reset
      - name: channel
        in: query
        description: Template channel
        schema:
          type: string
        example: sms
      - name: language
        in: query
        description: Template language
        schema:
          type: string
        example: en
      - name: subject
        in: query
        description: Subject for email templates
        schema:
          type: string
        example: Shipping in transit
      - name: content
        in: query
        description: Search template by partial content
        schema:
          type: string
        example: shipping is in transit
      - name: limit
        in: query
        description: Limit of results in the response
        schema:
          type: integer
          format: int64
        example: 20
      - name: offset
        in: query
        description: Offset applied to results for pagination
        schema:
          type: integer
          format: int64
        example: 0
      - name: changeType
        in: query
        description: "Templates changeType. Values can be 'draft', 'stable', 'archived'\
          \ or 'deleted'.Defaults is stable."
        schema:
          type: string
        example: stable
      responses:
        "200":
          description: SMS templates successful search
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplatesResponseDto'
              example:
                commit: v2.0.0
                items:
                - objectId: "1"
                  objectType: sms_template
                  type: password_reset
                  language: en
                  channel: sms
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-08T11:36:30.099Z
                  data:
                    senderInfo: YOIGO
                    content: "Hi [(${name})], enter [(${resetLink})] to reset password"
                  changeType: draft
                  version: "1.0"
                - objectId: "1"
                  objectType: email_template
                  type: password_reset
                  language: en
                  channel: email
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-08T11:36:30.099Z
                  data:
                    from:
                      email: noreply@masmovil.com
                      name: Masmovil info
                    subject: Reset your password
                    mimeType: text/html
                    content: "<h1>Hi [(${name})]!</h1> <p>Enter [(${resetLink})] to\
                      \ reset your password</p>"
                  changeType: stable
                  version: "1.0"
                - objectId: "1"
                  objectType: whatsapp_template
                  type: password_reset
                  language: en
                  channel: whatsapp
                  createdTime: 2021-02-06T12:33:51.087Z
                  updatedTime: 2021-02-08T11:36:30.099Z
                  deletedTime: 2021-02-09T13:36:30.099Z
                  data:
                    content: "{\n           \"handoffId\": \"MASMOVIL_PASSWORD_RESET_TYPE_ES\"\
                      ,\n           \"1\": \"Hi ${name}\",\n           \"2\": \"${resetLink}\"\
                      \n        }"
                  changeType: archived
                  version: "1.0"
                type: password_reset
                channel: sms
                limit: "20"
                offset: "0"
                total: "3"
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Missing query param 'type'"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    put:
      tags:
      - Templates Beta
      summary: Update template
      description: "Updates the template uniquely associated with provided type, channel\
        \ and language. This service can be call only by MasCommunications administration\
        \ service accounts"
      operationId: PUT-beta/orgs/:org/templates
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequestDto'
        required: true
      responses:
        "200":
          description: Communication template successfully updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponseDto'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] The type is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    post:
      tags:
      - Templates Beta
      summary: Create template
      description: "Creates a new template of a specific type, channel and language.\
        \ This service can be call only by MasCommunications administration service\
        \ accounts"
      operationId: POST-beta/orgs/:org/templates
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequestDto'
        required: true
      responses:
        "202":
          description: Communication template successfully created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponseDto'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] The type is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
    delete:
      tags:
      - Templates Beta
      summary: Delete template
      description: "Delete the template with type, language and channel provided in\
        \ the query"
      operationId: DELETE-beta/orgs/:org/templates
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      - name: type
        in: query
        description: Communication type
        required: true
        schema:
          type: string
        example: password_reset
      - name: channel
        in: query
        description: Template channel
        required: true
        schema:
          type: string
        example: sms
      - name: language
        in: query
        description: Template language
        required: true
        schema:
          type: string
        example: en
      - name: changeType
        in: query
        description: Example changeType. Values can be 'draft'.Defaults to including
          'stable' and 'draft'.
        schema:
          type: string
        example: draft
      responses:
        "200":
          description: Template successfully deleted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponseDto'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Missing query param 'type'"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/templates/download:
    post:
      tags:
      - Templates Beta
      summary: Download deployment package
      description: Download deployment package
      operationId: POST-beta/orgs/:org/templates/download
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Deployment selection for the export package. Allows cherry-picking
          specific objects to include in the deployment.
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateDeploymentPackageDownloadDto'
            examples:
              Deployment package selection:
                description: Deployment package selection
                value:
                  download:
                  - objectId: 4303f2af-a9cf-4020-b6f1-fb1afa110cb4
                    objectType: email_example
                  - objectId: "1"
                    objectType: email_template
                  - objectId: "1"
                    objectType: communication_type
        required: true
      responses:
        "200":
          description: Returns a JSON deployment package as an attachment.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentPackageDto'
              examples:
                Deployment package with mixed object types:
                  description: Deployment package with mixed object types
                  value:
                    items:
                    - communicationTypeCode: monthly_invoice_3
                      objectId: 4303f2af-a9cf-4020-b6f1-fb1afa110cb4
                      objectType: email_example
                      objectSnapshot:
                        id: 4303f2af-a9cf-4020-b6f1-fb1afa110cb4
                        language: es
                        subject: Factura YOIGO noviembre 2027
                    - communicationTypeCode: monthly_invoice_3
                      objectId: "1"
                      objectType: email_template
                      objectSnapshot:
                        id: 1
                        language: es
                        subject: Factura YOIGO noviembre 2025
                    - communicationTypeCode: monthly_invoice_3
                      objectId: "1"
                      objectType: communication_type
                      objectSnapshot:
                        id: 1
                        code: monthly_invoice_3
                        description: Invoice 2025 with the bill for last month
                No items found:
                  description: No items found
                  value:
                    items: []
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] deployment package missing"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: deployment package not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] deployment package Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/templates/import:
    post:
      tags:
      - Templates Beta
      summary: Import deployment package
      description: Synchronize production configuration based on a deployment package
        JSON file.
      operationId: POST-orgs/:org/templates/import
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Deployment package JSON file
        content:
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/FileUploadInputDto'
        required: true
      responses:
        "200":
          description: Deployment package imported successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/DeploymentImportResultDto'
        "400":
          description: Invalid deployment package or duplicate version
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
        "500":
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
      security:
      - AuthnToken: []
  /beta/orgs/{org}/templates/preview:
    post:
      tags:
      - Templates Beta
      summary: Preview a template
      description: "Returns a preview of the template for provided type, channel,\
        \ language and given arguments"
      operationId: POST-beta/orgs/:org/templates/preview
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequestDto'
        required: true
      responses:
        "200":
          description: Template processed successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateResponseDto'
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] The type is mandatory"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/templates/preview/validate:
    post:
      tags:
      - Templates Beta
      summary: Validate template preview
      description: Validates a template preview checking against its examples
      operationId: POST-beta/orgs/:org/templates/preview/validate
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template values
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateRequestDto'
        required: true
      responses:
        "202":
          description: Template validated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateValidationV2Response'
              example:
                commit: v2.0.0
                type: password_reset
                language: en
                channel: sms
                pass: "true"
                report:
                - pass: "true"
                  id: 44423434-5717-4562-b3fc-2c963f66afa6
                  description: Example description 1
                  changeType: draft
                - pass: "false"
                  errors:
                  - field: content
                    expected: "Ya puedes restaurar tu [PASS]word"
                    returned: "Ya puedes restaurar tu [pass]word"
                  id: a4e6ab9d-ccdb-4b4d-b3c3-07a387e31eff
                  description: Example description 2
                  changeType: draft
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Validation examples missing"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
  /beta/orgs/{org}/templates/validate:
    post:
      tags:
      - Templates Beta
      summary: Validate template
      description: Validates a template against its examples
      operationId: POST-beta/orgs/:org/templates/validate
      parameters:
      - name: org
        in: path
        description: Organization name as it is registered in Mas-Stack
        required: true
        schema:
          type: string
        example: yoigo
      requestBody:
        description: Template filters
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateValidateRequestDto'
            example:
              type: password_reset
              language: en
              channel: sms
              changeType: draft
        required: true
      responses:
        "202":
          description: Template validated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateValidationV2Response'
              example:
                commit: v2.0.0
                type: password_reset
                language: en
                channel: sms
                pass: "true"
                report:
                - pass: "true"
                  id: 44423434-5717-4562-b3fc-2c963f66afa6
                  description: Example description 1
                  changeType: draft
                - pass: "false"
                  errors:
                  - field: content
                    expected: "Ya puedes restaurar tu [PASS]word"
                    returned: "Ya puedes restaurar tu [pass]word"
                  id: a4e6ab9d-ccdb-4b4d-b3c3-07a387e31eff
                  description: Example description 2
                  changeType: draft
        "400":
          description: Client error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Validation examples missing"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "404":
          description: Template not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Not Found"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
        "500":
          description: Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResponseErrorDto'
              example:
                errors:
                - code: COMMS_1XX
                  title: TEMPLATES_X_X_X
                  details: "[TEMPLATES] Database temporary unavailable"
                  ref: https://developers.masstack.com/en/docs/apis_communications_doc_swagger/2/schemas
      security:
      - AuthnToken: []
components:
  schemas:
    ManagedFolderResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ManagedFolderResponseDto'
    ManagedFolderResponseDto:
      required:
      - bucket
      - createdTime
      - id
      - name
      - updatedTime
      type: object
      properties:
        id:
          type: string
          description: GCS folder id
          example: id
        name:
          type: string
          description: Name of folder
          example: example_dir/
        bucket:
          type: string
          description: Name of the bucket
          example: test-bucket
        metadata:
          type: object
          additionalProperties:
            type: string
            description: Metadata associated with the resource
            example: "{\"user\":\"John_doe@example.com\"}"
          description: Metadata associated with the resource
          example:
            user: John_doe@example.com
        createdTime:
          type: string
          description: Creation date and time
          format: date-time
          example: 2024-08-01T10:38:45.698148Z
        updatedTime:
          type: string
          description: Update date and time
          format: date-time
          example: 2024-08-01T10:38:45.698148Z
      description: Data content
    ErrorDto:
      type: object
      properties:
        code:
          type: string
          description: Error code
          example: String info error code
        title:
          type: string
          description: Error title
          example: String info error title
        details:
          type: string
          description: Error message
          example: String info error message
        ref:
          type: string
          description: Error reference
          example: String info error reference
        httpStatusCode:
          type: integer
          description: HTTP status code
          format: int32
          example: 400
      description: Error info
    ResponseErrorDto:
      type: object
      properties:
        errors:
          type: array
          description: Error info
          items:
            $ref: '#/components/schemas/ErrorDto'
    ObjectResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ResourceObjectResponseDto'
    ResourceObjectResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the resource
          example: "123456789"
        selfLink:
          type: string
          description: Link to the resource
          example: https://storage.googleapis.com/bucket_name/resource_name
        bucket:
          type: string
          description: Name of the bucket containing the resource
          example: my_bucket
        name:
          type: string
          description: Name of the resource
          example: example.png
        size:
          type: string
          description: Size of the resource in bytes
          example: "1024"
        createdTime:
          type: string
          description: Time the resource was created
          example: 2023-06-13T12:00:00Z
        updatedTime:
          type: string
          description: Time the resource was last updated
          example: 2023-06-14T12:00:00Z
        metadata:
          type: object
          additionalProperties:
            type: string
            description: Metadata associated with the resource
            example: "{\"key1\":\"value1\",\"key2\":\"value2\"}"
          description: Metadata associated with the resource
          example:
            key1: value1
            key2: value2
        mediaLink:
          type: string
          description: Media link to access the resource content
          example: https://storage.googleapis.com/download/bucket_name/resource_name
        contentType:
          type: string
          description: Content type of the resource
          example: image/png
      description: Data content
    CmsContentTreeResponseDto:
      required:
      - name
      type: object
      properties:
        name:
          type: string
          description: Name of the bucket
          example: test-bucket
        creationDate:
          type: string
          description: Creation date of the bucket
          format: date-time
        treeList:
          type: array
          items:
            $ref: '#/components/schemas/CmsItemDto'
        size:
          type: string
          description: Size of the resource in bytes
          example: "1024"
      description: Data content
    CmsItemDto:
      type: object
      properties:
        name:
          type: string
          description: The name of the item.
          example: exampleItem
        publicUrl:
          type: string
          description: The public URL of the item.
          example: http://example.com/item
        size:
          type: string
          description: The size of the item in bytes.
          example: 2 KB
        type:
          type: string
          description: The type of the item.
          example: image/png
        creationDate:
          type: string
          description: The creation date of the item.
          example: 2024-09-16T00:00:00Z
        updatedDate:
          type: string
          description: The last updated date of the item.
          example: 2024-09-17T00:00:00Z
        metadata:
          type: object
          additionalProperties:
            type: string
            description: The user who created or last updated the item.
            example: user123
          description: The user who created or last updated the item.
          example: user123
    ContentTreeResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/CmsContentTreeResponseDto'
    ManagedFolderRequestDto:
      required:
      - folderPath
      - user
      type: object
      properties:
        folderPath:
          type: string
          description: Path of the managed folder
          example: example_dir/
        user:
          type: string
          description: Email address of the user
          example: John_doe@example.com
    ResourceObjectRequestDto:
      required:
      - fileContent
      - objectName
      - user
      type: object
      properties:
        user:
          type: string
          description: Email address of the user
          example: John_doe@example.com
        objectName:
          type: string
          description: Object name
          example: test-bucket.png
        fileContent:
          type: string
          description: File path
          example: UmVzZXQgeW91ciBwYXNzd29yZA==
    UpdateObjectRequestDto:
      required:
      - sourceObjectName
      - updatedObjectName
      - user
      type: object
      properties:
        sourceObjectName:
          type: string
          description: Name of the source object to be updated
          example: oldObject.png
        updatedObjectName:
          type: string
          description: Name of the object after the update
          example: newObject.png
        user:
          type: string
          description: Email address of the user
          example: John_doe@example.com
    BlacklistEntryRequestDto:
      required:
      - type
      - value
      type: object
      properties:
        type:
          type: string
          description: "Blacklist entry type, allowed values are: EMAIL, PHONE"
          example: EMAIL
        value:
          type: string
          description: "Blacklist entry value, can be an email address or a phone\
            \ number"
          example: "612345678"
        countryCode:
          type: string
          description: Country code in ISO 3166-1 alpha-2 format or in E.164 format
          example: ES or +34
          default: ES
        reason:
          type: string
          description: Reason for blacklisting the entry
          example: User requested to be blacklisted
    BlacklistEntryResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique ID assigned to the blacklist entry
          format: uuid
          example: 3fa85f64-5717-4562-b3fc-2c963f66afa6
        type:
          type: string
          description: "Blacklist entry type, allowed values are: EMAIL, PHONE"
          example: EMAIL
        value:
          type: string
          description: "Blacklist entry value, can be an email address or a phone\
            \ number"
          example: "612345678"
        countryCode:
          type: string
          description: Country code associated with the phone number
          example: +34
        reason:
          type: string
          description: Reason for blacklisting the entry
          example: User requested to be blacklisted
        user:
          type: string
          description: User who created the blacklist entry
          example: agent@masmovil.com
        date:
          type: string
          description: Date and time when the blacklist entry was created according
            to ISO 8601 format
          example: 2026-01-03T20:00:00.000000Z
      description: Data content
    BlacklistResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/BlacklistResponseDto'
    BlacklistResponseDto:
      type: object
      properties:
        type:
          type: string
        value:
          type: string
        countryCode:
          type: string
        items:
          type: array
          items:
            $ref: '#/components/schemas/BlacklistEntryResponseDto'
        limit:
          type: integer
          format: int32
        offset:
          type: integer
          format: int32
        total:
          type: integer
          format: int32
      description: Data content
    BlacklistEntryResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/BlacklistEntryResponseDto'
    CommunicationListResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/CommunicationListResponseDto'
    CommunicationListResponseDto:
      type: object
      properties:
        items:
          type: array
          description: Communications matching the provided criteria
          items:
            $ref: '#/components/schemas/CommunicationResponseDto'
        type:
          type: string
          description: Communication's type used to filter
          example: password_recovery
        clientId:
          type: string
          description: Communication's client id used to filter
          example: cuco.test-dev
        countryCode:
          type: string
          description: Communication's SMS country code used to filter
          example: "34"
        terminatingNumber:
          type: string
          description: Communication's terminating number used to filter
          example: "626626626"
        destinationEmail:
          type: string
          description: Communication's email destination address used to filter
          example: diego.mateos@masmovil.com
        limit:
          type: integer
          description: Max number of communications retrieved
          format: int32
          example: 20
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
      description: Data content
    CommunicationResponseDto:
      type: object
      properties:
        id:
          type: string
          description: Unique ID assigned to the communication
          format: uuid
          example: c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Template language
          example: en
        clientId:
          type: string
          description: Entity that requested the communication sending
          example: vista360.auth.masmovil.com
        agentId:
          type: string
          description: Agent that requested the communication sending
          example: aitor.tilla@masmovil.com
        externalId:
          type: string
          description: |-
            Internal reference provided by the client system that could be
                      used in later queries
          example: sale-12512321
        sms:
          $ref: '#/components/schemas/CommunicationResponseSmsDto'
        email:
          $ref: '#/components/schemas/CommunicationResponseEmailDto'
        whatsapp:
          $ref: '#/components/schemas/CommunicationResponseWhatsAppDto'
        requestTime:
          type: string
          description: Time and date when the communication was originally requested
            by its origin system. Format according to ISO 8601
          example: 2021-01-01T14:00:00.000000Z
        warning:
          type: string
          description: When the communication was processed but another unexpected
            error occurred this field contains a message about what happened
          example: Accepted but communication not persisted
        scheduledTime:
          type: string
          description: Time and date when the communication was originally scheduled
            by its origin system. Format according to ISO 8601
          example: 2021-01-01T14:00:00.000000Z
        usingDraft:
          type: boolean
          description: Use the template draft
          example: true
        serviceName:
          type: string
          description: Service name that created the communication
          example: communications
      description: Data content
    CommunicationResponseEmailDto:
      type: object
      properties:
        id:
          type: string
          description: Unique ID assigned to the processed email
          format: uuid
          example: c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f
        from:
          $ref: '#/components/schemas/CommunicationResponseEmailFromDto'
        to:
          $ref: '#/components/schemas/CommunicationResponseEmailToDto'
        subject:
          type: string
          description: Processed email's subject
          example: Wonderful offer for you
        externalId:
          type: string
          description: |-
            Internal reference provided by the client system that could be
                      used in later queries
          example: sale-12512321
        deliveryStatus:
          type: string
          description: "Processed email's status, see https://developers.masstack.com/en/guides/communications/delivery_info\
            \ for details. Possible values are: SUBMITTED, DROPPED, DEFERRED, REJECTED,\
            \ DELIVERED, UNDELIVERABLE, OPEN, CLICKED"
          example: SUBMITTED
        mimeType:
          type: string
          description: Processed email's content mimeType. This field is only present
            when sending a communication
          example: text/html
        content:
          type: string
          description: Processed email's content. This field is only present when
            sending a communication
          example: <p>Welcome to </p>
        scheduledTime:
          type: string
          description: Scheduled delivery date and time for the email. Format according
            to ISO 8601
          example: 2021-01-01T14:00:00.000000Z
        updatedTime:
          type: string
          description: Last time when the email info has been updated. Format according
            to ISO 8601
          example: 2021-01-01T14:01:00.000000Z'
        attachments:
          type: array
          description: Processed email attachments' file names. This field is only
            present when sending communications
          example:
          - textFile.txt
          - pdfFile.pdf
          items:
            type: string
            description: Processed email attachments' file names. This field is only
              present when sending communications
            example: "[\"textFile.txt\",\"pdfFile.pdf\"]"
        code:
          type: integer
          description: Response code of email provider
          format: int32
          example: 202
        warning:
          type: string
          description: "When the email was submitted but another unexpected error\
            \ occurred in email's provider, this field contains a message about what\
            \ happened"
          example: Accepted but email not persisted
        error:
          type: string
          description: Error message explaining why the email could not be submitted
          example: Email service temporary unavailable
      description: Information of the sent email
    CommunicationResponseEmailFromDto:
      type: object
      properties:
        email:
          type: string
          description: Email address used to deliver the message
          example: noreply@masmovil.com
        name:
          type: string
          description: A name or title associated with the sending email address
          example: Masmovil info
    CommunicationResponseEmailToDto:
      type: object
      properties:
        email:
          type: string
          description: The intended recipient's email address
          example: recipient@masmovil.es
        name:
          type: string
          description: The intended recipient's name
          example: Diego
    CommunicationResponseSmsDto:
      type: object
      properties:
        id:
          type: string
          description: Unique ID assigned to the sent SMS.
          format: uuid
          example: c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f
        senderInfo:
          type: string
          description: "Sender info to be shown in SMS, it can be text up to 11 characters\
            \ or a phone number up to 15 digits"
          example: YOIGO
        countryCode:
          maxLength: 3
          minLength: 1
          type: string
          description: "International prefix without '+'. When not introduced, the\
            \ application takes the Spanish prefix (34) as default"
          example: "34"
        terminatingNumber:
          maxLength: 14
          minLength: 4
          type: string
          description: Destination phone number without international prefix
          example: "623196241"
        content:
          type: string
          description: Sms content text
          example: Sms content example
        realTimeRequired:
          type: boolean
          description: SMS delivery time criticality indicator. SMS with real time
            requirement are handled with higher priority than the others in case of
            overload
          example: true
        scheduledTime:
          type: string
          description: Scheduled delivery date and time for the SMS. Format according
            to ISO 8601
          example: 2021-01-01T14:00:00.000000Z
        updatedTime:
          type: string
          description: Last time when the SMS stored info has been updated. Format
            according to ISO 8601
          example: 2021-01-01T14:01:00.000000Z'
        deliveryStatus:
          type: string
          description: "Sms status description, see https://developers.masstack.com/en/guides/communications/delivery_info\
            \ for details. Possible values are: FAILED, REGISTERED, SUBMITTED, DELIVERED,\
            \ EXPIRED, UNDELIVERABLE, REJECTED, ACCEPTED, DELETED"
          example: SUBMITTED
        sendingType:
          type: string
          description: Provider used to send the SMS
          example: EXTERNAL
        code:
          type: integer
          description: Response code of SMS provider
          format: int32
          example: 202
        externalId:
          type: string
          description: |-
            Internal reference provided by the client system that could be
                      used in later queries
          example: sale-12512321
        warning:
          type: string
          description: "When the SMS was processed but another unexpected error occurred\
            \ in SMS's provider, this field contains a message about what happened"
          example: Accepted but SMS not persisted
        error:
          type: string
          description: Error message explaining why the SMS could not be processed
      description: Information of the sent SMS
    CommunicationResponseWhatsAppDto:
      type: object
      properties:
        id:
          type: string
          description: Unique ID assigned to the processed email
          format: uuid
          example: c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f
        countryCode:
          maxLength: 3
          minLength: 1
          type: string
          description: "International prefix without '+'. When not introduced, the\
            \ application takes the Spanish prefix (34) as default"
          example: "34"
        terminatingNumber:
          maxLength: 14
          minLength: 4
          type: string
          description: Destination phone number without international prefix
          example: "623196241"
        updatedTime:
          type: string
          description: Last time when the WhatsApp stored info has been updated. Format
            according to ISO 8601
          example: 2021-01-01T14:01:00.000000Z'
        handoffId:
          type: string
          description: WhatsApp handoff identifier
          example: COMMS_MASMOVIL_UNTRACEABLE_CLIENT_TV_ES
        content:
          type: string
          description: The actual WhatsApp message content sent to the user
          example: "Hi Juan, your code is 1234"
        deliveryStatus:
          type: string
          description: "WhatsApp status description, see https://developers.masstack.com/en/guides/communications/delivery_info\
            \ for details. Possible values are: FAILED, REGISTERED, SUBMITTED"
          example: SUBMITTED
        code:
          type: integer
          description: Response code of WhatsApp provider
          format: int32
          example: 202
        externalId:
          type: string
          description: |-
            Internal reference provided by the client system that could be
                      used in later queries
          example: sale-12512321
        warning:
          type: string
          description: "When the WhatsApp was processed but another unexpected error\
            \ occurred in WhatsApp's provider, this field contains a message about\
            \ what happened"
          example: Submitted but WhatsApp not persisted
        error:
          type: string
          description: Error message explaining why the WhatsApp could not be processed
      description: Information of the sent WhatsAppMessage
    CommunicationAttachment:
      type: object
      properties:
        communicationId:
          type: string
          description: Unique ID assigned to the communication
          format: uuid
          example: c936ead5-7a6d-4fdb-9ad3-7cf4bff9d07f
        attachments:
          type: object
          additionalProperties:
            type: string
            description: Attachments associated with the resource
            example: "{\"document.pdf\":\"https://example.com/files/attachment.pdf\"\
              }"
          description: Attachments associated with the resource
          example:
            document.pdf: https://example.com/files/attachment.pdf
      description: Data content
    CommunicationAttachmentResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/CommunicationAttachment'
    CommunicationResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/CommunicationResponseDto'
    FixedPhoneNumberValidationResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/FixedPhoneNumberValidationResponseDto'
    FixedPhoneNumberValidationResponseDto:
      type: object
      properties:
        message:
          type: string
        valid:
          type: boolean
      description: Data content
    FixedPhoneNumberValidationRequestDto:
      required:
      - phoneNumber
      type: object
      properties:
        phoneNumber:
          maxLength: 14
          minLength: 4
          type: string
          description: Phone number to validate
          example: "612345678"
        countryCode:
          maxLength: 2
          minLength: 2
          type: string
          description: Country code in ISO 3166-1 alpha-2 format
          example: ES
          default: ES
    MobilePhoneNumberValidationResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/MobilePhoneNumberValidationResponseDto'
    MobilePhoneNumberValidationResponseDto:
      type: object
      properties:
        message:
          type: string
        valid:
          type: boolean
      description: Data content
    MobilePhoneNumberValidationRequestDto:
      required:
      - phoneNumber
      type: object
      properties:
        phoneNumber:
          maxLength: 14
          minLength: 4
          type: string
          description: Phone number to validate
          example: "612345678"
        countryCode:
          maxLength: 2
          minLength: 2
          type: string
          description: Country code in ISO 3166-1 alpha-2 format
          example: ES
          default: ES
    CommunicationRequestDto:
      required:
      - language
      - type
      type: object
      properties:
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Communication language(ISO 639-1)
          example: en
        channels:
          type: array
          description: "Channels list through which the communication will be sent,\
            \ allowed values are: \"sms\", \"email\". If not specified, all channels\
            \ with a defined template are used"
          example: "[sms]"
          items:
            type: string
            description: "Channels list through which the communication will be sent,\
              \ allowed values are: \"sms\", \"email\". If not specified, all channels\
              \ with a defined template are used"
            example: "[sms]"
        scheduledTime:
          type: string
          description: Programmed time for the communication to be sent that can be
            reprogrammed to fit delivery window.
          example: 2022-04-25T12:00:00
        smsInput:
          $ref: '#/components/schemas/CommunicationRequestSmsDto'
        emailInput:
          $ref: '#/components/schemas/CommunicationRequestEmailDto'
        whatsAppInput:
          $ref: '#/components/schemas/CommunicationRequestWhatsAppDto'
        externalId:
          type: string
          description: Client internal reference
        arguments:
          type: object
          additionalProperties:
            type: object
            description: "Parameters and assigned values that are required to render\
              \ the specified template. Depending on the argument type they can be\
              \ a string, a number, a boolean or an array"
            example:
              name: Juan
              subscriptions:
              - ftth
              - mobile
              - health
              resetLink: https://password.com/reset/123456
              birthDate: 2022-04-25 12:00:00
              vipClient: false
              balance: 45.7
              birthCountry: US
              attached.txt: SG9sYSBQYWJsbyA6KQo=
              embedded_image_png: iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
              qrArgument: Text to convert into QR Code
              pdfAttachments:
                apple.pdf: VGhpcyBpcyBhIFBERiBjb250ZW50
                pear.pdf: VGhpcyBpcyBhIFBERiBjb250ZW50
          description: "Parameters and assigned values that are required to render\
            \ the specified template. Depending on the argument type they can be a\
            \ string, a number, a boolean or an array"
          example:
            name: Juan
            subscriptions:
            - ftth
            - mobile
            - health
            resetLink: https://password.com/reset/123456
            birthDate: 2022-04-25 12:00:00
            vipClient: false
            balance: 45.7
            birthCountry: US
            attached.txt: SG9sYSBQYWJsbyA6KQo=
            embedded_image_png: iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
            qrArgument: Text to convert into QR Code
            pdfAttachments:
              apple.pdf: VGhpcyBpcyBhIFBERiBjb250ZW50
              pear.pdf: VGhpcyBpcyBhIFBERiBjb250ZW50
        usingDraft:
          type: boolean
          description: Use the template draft
          example: true
    CommunicationRequestEmailDto:
      required:
      - destinationEmail
      type: object
      properties:
        destinationEmail:
          type: string
          description: The intended recipient's email address
          example: recipient@masmovil.es
        destinationName:
          type: string
          description: The intended recipient's name
          example: Diego
      description: "Specific parameters needed for email channel, mandatory if email\
        \ channel requested. No need to provide it when previewing a communication"
    CommunicationRequestSmsDto:
      required:
      - terminatingNumber
      type: object
      properties:
        countryCode:
          maxLength: 3
          minLength: 1
          type: string
          description: "International prefix without '+'. When not introduced, the\
            \ application takes the Spanish prefix (34) as default"
          example: "54"
          default: "34"
        terminatingNumber:
          maxLength: 14
          minLength: 4
          type: string
          description: Destination phone number without international prefix
          example: "623196241"
      description: "Specific parameters needed for SMS channel, mandatory if SMS channel\
        \ requested. No need to provide it when previewing a communication"
    CommunicationRequestWhatsAppDto:
      required:
      - terminatingNumber
      type: object
      properties:
        countryCode:
          maxLength: 3
          minLength: 1
          type: string
          description: "International prefix without '+'. When not introduced, the\
            \ application takes the Spanish prefix (34) as default"
          example: "54"
          default: "34"
        terminatingNumber:
          maxLength: 14
          minLength: 4
          type: string
          description: Destination phone number without international prefix
          example: "623196241"
      description: "Specific parameters needed for whatsApp channel, mandatory if\
        \ whatsApp channel requested. No need to provide it when previewing a communication"
    CommunicationEmailPreviewDto:
      type: object
      properties:
        from:
          $ref: '#/components/schemas/CommunicationEmailPreviewFromDto'
        subject:
          type: string
          description: Email's subject
          example: Wonderful offer for you
        mimeType:
          type: string
          description: Email's content mimeType
          example: text/html
        content:
          type: string
          description: Email's content
          example: <p>Welcome to </p>
      description: Preview information of the email
    CommunicationEmailPreviewFromDto:
      type: object
      properties:
        email:
          type: string
          description: Email address used to deliver the message
          example: noreply@masmovil.com
        name:
          type: string
          description: A name or title associated with the sending email address
          example: Masmovil info
    CommunicationPreviewResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/CommunicationPreviewResponseDto'
    CommunicationPreviewResponseDto:
      type: object
      properties:
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Template language
          example: en
        sms:
          $ref: '#/components/schemas/CommunicationSmsPreviewDto'
        email:
          $ref: '#/components/schemas/CommunicationEmailPreviewDto'
        whatsapp:
          $ref: '#/components/schemas/CommunicationWhatsAppPreviewDto'
        warning:
          type: string
          description: Communication can be processed using the default language since
            the template with the one provided could not be found
          example: Accepted replacing language
        usingDraft:
          type: boolean
          description: Use the template draft
          example: true
      description: Data content
    CommunicationSmsPreviewDto:
      type: object
      properties:
        senderInfo:
          type: string
          description: "Sender info to be shown in SMS, it can be text up to 11 characters\
            \ or a phone number up to 15 digits"
          example: YOIGO
        content:
          type: string
          description: Sms content text
          example: Sms content example
        realTimeRequired:
          type: boolean
          description: SMS delivery time criticality indicator. SMS with real time
            requirement are handled with higher priority than the others in case of
            overload
          example: true
      description: Preview information of the SMS
    CommunicationWhatsAppPreviewDto:
      type: object
      properties:
        content:
          type: string
          description: WhatsApp content contains only the handoff value
          example: BRAND_COMM_TYPE_EN
      description: Preview information of the WhatsApp
    ShortUrlResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ShortUrlResponseDto'
    ShortUrlResponseDto:
      type: object
      properties:
        id:
          type: string
          description: "Unique id for the short URL, usable to do queries about its\
            \ metadata"
          example: masstack.link/1221221
        longUrl:
          type: string
          description: Long URL the created link redirects to
          example: https://longurl.com/with/its/long/path
        link:
          type: string
          description: Shortened link
          example: https://masstack.link/1221221
        createdTime:
          type: string
          description: Short URL creation timestamp according to ISO 8601
          example: 2021-03-03T17:00:00Z
        updatedTime:
          type: string
          description: Short URL update timestamp according to ISO 8601
          example: 2022-03-03T17:00:00Z
        createdClientId:
          type: string
          description: Client who created the shortened link
          example: nice.frontend
        createdAgentId:
          type: string
          description: Author who created the shortened link
          example: linus.torvalds@masmovil.com
        updatedClientId:
          type: string
          description: Client who last updated the shortened link
          example: nice.frontend
        updatedAgentId:
          type: string
          description: Author who last updated the shortened link
          example: linus.torvalds@masmovil.com
        customSuffix:
          type: boolean
          description: Flag to indicate whether the shortened link has a custom suffix
          example: false
      description: Data content
    CreateShortUrlRequestDto:
      type: object
      properties:
        longUrl:
          type: string
          description: Long URL that is required to be shortened
          example: https://longurl.com/with/its/long/path
        customSuffix:
          type: string
          description: Custom suffix to use instead of generating a random string
          example: helpPage
        length:
          type: string
          description: User-defined length of the link
          example: "5"
    ArgumentDefinitionDto:
      required:
      - name
      - type
      type: object
      properties:
        name:
          maxLength: 20
          type: string
          description: Argument name that could be used in communication templates
          example: userName
        type:
          type: string
          description: "Data type of the argument. Possible values are: String, StringList,\
            \ StringMap, Number, Link,LocaleRegion, Date, Boolean, Attachment, EmbeddedImage,\
            \ QrInfo or MasDocument"
          example: String
        sensitive:
          type: boolean
          description: Whether the argument is sensitive or not. Sensitive arguments
            are not persisted
          example: false
          default: false
      description: "Variable arguments that can be used in the communication and its\
        \ type: String, StringList, StringMap, Number, Link,LocaleRegion, Date, Boolean,\
        \ Attachment, EmbeddedImage or QrInfo"
      example:
      - name: userName
        type: String
        sensitive: false
      - name: bonusList
        type: StringList
        sensitive: false
      - name: productNameAndInfo
        type: StringMap
        sensitive: false
      - name: maxRetries
        type: Number
        sensitive: false
      - name: resetLink
        type: Link
        sensitive: true
      - name: birthCountry
        type: LocaleRegion
        sensitive: false
      - name: expiration
        type: Date
        sensitive: false
      - name: mfaRequired
        type: Boolean
        sensitive: false
      - name: attached.pdf
        type: Attachment
        sensitive: false
      - name: image_png
        type: EmbeddedImage
        sensitive: false
      - name: qrCodeImage
        type: QrInfo
        sensitive: false
      - name: attachments
        type: AttachmentsMap
        sensitive: false
    CommunicationTypeResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/CommunicationTypeResponseDto'
    CommunicationTypeResponseDto:
      type: object
      properties:
        objectId:
          type: string
          description: Communication type id string
          example: "1"
        objectType:
          type: string
          description: Object type
          example: communication_type
        code:
          maxLength: 40
          type: string
          description: Unique identification code for the communication type
          example: password_reset
        description:
          type: string
          description: Long text description of the communication purpose
          example: Provides the user a link to reset his password
        realTimeRequired:
          type: boolean
          description: Flag indicating if the communication early delivery is critical.
            Communications with real time requirement are handled with higher priority
            than the others in case of overload
          example: true
          default: false
        deliveryWindow:
          type: string
          description: "Communication's delivery window. If another scheduled time\
            \ is defined, this value will be ignored. Possible values are: ANYDAY_ANYTIME,\
            \ ANYDAY_8AM8PM"
          example: ANYDAY_8AM8PM
        sendingType:
          type: string
          description: "Provider that will be used to send SMS communications. Possible\
            \ values are: DEFAULT, EXTERNAL"
          example: EXTERNAL
        createdTime:
          type: string
          description: Communication type's creation date and time. Format according
            to ISO 8601
          example: 2021-01-01T14:00:00.000000Z
        updatedTime:
          type: string
          description: Last time the communication type was modified. Format according
            to ISO 8601
          example: 2021-01-03T20:00:00.000000Z
        deletedTime:
          type: string
          description: The time when communication type was deleted. Format according
            to ISO 8601
          example: 2021-01-03T20:00:00.000000Z
        arguments:
          type: array
          description: Variable arguments that can be used in the communication and
            its type
          example:
            userName: String
            maxRetries: Number
            resetLink: Link
            birthCountry: LocaleRegion
            expiration: Date
            mfaRequired: Boolean
            attached.pdf: Attachment
            image_png: EmbeddedImage
            qrCodeImage: QrInfo
            attachments: AttachmentsMap
          items:
            $ref: '#/components/schemas/ArgumentDefinitionDto'
        changeType:
          type: string
          description: Indicates if the change type (stable/draft/validated).
          example: draft
        version:
          type: string
          description: Version of item
      description: Data content
    CommunicationTypeListResponseDto:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        items:
          type: array
          description: All types available in database
          items:
            $ref: '#/components/schemas/CommunicationTypeResponseDto'
        type:
          type: string
          description: Type used for search
          example: shipping_in_transit
        description:
          type: string
          description: Description used for search
          example: Reclamación
        realTimeRequired:
          type: string
          description: Search based on real time required
          example: "true"
        deliveryWindow:
          type: string
          description: Delivery window used for search
          example: ANYDAY_ANYTIME
        sendingType:
          type: string
          description: Sending type used for search
          example: DEFAULT
        argument:
          type: string
          description: Argument used for search
          example: name
        sensitive:
          type: string
          description: Search based on sensitive arguments
          example: "true"
        limit:
          type: integer
          description: Max number of communication types retrieved
          format: int32
          example: 20
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 40
    CommunicationTypeRequestDto:
      required:
      - arguments
      - code
      - description
      type: object
      properties:
        code:
          maxLength: 40
          type: string
          description: "Unique identification code for the communication type. It\
            \ can only contain alphanumeric characters separated with underscores.\
            \ It is validated under this regular expression: ^[a-z0-9][a-z0-9_]{0,38}[a-z0-9]$"
          example: password_reset
        description:
          type: string
          description: Long text description of the communication purpose
          example: Provides the user a link to reset his password
        realTimeRequired:
          type: boolean
          description: Flag indicating if the communication early delivery is critical.
            Communications with real time requirement are handled with higher priority
            than the others in case of overload
          example: true
          default: false
        deliveryWindow:
          type: string
          description: "Communication's delivery window. It is used to define the\
            \ time slot in which the communication can be sent. Possible values are\
            \ always preceded by ANYDAY_ and any valid window within the same day.\
            \ For example: ANYDAY_ANYTIME, ANYDAY_8AM8PM, ANYDAY_8AM12PM, ANYDAY_12PM4PM\
            \ or ANYDAY_4PM8PM. "
          example: ANYDAY_8AM8PM
          default: ANYDAY_ANYTIME
        sendingType:
          type: string
          description: "If set to EXTERNAL, an external provider will be used to send\
            \ the communication SMS. Possible values are: DEFAULT, EXTERNAL, BATCH,\
            \ PREPAID"
          example: EXTERNAL
          default: DEFAULT
        arguments:
          type: array
          description: "Variable arguments that can be used in the communication and\
            \ its type: String, StringList, StringMap, Number, Link,LocaleRegion,\
            \ Date, Boolean, Attachment, EmbeddedImage or QrInfo"
          example:
          - name: userName
            type: String
            sensitive: false
          - name: bonusList
            type: StringList
            sensitive: false
          - name: productNameAndInfo
            type: StringMap
            sensitive: false
          - name: maxRetries
            type: Number
            sensitive: false
          - name: resetLink
            type: Link
            sensitive: true
          - name: birthCountry
            type: LocaleRegion
            sensitive: false
          - name: expiration
            type: Date
            sensitive: false
          - name: mfaRequired
            type: Boolean
            sensitive: false
          - name: attached.pdf
            type: Attachment
            sensitive: false
          - name: image_png
            type: EmbeddedImage
            sensitive: false
          - name: qrCodeImage
            type: QrInfo
            sensitive: false
          - name: attachments
            type: AttachmentsMap
            sensitive: false
          items:
            $ref: '#/components/schemas/ArgumentDefinitionDto'
        requestRef:
          type: string
          description: Reference of issue where example was requested
          example: https://jiranext.masmovil.com/browse/CUCO-817
    EmailExampleExpectedOutputResponseDto:
      type: object
      properties:
        from:
          $ref: '#/components/schemas/EmailExampleResponseFromExpectedOutputDto'
        subject:
          type: string
          description: Processed email's subject
          example: Wonderful offer for you
    EmailExampleResponseFromExpectedOutputDto:
      type: object
      properties:
        email:
          type: string
          description: Email address that will be use to deliver the message
          example: noreply@masmovil.com
        name:
          type: string
          description: A name or title associated with the sending email address
          example: Masmovil info
    ExampleResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ExampleResponseDto'
    ExampleResponseDto:
      type: object
      properties:
        objectId:
          type: string
          description: Example id string
          example: "1"
        objectType:
          type: string
          description: Object type
          example: sms_example
        id:
          type: string
          description: UUID of the registered example as generated by database
          format: uuid
          example: 4e95a8bb-1616-4505-942e-007358e2f1e4
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Example's language(ISO 639-1)
          example: es
        channel:
          type: string
          description: Channel of example
          example: sms
        requestRef:
          type: string
          description: Reference of issue where example was requested
          example: https://jiranext.masmovil.com/browse/CUCO-817
        description:
          type: string
          description: Comprehensive description of the purpose of the example
          example: Mobile subscription contract sending
        arguments:
          type: object
          additionalProperties:
            type: object
            description: Input arguments used in the example
            example:
              name: Juan
              subscriptions:
              - ftth
              - mobile
              - health
              resetLink: https://password.com/reset/123456
              birthDate: 2022-04-25 12:00:00
              vipClient: false
              balance: 45.7
              birthCountry: US
          description: Input arguments used in the example
          example:
            name: Juan
            subscriptions:
            - ftth
            - mobile
            - health
            resetLink: https://password.com/reset/123456
            birthDate: 2022-04-25 12:00:00
            vipClient: false
            balance: 45.7
            birthCountry: US
        expectedOutput:
          $ref: '#/components/schemas/ExampleResponseExpectedOutput'
        createdTime:
          type: string
          description: Example's creation date and time according to ISO 8601 format
          example: 2021-01-01T14:00:00.000000Z
        updatedTime:
          type: string
          description: Last time the example was modified. Format according to ISO
            8601
          example: 2021-01-03T20:00:00.000000Z
        deletedTime:
          type: string
          description: The time when example was deleted. Format according to ISO
            8601
          example: 2021-01-03T20:00:00.000000Z
        createdClientId:
          type: string
          description: System or frontend that created the example identified by its
            audience.
          example: masstack.auth.masmovil.com
        updatedClientId:
          type: string
          description: System or frontend that requested the last example update identified
            by its audience.
          example: masstack.auth.masmovil.com
        createdAgentId:
          type: string
          description: "Id of the agent that made the request if available, otherwise\
            \ N/A."
          example: agent@masmovil.com
        updatedAgentId:
          type: string
          description: "AgentId that requested example update if available, otherwise\
            \ N/A."
          example: agent@masmovil.com
        changeType:
          type: string
          description: Indicates if the change type (stable/draft/validated).
          example: draft
      description: Data content
    ExampleResponseExpectedOutput:
      type: object
      description: Expected content of example for set of provided arguments. It is
        different depending on the channel
      oneOf:
      - $ref: '#/components/schemas/SmsExampleExpectedOutputResponseDto'
      - $ref: '#/components/schemas/EmailExampleExpectedOutputResponseDto'
      - $ref: '#/components/schemas/WhatsAppExampleExpectedOutputResponseDto'
    SmsExampleExpectedOutputResponseDto:
      type: object
      properties:
        senderInfo:
          type: string
          description: "Sender info to be shown in SMS, it can be text up to 11 characters\
            \ or a phone number up to 15 digits"
          example: MASMOVIL
        content:
          type: string
          description: Sms example content
          example: "Hi Aitor Tilla, enter masstack.link/ABC123 to reset password"
    WhatsAppExampleExpectedOutputResponseDto:
      type: object
      properties:
        content:
          type: string
          description: WhatsApp example content as string (handoffId + numbered variables)
          example: "{\"handoffId\":\"COMMS_MASMOVIL_MULTI_COMM_LINK_EN\",\"1\":\"\
            Hi John\",\"2\":\"Your code is 123456\",\"headerVariables\":{\"1\":\"\
            Our magic brand\"}}"
    ExampleListResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ExampleListResponseDto'
    ExampleListResponseDto:
      type: object
      properties:
        items:
          type: array
          description: Examples matching the provided criteria
          items:
            $ref: '#/components/schemas/ExampleResponseDto'
        limit:
          type: integer
          description: Max number of examples retrieved
          format: int32
          example: 50
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 5
        type:
          type: string
          description: Communication type filter
          example: password_recovery
        language:
          type: string
          description: Language filter
          example: es
        channel:
          type: string
          description: Channel filter
          example: sms
        description:
          type: string
          description: Description filter
          example: Recover your password
        requestRef:
          type: string
          description: Request reference filter
          example: CUCO-123
        content:
          type: string
          description: Content filter
          example: Click in the following link to recover your password
        subject:
          type: string
          description: Email subject filter
          example: Recover your password
      description: Data content
    EmailExampleRequestExpectedOutputDto:
      required:
      - subject
      type: object
      properties:
        from:
          $ref: '#/components/schemas/EmailExampleRequestFromExpectedOutputDto'
        subject:
          type: string
          description: Expected email's subject
          example: Wonderful offer for you
    EmailExampleRequestFromExpectedOutputDto:
      required:
      - email
      type: object
      properties:
        email:
          type: string
          description: Expected email from address
          example: example@cuco.com
        name:
          type: string
          description: Expected name or title associated with the email from address
          example: CUCO EXAMPLE
    ExampleRequestDto:
      required:
      - channel
      - expectedOutput
      - language
      - type
      type: object
      properties:
        id:
          type: string
          description: UUID to be used as identifier of the example. It must be unique
            in the system
          format: uuid
          example: 30387cbc-e3da-4c2a-be92-8aad3438908a
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Example's language(ISO 639-1)
          example: en
        channel:
          type: string
          description: Channel  of example
          example: sms
        requestRef:
          type: string
          description: Reference of issue where example was requested
          example: https://jiranext.masmovil.com/browse/CUCO-817
        description:
          type: string
          description: Comprehensive description of the purpose of the example
          example: Mobile subscription contract sending
        expectedOutput:
          $ref: '#/components/schemas/ExampleRequestExpectedOutput'
        arguments:
          type: object
          additionalProperties:
            type: object
            description: Input arguments used in the example. Name and value of arguments
              must be coherent with registered type's arguments.
            example:
              name: Juan
              subscriptions:
              - ftth
              - mobile
              - health
              resetLink: https://password.com/reset/123456
              birthDate: 2022-04-25 12:00:00
              vipClient: false
              balance: 45.7
              birthCountry: US
          description: Input arguments used in the example. Name and value of arguments
            must be coherent with registered type's arguments.
          example:
            name: Juan
            subscriptions:
            - ftth
            - mobile
            - health
            resetLink: https://password.com/reset/123456
            birthDate: 2022-04-25 12:00:00
            vipClient: false
            balance: 45.7
            birthCountry: US
    ExampleRequestExpectedOutput:
      type: object
      description: Expected output required for the example definition. It is different
        depending on the channel
      example:
        senderInfo: MasMovil
        content: Bienvenido a MasMovil!
      oneOf:
      - $ref: '#/components/schemas/SmsExampleRequestExpectedOutputDto'
      - $ref: '#/components/schemas/EmailExampleRequestExpectedOutputDto'
      - $ref: '#/components/schemas/WhatsAppExampleRequestExpectedOutputDto'
    SmsExampleRequestExpectedOutputDto:
      required:
      - content
      - senderInfo
      type: object
      properties:
        senderInfo:
          type: string
          description: "Sender info to be shown in SMS, it can be text up to 11 characters\
            \ or a phone number up to 15 digits"
          example: YOIGO
        content:
          type: string
          description: "Example content, multiple alphabets are supported, see https://developers.masstack.com/en/guides/communications/supported\
            \ for details"
          example: "Hi Aitor Tilla, enter masstack.link/resetPassword to reset password"
    WhatsAppExampleRequestExpectedOutputDto:
      required:
      - content
      type: object
      properties:
        content:
          type: string
          description: WhatsApp rendered content as JSON object
          example: "{\"handoffId\":\"COMMS_MASMOVIL_MULTI_COMM_LINK_EN\",\"1\":\"\
            Hi John\",\"headerVariables\":{\"1\":\"Our magic brand\"}}"
    EmailOutput:
      type: object
      properties:
        from:
          $ref: '#/components/schemas/EmailOutputFrom'
        subject:
          type: string
          description: Actual subject output
          example: Wonderful offer for you
        content:
          type: string
          description: Actual email content output
          example: "Hi Aitor Tilla, enter masstack.link/ABC123 to reset password"
    EmailOutputFrom:
      type: object
      properties:
        email:
          type: string
          description: Processed template's from email address
          example: noreply@masmovil.com
        name:
          type: string
          description: Processed template's from name
          example: Masmovil info
    Error:
      type: object
      properties:
        field:
          type: string
          description: Mismatching field name
        expected:
          type: string
          description: Expected field's value
        returned:
          type: string
          description: Actual field's value
      description: List of errors when example and template output does not match
    ExampleValidateResponseDto:
      type: object
      properties:
        pass:
          type: boolean
          description: Indicates whether the template output matches the example expected
            data
        errors:
          type: array
          description: List of errors when example and template output does not match
          items:
            $ref: '#/components/schemas/Error'
        id:
          type: string
          description: UUID of the registered example
          format: uuid
          example: 4e95a8bb-1616-4505-942e-007358e2f1e4
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Example's language (ISO 639-1)
          example: es
        channel:
          type: string
          description: Channel of example
          example: sms
        description:
          type: string
          description: Comprehensive description of the purpose of the example
          example: Mobile subscription contract sending
        changeType:
          type: string
          description: Indicates if the change type.
          example: stable
        output:
          $ref: '#/components/schemas/Output'
      description: Report of validated examples against the template
    ExampleValidationResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ExampleValidateResponseDto'
    Output:
      type: object
      description: Example's output data
      oneOf:
      - $ref: '#/components/schemas/SmsOutput'
      - $ref: '#/components/schemas/EmailOutput'
      - $ref: '#/components/schemas/WhatsAppOutput'
    SmsOutput:
      type: object
      properties:
        senderInfo:
          type: string
          description: Actual sender info output
          example: MASMOVIL
        content:
          type: string
          description: Actual sms content output
          example: "Hi Aitor Tilla, enter masstack.link/ABC123 to reset password"
    WhatsAppOutput:
      type: object
      properties:
        content:
          type: string
          description: Actual WhatsApp JSON content as string
          example: "{\"handoffId\":\"COMMS_MASMOVIL_MULTI_COMM_LINK_EN\",\"1\":\"\
            Hi ${name}\",\"2\":\"Your code is ${code}\"}"
    EmailTemplateDataResponseDto:
      required:
      - mimeType
      type: object
      properties:
        from:
          $ref: '#/components/schemas/EmailTemplateResponseFromDataDto'
        subject:
          type: string
          description: Processed email's subject
          example: Wonderful offer for you
        mimeType:
          type: string
          description: The MIME type of the content to be included in the email
          example: text/html
        content:
          type: string
          description: Email's template content based on the specified MIME type
          example: "Hi <th th:text=\\\"${name}\\\">Juan</th>, welcome to MasMovil!"
        attachments:
          type: array
          description: This field is only available when previewing templates. It
            shows what attachment would be added when sending the communication
          example:
          - textFile.txt
          - pdfFile.pdf
          items:
            type: string
            description: This field is only available when previewing templates. It
              shows what attachment would be added when sending the communication
            example: "[\"textFile.txt\",\"pdfFile.pdf\"]"
    EmailTemplateResponseFromDataDto:
      type: object
      properties:
        email:
          type: string
          description: Email address that will be use to deliver the message
          example: noreply@masmovil.com
        name:
          type: string
          description: A name or title associated with the sending email address
          example: Masmovil info
    SmsTemplateDataResponseDto:
      type: object
      properties:
        senderInfo:
          type: string
          description: "Sender info to be shown in SMS, it can be text up to 11 characters\
            \ or a phone number up to 15 digits"
          example: MASMOVIL
        content:
          type: string
          description: Sms template content
          example: "Hi [(${name})], enter [(${resetLink})] to reset password"
    TemplateResponseData:
      type: object
      description: Data required for the template definition. It is different depending
        on the channel
      oneOf:
      - $ref: '#/components/schemas/SmsTemplateDataResponseDto'
      - $ref: '#/components/schemas/EmailTemplateDataResponseDto'
      - $ref: '#/components/schemas/WhatsAppTemplateDataResponseDto'
    TemplateResponseDto:
      required:
      - changeType
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        objectId:
          type: string
          description: Template id string
          example: "1"
        objectType:
          type: string
          description: Object type
          example: sms_template
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Template language
          example: es
        channel:
          type: string
          description: Channel where the template is applicable
          example: sms
        data:
          $ref: '#/components/schemas/TemplateResponseData'
        createdTime:
          type: string
          description: Template's creation date and time according to ISO 8601 format
          example: 2021-01-01T14:00:00.000000Z
        updatedTime:
          type: string
          description: Last time the template was modified. Format according to ISO
            8601
          example: 2021-01-03T20:00:00.000000Z
        deletedTime:
          type: string
          description: The time when template was deleted. Format according to ISO
            8601
          example: 2021-01-03T20:00:00.000000Z
        changeType:
          type: string
          description: Indicates if the change type (stable/draft/validated).
          example: draft
    WhatsAppTemplateDataResponseDto:
      type: object
      properties:
        content:
          type: string
          description: "WhatsApp template JSON content. Must contain a 'handoffId'\
            \ and may contain numeric keys (\"1\", \"2\", ...) and headerVariables\
            \ map ( \"headerVariables\": { \"1\": \"Our magic brand\" } ) ."
          example: "{\"handoffId\":\"COMMS_MASMOVIL_PASSWORD_RESET_ES\",\"1\":\"Hello\
            \ ${name}\",\"2\":\"Your code is ${code}\",\"headerVariables\":{\"1\"\
            :\"Our magic brand\"}}"
    TemplatesResponseDto:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        items:
          type: array
          description: Templates matching the provided criteria
          items:
            $ref: '#/components/schemas/TemplateResponseDto'
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Template language
          example: es
        channel:
          type: string
          description: Channel through which the communication will be sent
          example: sms
        subject:
          type: string
          description: Subject of the email template
          example: Shipping in transit
        limit:
          type: integer
          description: Max number of templates retrieved
          format: int32
          example: 20
        offset:
          type: integer
          description: Offset used to paginate in conjunction with limit
          format: int32
          example: 0
        total:
          type: integer
          description: Total number of records
          format: int32
          example: 40
    EmailTemplateRequestDataDto:
      required:
      - content
      - mimeType
      type: object
      properties:
        from:
          $ref: '#/components/schemas/EmailTemplateRequestFromDataDto'
        subject:
          type: string
          description: Email's subject Base64 encoded
          example: V29uZGVyZnVsIG9mZmVyIGZvciB5b3Uh
        mimeType:
          type: string
          description: The MIME type of the content to be included in the email
          example: text/html
        content:
          type: string
          description: Base64 encoded content for the email template
          example: SGkgPHRoIHRoOnRleHQ9IiR7bmFtZX0iPkp1YW48L3RoPiwgd2VsY29tZSB0byBNYXNNb3ZpbCE=
    EmailTemplateRequestFromDataDto:
      required:
      - email
      type: object
      properties:
        email:
          type: string
          description: Email address used to deliver the message Base64 encoded
          example: bm9yZXBseUBtYXNtb3ZpbC5jb20=
        name:
          type: string
          description: A name or title associated with the sending email address Base64
            encoded
          example: TWFzbW92aWwgaW5mbw==
    SmsTemplateRequestDataDto:
      required:
      - content
      type: object
      properties:
        senderInfo:
          type: string
          description: "Sender info to be shown in SMS, it can be text up to 11 characters\
            \ or a phone number up to 15 digits"
          example: YOIGO
        content:
          type: string
          description: "Template content encoded in base64 , multiple alphabets are\
            \ supported, see https://developers.masstack.com/en/guides/communications/supported\
            \ for details"
          example: SGkgWygke25hbWV9KV0sIGVudGVyIFsoJHtyZXNldExpbmt9KV0gdG8gcmVzZXQgcGFzc3dvcmQ=
    TemplateRequestData:
      type: object
      description: Data required for the template definition. It is different depending
        on the channel
      oneOf:
      - $ref: '#/components/schemas/SmsTemplateRequestDataDto'
      - $ref: '#/components/schemas/EmailTemplateRequestDataDto'
      - $ref: '#/components/schemas/WhatsAppTemplateRequestDataDto'
    TemplateRequestDto:
      required:
      - channel
      - data
      - language
      - type
      type: object
      properties:
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Template language
          example: en
        channel:
          type: string
          description: Template channel
          example: sms
        data:
          $ref: '#/components/schemas/TemplateRequestData'
        arguments:
          type: object
          additionalProperties:
            type: object
            description: "Parameters and assigned values that are required to render\
              \ the specified template. Depending on the argument type they can be\
              \ a string, a number, a boolean or an array. This field is only required\
              \ when previewing templates"
            example:
              name: Juan
              subscriptions:
              - ftth
              - mobile
              - health
              resetLink: https://password.com/reset/123456
              birthDate: 2022-04-25 12:00:00
              vipClient: false
              balance: 45.7
              birthCountry: US
              attached.txt: SG9sYSBQYWJsbyA6KQo=
              embedded_image_png: iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
              qrArgument: Text to convert into QR Code
          description: "Parameters and assigned values that are required to render\
            \ the specified template. Depending on the argument type they can be a\
            \ string, a number, a boolean or an array. This field is only required\
            \ when previewing templates"
          example:
            name: Juan
            subscriptions:
            - ftth
            - mobile
            - health
            resetLink: https://password.com/reset/123456
            birthDate: 2022-04-25 12:00:00
            vipClient: false
            balance: 45.7
            birthCountry: US
            attached.txt: SG9sYSBQYWJsbyA6KQo=
            embedded_image_png: iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHElEQVQI12P4//8/w38GIAXDIBKE0DHxgljNBAAO9TXL0Y4OHwAAAABJRU5ErkJggg==
            qrArgument: Text to convert into QR Code
        requestRef:
          type: string
          description: Reference of issue where example was requested
          example: https://jiranext.masmovil.com/browse/CUCO-817
    WhatsAppTemplateRequestDataDto:
      required:
      - content
      type: object
      properties:
        content:
          type: string
          description: WhatsApp example content as JSON (handoffId + numbered variables)
          example: "{\"handoffId\":\"COMMS_MASMOVIL_MULTI_COMM_LINK_EN\",\"1\":\"\
            Hi John\",\"2\":\"Your code is 123456\",\"headerVariables\":{\"1\":\"\
            Our magic brand\"}}"
    TemplateValidateResponseDto:
      type: object
      properties:
        pass:
          type: boolean
          description: Indicates whether the template output matches the example expected
            data
        errors:
          type: array
          description: List of errors when example and template output does not match
          items:
            $ref: '#/components/schemas/Error'
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Template's language (ISO 639-1)
          example: es
        channel:
          type: string
          description: Template's channel
          example: sms
        report:
          type: array
          description: Report of validated examples against the template
          items:
            $ref: '#/components/schemas/ExampleValidateResponseDto'
      description: Data content
    TemplateValidationResponse:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/TemplateValidateResponseDto'
    TemplateValidateRequestDto:
      required:
      - channel
      - language
      - type
      type: object
      properties:
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Template's language (ISO 639-1)
          example: en
        channel:
          type: string
          description: Template's channel
          example: sms
        changeType:
          type: string
          description: "Change type of template, default is stable. Valid values:\
            \ stable, draft."
          example: draft
    CommitItemDto:
      required:
      - objectId
      - objectType
      type: object
      properties:
        objectId:
          type: string
          description: Template's language (ISO 639-1)
          example: en
        objectType:
          $ref: '#/components/schemas/ObjectType'
      description: List of items deleted that will be removed from delete list
      example:
      - objectId: "2"
        objectType: sms_template
      - objectId: 3g267416-7394-419b-8c25-4783f80d37e6
        objectType: sms_example
      - objectId: "2"
        objectType: communication_type
    NotCommitItemDto:
      required:
      - objectId
      - objectType
      type: object
      properties:
        objectId:
          type: string
          description: Template's language (ISO 639-1)
          example: en
        objectType:
          $ref: '#/components/schemas/ObjectType'
        draftCompatible:
          type: boolean
          description: Object is draft compatible
          example: false
        changeType:
          type: string
          description: Indicates if the change type.
          example: stable
      description: Items not commited
    ObjectType:
      type: string
      description: Object type that can be commit.
      example: sms
      enum:
      - sms_template
      - email_template
      - whatsapp_template
      - sms_example
      - email_example
      - whatsapp_example
      - communication_type
    TemplateCommitResponseDto:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v3.2.0
        commitItems:
          type: array
          description: Items commited
          items:
            $ref: '#/components/schemas/CommitItemDto'
        promoteDeletedItemsToArchivedItem:
          type: array
          description: Items deleted promoted as archived
          items:
            $ref: '#/components/schemas/CommitItemDto'
        itemsNotCommitted:
          type: array
          description: Items not commited
          items:
            $ref: '#/components/schemas/NotCommitItemDto'
        deletedItemsNotCommitted:
          type: array
          description: Deleted items not commited
          items:
            $ref: '#/components/schemas/CommitItemDto'
    CommitRequestDto:
      required:
      - commitItems
      - deletedItems
      type: object
      properties:
        commitItems:
          type: array
          description: List of items to be committed and marked as stable
          example:
          - objectId: "1"
            objectType: sms_template
          - objectId: 4f266416-7394-419b-8c25-4783f80d37e6
            objectType: sms_example
          - objectId: "1"
            objectType: communication_type
          items:
            $ref: '#/components/schemas/CommitItemDto'
        deletedItems:
          type: array
          description: List of items deleted that will be removed from delete list
          example:
          - objectId: "2"
            objectType: sms_template
          - objectId: 3g267416-7394-419b-8c25-4783f80d37e6
            objectType: sms_example
          - objectId: "2"
            objectType: communication_type
          items:
            $ref: '#/components/schemas/CommitItemDto'
    ChannelTypeDTO:
      type: string
      description: Tipul canalului pentru comunicare. Valorile acceptate sunt 'sms'
        sau 'email'.
      example: sms
      enum:
      - sms
      - email
      - whatsapp
    CommitValidationItemsResponseDTO:
      type: object
      properties:
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        typeId:
          type: integer
          description: The unique identifier of the type.
          format: int64
          example: 2
        objectType:
          type: string
          description: "The type of the object. For example, 'communication_type'."
          example: communication_type
        changeType:
          type: string
          description: Indicates if the change type.
          example: stable
        channel:
          $ref: '#/components/schemas/ChannelTypeDTO'
        typeItems:
          type: array
          description: List of items selected for validation
          items:
            $ref: '#/components/schemas/TypeItem'
        description:
          type: string
          description: Description of communication type
        eligibleForDeployment:
          type: boolean
    CommitValidationResponseDTO:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v3.2.0
        items:
          type: array
          items:
            $ref: '#/components/schemas/CommitValidationItemsResponseDTO'
    TypeItem:
      type: object
      properties:
        objectId:
          type: string
          description: The unique identifier of the object.
          example: ba047bf4-5a95-49c3-8602-61317bce1e22
        objectType:
          type: string
          description: "The type of the object. For example, 'sms_example'."
          example: sms_example
        language:
          type: string
          description: The language of the object
          example: es
        changeType:
          type: string
          description: Indicates if the change type.
          example: stable
        errors:
          type: array
          description: List of errors when example and template output does not match
          items:
            $ref: '#/components/schemas/Error'
        content:
          type: string
          description: Content of the example or template
        tenant:
          type: string
          description: Tenant of the object
          example: masmovil
        eligibleForDeployment:
          type: boolean
      description: List of items selected for validation
    CommitValidationRequestDTO:
      type: object
      properties:
        type:
          type: string
          description: Communication type code according to the ones previously defined
            in the system
          example: password_reset
        language:
          type: string
          description: Template language
          example: es
        channel:
          $ref: '#/components/schemas/ChannelTypeDTO'
    CommunicationTypeV2Response:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/CommunicationTypeResponseDto'
    ExampleV2Response:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ExampleResponseDto'
    ExampleListV2Response:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ExampleListResponseDto'
    ExampleValidationV2Response:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/ExampleValidateResponseDto'
    DeploymentExportObjectDto:
      type: object
      properties:
        communicationTypeCode:
          type: string
          description: The code of the communication type associated with this object
        objectId:
          type: string
          description: Object ID from the database. Represents Long as String for
            templates/types or UUID for examples.
        objectType:
          type: string
          description: "Type of object being exported (e.g., 'sms_template', 'email_example',\
            \ 'communication_type')."
        objectSnapshot:
          type: object
          additionalProperties:
            type: object
            description: "Full database row snapshot as a flexible JSON object. Contains\
              \ all columns, including nested 'arguments' for examples/types."
          description: "Full database row snapshot as a flexible JSON object. Contains\
            \ all columns, including nested 'arguments' for examples/types."
      description: "List of export objects (templates, examples, communication types)\
        \ in this package. Each object contains its full database snapshot as JSON."
    DeploymentPackageDto:
      type: object
      properties:
        items:
          type: array
          description: "List of export objects (templates, examples, communication\
            \ types) in this package. Each object contains its full database snapshot\
            \ as JSON."
          items:
            $ref: '#/components/schemas/DeploymentExportObjectDto'
    DownloadItemDto:
      type: object
      properties:
        objectId:
          type: string
          description: Object identifier
          example: d5b5c973-3194-49b6-96f4-508167f05506
        objectType:
          type: string
          description: Type of object to download
          example: sms_example
      description: List of objects to download for the deployment package
    TemplateDeploymentPackageDownloadDto:
      type: object
      properties:
        download:
          type: array
          description: List of objects to download for the deployment package
          items:
            $ref: '#/components/schemas/DownloadItemDto'
    DeploymentImportCountsDto:
      type: object
      properties:
        total:
          type: integer
          description: total
          format: int32
        errors:
          type: integer
          description: errors
          format: int32
        success:
          type: integer
          description: success
          format: int32
      description: Import statistics
    DeploymentImportItemResultDto:
      type: object
      properties:
        objectType:
          type: string
          description: objectType
        objectId:
          type: string
          description: objectId
        communicationTypeCode:
          type: string
          description: communicationTypeCode
        channel:
          type: string
          description: channel
        language:
          type: string
          description: language
        status:
          type: string
          description: status
        operation:
          type: string
          description: operation
        errorMessage:
          type: string
          description: errorMessage
      description: Results for imported examples
    DeploymentImportResultDto:
      type: object
      properties:
        overallStatus:
          type: string
          description: "Overall status of the import operation (SUCCESS, FAILED, PARTIAL_SUCCESS)"
        counts:
          $ref: '#/components/schemas/DeploymentImportCountsDto'
        communicationTypes:
          type: array
          description: Results for imported communication types
          items:
            $ref: '#/components/schemas/DeploymentImportItemResultDto'
        templates:
          type: array
          description: Results for imported templates
          items:
            $ref: '#/components/schemas/DeploymentImportItemResultDto'
        examples:
          type: array
          description: Results for imported examples
          items:
            $ref: '#/components/schemas/DeploymentImportItemResultDto'
    FileUploadInputDto:
      required:
      - file
      type: object
      properties:
        file:
          type: string
          description: Deployment package JSON file
          format: binary
    TemplateValidationV2Response:
      type: object
      properties:
        commit:
          type: string
          description: Service version handling the request
          example: v2.10.1
        id:
          type: string
          description: Specific resource identifier
          example: 57cff118-984f-473c-a6ad-5ba51baed0dd
        data:
          $ref: '#/components/schemas/TemplateValidateResponseDto'
  securitySchemes:
    AuthnToken:
      type: http
      scheme: bearer
      bearerFormat: JWT
