openapi: 3.1.0
info:
    title: simmcomm.com SMS Gateway API
    description: |
        simmcomm.com SMS Gateway API
    version: 1.0.2
    contact:
        name: SIMM-Comm GmbH
        url: 'http://www.truesenses.com'
        email: contact@simmcomm.ch
servers:
    -   url: https://api.simmcomm.com/sms/v1
        description: Production server
    -   url: https://api-staging.simmcomm.com/sms/v1
        description: Staging server
paths:
    /send:
        post:
            security:
                -   basicAuth: [ ]
            summary: Send SMS
            description: |
                Method provides SMS sending
            operationId: sendSMS
            requestBody:
                description: Options for SMS sending
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                from:
                                    type: string
                                    description: (optional) Numeric sender ID or alphanumeric sender ID (max 11 chars)
                                to:
                                    type: string
                                    description: Destination MSISDN in intl. Format (00 or + prefix)
                                message:
                                    type: string
                                    description: UTF-8 formatted message text
                                transcode_gsm:
                                    type: boolean
                                    description: (optional) If TRUE transcode the message to use GSM-Alphabet only
                                flash:
                                    type: boolean
                                    description: (optional) If TRUE send the message as class-0 flash-SMS
                                validity:
                                    type: integer
                                    description: (optional) Validity in seconds (depends on carrier if setting is used or not)
                                send_utc:
                                    type: integer
                                    description: (optional) Send message at UTC (01.01.2029 00:00:00)
                                routing:
                                    type: string
                                    format: uuid
                                    description: (optional) UUID of console provided carrier routing path (requires setup by support)
                                campaign:
                                    type: string
                                    format: uuid
                                    description: (optional) UUID of console generated campaign on which traffic should be tracked on
                                tag:
                                    type: string
                                    description: (optional) Client provided statistics tag for this type of traffic (max 30 characters)
                                notify_ref:
                                    type: string
                                    description: (optional) Client provided reference ID (sent back in notifications)
                                notify_url:
                                    type: string
                                    description: (optional) URL to which notifications should be sent
                                notify_intermediate:
                                    type: boolean
                                    description: (optional) If TRUE sends all delivery notifications (not just final one)
                            required:
                                - to
                                - message
                            examples:
                                -   from: CompanyName
                                    to: +41790000000
                                    message: 'Your Login-Code is: 1234'
                                    transcode_gsm: true
                                    flash: true
                                    validity: 86400
                                    send_utc: 1861920000
                                    routing: ''
                                    campaign: ''
                                    tag: A2P-PIN
                                    notify_ref: CLIENTREF-ABC-123
                                    notify_url: https://client.domain/notifications
                                    notify_intermediate: true
            tags:
                - SMS Gateway

            responses:
                '200':
                    description: Message accepted
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/send"
                            examples:
                                success:
                                    value:
                                        status_code: 0
                                        status_text: 'Message accepted'
                                        uuid: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'
                                        to: '0041790000000'
                                        ported: true
                                        original_mccmnc: '22801'
                                        original_operator: 'Swisscom'
                                        current_mccmnc: '22802'
                                        current_operator: 'Sunrise'
                                        encoding_in: 'GSM_7BIT'
                                        encoding_out: 'GSM_7BIT'
                                        transcode_gsm: true
                                        message: 'Your Login-Code is: 1234'
                                        length: 24
                                        credits: 1.0000
                                        amount: 0.0000
                                        currency_source: 'CHF'
                                        exchange_rate: 1.0000
                                        currency_target: 'CHF'
                                        account_credits: 99.0000
                                        account_balance: 0.0000

                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable


    /simulate:
        post:
            security:
                -   basicAuth: [ ]
            summary: Simulate send SMS
            description: |
                Method provides SMS sending simulation

                This method works exactly the same way as /send, except that the account will not be charged and the SMS not sent.
                You can use this method to test the API integration, as well for estimating message length and costs.
            operationId: simulateSMS
            requestBody:
                description: Options for SMS sending
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                from:
                                    type: string
                                    description: (optional) Numeric sender ID or alphanumeric sender ID (max 11 chars)
                                to:
                                    type: string
                                    description: Destination MSISDN in intl. Format (00 or + prefix)
                                message:
                                    type: string
                                    description: UTF-8 formatted message text
                                transcode_gsm:
                                    type: boolean
                                    description: (optional) If TRUE transcode the message to use GSM-Alphabet only
                                flash:
                                    type: boolean
                                    description: (optional) If TRUE send the message as class-0 flash-SMS
                                validity:
                                    type: integer
                                    description: (optional) Validity in seconds (depends on carrier if setting is used or not)
                                send_utc:
                                    type: integer
                                    description: (optional) Send message at UTC (01.01.2029 00:00:00)
                                routing:
                                    type: string
                                    format: uuid
                                    description: (optional) UUID of console provided carrier routing path (requires setup by support)
                                campaign:
                                    type: string
                                    format: uuid
                                    description: (optional) UUID of console generated campaign on which traffic should be tracked on
                                tag:
                                    type: string
                                    description: (optional) Client provided statistics tag for this type of traffic (max 30 characters)
                                notify_ref:
                                    type: string
                                    description: (optional) Client provided reference ID (sent back in notifications)
                                notify_url:
                                    type: string
                                    description: (optional) URL to which notifications should be sent
                                notify_intermediate:
                                    type: boolean
                                    description: (optional) If TRUE sends all delivery notifications (not just final one)
                            required:
                                - to
                                - message
                            examples:
                                -   from: CompanyName
                                    to: +41790000000
                                    message: 'Your Login-Code is: 1234'
                                    transcode_gsm: true
                                    flash: true
                                    validity: 86400
                                    send_utc: 1861920000
                                    routing: ''
                                    campaign: ''
                                    tag: A2P-PIN
                                    notify_ref: CLIENTREF-ABC-123
                                    notify_url: https://client.domain/notifications
                                    notify_intermediate: true
            tags:
                - SMS Gateway

            responses:
                '200':
                    description: Message simulated
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/send"
                            examples:
                                success:
                                    value:
                                        status_code: 1
                                        status_text: 'Message simulated'
                                        uuid: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'
                                        to: '0041790000000'
                                        ported: true
                                        original_mccmnc: '22801'
                                        original_operator: 'Swisscom'
                                        current_mccmnc: '22802'
                                        current_operator: 'Sunrise'
                                        encoding_in: 'GSM_7BIT'
                                        encoding_out: 'GSM_7BIT'
                                        transcode_gsm: true
                                        message: 'Your Login-Code is: 1234'
                                        length: 24
                                        credits: 1.0000
                                        amount: 0.0000
                                        currency_source: 'CHF'
                                        exchange_rate: 1.0000
                                        currency_target: 'CHF'
                                        account_credits: 99.0000
                                        account_balance: 0.0000

                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable


    /hlr:
        post:
            security:
                -   basicAuth: [ ]
            summary: Lookup Home Location Register
            description: |
                Method provides HLR lookup
            operationId: lookupHLR
            requestBody:
                description: Options for HLR lookup
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                to:
                                    type: string
                                    description: Lookup MSISDN in intl. Format (00 or + prefix)
                                cache_age:
                                    type: integer
                                    description: (optional) Cache age in seconds (returns cached HLR-Info if last lookup occured <= cache_age time)
                                routing:
                                    type: string
                                    format: uuid
                                    description: (optional) UUID of console provided carrier routing path (requires setup by support)
                                campaign:
                                    type: string
                                    format: uuid
                                    description: (optional) UUID of console generated campaign on which traffic should be tracked on
                                tag:
                                    type: string
                                    description: (optional) Client provided statistics tag for this type of traffic (max 30 characters)
                                notify_ref:
                                    type: string
                                    description: (optional) Client provided reference ID (sent back in HLR-notifications)
                                notify_url:
                                    type: string
                                    description: (optional) URL to which async HLR-notifications should be sent
                            required:
                                - to
                            examples:
                                -   to: +41790000000
                                    cache_age: 86400
                                    routing: ''
                                    campaign: ''
                                    tag: NUMBER-CLEANING
                                    notify_ref: CLIENTREF-ABC-123
                                    notify_url: https://client.domain/hlr_notifications
            tags:
                - HLR Lookups

            responses:
                '200':
                    description: Lookup accepted
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/hlr"
                            examples:
                                success:
                                    value:
                                        status_code: 0
                                        status_text: 'HLR Destination reachable'
                                        uuid: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'
                                        to: '0041790000000'
                                        ported: true
                                        roaming: false
                                        imsi: 228021234567890
                                        cache: false
                                        original_mccmnc: '22801'
                                        original_operator: 'Swisscom'
                                        current_mccmnc: '22802'
                                        current_operator: 'Sunrise'
                                        credits: 0.1000
                                        amount: 0.0000
                                        currency_source: 'CHF'
                                        exchange_rate: 1.0000
                                        currency_target: 'CHF'
                                        account_credits: 99.9000
                                        account_balance: 0.0000

                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable


    /notifications/{uuid}:
        get:
            security:
                -   basicAuth: [ ]
            summary: Get delivery notification for message $uuid
            description: |
                Method provides delivery notifications retrieval|
                (optional 'hlr' only filled in case of HLR lookups)
            operationId: notifications
            parameters:
                -   name: uuid
                    in: path
                    description: Message uuid
                    schema:
                        type: string
                        format: uuid
                    required: true

            tags:
                - SMS/HLR Notifications

            responses:
                '200':
                    description: Get last delivery notification
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/notifications"
                            examples:
                                success:
                                    value:
                                        uuid: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'
                                        type: 'SMS'
                                        from: 'CompanyName'
                                        to: '0041790000000'
                                        owner: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'
                                        site: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'
                                        program: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'
                                        campaign: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'
                                        tag: 'A2P-PIN'
                                        notify_ref: 'CLIENTREF-ABC-123'
                                        UTC:
                                            time_dln: 1553008976
                                            time_dln_human: '19.03.2019 15:22:56'
                                            time_sent: 1553008975
                                            time_sent_human: '19.03.2019 15:22:55'
                                            dln: 'Message for 0041790000000, with identification xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx has been delivered on 19.03.2019 15:22:57'
                                        timezone_name: 'Europe/Zurich'
                                        timezone: 'CET'
                                        CET:
                                            time_dln: 1553012576
                                            time_dln_human: '19.03.2019 16:22:56'
                                            time_sent: 1553012575
                                            time_sent_human: '19.03.2019 16:22:55'
                                            dln: 'Message for 0041790000000, with identification xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx has been delivered on 19.03.2019 16:22:57'
                                        hlr:
                                            original_mccmnc: '22801'
                                            original_operator: 'Swisscom'
                                            current_mccmnc: '22802'
                                            current_operator: 'Sunrise'
                                            ported: true
                                            roaming: false
                                            imsi: '228021234567890'
                                        state_code: 0
                                        state_text: 'OK'
                                        duration_delivery: 0.9534
                                        duration_delivery_human: '00:00:00.9534'
                                        status_code: 2
                                        status_text: 'Delivered'


                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable


    /carrierinfo/{number}:
        get:
            security:
                -   basicAuth: [ ]
            summary: Get carrier information for $number
            description: |
                Method provides retrieval of carrier information
            operationId: carrierinfo
            parameters:
                -   name: number
                    in: path
                    description: Mobile or fixed line number
                    schema:
                        type: string
                        format: msisdn
                    required: true

            tags:
                - Carrier Lookups

            responses:
                '200':
                    description: Get carrier information
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/carrierinfo"
                            examples:
                                success:
                                    value:
                                        number: '+41790000000'
                                        details:
                                            is_valid: true
                                            is_mobile: true
                                            type: 1
                                            type_name: 'MOBILE'
                                            country_code: 41
                                            region_code: 'CH'
                                            national_number: '790000000'
                                            prefix: '4179'
                                            prefix_local: '079'
                                            operator: 'Swisscom'
                                            carrier_name: 'Swisscom'
                                            description: 'Switzerland'
                                            example_mobile: '+41781234567'
                                        mobile:
                                            type: 'National'
                                            country_name: 'Switzerland'
                                            operator: 'Swisscom AG'
                                            brand: 'Swisscom'
                                            mcc: '228'
                                            mnc: '01'
                                            mccmnc: '22801'
                                            status: 'Operational'
                                            bands: 'GSM 900 \/ GSM 1800 \/ UMTS 900 \/ UMTS 2100 \/ LTE 800 \/ LTE 1800 \/ LTE 2100 \/ LTE 2600'
                                            notes: 'GSM shutdown planned for 2020'
                                        portability:
                                            ported: true
                                            original_mccmnc: '22802'
                                            original_operator: 'Sunrise'
                                            current_mccmnc: '22801'
                                            current_operator: 'Swisscom'
                                        status_code: 0
                                        status_text: 'Carrier information'


                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -21
                                        status_text: 'Example for status_code -21: Invalid number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable




    /balances:
        get:
            security:
                -   basicAuth: [ ]
            summary: Get account balances
            description: |
                Method provides account balances retrieval
            operationId: balances

            tags:
                - Account Management

            responses:
                '200':
                    description: Get balances
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/balances"
                            examples:
                                success:
                                    value:
                                        status_code: 0
                                        status_text: 'Balance details'
                                        account_currency: CHF
                                        account_type: postpaid
                                        data:
                                            CHF:
                                                balance: 99.0000
                                                credits: 0.0000
                                            EUR:
                                                balance: 0.0000
                                                credits: 5.3200

                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable


    /sites:
        post:
            security:
                -   basicAuth: [ ]
            summary: Create site
            description: |
                Method provides site creation
            operationId: createSite
            requestBody:
                description: Options for site creation
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                name:
                                    type: string
                                    description: Provide a name for the site created
                            required:
                                - name
                            examples:
                                -   name: Site name ABC
            tags:
                - Account Management

            responses:
                '200':
                    description: Site created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/sitesCreate"
                            examples:
                                success:
                                    value:
                                        status_code: 0
                                        status_text: 'Site created'
                                        uuid: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'

                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable

        get:
            security:
                -   basicAuth: [ ]
            summary: Get sites of account
            description: |
                Method provides account sites retrieval
            operationId: sites

            tags:
                - Account Management

            responses:
                '200':
                    description: Get sites
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/sites"
                            examples:
                                success:
                                    value:
                                        status_code: 0
                                        status_text: 'Sites list'
                                        count: 2
                                        data:
                                            -   uuid: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
                                                name: "Name of site 0"
                                                created: 1553381535.8793
                                            -   uuid: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
                                                name: "Name of site 1"
                                                created: 1553381540.0001

                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable

    /sites/{uuid}/programs:
        post:
            security:
                -   basicAuth: [ ]
            summary: Create program
            description: |
                Method provides program creation
            operationId: createProgram

            parameters:
                -   name: uuid
                    in: path
                    description: Site uuid
                    schema:
                        type: string
                    required: true

            requestBody:
                description: Options for program creation
                required: true
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                name:
                                    type: string
                                    description: Provide a name for the program created
                            required:
                                - name
                            examples:
                                -   name: Program name ABC
            tags:
                - Account Management

            responses:
                '200':
                    description: Program created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/programsCreate"
                            examples:
                                success:
                                    value:
                                        status_code: 0
                                        status_text: 'Program created'
                                        uuid: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'

                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable


        get:
            security:
                -   basicAuth: [ ]
            summary: Get programs of site
            description: |
                Method provides programs of site retrieval
            operationId: programs

            parameters:
                -   name: uuid
                    in: path
                    description: Site uuid
                    schema:
                        type: string
                    required: true

            tags:
                - Account Management

            responses:
                '200':
                    description: Get programs
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/programs"
                            examples:
                                success:
                                    value:
                                        status_code: 0
                                        status_text: 'Programs list'
                                        count: 2
                                        data:
                                            -   uuid: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
                                                name: "Name of program 0"
                                                created: 1553381535.8793
                                            -   uuid: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
                                                name: "Name of program 1"
                                                created: 1553381540.0001

                '400':
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                error:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                '401':
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                error:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                '403':
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                error:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                '404':
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                error:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                '412':
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                error:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                '500':
                    description: An internal server error has occured
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                error:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error

                '503':
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                error:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable

    /programs/{uuid}/campaigns:
        post:
            security:
                -   basicAuth: [ ]
            summary: Create campaign
            description: Method provides campaign creation
            operationId: createCampaign

            parameters:
                -   name: uuid
                    in: path
                    description: Program uuid
                    required: true
                    content:
            requestBody:
                content:
                    application/json:
                        schema:
                            type: object
                            properties:
                                name:
                                    type: string
                                    description: Provide a name for the campaign created
                            required:
                                - name
                            examples:
                                -   name: Campaign name ABC

            tags:
                - Account Management

            responses:
                "200":
                    description: Campaign created
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/campaignsCreate"
                            examples:
                                response:
                                    value:
                                        status_code: 0
                                        status_text: 'Campaign created'
                                        uuid: 'xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx'

                "400":
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                response:
                                    value:
                                        status_code: -400,
                                        status_text: Bad request

                "401":
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                response:
                                    value:
                                        status_code: -401,
                                        status_text: Not authorized

                "403":
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                response:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                "404":
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                response:
                                    value:
                                        status_code: -404
                                        status_text: Command not found
                "412":
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                response:
                                    value:
                                        status_code: -20
                                        status_text: 'Example for status_code -20: Invalid to number provided'
                "500":
                    description: An internal server error has occurred
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                response:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error
                "503":
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                response:
                                    value:
                                        status_code: -503
                                        statuis_text: Service Unavailable

        get:
            security:
                -   basicAuth: [ ]
            summary: Get campaigns of program
            description: |
                Method provides campaigns of program retrieval
            operationId: campaigns

            parameters:
                -   name: uuid
                    in: path
                    description: Program uuid
                    required: true
                    schema:
                        type: string
                        format: uuid

            tags:
                - Account Management

            responses:
                "200":
                    description: Get campaigns
                    content:
                        application/json:
                            schema:
                                $ref: "#/components/responses/campaigns"
                            examples:
                                response:
                                    value:
                                        status_code: 0
                                        status_text: 'Campaigns list'
                                        count: 2
                                        data:
                                            -   uuid: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
                                                name: "Name of campaign 0"
                                                created: 1553381535.8793
                                            -   uuid: "xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx"
                                                name: "Name of campaign 1"
                                                created: 1553381540.0001

                "400":
                    description: The provided JSON data cannot be parsed
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Bad request
                            examples:
                                response:
                                    value:
                                        status_code: -400
                                        status_text: Bad request

                "401":
                    description: HTTPS Basic-Auth is required
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Not authorized
                            examples:
                                response:
                                    value:
                                        status_code: -401
                                        status_text: Not authorized

                "403":
                    description: Invalid authentication credentials provided
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Forbidden
                            examples:
                                response:
                                    value:
                                        status_code: -403
                                        status_text: Forbidden

                "404":
                    description: The provided command is invalid
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Command not found
                            examples:
                                response:
                                    value:
                                        status_code: -404
                                        status_text: Command not found

                "412":
                    description: Precondition failed (evaluate status_code / status_text for detailed information)
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Precondition failed
                            examples:
                                response:
                                    value:
                                        status_code: -20
                                        status_text: "Example for status_code -20: Invalid to number provided"
                "500":
                    description: An internal server error has occurred
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Internal Server Error
                            examples:
                                response:
                                    value:
                                        status_code: -500
                                        status_text: Internal Server Error
                "503":
                    description: Service unavailable due to account not provisioned for service
                    content:
                        application/json:
                            schema:
                                type: object
                                title: Service unavailable
                            examples:
                                response:
                                    value:
                                        status_code: -503
                                        status_text: Service Unavailable

components:
    securitySchemes:
        basicAuth:
            type: http
            scheme: basic
            description: >-
                HTTP Basic Authentication. Works over `HTTP` and `HTTPS`. Use provided
                Flowly accesskey as username and secretkey as password
    responses:
        send:
            description: Send SMS response
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            uuid:
                                type: string
                                format: uuid
                                description: Unique identifier for accepted SMS message
                            to:
                                type: string
                                description: Destination MSISDN in intl. Format (always 00 prefixed)
                            ported:
                                type: boolean
                                format: true|false|null
                                description: If TRUE the number has been ported to a different operator
                            original_mccmnc:
                                type: string
                                description: Mobile Country and Mobile Network Code (eg. 22801)
                            original_operator:
                                type: string
                                description: Name of original operator (eg. Swisscom)
                            current_mccmnc:
                                type: string
                                description: Mobile Country and Mobile Network Code (eg. 22802)
                            current_operator:
                                type: string
                                description: Name of current operator (eg. Sunrise)
                            encoding_in:
                                type: string
                                description: Encoding of message input
                            encoding_out:
                                type: string
                                description: Encoding of message output
                            transcode_gsm:
                                type: boolean
                                description: If TRUE the message got transcoded by the gateway
                            message:
                                type: string
                                description: Actual message text sent (eg. after transcode_gsm was applied)
                            length:
                                type: integer
                                description: Total length of message
                            messages:
                                type: integer
                                description: Total amount of concatenated messages
                            credits:
                                type: number
                                format: float
                                description: Total number of credits (for credit based accounts)
                            amount:
                                type: number
                                format: float
                                description: Total costs (for currency based accounts)
                            currency_source:
                                type: string
                                description: ISO-Currency code of message processor
                            exchange_rate:
                                type: number
                                format: float
                                description: Exchange rate applied
                            currency_target:
                                type: string
                                description: ISO-Currency code of client account
                            account_credits:
                                type: number
                                format: float
                                description: Current account credits (for credit based accounts)
                            account_balance:
                                type: number
                                format: float
                                description: Current account balance (for currency based accounts)
        notifications:
            description: Notifications response
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            uuid:
                                type: string
                                description: Unique identifier for sent SMS message
                            from:
                                type: string
                                description: Numeric sender ID or alphanumeric sender ID (max 11 chars)
                            to:
                                type: string
                                description: Destination MSISDN in intl. Format (always 00 prefixed)
                            owner:
                                type: string
                                description: UUID of account owner
                            site:
                                type: string
                                description: UUID of site
                            program:
                                type: string
                                description: UUID of program
                            campaign:
                                type: string
                                description: UUID of campaign
                            tag:
                                type: string
                                description: Client provided name tag for this type of traffic
                            notify_ref:
                                type: string
                                description: Client provided reference ID
                            UTC:
                                $ref: "#/components/schemas/notificationsDetails"
                            timezone_name:
                                type: string
                                description: Timezone name of account (eg. Europe/Zurich)
                            timezone:
                                type: string
                                description: Timezone abbreviation of account (eg. CET)
                            CET:
                                $ref: "#/components/schemas/notificationsDetails"
                            hlr:
                                $ref: "#/components/schemas/notificationsHLR"
                            state_code:
                                type: integer
                                description: 'Message state (1: Intermediate, -1: Failed, 0: Delivered'
                            state_text:
                                type: string
                                description: State text (eg. 'OK')
                            duration_delivery:
                                type: number
                                format: float
                                description: 'Duration of delivery (eg. 0.9534)'
                            duration_delivery_human:
                                type: string
                                description: 'Duration of delivery (eg. 00:00:00.9534)'
                            status_code:
                                type: integer
                                description: 'Delivery notifications (DLN) code (Negative: Errors, 0: Forwarded, 1: Buffered, 2: Delivered'
                            status_text:
                                type: string
                                description: 'Delivery notifications (DLN) text (eg. Delivered)'
        carrierinfo:
            description: Carrier info
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            number:
                                type: string
                                description: Mobile or fixed line number
                            details:
                                $ref: "#/components/schemas/carrierinfoDetails"
                            mobile:
                                $ref: "#/components/schemas/carrierinfoMobile"
                            portability:
                                $ref: "#/components/schemas/carrierinfoPortability"
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
        hlr:
            description: HLR data
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            uuid:
                                type: string
                                format: uuid
                                description: Unique identifier for accepted HLR lookup
                            to:
                                type: string
                                description: Lookup MSISDN in intl. Format (always 00 prefixed)
                            ported:
                                type: boolean
                                format: true|false|null
                                description: If TRUE the number has been ported to a different operator
                            roaming:
                                type: boolean
                                format: true|false
                                description: If TRUE the number is currently roaming in another network
                            imsi:
                                type: string
                                description: International mobile subscriber identity
                            cache:
                                type: boolean
                                format: true|false
                                description: If TRUE a requested cached result was found and returned
                            original_mccmnc:
                                type: string
                                description: Mobile Country and Mobile Network Code (eg. 22801)
                            original_operator:
                                type: string
                                description: Name of original operator (eg. Swisscom)
                            current_mccmnc:
                                type: string
                                description: Mobile Country and Mobile Network Code (eg. 22802)
                            current_operator:
                                type: string
                                description: Name of current operator (eg. Sunrise)
                            credits:
                                type: number
                                format: float
                                description: Total number of credits (for credit based accounts)
                            amount:
                                type: number
                                format: float
                                description: Total costs (for currency based accounts)
                            currency_source:
                                type: string
                                description: ISO-Currency code of HLR processor
                            exchange_rate:
                                type: number
                                format: float
                                description: Exchange rate applied
                            currency_target:
                                type: string
                                description: ISO-Currency code of client account
                            account_credits:
                                type: number
                                format: float
                                description: Current account credits (for credit based accounts)
                            account_balance:
                                type: number
                                format: float
                                description: Current account balance (for currency based accounts)
        balances:
            description: Account balances
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            account_currency:
                                type: string
                                description: Default account currency
                            account_type:
                                type: string
                                description: Account charging type (prepaid or postpaid)
                            data:
                                $ref: "#/components/schemas/balancesData"
        sites:
            description: Sites list
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            count:
                                type: integer
                                description: Total sites in account (numeric)
                            data:
                                $ref: '#/components/schemas/sitesData'
        programs:
            description: Programs list
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            count:
                                type: integer
                                description: Total programs in site (numeric)
                            data:
                                $ref: '#/components/schemas/programsData'
        campaigns:
            description: Campaigns list
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            count:
                                type: integer
                                description: Total campaigns in program (numeric)
                            data:
                                $ref: '#/components/schemas/campaignsData'
        sitesCreate:
            description: Sites create response
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            uuid:
                                type: string
                                description: UUID of site
        programsCreate:
            description: Programs create response
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            uuid:
                                type: string
                                description: UUID of program
        campaignsCreate:
            description: Campaigns create response
            content:
                application/json:
                    schema:
                        type: object
                        properties:
                            status_code:
                                type: integer
                                description: Status code (numeric)
                            status_text:
                                type: string
                                description: Status text (detailed string)
                            uuid:
                                type: string
                                description: UUID of campaign

    schemas:
        notificationsDetails:
            type: object
            properties:
                time_dln:
                    type: integer
                    description: Unixtime of delivery notification
                time_dln_human:
                    type: string
                    description: 'DD.MM.YYYY HH:MM:SS of delivery notification'
                time_sent:
                    type: integer
                    description: Unixtime of sent message
                time_sent_human:
                    type: string
                    description: 'DD.MM.YYYY HH:MM:SS of sent message'
                dln:
                    type: string
                    description: 'Delivery notification details in human format'
        notificationsHLR:
            type: object
            properties:
                ported:
                    type: boolean
                    format: true|false|null
                    description: If TRUE the number has been ported to a different operator
                roaming:
                    type: boolean
                    format: true|false
                    description: If TRUE the number is currently roaming in another network
                imsi:
                    type: string
                    description: International mobile subscriber identity
                original_mccmnc:
                    type: string
                    description: Mobile Country and Mobile Network Code (eg. 22801)
                original_operator:
                    type: string
                    description: Name of original operator (eg. Swisscom)
                current_mccmnc:
                    type: string
                    description: Mobile Country and Mobile Network Code (eg. 22802)
                current_operator:
                    type: string
                    description: Name of current operator (eg. Sunrise)
        carrierinfoDetails:
            type: object
            properties:
                is_valid:
                    type: boolean
                    description: true if number is valid
                is_mobile:
                    type: boolean
                    description: true if number is mobile
                type:
                    type: integer
                    description: Type of number
                type_name:
                    type: string
                    description: Type of number
                country_code:
                    type: integer
                    description: Country code
                region_code:
                    type: string
                    description: Region code (eg. CH)
                national_number:
                    type: string
                    description: National number without leading 0
                prefix:
                    type: string
                    description: International prefix (eg. 4179)
                prefix_local:
                    type: string
                    description: Local prefix (eg. 079)
                operator:
                    type: string
                    description: Name of operator (usually same as carrier_name)
                carrier_name:
                    type: string
                    description: Name of carrier (eg. Swisscom)
                description:
                    type: string
                    description: Country or city name (depends on number)
                example_mobile:
                    type: string
                    description: Sample mobile number in given country
        carrierinfoMobile:
            type: object
            properties:
                type:
                    type: string
                    description: Type of number
                country_name:
                    type: string
                    description: Country name
                operator:
                    type: string
                    description: Name of operator
                brand:
                    type: string
                    description: Brand name of operator
                mcc:
                    type: string
                    description: Mobile Country Code
                mnc:
                    type: string
                    description: Mobile Network Code
                mccmnc:
                    type: string
                    description: Combined MCC and MNC
                status:
                    type: string
                    description: Status of mobile network
                bands:
                    type: string
                    description: Mobile bands in use by network
                notes:
                    type: string
                    description: Additional notes
        carrierinfoPortability:
            type: object
            properties:
                ported:
                    type: boolean
                    description: true if number has been ported
                original_mccmnc:
                    type: string
                    description: MCCMNC of original operator (only for mobile networks)
                original_operator:
                    type: string
                    description: Name of original operator
                current_mccmnc:
                    type: string
                    description: MCCMNC of current operator (only for mobile networks)
                current_operator:
                    type: string
                    description: Name of current operator
        balancesData:
            type: object
            properties:
                CHF:
                    $ref: "#/components/schemas/currencyDetails"
                EUR:
                    $ref: "#/components/schemas/currencyDetails"
                USD:
                    $ref: "#/components/schemas/currencyDetails"
        currencyDetails:
            type: object
            properties:
                credits:
                    type: number
                    format: float
                    description: Current account credits (for credit based accounts)
                balance:
                    type: number
                    format: float
                    description: Current account balance (for currency based accounts)
        sitesData:
            type: object
            properties:
                uuid:
                    type: string
                    description: UUID of site
                name:
                    type: string
                    description: Name of site
                created:
                    type: number
                    format: float
                    description: UTC of site creation
        programsData:
            type: object
            properties:
                uuid:
                    type: string
                    description: UUID of program
                name:
                    type: string
                    description: Name of program
                created:
                    type: number
                    format: float
                    description: UTC of program creation
        campaignsData:
            type: object
            properties:
                uuid:
                    type: string
                    description: UUID of campaign
                name:
                    type: string
                    description: Name of campaign
                created:
                    type: number
                    format: float
                    description: UTC of campaign creation
