openapi: 3.0.1
info:
  title: LUXSCI
  description: |-
    For a technical overview, see [LuxSci API Mechanics Guide](https://luxsci.com/api/mechanics/)

    Return to [The API Guide](https://luxsci.com/api/)

  version: v2025.1.15.1
servers:
  - url: 'https://{{domain}}/perl/api/v2'
    description: 'The domain rest.luxsci.com is our default API host.  Customers in a specific data center, or customers with a dedicated API server(s) may have a different API host(s).'
    variables:
      domain:
        default: rest.luxsci.com
        description: Your LuxSci REST API endpoint (e.g., rest.yourdomain.com).  rest.luxsci.com is LuxSci's default shared API endpoint.  See the configuration dialog for your API Integration to see what hostname should be used for that integration.'
security:
  - LuxSciSecureAccount: []
  - LuxSciSecureUser: []
  - OAuth2Account: [read, write]
  - OAuth2Uer: [read, write]
  - ApiKeyAccount: []
  - ApiKeyUser: []
  - BasicAccount: []
  - BasicUser: []
paths:
  '/auth':
    post:
      operationId: authentication
      tags:
        - Authentication
      description: |-
        For API Integrations using the "LuxSci Secure" authentication mechanisms, only. In order to use any API commands, at any level, your client must first authenticate and obtain an authentication code. This authentication code can then be used to make one or more calls to API functions.  

        Your authentication "session" can also be revoked, immediately invalidating all authentication codes received for it (i.e., this is a "log out"). 
        
        In order to authenticate, you will need your API Token, API Key, and your API Host name. This API request is different from authenticated request in that you do not need to send a cookie, and the way that the request is signed is different.

        See also [Authentication](/rest-api/mechanics.html#auth).
      security: []
      x-internal: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - token
                - date
                - signature
              properties:
                date:
                  type: string
                  description: |-
                    The current date and time. This can be in "epoch seconds" (e.g. "1426025141") or in a standard date format that will be parsed and converted to epoch seconds. E.g. these formats are all OK:  
                    "<tt>Wed, 3 Mar 2015 13:12:15 -0400</tt>"  
                    "<tt>Wed, 3 Mar 2015 13:12:15 GMT</tt>"  
                    "<tt>2015-03-03 13:12:15 -0400</tt>"  
                    "<tt>03-Mar-2015 13:12:15 GMT</tt>"  
                    Your date and time (clock skew) must be no later than 15 minutes behind and no more than 1 minute ahead of our server time, or else the request will be rejected.
                signature:
                  type: string
                  description: |-
                    HMAC using your API Key as the HMAC key. 
                    Signature = <tt>HMAC( text_to_sign, API KEY)</tt>
                    <tt>text_to_sign = token + "\n" + date + "\n"</tt> 
                    If you are sending username and password information in this authentication request, then:  
                    <tt>text_to_sign = token + "\n" + date + "\n" + user + "\n" + pass + "\n"</tt>
                token:
                  type: string
                  description: 'Your API Token'
                user:
                  type: string
                  description: 'If you are authenticating into "user" scope with an explicit username and password, include the login email address of the user in question. E.g."<tt>joe@domain.com</tt>"'
                pass:
                  type: string
                  description: 'If you are authenticating into "user" scope with an explicit username and password, include the plain text password for the user.'
            example:
                  {
                      "token": "9phnzJLa8ly9K9qOvwrJwL9FQXSNBwH+kQEiai0aHHI",
                      "date": "1617889555",
                      "signature": "78a3cc52fe9fed8a9cf69a2f0f0095ee66b6d0c655814c303adec83222ed7063"
                  }
      responses:
        '201':
          description: |-
            Standard JSON response.  
            No "data" keyword will be sent.  
            See the "auth" keyword for your new authentication token.
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {"auth":"66840164-1617889562-3d472a77806a340161982d8e034219034007ed9518f452f4b6f8c2ddd8b5b03a","success":1}
    delete:
      operationId: revokeAuthentication
      security:
        - LuxSciSecureAccount: []
        - LuxSciSecureUser: []
      tags:
        - Authentication
      description: |-
        For API Integrations using the "LuxSci Secure" authentication mechanism, only. Revoke your authentication session and invalidate all authorization codes received.
        See also [Revocation](/rest-api/mechanics.html#revoke).
      responses:
        '200':
          description: |-
            Standard JSON response.  
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: integer
                  comment:
                    type: string
              example: '{"success":1,"comment":"Authentication session revoked."}'
  '/oauth':
    post:
      operationId: getOAuthAccessToken
      tags:
        - Authentication
      description: |-
        For API Integrations using the "OAuth 2" authentication mechanism, only. In order to use any API commands, at any level, your client must first authenticate and obtain a Bearer Token. This Bearer Token can then be used to make one or more calls to API functions.  
        The Bearer Token is obtained using the OAuth 2.0 Client Credentials Flow for account-scope API Integrations, and the OAuth 2.0 Resource Owner Password Credentials Flow (ROPC) or user-scope API Integrations.

        In order to authenticate, you will need your API Token, API Key, and your API Host name. This API request is different from authenticated request in that you do not send an Authorization header.

        See also [Authentication](/rest-api/mechanics.html#auth).
      security: []
      x-internal: true
      requestBody:
        content:
          application/x-www-form-urlencoded::
            schema:
              type: object
              required:
                - grant_type
                - client_id
                - client_secret
              properties:
                grant_type:
                  type: string
                  enum: [client_credentials, password]
                  description: >
                    The type of OAuth 2.0 grant to use.  
                    Use `client_credentials` for account-scope API configurations
                    Use `password` for user-scope API configurations to authenticate a user with their username and password.				  
                client_id:
                  type: string
                  description: 'Your Public API Token'
                client_secret:
                  type: string
                  description: 'Your API Secret' 
                usernam:
                  type: string
                  description: 'If you are authenticating into "user" scope with an explicit username and password, include the login email address of the user in question. E.g."<tt>joe@domain.com</tt>"'
                password:
                  type: string
                  description: 'If you are authenticating into "user" scope with an explicit username and password, include the plain text password for the user.'
            example:
                  {
                      "token": "9phnzJLa8ly9K9qOvwrJwL9FQXSNBwH+kQEiai0aHHI",
                      "date": "1617889555",
                      "signature": "78a3cc52fe9fed8a9cf69a2f0f0095ee66b6d0c655814c303adec83222ed7063"
                  }
      responses:
        '200':
          description: Access Bearer Token successfully issued.
          content:
            application/json:
              schema:
                type: object
                properties:
                  access_token:
                    type: string
                    description: The issued opaque Bearer token.
                  token_type:
                    type: string
                    enum: [Bearer]
                    description: The type of token issued (always "Bearer").
                  expires_in:
                    type: integer
                    description: The lifetime in seconds of the token.
  '/user/{username}/password':
    get:
      operationId: 'getUserSingleSignOnLoginURL'
      tags:
        - Users
      description: |-
        Create a URL that the user can click on which will automatically log the user into the Web Interface without needing to enter his/her username and password. For example, if the user has already authenticated himself in your system, you can use this API call to get a link that can be presented to the user so the user can then access WebMail or other services without needing to login again (e.g. “single sign-on”).
        
        Notes:
        1. This API call returns a URL. You can have the user click on that URL or you can redirect him/her to it.
        2. This URL is valid for 15 minutes from the time of issuance. It can be used multiple times while it is in use.
        3. These URLs are invalidated if the user’s password is changed.
        4. These URLs will only work for someone coming from the IP address that your specified in your request for the URL
        5. If a user has a preference that permits only OpenID/Social media logins to his/her account, then this auto-login URL will not work.
        6. If a user has two-factor authentication enabled, then this URL will take him through the username/password portion of the login process; however, the user will still have to do the chosen second factor.
        7. All logins via Single Sign-on are logged and are denoted as Single Sign-on logins in the user’s login history report.
      parameters:
        - name: username
          in: path
          description: 'Optional. Path after the domain name to take the user to upon automatic sign in. If omitted, the default path of “/perl/member/email/messages.pl” will be used; this default takes one to view the WebMail INBOX folder. You can use this parameter to select other destinations.'
          required: true
          schema:
            type: string
        - name: ip
          in: query
          required: true
          description: 'Required. This must be the IPv4 IP address that the end user is currently using. The resulting login URL will only work for someone who is coming from this specific IP address.'
          schema:
            type: string
          example: 4.2.2.1
      responses:
        '200':
          description: 'Response description.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        description: 'The web address that can be used to auto-login to the Web Interface.'
              example: {
                      "success": 1,
                      "data":{
                        "url":"https://doctor.com/perl/member/email/messages. pl/2/63871?login-single-signon=1-63871-1428369732-00117d17e6484fb4a38a14ff83b18cbfaa10 15db7aa657dcf7adf0de938a68d0&settheme=23163737891"
                      }
                    }
    put:
      operationId: 'changeUserPassword'
      tags:
        - Users
      description: |-
        This command changes the user’s password. It validates the new password using all the same tests that would be applied if you were changing the password in the Web Interface. Make sure that the configuration settings for password strength validation are compatible with that used by your own applications generating the passwords.
        
        You cannot change the passwords of users that have been disabled. You must re-enable them first, then change the password. {{ACL: User Settings - Change Password}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - password
              properties:
                password:
                  type: string
                  description: |-
                    Plain text new password for this user.   
                    Alternately, you can send an “SHA512 hash” of the password in the format:
                    - $6$16charsalt$86-character-hash  
                    
                    If you would like to update the password without ever telling revealing what it is.
      responses:
        '201':
          description: 'Response description.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                        "auth": "omitted",
                        "success": 1
                    }
  '/user/{username}':
    get:
      operationId: getUser
      tags:
      - Users
      description: 'Return contact information and other general metadata for the user. {{ACL: User Settings - Read}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'User profile'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      account:
                        type: string
                        description: 'Account id for the account to which this user belongs (integer).'
                      city:
                        type: string
                        description: 'City'
                      company:
                        type: string
                        description: 'Company / organization'
                      contact:
                        type: string
                        description: 'Full name. E.g. “John Smith”'
                      country: 
                        type: string
                        description: 'Country'
                      created:
                        type: string
                        description: 'Date and time this user was created (YYYY-MM-DD HH:MM:SS in GMT)'
                      custom1: 
                        type: string
                        description: 'Custom field #1'
                      custom2: 
                        type: string
                        description: ' Custom field #2'
                      custom3:
                        type: string
                        description: 'Custom field #3'
                      disk_quota: 
                        type: string
                        description: 'Floating point limit on the user’s total disk space usage. In gigabytes (1 GB = 1000 MB). A value of “-1” signifies that the user does not have a disk usage limit.'
                      disk_usage:
                        type: string
                        description: 'Floating point value for the user’s current (last measured) total disk space usage. In gigabytes (1 GB = 1000 MB)'
                      email1:
                        type: string
                        description: 'Primary email address'
                      email2:
                        type: string
                        description: 'Alternate email address'
                      fax:
                        type: string
                        description: 'FAX number'
                      flags: 
                        type: array
                        items:
                          type: string
                        description: |-
                          Array. Lists which of the following flags, if any, are set on this user:
                            - poor_password – User must change his/her password on the nextlogin to the Web Interface 
                            - can_autodelete – User account can be auto-deleted if the user has not logged in in a long time.
                      uid:
                        type: string
                        description: 'Unique user ID (integer).'
                      last_access_date: 
                        type: string
                        description: 'Date Time the user last logged into any of WebMail, POP, IMAP, or SMTP (not updated real time). If the user has never logged in, this should be the same as the “created” date time. (YYYY-MM-DD HH:MM:SS in GMT)'
                      phone1: 
                        type: string
                        description: 'Primary contact phone number'
                      phone2: 
                        type: string
                        description: 'Alternate contact phone number'
                      secret_a: 
                        type: string
                        description: 'Answer to secret security question'
                      secret_q: 
                        type: string
                        description: 'Secret security question'
                      services: 
                        type: array
                        items:
                          type: string
                        description: |-
                          Array. Lists which of the following services the user has permission to use: 
                            - pop – POP3 access to email 
                            - imap – IMAP4 access to email 
                            - smtp – SMTP for sending email 
                            - spam – Basic Spam and Virus Filtering 
                            - ftp – SFTP access 
                            - website – permission to login to the Web Interface
                      state:
                        type: string
                        description: 'State/Province'
                      street1: 
                        type: string
                        description: 'Street address (line 1)'
                      street2:
                        type: string
                        description: 'Street address (line 2)'
                      zip:
                        type: string
                        description: 'Zip / postal code'
              example:
                    {
                      "success": 1,
                      "data":{
                        "contact":"John Smith",
                        "custom3":null,
                        "state":"MA",
                        "secret_q":"What color is the sky?",
                        "city":"Boston",
                        "fax":null,
                        "company":"Doctor, Inc.",
                        "secret_a":"Black in a cave",
                        "country":"USA",
                        "email2":null,
                        "email1":"john@doctor.com",
                        "custom1": null,
                        "street1":null,
                        "zip":null,
                        "custom2":null,
                        "phone1":"111-222-3333",
                        "street2":null,
                        "phone2":null
                      }
                    }
    put:
      operationId: updateUser
      tags:
      - Users
      description: 'Update contact information for the user.  Same as `updateUserProfile`.  {{ACL: User Settings - Write}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                city:
                  type: string
                  description: 'City'
                company:
                  type: string
                  description: 'Company / organization'
                contact:
                  type: string
                  description: 'Full name. E.g. “John Smith”. Must be a non-empty string.'
                country:
                  type: string
                  description: 'Country'
                custom1:
                  type: string
                  description: 'Custom field #1'
                custom2:
                  type: string
                  description: 'Custom field #2'
                custom3:
                  type: string
                  description: 'Custom field #3'
                email1:
                  type: string
                  description: 'Primary email address. Must be a valid email.'
                email2:
                  type: string
                  description: 'Alternate email address. Must be a valid email.'
                fax:
                  type: string
                  description: 'FAX number'
                phone1:
                  type: string
                  description: 'Primary contact phone number'
                phone2:
                  type: string
                  description: 'Alternate contact phone number'
                secret_a:
                  type: string
                  description: 'Answer to secret security question'
                secret_q:
                  type: string
                  description: 'Secret security question. If you provide one of the 2 security fields, you must supply both.'
                state:
                  type: string
                  description: 'State/Province'
                street1:
                  type: string
                  description: 'Street address (line 1)'
                street2:
                  type: string
                  description: 'Street address (line 2)'
                zip:
                  type: string
                  description: 'Zip / postal code'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'User profile'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":{
                        "contact":"John Smith",
                        "custom3":null,
                        "state":"MA",
                        "secret_q":"What color is the sky?",
                        "city":"Boston",
                        "fax":null,
                        "company":"Doctor, Inc.",
                        "secret_a":"Black in a cave",
                        "country":"USA",
                        "email2":null,
                        "email1":"john@doctor.com",
                        "custom1": null,
                        "street1":null,
                        "zip":null,
                        "custom2":null,
                        "phone1":"111-222-3333",
                        "street2":null,
                        "phone2":null
                      }
                    }
  '/user/{username}/profile':
    get:
      operationId: getUserProfile
      tags:
      - Users
      description: 'Return contact information and other general metadata for the user.  This endpoint is the same as `getUser`. {{ACL: User Settings - Read}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'User profile'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      account:
                        type: string
                        description: 'Account id for the account to which this user belongs (integer).'
                      city:
                        type: string
                        description: 'City'
                      company:
                        type: string
                        description: 'Company / organization'
                      contact:
                        type: string
                        description: 'Full name. E.g. “John Smith”'
                      country: 
                        type: string
                        description: 'Country'
                      created:
                        type: string
                        description: 'Date and time this user was created (YYYY-MM-DD HH:MM:SS in GMT)'
                      custom1: 
                        type: string
                        description: 'Custom field #1'
                      custom2: 
                        type: string
                        description: ' Custom field #2'
                      custom3:
                        type: string
                        description: 'Custom field #3'
                      disk_quota: 
                        type: string
                        description: 'Floating point limit on the user’s total disk space usage. In gigabytes (1 GB = 1000 MB). A value of “-1” signifies that the user does not have a disk usage limit.'
                      disk_usage:
                        type: string
                        description: 'Floating point value for the user’s current (last measured) total disk space usage. In gigabytes (1 GB = 1000 MB)'
                      email1:
                        type: string
                        description: 'Primary email address'
                      email2:
                        type: string
                        description: 'Alternate email address'
                      fax:
                        type: string
                        description: 'FAX number'
                      flags: 
                        type: array
                        items:
                          type: string
                        description: 'Array. Lists which of the following flags, if any, are set on this user: • poor_password – User must change his/her password on the nextlogin to the Web Interface • can_autodelete – User account can be auto-deleted if the user has not logged in in a long time.'
                      uid:
                        type: string
                        description: 'Unique user ID (integer).'
                      last_access_date: 
                        type: string
                        description: 'Date Time the user last logged into any of WebMail, POP, IMAP, or SMTP (not updated real time). If the user has never logged in, this should be the same as the “created” date time. (YYYY-MM-DD HH:MM:SS in GMT)'
                      phone1: 
                        type: string
                        description: 'Primary contact phone number'
                      phone2: 
                        type: string
                        description: 'Alternate contact phone number'
                      secret_a: 
                        type: string
                        description: 'Answer to secret security question'
                      secret_q: 
                        type: string
                        description: 'Secret security question'
                      services: 
                        type: array
                        items:
                          type: string
                        description: |-
                          Array. Lists which of the following services the user has permission to use: 
                            - pop – POP3 access to email 
                            - imap – IMAP4 access to email 
                            - smtp – SMTP for sending email 
                            - spam – Basic Spam and Virus Filtering 
                            - ftp – SFTP access 
                            - website – permission to login to the Web Interface
                      state:
                        type: string
                        description: 'State/Province'
                      street1: 
                        type: string
                        description: 'Street address (line 1)'
                      street2:
                        type: string
                        description: 'Street address (line 2)'
                      zip:
                        type: string
                        description: 'Zip / postal code'
              example:
                    {
                      "success": 1,
                      "data":{
                        "contact":"John Smith",
                        "custom3":null,
                        "state":"MA",
                        "secret_q":"What color is the sky?",
                        "city":"Boston",
                        "fax":null,
                        "company":"Doctor, Inc.",
                        "secret_a":"Black in a cave",
                        "country":"USA",
                        "email2":null,
                        "email1":"john@doctor.com",
                        "custom1": null,
                        "street1":null,
                        "zip":null,
                        "custom2":null,
                        "phone1":"111-222-3333",
                        "street2":null,
                        "phone2":null
                      }
                    }
    put:
      operationId: updateUserProfile
      tags:
      - Users
      description: 'Update contact information for the user. {{ACL: User Settings - Write}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                city:
                  type: string
                  description: 'City'
                company:
                  type: string
                  description: 'Company / organization'
                contact:
                  type: string
                  description: 'Full name. E.g. “John Smith”. Must be a non-empty string.'
                country:
                  type: string
                  description: 'Country'
                custom1:
                  type: string
                  description: 'Custom field #1'
                custom2:
                  type: string
                  description: 'Custom field #2'
                custom3:
                  type: string
                  description: 'Custom field #3'
                email1:
                  type: string
                  description: 'Primary email address. Must be a valid email.'
                email2:
                  type: string
                  description: 'Alternate email address. Must be a valid email.'
                fax:
                  type: string
                  description: 'FAX number'
                phone1:
                  type: string
                  description: 'Primary contact phone number'
                phone2:
                  type: string
                  description: 'Alternate contact phone number'
                secret_a:
                  type: string
                  description: 'Answer to secret security question'
                secret_q:
                  type: string
                  description: 'Secret security question. If you provide one of the 2 security fields, you must supply both.'
                state:
                  type: string
                  description: 'State/Province'
                street1:
                  type: string
                  description: 'Street address (line 1)'
                street2:
                  type: string
                  description: 'Street address (line 2)'
                zip:
                  type: string
                  description: 'Zip / postal code'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'User profile'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":{
                        "contact":"John Smith",
                        "custom3":null,
                        "state":"MA",
                        "secret_q":"What color is the sky?",
                        "city":"Boston",
                        "fax":null,
                        "company":"Doctor, Inc.",
                        "secret_a":"Black in a cave",
                        "country":"USA",
                        "email2":null,
                        "email1":"john@doctor.com",
                        "custom1": null,
                        "street1":null,
                        "zip":null,
                        "custom2":null,
                        "phone1":"111-222-3333",
                        "street2":null,
                        "phone2":null
                      }
                    }
  '/user/{username}/app-password/{suffix}':
    post:
      operationId: 'createAppSpecificPassword'
      tags:
      - Users
      description: 'This command creates a new user app-specific password/login for a specific user. Note that users can have at most 30 app-specific passwords defined at any one time. {{ACL: User Settings - Change Password}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: suffix
          in: path
          required: true
          schema:
            type: string
          description: |-
            It is the plain text suffix to the user’s regular login email address that will be used to create this new app-specific password. E.g., if you specify “email” as the suffix for the user ‘user@domain.com’, then the new login will be ‘usr@domain.com/email’.
          
            The suffix string must be 1-10 characters long and can only contain letters and numbers. It is also case insensitive (so will be converted to lower case).'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - title
              properties:
                title:
                  type: string
                  description: 'Required. Plain text string used as a title / description of what this new app-specific password is for.'
                types:
                  type: string
                  description: |-
                    One or more of the following keywords, delimited by commas. The access granted to this app-specific password will be the union of these specified access granting keywords:
                    - “all” -- all access (except “dav”)
                    - “webmail” – access to the Web-based userinterface (i.e., WebMail)
                    - “email” – POP, IMAP, SMTP, MobileSync
                    - “webfile” – SFTP, SSH, SCP with permissions of the user.
                    - “webmaster” - SFTP, SSH, SCP with permissions of the web server
                    - “api” – API, MobileSync, Outlook Plugins
                    - “dav” – CalDAV/CardDAV only.
                    
                    Note that app-specific logins are also limited by the access afforded to the regular user himself/herself. So, for example, users without SFTP access can’t have an app-specific login that does have SFTP access.
                    
                    “dav” and “webmaster” types, if specified, must be the oly types applied to the user.
      responses:
        '201':
          description: 'The response body for a successful request will have a keywords and data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      password:
                        type: string
                        description: 'The new password generated for this app-specific login. Save this, as it cannot be retrieved later.'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "password":"newly created password for this login"

                        }
                    }
    delete:
      operationId: 'deleteAppSpecificPassword'
      tags:
      - Users
      description: 'This command removes a user app-specific password/login for a specific user. {{ACL: User Settings - Change Password}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: suffix
          in: path
          required: true
          schema:
            type: string
          description: 'It is the plain text suffix to the user’s regular login email address that will be used to identify the app-specific password. E.g., if you specify “email” as the suffix for the user ‘user@ domain.com’, then the login deleted will be ‘usr@domain.com/email’.'
      responses:
        '201':
          description: 'Response description.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
    get:
      operationId: 'listAppSpecificPasswords'
      tags:
      - Users
      description: |-
        This command creates a list of all app-specific password/logins defined for a specific user. This command does not allow you to access the passwords themselves, as these are stored only as complex hashes on the server. 
      
        The list will contain either 0 results (if there is no app-specific password defined with that suffix), or the 1 singular result corresponding to that suffix. {{ACL: User Settings - Change Password}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: suffix
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: |-
            The response body for a successful request will have a list as the “data” in the JSON response. Each element of the list will be the definition of one of the app-specific passwords for this user. An appspecific-password definitions is a list containing 4 elements:
          
            [suffix, title, types, created, expires]
            
            The “suffix” is the login suffix we have been using; “title” is the text description; “types” is the comma-delimited list of code words that defines the access available to this login; “created” is the date and time in GMT in the format “YYYY-MM-DD HHMMSS” of when this app-specific login was created. Expires is the similar date when it expires; if this is before “2020-01-01”, then it does not expire.
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: string
                    minItems: 4
                    maxItems: 4
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          "outlook",
                          "Outlook Access",
                          "email,api",
                          "2018-04-28 12:05:01"
                        ]
                    }
  '/user/{username}/app-password':
    get:
      operationId: 'listAllAppSpecificPassword'
      tags:
      - Users
      description: |-
        This command creates a list of all app-specific password/logins defined for a specific user. This command does not allow you to access the passwords themselves, as these are stored only as complex hashes on the server.
      
        A list of all defined app-specific passwords will be returned.  {{ACL: User Settings - Change Password}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '201':
          description: |-
            The response body for a successful request will have a list as the “data” in the JSON response. Each element of the list will be the definition of one of the app-specific passwords for this user. An app specific-password definitions is a list containing 4 elements:
          
            [suffix, title, types, created, expires]
          
            The “suffix” is the login suffix we have been using; “title” is the text description; “types” is the comma-delimited list of code words that defines the access available to this login; “created” is the date and time in GMT in the format “YYYY-MM-DD HHMMSS” of when this app-specific login was created. Expires is the similar date when it expires; if this is before “2020-01-01”, then it does not expire.
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: string
                    minItems: 4
                    maxItems: 4
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          "outlook",
                          "Outlook Access",
                          "email,api",
                          "2018-04-28 12:05:01"
                        ]
                    }
  '/user/{username}/branding':
    get:
      operationId: getUserBrandingInformation
      tags:
      - Users
      description: 'Return information that can be used to brand (private label) a user interface consistently with the branding the user would experience when logging in to WebMail. Other keywords may be added in the future as the need arises. {{ACL: User Settings - Read}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have a keywords and data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      imap_server:
                        type: string 
                        description: 'Desired (insecure) imap server host name'
                      pop_server:
                          type: string 
                          description: 'Desired (insecure) pop server host name'
                      smtp_server:
                          type: string 
                          description: 'Desired (insecure) smtp server host name'
                      semail_server:
                          type: string 
                          description: 'Desired secure (TLS) server host name for pop, imap, and smtp.'
                      company:
                          type: string 
                          description: 'Private Labeled company name.'
                      number:
                          type: string 
                          description: 'Private Labeled theme id number.'
                      ftp_server:
                          type: string 
                          description: 'Hostname to use for SFTP, SSH, SCP.'
                      tech_suppt_email:
                          type: string 
                          description: 'Email address to present to the user for technical support help.'
                      tech_suppt_name:
                          type: string 
                          description: 'Name to present to the user for technical support help'
                      admin_email:
                          type: string 
                          description: 'Email address to present to the user for administrative help.'
                      admin_name:
                          type: string 
                          description: 'Name address to present to the user for administrative help'
                      corpsite:
                          type: string 
                          description: 'URL of the corporate web site for this Private Labeled theme.'
                      members_domain:
                          type: string 
                          description: 'Domain name used for logging into the WebMail interface.'
                      outlook_webaidesynch_latest_version:
                          type: string 
                          description: 'Version number of the latest published release of Outlook WebAide Sync plugin'
                      outlook_secureline_plugin_version:
                          type: string 
                          description: 'Version number of the latest published release of Outlook SecureLine plugin'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "tech_suppt_email":"support@doctor. com",
                          "number":"23163737891",
                          "admin_name":"sales@Doctor.com",
                          "semail_server":"secure-email-1.doctor.com",
                          "pop_server": "pop-1.doctor.com",
                          "outlook_secureline_plugin_version":"1.0.2",
                          "admin_ email":"sales@doctor.com",
                          "domain":"doctor.com",
                          "smtp_server":"smtp-1.doctor.com",
                          "company":"Doctor",
                          "ftp_server":"ftp-2doctor.com",
                          "tech_suppt_name":"Technical Support",
                          "imap_server":"imap-1.doctor.com",
                          "members_domain":"doctor.com",
                          "corpsite":"Doctor",
                          "outlook_webaidesynch_latest_version":"5.1.3"
                        }
                    }
  '/user/{username}/settings':
    get:
      operationId: getUserSettings
      tags:
      - Users
      description: 'Return information regarding selected user preferences and settings. Other keywords may be added in the future as the need arises. {{ACL: User Settings - Read}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have a keywords and data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      timezone:
                        type: string
                        description: 'Preferred time zone code for this user'
                      hipaa:
                        type: string
                        description: 'True (1) if the user is flagged as needing to be HIPAA-compliant. False (0) otherwise.'
                      has_secureline:
                        type: string
                        description: 'True (1) if the user has a SecureLine license. False (0) otherwise.'
                      has_webaides:
                        type: string
                        description: 'True (1) if the user has a WebAides license. False (0) otherwise. Most users have WebAide licenses.'
                      must_secure_send:
                        type: string
                        description: 'True (1) if the user is required to send outbound email securely by default when sending through SMTP and the user’s SMTP server.'
                      can_secureline_optout:
                        type: string
                        description: 'True (1) if the user is permitted to “opt out” of sending email securely when using SMTP through the user’s SMTP server'
                      was_api_poll:
                        type: string
                        description: 'Reserved for use by the WebAideSync Outlook Plugin'
                      was_local_poll:
                        type: string
                        description: 'Reserved for use by the WebAideSync Outlook Plugin'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "was_api_poll":180,
                          "hipaa":0,
                          "timezone":"EST5EDT",
                          "must_ secure_send":1,
                          "has_secureline":1,
                          "has_webaides":1,
                          "can_secureline_optout":0,
                          "was_local_ poll":60
                        }
                    }
  '/user/{username}/settings/timezones':
    get:
      operationId: getTimeZonesList
      tags:
      - Users
      description: |-
        Return a list of all available time zones. The keywords are the canonical time zone names. The values are plain text versions of the names.
      
        Note, that with the “GMT+/-” times, specifically, the canonical name has the opposite sign compared to the common plain text version we all are used to seeing. E.g. “GMT-5” for Eastern Time USA, has a canonical name of “GMT+5”. Ya, weird, but based on how the standard time zone database works – we use these canonical names in conjunction with the standard time zone database to translate times from one time zone to another. So, if you are in “GMT+5”, your saved time zone name will be “GMT-5” so that, behind the scenes, the software can use this database to properly handle your time.  {{ACL: User Settings - Read}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have a keywords and data in the “data” in the JSON response. The keywords are the time zone code names (e.g. “EST”) and the values are the descriptions for these names (e.g. “EST: Eastern Standard Time”).'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1
                    }
  '/user/{username}/email/forwarding':
    put:
      operationId: updateEmailForwarding
      tags:
        - Email
      description: 'This function allows you to alter the email forwarding (and denial/deletion) settings for the user. {{ACL:User Email - Forwarding}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - enabled
                - deliver
                - forward_to
                - deny_message
              properties:
                enabled:
                  type: string 
                  description: 'Required. Specify “0” to disable forwarding; non-zero to enable.'
                deliver:
                    type: string 
                    description: 'Required. Specify what should happen to email to this user (if enabled): • “forward” - forward to 1+ email addresses • “delete” - delete all email • “deny” - deny all email with a custom message. Note that delete and deny will apply to all messages and all other custom email filters will be skipped. The forward delivery action will forward email and all other custom email filters, including this forwarding rule, will apply in the usual order.'
                leave_local:
                    type: string 
                    description: 'Optional. For “deliver=forward” cases, specify non-zero if you would like copies of the forwarded email to continue on and pass through the rest of your email filters for possible ultimate delivery to the INBOX. E.g. this is a “not final” forwarding rule. If omitted, leave local will be “off”.'
                forward_to:
                    type: string 
                    description: 'Required for “deliver=forward”. Specify a comma-delimited list of email addresses to which inbound email messages should be forwarded. There is a maximum number of recipients that can be specified (this limit is accountdependent).'
                deny_message:
                    type: string 
                    description: 'Required for “deliver=deny”. Specify a short message to return when messages are blocked. Note that this message must be less than 50 characters, contain only latin1 characters and should omit special characters. The message will beautomatically modified to meet these criteria.'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '""'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/user/{username}/email/ar':
    post:
      operationId: newEmailAutoResponder
      tags:
        - Email
      description: 'Create a new email auto-responer. {{ACL:User Email - Auto-Responders}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - title
                - subject
                - body
              properties:
                title:
                  description: 'Title of the auto-responder.'
                  type: string
                suject:
                  description: 'Response email subject. In UTF-8.'
                  type: string
                body:
                  description: 'Email body content. In UTF-8.'
                  type: string
                match:
                  description: 'Content to match.  This must be empty, an email address, or a domain name.  If included, the auto-reponse fires only for messages to an email address matching this content.'
                  type: string
                signature_id:
                  type: integer
                  description: 'Numerical Id of the WebMail signature to use for the auto-response. If omitted, the first signature that matches the signature_name field will be used.  If omitted, the first signature that matches the signature_from field will be used.  If omitted, the default signature will be used. If there is no default, a signature will be picked from the available signatures.'
                signature_name:
                  type: string
                  description: 'Instead of signature_id, match the desired WebMail signature by its name.'
                signature_from:
                  type: string
                  description: 'Instead of signature_id or signature_name, match the desired WebMail signature by the from address.'
                is_body_html:
                  type: boolean
                  description: 'If supplied and true, the "body" field is taken to be HTML content.  Otherwise, the "body" is assumed to be plain text.'
                in_reply:
                  type: boolean
                  description: 'If supplied and true, the "In reply to..." content typically at the top of an automatic response will be omitted.'
      responses:
        '200':
          description: 'A successful response will return the unique ID of the created auto-responder.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: The unique dd of the newly created auto-responder.
              example:
                    {
                      "success": 1,
                      "data":
                            { "id": 105789 }
                    }
    get:
      operationId: getEmailAutoResponders
      tags:
        - Email
      description: 'Return all email auto-responders owned by this user. {{ACL:User Email - Auto-Responders}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'A successful response will return an array of objects, one for each auto-responder owned by this user.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        body:
                          type: string
                          description: 'Body of the email message response. In UTF-8.'
                        duplicate_interval:
                          type: integer
                          description: 'Number of minutes between repeat auto-replies to the same from address from this auto-responder. This applies “per inbound server” ... so if your messages are being processed by multiple inbound servers there could still be multiple replies as each one rate limits itself.'
                        id:
                          type: integer
                          description: 'Unique ID of this auto-responder.'
                        in_reply:
                          type: integer
                          enum: [0,1]
                          description: 'If “1”, then an “In Reply To...” heading will be added to the top of your message body on all messages. This indicates in more detail what message is being replied to.'
                        is_body_html:
                          type: integer
                          enum: [0,1]
                          description: 'True (1) of the “body” field is HTML content; False (0) if it is plain text content.'
                        match_type:
                          type: string
                          description: 'What is being matched? E.g. all messages, messages to a specific address or domain, or what?'
                        match_what:
                          type: string
                          description: 'Empty for responses to all messages; domain name for responses to all messages addressed to a specific domain; email address for responses to all messages addressed to this specific address.'
                        signature_from:
                          type: string
                          description: 'Email address. From email address of the WebMail Signature to use with this responder.'
                        signature_id:
                          type: integer
                          description: 'Unique ID of the WebMail Signature to use with this responder.'
                        signature_name:
                          type: string
                          description: 'Name of the WebMail Signature to use with this responder.'
                        status:
                          type: string
                          enum: ['on','off','scheduled']
                          description: 'Status of the responder. This can be “on”, “off”, or “scheduled”. If “scheduled”, then “window_start “ and “window_end” apply'
                        subject:
                          type: string
                          description: 'Subject of the email message response. In UTF-8.'
                        title:
                          type: string
                          description: 'Arbitrary title for this auro-responder.'
                        window_end:
                          type: string
                          description: 'DATETIME. If status=scheduled. The Date and Time after which this responder should be auto-disabled. Format must be like “YYYY-MM-DD HH:MM:SS” in GMT.'
                        window_start:
                          type: string
                          description: 'DATETIME. If status=scheduled. The Date and Time after which this responder should be auto-enabled. Format must be like “YYYY-MM-DD HH:MM:SS” in GMT.'
              example:
                    {
                      "success": 1,
                      "data":
                            [
                              {
                              "signature_from":"john@sample.com",
                              "match_ what":"yahoo.com",
                              "match_type":"To domain",
                              "in_reply":0,
                              "subject":"Respond to this!",
                              "status":"scheduled",
                              "window_start":"2015-04-01 00:00:00",
                              "signature_name":"John Sample",
                              "body":"Leave me alone!",
                              "duplicate_interval":30,
                              "window_end":"2015-05-01 00:00:00",
                              "id":708967,
                              "title":"Test",
                              "is_body_html":0,
                              "signature_id":123723
                              }
                            ]
                    }
  '/user/{username}/email/ar/{id}':
    delete:
      operationId: deleteEmailAutoResponder
      tags:
        - Email
      description: 'Delete an email auto-responder number `id` that belongs to the user. {{ACL:User Email - Auto-Responders}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '""'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1,
                    }
  '/user/{username}/email/compose/secureline/tls/{domain}':
    get:
      operationId: getDomainSmtpTlsCapability
      tags:
        - EmailSending
      description: |-
        This function checks if a specific domain name supports “good” SMTP TLS for email delivery to its users. This means:
        - All MX records are working
        - SMTP TLS is supported by all MX records
        - TLS support includes TLS v1.0+ and strong (NIST 800-52 recommended) ciphers like AES256.
        
        For more background, see:
        - [About SMTP TLS](https://luxsci.com/blog/smtp-tls-all-about-secure-email-delivery-over-tls.html)
        - [What Level of SSL/TLS is needed for HIPAA?](https://luxsci.com/blog/level-ssl-tls-required-hipaa.html)
        {{ACL: User Email - Sending}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: domain
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have a keywords and data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      tls:
                        type: string
                        description: '“1” if strong TLS is supported; “0” if not.'
                      domain:
                        type: string
                        description: 'The domain name checked'
              example:
                    {
                      "success": 1,
                       "data": {
                         "domain": "gmail.com",
                         "tls": 1
                       }
                    }
  '/user/{username}/email/compose/secureline/recipients':
    post:
      operationId: retrieveSecureLineRecipientListEncryptionData
      tags:
        - Email
      description: |-
        When composing an email message, you may have a list of recipients and want to know what kind of encryption, if any, would be used for each recipient when it is finally sent out with SecureLine encryption. E.g. this can be used to (a) inform the sender of what encryption will be used, and (b) to discover ahead of time if there are some recipients for which a message cannot yet be encrypted (possible, for example, if SecureLine Escrow is setup to use question and answer authentication without a default fall-back question and answer).
      
        It is good to use this method before sending an encrypted message – so you can modify your recipient list and/or add additional required encryption information before sending.
        
        Note: This is a RPC-style call and hence uses a POST method even though we are “getting data”. We are interacting with the system rather than querying a specific resource.
        {{ACL: User Email - Sending}}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                no_tls_only:
                  type: integer
                  description: 'Optional. If this is passed and is true (1), then no recipients will be allowed to be sent using “TLS Only” – other encryption methods will have to be considered. Note that TLS Only would only be used, anyway, if enabled in the user / domain / account settings.'
                recipients:
                  description: 'Required. An array of recipient email addresses. There is a maximum of 100 addresses that can be submitted in each request.'
                  type: array
                  items:
                    type: string
              required:
                - recipients
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will contain a hash in the “data” field with one keyword, “recipients”. The value of “recipients” is a list. Each list element will be another list corresponding to one of your queried recipients.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      recipients:
                        type: array
                        items:
                          type: array
                          items:
                            type: string
                            description: |-
                              Field #0: Recipient email address  
                              Field #1: Encryption type to be used. One of:
                              - escrow
                              - smime
                              - pgp
                              - tls
                              - error (e.g. invalid email address)
                              
                              Field #2:  
                              &nbsp;&nbsp;For Type=escrow:
                              - Escrow question to be used. If this is empty or null, then you must supply an Escrow question when sending. If the value is “*”, then SecureSend Authentication is being used rather than an actual question and answer pair  
                              
                              &nbsp;&nbsp;For Type=tls:
                              - Preferred “Escrow” authentication type (“qa” for “Question and Answer” or “secsend” for “SecureSend Login”). Used for deciding what will be needed if the sender wishes to not use TLS for the delivery of this message.
                            
                              Field #3:  
                                &nbsp;&nbsp;For Type=ecrow only:
                                - \# of days until the message will expire from Escrow, by default.'
              example:
                    {
                      "success": 1,
                      "data": {
                                "recipients":
                                  [
                                    ["ann@mail.co.cc","escrow",null,60],
                                    ["kangas@luxsci.com","pgp"],
                                    ["joe@gmail.com","tls"]
                                  ]
                              }
                    }
  '/user/{username}/email/send':
    post:
      operationId: sendEmail
      tags:
        - EmailSending
      description: |-
        This API call is a generic outbound email sending interface that is designed to enable efficient large-scale email sending through your account’s email servers.  It is ideal for Secure High Volume email sending.
        
        See - [sendEmail vs sendSecureEmailOrSecureText endpoints](/rest-api/sending-email.html) for sending email via the LuxSci API.
      
        This API function is used to send message(s) through your account’s SMTP server(s). You can think of it as an API-based proxy to SMTP, used for cases where direct use of SMTP is not an option. Generally speaking, direct use of SMTP is overall faster and more efficient; however, the API does include some things that you cannot get through direct SMTP connections. For example, the API includes support for failover, load-balanced SMTP servers; this can be done with direct SMTP only if you have a load balancer in front of your servers. You can also hand off messages to LuxSci (into the outbound queues) faster through the API than you can through direct SMTP.
      
        As this is a proxy for SMTP, the majority of the email message processing actually happens on the SMTP servers themselves (just like it would if you had actually used direct SMTP to send the message). The API call accepts the message, vets your ability to send the message, queues the message, and the moves it to the appropriate SMTP servers for delivery. This API process is designed to be very safe and efficient and works well for customers with very large SMTP sending limits (e.g., millions of messages per month).
      
        This API function allows you to optionally include attachments. If you wish to include attachments, you must format your request as a `multipart/form-data` request as discussed in the [API Mechanics Guide](/rest-api/mechanics.html).
      
        If the API call 'fails' it may be because more information is needed to encrypt the message to your recipients, if the request is malformed, or if your sending has exceeded some limit. Here are some limits to be aware of
        
        1. The sending user must have an SMTP license.
        2. The sending user must have a SecureLine license to use SecureLine-specific parameters.
        3. You have to send to at least 1 recipient, but no more than 100 recipients per message. This limit can be increased on dedicated servers.
        4. Your API call can contain 1 to 1000 messages. This limit can be increased on dedicated servers.
        5. The total number of recipients across all messages in your API call cannot exceed 1000. This limit can be increased on dedicated servers.
        6. The messages sent by a user through this API call count towards the users’ daily and monthly SMTP sending (just as if the user had actually used direct SMTP to send) totals. So, messages will be rejected if a user exceeds any of these limits. Please contact support if you need to upgrade these limits.
        7. While SecureLine-encrypted emails sending is supported through this API call, SecureText sending is not.
        8. If there are restrictions configured in the Domain Administration control panel on to whom the sending user can send messages, these restrictions also apply to messages sent through the API.
        9. The total size of the message subject, body, and all attachments (raw size) must be less than or equal to 66% the sender’s SMTP message sending size limit. This limit can be affected by use of Email Archival, custom domain-level size limits, and general global limits. The current value of this limit can be found in the “Maximum Message Size Limit” for the sender’s domain in your domain administration settings area. 66% is used because, when the attachments are encoded into an actual email message, the size can bloat to 140-150% of the raw size; the SMTP message size limit looks at the size of the encoded messages passing through your SMTP servers.
        
        Note that once messages sent via this API arrive on your SMTP server for processing and delivery, those messages are subject to any server delivery rate limiting settings currently enabled on the SMTP server. For example, if your SMTP server is “warming up” its IP address by slowly increasing its outbound email delivery rate, messages sent by the API through that server may be delayed by that warmup rate limit.
      
        **Maximizing your sending rate:**
      
        To deposit email messages in the outbound queues as fast as possible using the API, we recommend
        
        1. Send as many messages as you can in each API call. This “pipelining” greatly reduces the number of API calls you need to execute and greatly speeds up processing of your messages.
        2. When sending same attachments in multiple messages, use the API’s feature for including the attachment once and referencing it in each of the actual messages. This will greatly speed up the uploading/posting of your message information to the API server.
        3. Keep the messages as small as possible.
        4. If appropriate for your use case, send fewer messages. Have more recipients per message (using the `bcc` field if needed).
        5. Ask support about dedicated API servers. If all of the server resources are dedicated to your account, your throughput can be higher. You can also use multiple load-balanced dedicated API sending servers to scale your throughput capacity.
        6. Use the `priority` field to ensure that more important messages are processed and delivered before less important messages.
        
        Under ideal conditions, you should be able to deposit outbound email messages in the API queues much faster that your email servers can actually deliver those messages to the actual recipients (unless you have a number of powerful dedicated email servers). That is OK, your email servers will just process and delivery them as fast as they can. The actual rate of message delivery to the recipients will be a function of how many email servers you have, what their specs are, how busy they are, and many other factors involved in SMTP email delivery – such as the recipients’ DNS response time, the recipient’s inbound email server speeds, etc. {{ACL: User Email: Sending}}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                message:
                  
                  $ref: '#/components/schemas/Message'
                messages:
                  type: array
                  description: |-
                    If you are sending one or more messages through this API call, you can include an array of message objects (see below) as the value of the “messages” parameter.
                  
                    You should not use both message and messages in the same API call. If you do, the “message” parameter will be used, and the “messages” parameter ignored.
                  items:
                    $ref: '#/components/schemas/Message'
                sandbox:
                    type: integer
                    description: 'Optional: to enable specify any non-zero number.  Sandbox mode is designed for integration and performance testing.  When enabled, messages are validated, accepted, and queued for sending as ususal.  However, in sandbox mode (a) your email sending limits are not checked -- so you will not receive errors for trying to send more messages than you have available your plan, (b) the messages will be deleted from queue instead of being passed on to your SMTP servers for processing and delivery to their recipents, (c) the messages will not actually be sent or delivered -- so it does not matter what recipient email addresses are atually used, (d) the messages will not show up in your email sending history reports, and (e) the messages will not count against your email sending limits.'
                smtp_server:
                  type: string
                  description: 'Optional. Specify a comma-delimited list of the SMTP server hostnames that this message should be delivered through. These hostnames are the canonical server names for your SMTP servers, as provided by your LuxSci support team. E.g., such names are typically of the form “rs999.luxsci.com” or “rs1099.yourdomain.com”. Other possibly valid-forSMTP, names like “email999.luxsci.com,” will be rejected. If you omit this field then, by default, all of the outbound SMTP servers assigned to your account will be selected (no matter if that is 1 or 20) for you. Note that you can specify in your API configuration what this default list of servers should be (i.e., instead of "all").  In this way, it is easy to send to different groups of servers using different API end points, rather than relying on the API client to choose the servers explicitly.'
                smtp_server_method:
                  type: string
                  description: 'Optional. If you have multiple SMTP servers implicitly or explicitly selected for the “smtp_server” parameter, this parameter determines in what order they are tried. I.e., the “first” server is tried first and if the API cannot connect to that SMTP server (because it is down or too busy), it will try the next one, and so on. The possible values are “1” and “2”. 1: Try the email servers in the exact order provided. In this case, the servers in smtp_server are given in order of preference and we always try to send through the 1st one in the list when possible, falling back to the others if needed. 2: Randomize the list and then try them in a random order. This option, which is the default, is ideal for distributing the sending of your messages evenly across your selected SMTP servers. '
          multipart/form-data:
            schema:
              type: object
              properties:
                json:
                  type: object
                  properties:
                    message:
                      type: object
                      description: 'If you are sending a single message through this API call, you can include the message data object (see below) as the value of the “message” parameter.'
                      required:
                        - body
                        - subject
                      properties:
                        attachments:
                          type: array
                          description: 'Optional. If included, this is an array of JSON objects, one for each uploaded file. See the General API Usage Guide for how to upload files with your request. The individual JSON objects will have the following keywords and values: • name – The exact filename of the uploaded file • hash – The SHA256 hex-encoded hash of the content of this file.'
                          items:
                            type: object
                        bcc:
                          type: array
                          description: 'Optional. Array of email addresses for the recipients in the “Bcc” of the message.'
                          items:
                            type: string
                        body:
                          type: string
                          description: 'Required. The body content of this message. This can be either a block of plain text (\n or \r\n – UNIX or Windows style linefeeds are recommended) or a block of HTML content. For best results, HTML content should NOT be a completed HTML Document, but what you would put inside <body> … </body> tags. If you need to include a complete, arbitrary HTML document, we recommend uploading that as an attached file. See the “body_type” parameter.'
                        body_text:
                          type: string
                          description: 'Optional. Only used when body_type=”html”. If supplied, this plain text content will be used as the “alternative” message content for the HTML message body provided in “body”. I.e., for people with HTML email content viewing disabled in their email or WebMail interfaces, this plain text version of your content will be displayed instead. If omitted, a plain text alternate version of your HTML message content will not be included in your message.'
                        body_type:
                          type: string
                          description: 'Optional. If included, this must be “text” or “html”. If omitted, it takes on the value “text”. The body_type parameter indicates what content is being passed in the “body” field.'
                        cc:
                          type: array
                          description: 'Optional. Array of email addresses for the recipients in the “Cc” of the message.'
                          items:
                            type: string
                        from_address:
                          description: 'Optional. Email address to use as the “From address” for this message. If omitted, the sending user’s login email address will be used. Note that it is against the terms of service to use an address here that does not belong to you or for which you do not otherwise have permission to send from.'
                          type: string
                        from_name:
                          type: string
                          description: 'Optional. The plain text name of the sender. If omitted, the sending user’s “contact” name (from his/her profile) will be used. If that is empty, then the “from_address” will be used. The from name can be a maximum of 100 characters long.'
                        headers:
                          type: array
                          description: 'Optional. If included, the value must be an array specifying data for up to 10 custom headers that will be added to the outbound email message. This is usually used in combination with the custom header tracking and reporting features of LuxSci outbound emailing. E.g., you can set headers here that will be tracked (if you have enabled tracking of them in your outbound email settings in the LuxSci web site), and which can be used for reporting. Each element of the headers array must itself be an array of two elements. The 1st element is the custom header name; the 2nd element is the custom header value. Some of the basic validation restrictions include: • You cannot override standard email headers (like To, Subject, Date, etc.) using custom headers. • Header names cannot contain spaces, tabs, linefeeds, or colons • Header values cannot contain tabs or linefeeds and must be non-empty. • Each added header line must be less than 997 characters in length • The total length of add added header lines must be less than 5000 characters in length.'
                          items:
                            type: array
                            items:
                              type: string
                        receipt:
                          type: integer
                          description: 'Optional. If set to “1”, a read receipt will be requested. For SecureLine Escrow, these read receipts will always be sent back on the 1st time the message is viewed by each recipient … the recipient has no say in the matter and no indication of if this is happening.'
                        reply_address:
                          type: string
                          description: 'Optional. Email address to use as the “Reply-To address” for this message. If omitted, the from address will be used. Note that it is against the terms of service to use an address here that does not belong to you or for which you do not otherwise have permission to send from.'
                        secline_a_ [email]:
                          type: string
                          description: 'Optional. For email messages sent via SecureLine Escrow where Question/Answer pairs are being used for authentication, this answer will be used for the recipient whose email address is “[email]”. This overrides any other answer that may have otherwise been used.'
                        secline_keep_ [email]:
                          description: 'Optional. (Days) For ALL email messages sent via SecureLine Escrow and SecureText, this this will be used as the integer number of days before the message accessible for recipient [email] expires from access. Note that you can have different expirations for different recipients of the same message. Once the message has expired for all recipients, the encrypted message data itself is deleted from the system.'
                          type: integer
                        secline_q_ [email]:
                          type: string
                          description: 'Optional. For email messages sent via SecureLine Escrow where Question/Answer pairs are being used for authentication, this question will be used for the recipient whose email address is “[email]”. E.g., use “secline_q_ bob@domain.com” as the key for the question for recipient “bob@domain.com”. This overrides any other question that may have otherwise been used. If you set this question value to just an asterisk, “*”, then SecureSend portal login will be used for recipient authentication instead of an explicit question and answer. It does not matter what you specify for “secline_a_...” in this case.'
                        subject:
                          type: string
                          description: 'Required. Subject of this message. This can be a maximum of 1000 characters long. Leading and training spaces are automatically trimmed from this subject. Note: the API will encode the subject if/when needed; subject content should not be pre-encoded.  Simply include the raw subject text.'
                        template:
                          type: string
                          description: 'Optional. If provided, this must be the “Template ID” or template “Code Word” corresponding to an “SMTP or API Email Template” in the sender’s account. This template will be used to set the subject and body of the message (overriding any other subject and body data sent in your API call). Note, any attachments that you include in the API call will still be attached to the templated email message. Note that the templates “flags” may affect how the message isencrypted and delivered.'
                        template_data:
                          type: object
                          description: 'If you specify a “template” which has dynamic place holders, you can specify the keywords and respective values to substitute into the template in this field. The value of the “template_data” field is an associated array (object) with the fields/keywords being the template place holder keywords and the values of those keywords beingthe values to be substituted.'
                        template_data_raw:
                          type: integer
                          description: 'Optional. If passed with a value of “1” then the contents of template_data will be substituted into the template place holders “as is” exactly as passed. This is appropriate for passing content marked up with HTML and inserting that into and HTML-formatted email. The default, “0”, assumes the template_data is plain text content. In this context, the data will be appropriately quoted when being substituted into HTML-formatted email. E.g., special HTML characters like “<” will be converted into HTML entitles like “&lt;” and web links will be converted into clickable links.'
                        to:
                          type: array
                          description: 'Optional. Array of email addresses for the recipients in the “To” of the message.'
                          items:
                            type: string
                    messages:
                      type: array
                      description: 'If you are sending one or more messages through this API call, you can include an array of message objects (see below) as the value of the “messages” parameter. You should not use both message and messages in the same API call. If you do, the “message” parameter will be used, and the “messages” parameter ignored. '
                      items:
                        type: object
                        required:
                          - body
                          - subject
                        properties:
                          attachments:
                            type: array
                            description: 'Optional. If included, this is an array of JSON objects, one for each uploaded file. See the General API Usage Guide for how to upload files with your request. The individual JSON objects will have the following keywords and values: • name – The exact filename of the uploaded file • hash – The SHA256 hex-encoded hash of the content of this file.'
                            items:
                              type: object
                          bcc:
                            type: array
                            description: 'Optional. Array of email addresses for the recipients in the “Bcc” of the message.'
                            items:
                              type: string
                          body:
                            type: string
                            description: 'Required. The body content of this message. This can be either a block of plain text (\n or \r\n – UNIX or Windows style linefeeds are recommended) or a block of HTML content. For best results, HTML content should NOT be a completed HTML Document, but what you would put inside <body> … </body> tags. If you need to include a complete, arbitrary HTML document, we recommend uploading that as an attached file. See the “body_type” parameter.'
                          body_text:
                            type: string
                            description: 'Optional. Only used when body_type=”html”. If supplied, this plain text content will be used as the “alternative” message content for the HTML message body provided in “body”. I.e., for people with HTML email content viewing disabled in their email or WebMail interfaces, this plain text version of your content will be displayed instead. If omitted, a plain text alternate version of your HTML message content will not be included in your message.'
                          body_type:
                            type: string
                            description: 'Optional. If included, this must be “text” or “html”. If omitted, it takes on the value “text”. The body_type parameter indicates what content is being passed in the “body” field.'
                          cc:
                            type: array
                            description: 'Optional. Array of email addresses for the recipients in the “Cc” of the message.'
                            items:
                              type: string
                          from_address:
                            description: 'Optional. Email address to use as the “From address” for this message. If omitted, the sending user’s login email address will be used. Note that it is against the terms of service to use an address here that does not belong to you or for which you do not otherwise have permission to send from.'
                            type: string
                          from_name:
                            type: string
                            description: 'Optional. The plain text name of the sender. If omitted, the sending user’s “contact” name (from his/her profile) will be used. If that is empty, then the “from_address” will be used. The from name can be a maximum of 100 characters long.'
                          headers:
                            type: array
                            description: 'Optional. If included, the value must be an array specifying data for up to 10 custom headers that will be added to the outbound email message. This is usually used in combination with the custom header tracking and reporting features of LuxSci outbound emailing. E.g., you can set headers here that will be tracked (if you have enabled tracking of them in your outbound email settings in the LuxSci web site), and which can be used for reporting. Each element of the headers array must itself be an array of two elements. The 1st element is the custom header name; the 2nd element is the custom header value. Some of the basic validation restrictions include: • You cannot override standard email headers (like To, Subject, Date, etc.) using custom headers. • Header names cannot contain spaces, tabs, linefeeds, or colons • Header values cannot contain tabs or linefeeds and must be non-empty. • Each added header line must be less than 997 characters in length • The total length of add added header lines must be less than 5000 characters in length.'
                            items:
                              type: array
                              items:
                                type: string
                          receipt:
                            type: integer
                            description: 'Optional. If set to “1”, a read receipt will be requested. For SecureLine Escrow, these read receipts will always be sent back on the 1st time the message is viewed by each recipient … the recipient has no say in the matter and no indication of if this is happening.'
                          reply_address:
                            type: string
                            description: 'Optional. Email address to use as the “Reply-To address” for this message. If omitted, the from address will be used. Note that it is against the terms of service to use an address here that does not belong to you or for which you do not otherwise have permission to send from.'
                          secline_a_ [email]:
                            type: string
                            description: 'Optional. For email messages sent via SecureLine Escrow where Question/Answer pairs are being used for authentication, this answer will be used for the recipient whose email address is “[email]”. This overrides any other answer that may have otherwise been used.'
                          secline_keep_ [email]:
                            description: 'Optional. (Days) For ALL email messages sent via SecureLine Escrow and SecureText, this this will be used as the integer number of days before the message accessible for recipient [email] expires from access. Note that you can have different expirations for different recipients of the same message. Once the message has expired for all recipients, the encrypted message data itself is deleted from the system.'
                            type: integer
                          secline_q_ [email]:
                            type: string
                            description: 'Optional. For email messages sent via SecureLine Escrow where Question/Answer pairs are being used for authentication, this question will be used for the recipient whose email address is “[email]”. E.g., use “secline_q_ bob@domain.com” as the key for the question for recipient “bob@domain.com”. This overrides any other question that may have otherwise been used. If you set this question value to just an asterisk, “*”, then SecureSend portal login will be used for recipient authentication instead of an explicit question and answer. It does not matter what you specify for “secline_a_...” in this case.'
                          subject:
                            type: string
                            description: 'Required. Subject of this message. This can be a maximum of 1000 characters long. Leading and training spaces are automatically trimmed from this subject.'
                          template:
                            type: string
                            description: 'Optional. If provided, this must be the “Template ID” or template “Code Word” corresponding to an “SMTP or API Email Template” in the sender’s account. This template will be used to set the subject and body of the message (overriding any other subject and body data sent in your API call). Note, any attachments that you include in the API call will still be attached to the templated email message. Note that the templates “flags” may affect how the message isencrypted and delivered.'
                          template_data:
                            type: object
                            description: 'If you specify a “template” which has dynamic place holders, you can specify the keywords and respective values to substitute into the template in this field. The value of the “template_data” field is an associated array (object) with the fields/keywords being the template place holder keywords and the values of those keywords beingthe values to be substituted.'
                          template_data_raw:
                            type: integer
                            description: 'Optional. If passed with a value of “1” then the contents of template_data will be substituted into the template place holders “as is” exactly as passed. This is appropriate for passing content marked up with HTML and inserting that into and HTML-formatted email. The default, “0”, assumes the template_data is plain text content. In this context, the data will be appropriately quoted when being substituted into HTML-formatted email. E.g., special HTML characters like “<” will be converted into HTML entitles like “&lt;” and web links will be converted into clickable links.'
                          to:
                            type: array
                            description: 'Optional. Array of email addresses for the recipients in the “To” of the message.'
                            items:
                              type: string
                    smtp_server:
                      type: string
                      description: 'Optional. Specify a comma-delimited list of the SMTP server hostnames that this message should be delivered through. These hostnames are the canonical server names for your SMTP servers, as provided by your LuxSci support team. E.g., such names are typically of the form “rs999.luxsci.com” or “rs1099.yourdomain.com”. Other possibly valid-forSMTP, names like “email999.luxsci.com,” will be rejected. If you omit this field, then all of the outbound SMTP servers assigned to your account will be selected (no matter if that is 1 or 20) for you.'
                    smtp_server_method:
                      type: string
                      description: 'Optional. If you have multiple SMTP servers implicitly or explicitly selected for the “smtp_server” parameter, this parameter determines in what order they are tried. I.e., the “first” server is tried first and if the API cannot connect to that SMTP server (because it is down or too busy), it will try the next one, and so on. The possible values are “1” and “2”. 1: Try the email servers in the exact order provided. In this case, the servers in smtp_server are given in order of preference and we always try to send through the 1st one in the list when possible, falling back to the others if needed. 2: Randomize the list and then try them in the random order. This option, which is the default, is ideal for distributing the sending of your messages evenly across your selected SMTP servers. '
                  description: 'Must use filenam file.js'
                files:
                  type: array
                  items:
                    type: string
                    format: binary
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will contain a hash in the “data” field. The value of this data field is an array which lists the unique sendmail_id codes for each of the messages sent. These codes can be used in the reporting API functions to look up delivery status and other message details.  If multiple messages were sent in a single API call, multiple sendmail_id codes will be returned and the order of the codes in the array will exactly match the order of the messages in the API call.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: string
              example:
                    {
                      "success": 1,
                      "data": ["L3CJvSVVa74574"]
                    }
  '/user/{username}/email/compose/secureline/send':
    post:
      operationId: sendSecureEmailOrSecureText
      tags:
        - EmailSending
      description: 'Send Secure Email and/or SecureText messages through your WebMail servers.  This API endpoint is deprecated; use the sendEmail endpoint instead. See [sendEmail vs sendSecureEmailOrSecureText endpoints](/rest-api/sending-email.html) for sending email via the LuxSci API. {{ACL: User Email: Sending}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - body
                - subject
              properties:
                attachments:
                  description: 'Optional. If included, this is an array of JSON objects, one for each uploaded file. See the General API Usage Guide for how to upload files with your request. The individual JSON objects will have the following keywords and values: `name` – The exact filename of the uploaded file. `hash` – The SHA256 hex-encoded hash of the content of this file.'
                  type: array
                  items:
                    type: object
                bcc:
                  description: 'Optional. Array of email addresses for the recipients in the “Bcc” of the message.'
                  type: array
                  items:
                    type: string
                body:
                  description: 'Required. The body content of this message. This can be either a block of plain text (\n or \r\n – UNIX or Windows style linefeeds are recommended) or a block of HTML content. For best results, HTML content should NOT be a completed HTML Document, but what you would put inside <body> … </body> tags. If you need to include a complete, arbitrary HTML document, we recommend uploading that as an attached file. See the “body_type” parameter.'
                  type: string
                body_type:
                  type: string
                  description: 'Optional. If included, this must be “text” or “html”. If omitted, it takes on the value “text”. The body_type parameter indicates what content is being passed in the “body” field.'
                cc:
                  description: 'Optional. Array of email addresses for the recipients in the “Cc” of the message.'
                  type: array
                  items:
                    type: string
                from_address:
                  description: 'Optional. Email address to use as the “From address” for this message. If omitted, the sending user’s login email address will be used. Note that it is against the terms of service to use an address here that does not belong to you or for which you do not otherwise have permission to send from.'
                  type: string
                from_name:
                  description: 'Optional. The plain text name of the sender. If omitted, the sending user’s “contact” name (from his/her profile) will be used. If that is empty, then the “from_address” will be used. The from name can be a maximum of 100 characters long.'
                  type: string
                no_tls_only:
                  description: 'Optional. If this is passed and is true (1), then no email messages to recipients will be allowed to be sent using “TLS Only” – other encryption methods (e.g. Escrow) will be used. SecureText messages are never sent via TLS only.'
                  type: integer
                receipt:
                  description: 'Optional. If set to “1”, a read receipt will be requested. For SecureLine Escrow and SecureText, these read receipts will always be sent back on the 1st time the message is viewed by each recipient … the recipient has no say in the matter and no indication of if this is happening.'
                  type: integer
                reply_address:
                  description: 'Optional. Email address to use as the “Reply-To address” for this message. If omitted, the from address will be used. Note that it is against the terms of service to use an address here that does not belong to you or for which you do not otherwise have permission to send from.'
                  type: string
                secline_a_[email]:
                  description: 'Optional. For email messages sent via SecureLine Escrow where Question/Answer pairs are being used for authentication, this answer will be used for the recipient whose email address is “[email]”. This overrides any other answer that may have otherwise been used.'
                  type: string
                secline_keep_[email]:
                  description: 'Optional. (Days) For ALL email messages sent via SecureLine Escrow and SecureText, this this will be used as the integer number of days before the message accessible for recipient [email] expires from access. Note that you can have different expirations for different recipients of the same message. Once the message has expired for all recipients, the encrypted message data itself is deleted from the system.'
                  type: integer
                secline_q_[email]:
                  description: 'Optional. For email messages sent via SecureLine Escrow where Question/Answer pairs are being used for authentication, this question will be used for the recipient whose email address is “[email]”. E.g. use “secline_q_bob@domain.com” as the key for the question for recipient “bob@domain.com”. This overrides any other question that may have otherwise been used. If you set this question value to just an asterisk, “*”, then SecureSend portal login will be used for recipient authentication instead of an explicit question and answer. It does not matter what you specify for “secline_a_...” in this case.'
                  type: string
                subject:
                  description: 'Required. Subject of this message. This can be a maximum of 1000 characters long. Leading and training spaces are automatically trimmed from this subject.'
                  type: string
                template:
                  description: 'Optional. If provided, this must be the “Template ID” or template “Code Word” corresponding to an “SMTP or API Email Template” in the sender’s account. This template will be used to set the subject and body of the message (overriding any other subject and body data sent in your API call). Note, any attachments that you include in the API call will still be attached to the templated email message. Note that the templates “flags” may affect how the message is encrypted and delivered. Note also that this API call does not support the “Both HTML and Plain Text” template option to specify separate custom values for the alternative text and HTML parts of a message.  If you use such a template, the HTML part will be used and  the plain text versions will be auto-converted from that HTML. This is consistent with the way this API call works in general.  If you really need different plain text and HTML parts, use the “/email/send” API call.'
                  type: string
                template_data:
                  description: 'If you specify a “template” which has dynamic place holders, you can specify the keywords and respective values to substitute into the template in this field. The value of the “template_data” field is an associated array (object) with the fields/keywords being the template place holder keywords and the values of those keywords being the values to be substituted.'
                  type: object
                template_data_raw:
                  description: 'Optional. If passed with a value of “1” then the contents of template_data will be substituted into the template place holders “as is” exactly as passed. This is appropriate for passing content marked up with HTML and inserting that into and HTML-formatted email. The default, “0”, assumes the template_data is plain text content. In this context, the data will be appropriately quoted when being substituted into HTML-formatted email. E.g., special HTML characters like “<” will be converted into HTML entitles like “&lt;” and web links will be converted into clickable links'
                  type: integer
                to:
                  description: 'Optional. Array of email addresses for the recipients in the “To” of the message.'
                  type: array
                  items:
                    type: string
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '""'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/user/{username}/template/{template_id}':
    get:
      operationId: getEmailTemplate
      tags:
        - EmailSending
      description: 'The call returns the specific details around a specific Email Template. {{ACL: User Email: Templates}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: template_id
          in: path
          required: true
          description: "can either be the numerical unique ID of the template, or the textual “code_word”"
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the data component of the response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      template_id:
                        type: string
                        description: 'Unique numerical template ID.'
                      template_group_id:
                        type: string
                        description: 'Unique numerical template Group ID. A value of zero means unassigned.'
                      code_word:
                        type: string
                        description: 'Textual unique template reference.'
                      editor_type:
                        type: string
                        description: 'Which editor is assigned for editing this template. Options: advanced, visual, source, legacy.' 
                      title:
                        type: string
                        description: 'Internal title for this template.'
                      subject:
                        type: string
                        description: 'Email message subject to be used.'
                      body_html:
                        type: string
                        description: 'Email body content for HTML viewing.'
                      body_text:
                        type: string
                        description: 'Email body content for plain text viewing.'
                      preheader:
                        type: string
                        description: 'Email preheader content.'
                      notes:
                        type: string
                        description: 'Notes/comments on this template.'
                      is_private:
                        type: integer
                        description: '1: is private and will not be visible to other users in the same partition. 0: not private and can be shared.'
                      format:
                        type: string
                        description: 'What body formats to include when sending?'
                      sl_opt_in:
                        type: integer
                        description: 'Definitely use email encryption for this message (for users who are not required to use it anyway).'
                      sl_opt_out:
                        type: integer
                        description: 'Opt out of encryption as this message will NOT include PHI, PII, or sensitive data.'
                      sl_no_tls:
                        type: integer
                        description: 'Do not use "TLS Only" as an email encryption method. Use something stronger such as Escrow, PGP, or S/MIME.'
                      created:
                        type: string
                        description: 'Date the template was created. YYYY-MM-DD HH:MM:SS in GMT.'
                      modified:
                        type: string
                        description: 'Date the template was last modified. YYYY-MM-DD HH:MM:SS in GMT.'
                      last_used:
                        type: string
                        description: 'Date and time the template was last used. YYYY-MM-DD HH:MM:SS in GMT.  If this date is before the year 2000, then the date was ot captured or the template has not yet been used.'
              example:
                    {
                      "success": 1,
                      "data": {
                        "code_word":"campaign1",
                        "template_id":23,
                        "subject":"Campaign example subject",
                        "sl_opt_out":0,
                        "sl_opt_in":0,
                        "modified":"2020-06-15 20:43:57",
                        "created":"2020-06-15 20:43:57",
                        "last_used":"2023-02-15 08:12:03",
                        "body_text":"Test message body.",
                        "preheader":"About this message...",
                        "format":"both",
                        "sl_no_tls":1,
                        "title":"Example template",
                        "is_private":"0",
                        "body_html":"<p>Test message body</p>",
                        "editor_type":"visual",
                        "notes":"My notes"
                      }
                    }
    post:
      operationId: updateEmailTemplate
      tags:
        - EmailSending
      description: 'This template update call will update/replace ALL FIELDS (except editor_type). So, include all fields, as omitted fields will be treated as if you are updating them with empty or false values.  This is effectively just like deleting the old template with this `template_id` and replacing it with the new data.  Note, the editor_type can not be changed with this update API call; however, if you update a Template that was previously using the Advaced Editor, then it will be automatically changed to use the Source Editor going forward for compatibility with arbitrary HTML. {{ACL: User Email: Templates}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Template'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: template_id
          description: "template_id can be either the unique numerical template_id or the text code_word."
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'None'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":
                        {

                        }
                    }
    delete:
      operationId: deleteEmailTemplate
      tags:
        - EmailSending
      description: 'Delete a specific email template.  {{ACL: User Email: Templates}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: template_id
          in: path
          required: true
          description: "template_id can be either the unique numerical template_id or the text code_word"
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data": {}
                    }
  '/user/{username}/templates':
    get:
      operationId: getEmailTemplateList
      tags:
        - EmailSending
      description: 'This function returns a list of all templates accessible to you.  {{ACL: User Email: Templates}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: user_id
          in: query
          description: "Restricts the templates returned to only those owned by a specific user, [user_id].  This is relevent when [username] used belongs to a Team. In that case, all non-private Templates of all Team members are returned by this call unless this parameter is specified."
          schema:
            type: integer
      responses:
        '200':
          description: 'Results in the “data” component of the response. The data component is a list of associated arrays. Each associate array corresponds to a single template.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        template_id:
                          type: integer
                          description: 'Unique numerical template ID.'
                        template_group_id:
                          type: integer
                          description: 'Unique numerical Template Group ID. A value of zero means unassigned.'
                        code_word:
                          type: string 
                          description: 'Textual unique template reference.'
                        title:
                          type: string 
                          description: 'Internal title for this template.'
                        editor_type:
                          type: string
                          description: 'Which editor is assigned for editing this template. Options: advanced, visual, source, legacy.' 
                        notes:
                          type: string 
                          description: 'Notes on this template.'
                        can_edit:
                          type: integer 
                          description: '0: Template is read only. 1: Can update/delete this template.'
                        uid:
                          type: integer 
                          description: 'User ID of the user that owns this template.'
                        is_private:
                          type: integer
                          description: '1: is private and will not be visible to other users in the same partition. 0: not private and can be shared.'
                        last_used:
                          type: string
                          description: 'Date and time the template was last used. YYYY-MM-DD HH:MM:SS in GMT.  If this date is before the year 2000, then the date was ot captured or the template has not yet been used.'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "code_word":"campaign1",
                          "template_id":23,
                          "title":"Example template",
                          "notes":"My notes", "is_private": 0,
                          "last_used":"2023-02-15 08:12:03"
                        }
                    }
    put:
      operationId: createEmailTemplate
      tags:
        - EmailSending
      description: 'Create a new email template.  Templates created via the API will use the Legacy editor_type by default if editor_type is not specified.  If you select the Legacy Editor but do not have permission to use it, the Source Editor will be selected instead. {{ACL: User Email: Templates}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Template'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the “data” component of the response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      template_id:
                        type: string
                        description: 'Unique numerical template ID.'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "template_id":23
                        }
                    }
  '/user/{username}/content_tags':
    get:
      operationId: getEmailContentTagList
      tags:
        - EmailSending
      description: 'This function returns a list of all content tags accessible to you.  {{ACL: User Email: Templates}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the “data” component of the response. The data component is a list of associated arrays. Each associate array corresponds to a single content tag'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        tag_id:
                          type: integer
                          description: 'Unique numerical content tag ID.'
                        code_word:
                          type: string 
                          description: 'Textual unique content tag reference.'
                        title:
                          type: string 
                          description: 'Internal title for this content tag.'
                        uid:
                          type: integer 
                          description: 'User Id of the owner of the content tag.'
                        can_edit:
                          type: integer 
                          description: '1: You can update or delete this content tag.  0: This content tag is read only.'
                        is_private:
                          type: integer
                          description: '1: is private and will not be visible to other users in the same partition. 0: not private and can be shared.'
                        type:
                          type: string 
                          description: 'Content tag type.  One of: static, dynamic, or random.'
              example:
                    {
                      "success": 1,
                      "data": [
                        {
                          "code_word":"tag1",
                          "tag_id":23,
                          "title":"Example tag", "can_edit":1, "uid": 1190678, "is_private": 0, "type": "static"
                        }
                      ]
                    }
    put:
      operationId: createEmailContentTag
      tags:
        - EmailSending
      description: 'Define a new static email content tag.  {{ACL: User Email: Templates}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentTag'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the “data” component of the response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      tag_id:
                        type: string
                        description: 'Unique numerical content tag ID.'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "tag_id":23
                        }
                    }
  '/user/{username}/content_tags/{tag_id}':
    get:
      operationId: getEmailContentTag
      tags:
        - EmailSending
      description: 'The call returns the specific details around a specific Email Content Tag {{ACL: User Email: Templates}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: tag_id
          in: path
          required: true
          description: "can either be the numerical unique ID of the Cotent Tag, or its 'code_word'"
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the “data” component of the response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      template_id:
                        type: string
                        description: 'Unique numerical content tag ID.'
                      code_word:
                        type: string
                        description: 'Textual unique content tag reference.'
                      title:
                        type: string
                        description: 'Internal title for this content tag.'
                      body_html:
                        type: string
                        description: 'HTML context content.'
                      body_text:
                        type: string
                        description: 'Text context content'
                      is_private:
                        type: integer
                        description: '1: is private and will not be visible to other users in the same partition. 0: not private and can be shared.'
                      type:
                        type: string
                        description: 'Tag type - one of: static, dyanmic, or random.'
                      format:
                        type: string
                        description: 'What body format context(s) does this content tag apply to?'
                      created:
                        type: string
                        description: 'Date the template was created. YYYY-MM-DD HH:MM:SS in GMT.'
                      modified:
                        type: string
                        description: 'Date the template was last modified. YYYY-MM-DD HH:MM:SS in GMT.'
              example:
                    {
                      "success": 1,
                      "data": {
                        "code_word":"tag1",
                        "tag_id":23,
                        "modified":"2022-06-15 20:43:57",
                        "created":"2022-06-15 20:43:57",
                        "body_text":"Test message body.",
                        "format":"both",
                        "title":"Example content tag",
                        "is_private":"0",
                        "type":"static",
                        "body_html":"<p>Test message body</p>"
                      }
                    }
    post:
      operationId: updateEmailContentTag
      tags:
        - EmailSending
      description: 'This content tag update call will update/replace ALL FIELDS. So, include all fields, as omitted fields will be treated as if you are updating them with empty or false values.  This is effectively just like deleting the old tag with this `tag_id` and replacing it with the new data. Note, this call does not allow you to change the type of a Contet Tag or alter the inclusion rules for Dynamic Content Tags. {{ACL: User Email: Templates}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ContentTag'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: tag_id
          description: "tag_id can be either the unique numerical tag_id or the code_word."
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'None'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":
                        {

                        }
                    }
    delete:
      operationId: deleteEmailContentTag
      tags:
        - EmailSending
      description: 'Delete a specific email content tag.  {{ACL: User Email: Templates}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: tag_id
          in: path
          required: true
          description: "tag_id can be either the unique numerical tag_id or the text code_word"
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data": {}
                    }
  '/user/{username}/template_group/{template_group_id}':
    post:
      operationId: updateEmailTemplateGroup
      tags:
        - EmailSending
      description: 'Update the Template Group name. {{ACL: User Email: Templates}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: 'Required. New Template Group name.'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: template_group_id
          description: "Unique Id for this template group."
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'None'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":
                        {
                        }
                    }
    delete:
      operationId: deleteEmailTemplateGroup
      tags:
        - EmailSending
      description: 'Delete a specific email template group.  {{ACL: User Email: Templates}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: template_group_id
          in: path
          required: true
          description: "Unique Id for this template group."
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data": {}
                    }
    put:
      operationId: createEmailTemplateGroup
      tags:
        - EmailSending
      description: 'Create a new email template group. {{ACL: User Email: Templates}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: 'Required. New Template Group name.'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: template_group_id
          in: path
          required: true
          description: "Unique Id for this template group."
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the data component of the response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      template_group_id:
                        type: string
                        description: 'Unique numerical ID the new group.'
  '/user/{username}/template_groups':
    get:
      operationId: getEmailTemplateGroups
      tags:
        - EmailSending
      description: 'This function returns a list of all templates groups accessible to you.  {{ACL: User Email: Templates}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the data component of the response. The data component is a list of associated arrays. Each associate array corresponds to a single template group.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        template_group_id:
                          type: integer
                          description: 'Unique numerical template group ID.'
                        name:
                          type: string 
                          description: 'Name for this Group.'
                        user_id:
                          type: integer 
                          description: 'User ID of the user that owns this template.'
                        created:
                          type: string
                          description: 'DATETIME of when this Group was created.'
                        modified:
                          type: string
                          description: 'DATETIME of when this Group was last modified.'
                        n_items:
                          type: integer
                          description: 'Number of Templates in the Group.'
  '/user/{username}/suppression_count/':
    get:
      operationId: getUserSuppressionSummaryReport
      tags:
        - UserReports
      description: 'Retrieve a count of the matching email suppressions at the user level using a report-style call.  Dates are based on the date that the suppression was added.  See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#sup_count). {{ACL: User Email: Suppression}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
      responses:
        '200':
          description: 'Report the count of matching suppressions.  The returned field name for this count is suppressions.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/suppression_v2/':
    get:
      operationId: getUserSuppressionReport
      tags:
        - UserReports
      description: 'Retrieve all email suppressions at the user level using a report-style call.  See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#sup). {{ACL: User Email: Suppression}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: email
          in: query
          description: 'Restrict the report to suppressions of this specific email address.'
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'Report of suppressions'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/suppression/{email}':
    delete:
      operationId: deleteUserSuppression
      tags:
        - EmailSending
      description: 'Delete a specific user-level email suppression. {{ACL: User Email: Suppression}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: email
          in: path
          required: true
          description: "Suppression email address to be deleted."
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data": {}
                    }
    get:
      operationId: getUserSuppression
      tags:
        - EmailSending
      description: 'Retrieve a specific email suppression at the user level. {{ACL: User Email: Suppression}}.  See also the newer and more general function: getUserSuppressionReport.'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: email
          in: path
          required: true
          description: "Suppression email address to be retrieved. You are returning all suppression entries that contain the string 'email'.  Note that even if you specify a full email address for 'email,' you can get multiple matches."
          schema:
            type: string
      responses:
        '200':
          description: 'The data will be a single object that is a list containing one entry for each match.  Each entry will itself be a list of the form: [email, expires, account_id, domain_id, user_id, date_time_created, notes]. "email" is the email address suppressed.  "expires" is the number of days until it expires, or zero if it does not expire. account_id is the customer account id. domain_id is zero for account-level entries, or the domain name id for domain and user-level entries.  user_id is zero except for user-level suppression entries, in which case it is the end user id number. "date_time_created" is in GMT.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                        type: string                   
              example:
                    {
                      "success": 1,
                      "data":
                        [
                        "email@domain.com,0,101010,0,0"
                        ]
                    }
  '/user/{username}/suppression/':
    get:
      operationId: getUserSuppressionList
      tags:
        - EmailSending
      description: 'Retrieve all email suppressions at the user level in a simple list. {{ACL: User Email: Suppression}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The data will be a single object that is a list containing one entry for each match.  Each entry will itself be a list of the form: [email, expires, account_id, domain_id, user_id, date_time_created, notes]. "email" is the email address suppressed.  "expires" is the number of days until it expires, or zero if it does not expire. account_id is the customer account id. domain_id is zero for account-level entries, or the domain name id for domain and user-level entries.  user_id is zero except for user-level suppression entries, in which case it is the end user id number. "date_time_created" is in GMT.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                        type: string                    
              example:
                    {
                      "success": 1,
                      "data":
                        {
                        "email@domain.com,0,101010,0,0"
                        }
                    }  
    put:
      operationId: createUserSuppression
      tags:
        - EmailSending
      description: 'Add new email suppressions at the user level. {{ACL: User Email: Suppression}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Suppression'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'None'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":{}
                    }
  '/account/{accountId}/suppression_count/':
    get:
      operationId: getAccountSuppressionSummaryReport
      tags:
        - Reports
      description: 'Retrieve a count of the matching email suppressions at the account level (only) using a report-style call.  Dates are based on the date that the suppression was added.  See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#sup_count)   {{ACL: User Email: Suppression}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
      responses:
        '200':
          description: 'Report the count of matching suppressions.  The returned field name for this count is suppressions.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse' 
  '/account/{accountId}/suppression_v2/':
    get:
      operationId: getAccountSuppressionReport
      tags:
        - Reports
      description: 'Retrieve all email suppressions at the account level (only) using a report-style call.  See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sup). {{ACL: User Email: Suppression}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: email
          in: query
          description: 'Restrict the report to suppressions of this specific email address.'
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'Report of suppressions'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/suppression/{email}':
    delete:
      operationId: deleteAccountSuppression
      tags:
        - EmailSending
      description: 'Delete a specific account-level email suppression. {{ACL: User Email: Suppression}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: email
          in: path
          required: true
          description: "Suppression email address to be deleted."
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data": 
                      {
                      }
                    }
    get:
      operationId: getAccountSuppression
      tags:
        - EmailSending
      description: 'Retrieve a specific email suppression at the account level. {{ACL: User Email: Suppression}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: integer
        - name: email
          in: path
          required: true
          description: "Suppression email address to be retrieved. You are returning all suppression entries that contain the string 'email'.  Note that even if you specify a full email address for 'email,' you can get multiple matches."
          schema:
            type: string
      responses:
        '200':
          description: 'The data will be a single object that is a list containing one entry for each match.  Each entry will itself be a list of the form: `[email, expires, account_id, domain_id, user_id]`. "email" is the email address suppressed.  "expires" is the number of days until it expires, or zero if it does not expire. account_id is the customer account id. domain_id is zero for account-level entries or the domain name id for domain and user-level entries.  user_id is zero except for user-level suppression entries, in which case it is the end user id number.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                        type: string                   
              example:
                    {
                      "success": 1,
                      "data":
                        [
                        "email@domain.com,0,101010,0,0"
                        ]
                    }
  '/account/{accountId}/suppression/':
    get:
      operationId: getAccountSuppressionList
      tags:
        - EmailSending
      description: 'Retrieve all email suppressions at the account level. See also the newer and more general function: getAccountSuppressionReport.  {{ACL: User Email: Suppression}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The data will be a single object that is a list containing one entry for each match.  Each entry will itself be a list of the form: `[email, expires, account_id, domain_id, user_id]`. "email" is the email address suppressed.  "expires" is the number of days until it expires, or zero if it does not expire. account_id is the customer account id. domain_id is zero for account-level entries, or the domain name id for domain and user-level entries.  user_id is zero except for user-level suppression entries, in which case it is the end user id number.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                        type: string                    
              example:
                    {
                      "success": 1,
                      "data":
                        [
                        "email@domain.com,0,101010,0,0"
                        ]
                    }  
    put:
      operationId: createAccountSuppression
      tags:
        - EmailSending
      description: 'Add new email suppressions at the account level. {{ACL: User Email: Suppression}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Suppression'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: 'None'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":
                        {
                        }
                    }
  '/user/{username}/webaides/{webaide_type}':
    get:
      operationId: getWebAides
      tags:
        - WebAides
      description: 'Return a list of all WebAides accessible to the specified user, that are also of the indicated type. You can use the query string to add filters to narrow down the results. See also [WebAide definitions](/rest-api/webaides.html). {{ACL: Access to that specific type of WebAides; Read Accessible WebAides and Entries }}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: subscribed
          description: 'Filter by WebAide subscription status<ul><li>all - select all</li><li>subscribed - return those subscribed</li><li>unsubscribed - return those not subscribed</li><li>tosync - return those tagged for synchronization with MobileSync.</li>'
          in: query
          schema:
            type: string
            enum:
              - all
              - subscribed
              - unsubscribed
              - tosync
        - name: ids
          description: 'List of the numerical WebAide IDs eligible to be returned.'
          in: query
          schema:
            type: array
            items:
              type: string
          explode: false
        - name: permissions
          description: 'Values can include those in the webaide_permission list. Select only WebAides where the user has all of the indicated permissions'
          in: query
          schema:
            type: array
            items:
              type: string
          explode: false
        - name: modified
          description: 'DateTime in GMT in the format: YYYY-MM-DD HH:MM:SS. Return all WebAides that have had any entry created, deleted, or modified on or after this date and time. Values can include those in the webaide_permission list.'
          in: query
          schema:
            type: string
        - name: changes
          in: query
          description: 'Optional. DateTime in GMT in the format: YYYY-MM-DD HH:MM:SS. If this is provided, a sub call to “GetWebAideChanges” will be made for each returned WebAide, giving you summary counts of numbers of entries and adds/ updates/deletes since the specified date.<br><br>Specify an old date (e.g. “2000-01-01”) if all you care about is the total number of entries.<br><br>Use of “changes” is the recommended way to get the number of entries in one or more WebAides in an efficient manner.'
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have a list of objects as the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebAide'
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "permissions":"create,admin,add_all,delete_all,edit_sel,delete_self,add_self,read,edit_all", 
                            "default":0, 
                            "tosync":1, 
                            "desc":null, 
                            "modified":"2015-03-06 17:14:07", 
                            "title":"Example Addresss Book 1", 
                            "webaide_id":4996, 
                            "type":"addressbooks", 
                            "subscribed":1, 
                            "favorite":1, 
                            "mine":1
                            
                          }
                          , 
                          {
                            "permissions":"add_all,add_self,delete_all,read,edit_self,delete_self,edit_all", 
                            "default":0,
                            "tosync":0, 
                            "desc": "This is just a de\u0073cription for testing", 
                            "modified":"2011-04-20 01:45:49", 
                            "title": "Another Example",
                            "webaide_id":1601, 
                            "type":"addressbooks", 
                            "subscribed":1,
                            "favorite":0,
                            "mine":1
                          }
                        ]
                    }
    post:
      operationId: newWebAide
      tags:
        - WebAides
      description: |-
        Create a new WebAide of type webaide_type. E.g. creation of a new “Address Book”. 
      
        Note: Each user is limited to 500 WebAides of each type. Trying to create more will result in an error being returned.
        
        See also [WebAide definitions](/rest-api/webaides.html).
        
        {{ACL: Access to that specific type of WebAides; Add/Update Accessible WebAides and Entries }}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - title
              properties:
                title:
                  type: string
                  description: 'Required. Title string for the new WebAide.  This does not have to be unique across your WebAides. You can, but probably should not, create multiple WebAides with the same title'
                description:
                  description: 'Optional. Description of the new WebAide'
                  type: string
                parent_id:
                  description: 'Optional. WebAide ID of a WebAide of the same webaide_type owned by this user that will be the parent for this new WebAide in the hierarchy. If this is omitted or invalid, the new WebAide will be created at the “top level” of the hierarchy.'
                  type: string
                subscribe:
                  description: 'Optional. If set to true (e.g. “1”), then the WebAide will be subscribed to once it is created.'
                  type: integer
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      title: 
                        type: string
                        description: 'Plain text title of the WebAide.'
                      webaide_id: 
                        type: string
                        description: 'Numerical unique WebAide Id of the new WebAide'
                      subscribed: 
                        type: integer
                        enum: [0, 1]
                        description: 'If the user is subscribed to this WebAide (1) or not (0)'
                      tosync: 
                        type: integer
                        nullable: true
                        enum:
                          - 0
                          - 1
                          # - null #causing html2 generation error
                        description: 'If the WebAide is tagged for synchronization via MobileSync (1) or not (0 or null)'
                      mine: 
                        type: integer
                        default: 1
                        enum: [1]
                        description: 'True (1) if the WebAide is owned by the user. This is always true.'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "subscribed":1, 
                          "tosync":null, 
                          "webaide_id":5128, 
                          "title":"Test New WebAide", 
                          "mine":1
                        }
                    }
  '/user/{username}/webaides/{webaide_type}/{webaide_id}':
    get:
      operationId: getWebAide
      tags:
        - WebAides
      description: 'This call is like `getWebAides`, except that the call is simplified and targeted at a specific, single WebAide. See also [WebAide definitions](/rest-api/webaides.html). {{ACL: Access to that specific type of WebAides; Read Accessible WebAides and Entries }}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
        - name: changes
          description: 'Optional. DateTime in GMT in the format: YYYY-MM-DD HH:MM:SS. If this is provided, a sub call to “GetWebAideChanges” will be made for each returned WebAide, giving you summary counts of numbers of entries and adds/updates/deletes since the specified date.<br><br>Specify an old date (e.g. “2000-01-01”) if all you care about is the total number of entries.<br><br>Use of “changes” is the recommended way to get the number of entries in one or more WebAides in an efficient manner.'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the “data” component of the response. The result will be the same as that for `getWebAides`.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/WebAide'
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "permissions":"create,admin,add_all,delete_all,edit_self,delete_self,add_self,read,edit_all",
                            "default":0,
                            "tosync":1, 
                            "desc":null, 
                            "modified":"2015-03-06 17:14:07", 
                            "title":"Example Addresss Book 1",
                            "webaide_id":4996, 
                            "type":"addressbooks", 
                            "subscribed":1, 
                            "favorite":1, 
                            "mine":1, 
                            "changes": { "adds": 10, "entries": 10, "deletes": 0, "updates":0}
                          }
                        ]
                    }
    delete:
      operationId: deleteWebAide
      tags:
        - WebAides
      description: 'Delete a WebAide of type `webaide_type` whose unique ID is `webaide_id`. This WebAide must be owned by the user in question. See also [WebAide definitions](/rest-api/webaides.html).  {{ACL: Access to that specific type of WebAides; Delete Accessible WebAides and Entries }}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'nothing in data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
    post:
      operationId: newWebAideEntry
      tags:
        - WebAides
      description: |-
        Create a new WebAide Entry. Note that invalid fields may simply be ignored, rather than generate an actual error. E.g. an invalid “E-mail Address” field will simply result in that field being omitted in the new entry. We recommend that you validate your own data and not rely on request errors to do the validation for you.
      
        Note: Each WebAide is limited to 25,000 entries by default. If your WebAide has this many entries (or more), then this NewWebAideEntry command will return an error. If you need larger WebAides, please contact support. Very large WebAides may require the use of a dedicated server.
        
        See also [WebAide definitions](/rest-api/webaides.html).
        
        {{ACL: Access to that specific type of WebAides; Add/Change Accessible WebAides and Entries }}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required: 
                - entry
              properties:
                timezone:
                  type: string
                  description: 'Time zone Keyword (e.g. GMT, EST5EDT, etc.). Used for calendars and Tasks WebAides to define the Time zone of the event for recurrence.'
                entry:
                  type: object
                  description: 'Required. Key/value pairs of the data used to make this WebAide entry. See the webaide entry data fields for the field names and meanings.'
            examples:
              Example 1:
                value:
                  {"entry":{"First Name":"John", "E-mail Address":"xxxxxxx@cc.cc", "Primary Phone":"111-222-3333", "Last Name":"Smith", "Children":"Yes, 2", "File As":"Smith, John"}}
              Example 2:
                value:
                  {"entry":{"Weekly Recur Type":"nweeks","Weekly Recur Days":"1,2,3,5","Categories":"tag1;tag me again","Subject":"Example Calendar Event","Show Time As":"Busy","Start DateTime":"2015-03-17 12:00:00","Recur Timezone":"EST5EDT","All day event":"yes","Recur Freq Type":"weekly","Recur Every N Weeks":2,"Recur End Type":"none","Recur Enabled":"yes","End DateTime":"2015-03-17 13:30:00"}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      entry_id:
                        type: number
                        description: 'Unique ID for the newly created entry.'
                      modified:
                        type: string
                        description: 'DATETIME this new entry was created (and when this WebAide thus has been last modified). “YYYY-MM-DD HH:MM:SS” in GMT '
                      errors:
                        type: string
                        description: 'String. If errors occurred in processing some of the entry, but the entry was still created, you can see these errors here. If this is null, then there were no errors.                    '
              examples:
                Example 1:
                  value: >-
                    {
                      "success": 1,
                      "data":
                        {
                          "modified": "2015-03-17 03:41:54", 
                          "entry_ id":5643,
                          "errors":null
                        }
                    }
                Example 2:
                  value:
                    {"auth":OMITTED, "success":1,"data":{"errors":null,"modified":"2015-03-17 16:09:34","entry_ id":23557}}
  '/user/{username}/webaides/{webaide_type}/{webaide_id}/{entry_id}':
    get:
      operationId: getWebAideEntry
      tags:
        - WebAides
      description: 'Retrieve the detailed contents of a specific WebAide entry. See also [WebAide definitions](/rest-api/webaides.html). {{ACL: Access to that specific type of WebAides; Read Accessible WebAides and Entries }}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
        - name: entry_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'data contains the entry details as a object. See webaide entry data fields for the field names and meanings of the fields returned.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "Date Created":"2015-03-16 19:31:06", 
                          "URL":"http:// google.com", 
                          "Link Title":"Google", 
                          "Date Modified":"2015-03-16 19:31:06", 
                          "Unique ID": 5668, 
                          "Categories":"tag1;tag2"
                        }
                    }
    put:
      operationId: updateWebAideEntry
      tags:
        - WebAides
      description: |-
        Update an existing WebAide Entry. This function will replace the data in all entry fields with the new data supplied. It is recommended that you retrieve the complete entry, alter it, and then update it – so that you update does not delete data from an entry simply because you did not include those fields in your update.
      
        File attachments on entries are unaffected by this command. 
        
        See also [WebAide definitions](/rest-api/webaides.html).
        
        {{ACL: Access to that specific type of WebAides; Add/Change Accessible WebAides and Entries }}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - entry
              properties:
                timezone:
                  type: string
                  description: 'Time zone Keyword (e.g. GMT, EST5EDT, etc.) Used for calendars and Tasks WebAides to define the Time zone of the event for recurrence.'
                import_recur:
                  type: integer
                  default: 0
                  enum: [0,1]
                  description: 'Optional. Value: 1 or 0. Default 0. For calendar and task entries. If true, recurrence data will be updated/replaced. If false, then the event’s recurrence pattern will remain unchanged.'
                entry:
                  type: object
                  description: 'Required. Key/value pairs of the data used to make this WebAide entry. See the WebAide entry data fields for the field names and meanings.'
            example:
              {"entry":{"Weekly Recur Type":"nweeks","Weekly Recur Days":"1,2,3,4,5","Categories":"tag1;tagx", "Subject":"Example Calendar Event: Recurrence Changed!", "Show Time As":"Busy", "Start DateTime":"2015-03-17 12:00:00", "Recur Timezone":"EST5EDT", "All day event":"yes","Recur Freq Type":"weekly", "Recur Every N Weeks":1, "Recur End Type":"none", "Recur Enabled":"yes", "End DateTime":"2015-03-17 13:30:00"}, "import_recur":1}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
        - name: entry_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      entry_id:
                        type: string
                        description: 'Unique ID for the updated created entry.'
                      modified: 
                        type: string
                        description: 'DATETIME this new entry was updated (and when this WebAide thus has been last modified). “YYYY-MM-DD HH:MM:SS” in GMT'
                      errors:
                        type: string
                        description: 'String. If errors occurred in processing some of the entry, but the entry was still updated, you can see these errors here. If this is null, then there were no errors.'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "modified": "2015-03-17 03:41:54", 
                          "entry_ id":5643,
                          "errors":null
                        }
                    }
    delete:
      operationId: deleteWebAideEntry
      tags:
        - WebAides
      description: 'Delete an existing WebAide Entry. See also [WebAide definitions](/rest-api/webaides.html). {{ACL: Access to that specific type of WebAides; Delete Accessible WebAides and Entries }}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
        - name: entry_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      num_deleted:
                        type: string
                        description: 'Number of entries that were deleted. Should always be “1” on success.'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "num_deleted":1
                        }
                    }
  '/user/{username}/webaides/{webaide_type}/{webaide_id}/entries':
    get:
      operationId: getWebAideEntries
      tags:
        - WebAides
      description: 'Retrieve the detailed contents of all WebAide entries matching a query. See also [WebAide definitions](/rest-api/webaides.html).  {{ACL: Access to that specific type of WebAides; Read Accessible WebAides and Entries }}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
        - name: entries
          description: |-
            Optional. Comma-delimited list of entry Unique IDs. e.g. “10786,77892,23”.
          
            If included, the search is restricted to only entries in this list.
          
            Note, if you want to use a very long list of entries, you might want to use several requests so that you do not exceed the maximum URL query string size of 8190 bytes.
          in: query
          schema:
            type: array
            items:
              type: string
          explode: false
        - name: limit
          description: 'Optional. Integer 1 to 500. How many entries to return (maximum). Default is 500.'
          in: query
          schema:
            type: integer
            minimum: 1
            maximum: 500
            default: 500
        - name: resume
          description: 'Integer:1 or 0. If 0 (the default), begin a new search. If 1, continue the previous search. When returning successive “pages” or entries, use resume for faster and more consistent results.'
          in: query
          schema:
            type: integer
            enum: [0,1]
            default: 0
        - name: secureline
          description: 'Integer 1 or 0 If specified as ‘1’, SecureLine-specific Address Book fields are included in the export. I.e., this includes the SecureLine Escrow Question/Answer pair and/or PGP and S/MIME public keys.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: showcomplete
          description: 'Integer 1 or 0 If specified as ‘1’, get completed tasks for ‘Tasks’ WebAides. By default, only uncompleted tasks are returned.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: sort
          description: 'Optional method by which the returned entries should be sorted.'
          in: query
          schema:
            type: string
            enum: ["modified", "created", "title", "size"]
        - name: start
          description: 'Optional. The default is 0. Index in the list of all entries from which to start the result set. Use this to return successive “pages” of entries.'
          in: query
          schema:
            type: integer
            minimum: 0
            default: 0
        - name: timezone
          description: 'Time zone code. The time zone to use for Calendar/Task dates and times. The user’s default time zone is used if no time zone is specified.'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      entry_data:
                        description: |-
                          Array of arrays. Each interior array corresponds to one returned entry. The nth element in that array corresponds to the nth entry in the array of fields.
                        
                          Items are returned ion this way in order for the results of be more compact when many entries are returned at once.
                        type: array
                        items:
                          type: array
                          items:
                            $ref: "#/components/schemas/StringOrNumber"
                          # items:
                          #   oneOf:
                          #     - type: string
                          #     - type: number
                          #   nullable: true
                      fields:
                        description: "Array of field names. These are the field as per WebAide entry data fields, below."
                        type: array
                        items:
                          type: string
                      num_total_entries:
                        type: integer
                        description: "Total number of entries matching the criteria. This can be larger than the number of entries actually returned."
                      starting_index:
                        type: integer
                        description: "The starting index of this current result set. A value of “0” is for the first entry matched."
              example:
                    {
                      "success": 1,
                      "data": {
                        "entry_data": [
                          [
                            "Google", "http://google.com", 
                            "2015-03-18 01:49:03", 
                            "2015-03-18 01:49:03", 
                            null, 
                            5669
                          ], 
                          [
                            "LuxSci", 
                            "http://luxsci.com", 
                            "2015-03-16 19:31:06", 
                            "2015-03-16 20:26:08", 
                            "ddd;abcabcabc",
                            566
                          ]
                        ], 
                        "starting_index": 0, 
                        "fields": [
                          "Link Title", 
                          "URL", 
                          "Date Created", 
                          "Date Modified", 
                          "Categories", 
                          "Unique ID"
                          ],
                        "num_total_entries": 2
                      }
                    }
  '/user/{username}/webaides/calendar/{webaide_id}/entries/date_range':
    get:
      operationId: getCalendarEntriesDateRange
      tags:
        - WebAides
      description: 'Gets a list of entries in a specified Calendar WebAide that fall within a specified range of dates. For recurring entries, the entry will be returned if any of its instances fall within the specified date range. The date range is taken to be dates in GMT. See also [WebAide definitions](/rest-api/webaides.html).  {{ACL: Access to WebAide Calendars; Read Accessible WebAides and Entries }}' 
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
        - name: before
          description: 'DATE: “YYYY-MM-DD” in GMT (where 00:00:00 GMT is implied) Required. Entries that contain events before this date.'
          required: true
          in: query
          schema:
            type: string
        - name: entries
          description: 'Comma-delimited list of entry Unique IDs. e.g. “10786,77892,23”<br><br>Optional. If included, the search is restricted to only entries in this list.<br><br>Note, if you want to use a very long list of entries, you might want to use several requests so that you do not exceed the maximum URL query string size of 8190 bytes.'
          in: query
          schema:
            type: string
        - name: from
          description: 'DATE: “YYYY-MM-DD” in GMT (where 00:00:00 GMT is implied)<br><br>Required. Entries that contain events on or after this date.'
          required: true
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      Entries:
                        type: array
                        items:
                          type: integer
                        description: 'Array of entry Unique IDs for all entries that match.'
              example:
                    {
                      "success": 1,
                      "data":{"entries":[15617,15618,23539]}
                    }                   
  '/user/{username}/webaides/{webaide_type}/{webaide_id}/entries/delete':
    post:
      operationId: deleteWebAideEntries
      tags:
        - WebAides
      description: 'Delete multiple entries from a WebAide all at once. (Since we are not deleting an individual entity at a specific address, this is a POST instead of a DELETE method). See also [WebAide definitions](/rest-api/webaides.html). {{ACL: Access to that specific type of WebAides; Delete Accessible WebAides and Entries }}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                entries:
                  type: string
                  description: |-
                    Comma-delimited list of entry Unique IDs. e.g. “10786,77892,23”
                  
                    Optional. Specific list of entries to delete
                all:
                  type: integer
                  description: |-
                    Integer: 1 or 0
                  
                    Optional. If true, and “entries” is omitted, then all entries in the WebAide will be deleted.
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '""'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      num_deleted:
                        type: integer
                        description: 'Integer number of entries actually deleted'
              example:
                    {
                      "success": 1,
                      "data": {"num_deleted":2}
                    }                   
  '/user/{username}/webaides/{webaide_type}/{webaide_id}/entries/changes':
    get:
      operationId: getWebAideChanges
      tags:
        - WebAides
      description: 'Return all WebAide entries added, changed, or deleted since a particular time. See also [WebAide definitions](/rest-api/webaides.html).  {{ACL: Access to that specific type of WebAides; Read Accessible WebAides and Entries }}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
        - name: modified
          description: 'Timestamp “YYYYMMDDHHMMSS” in GMT or “YYYY-MM-DD HH:MM:SS” in GMT<br><br>Return all WebAide entries added, changed, or deleted since this timestamp. If you specify “0” here, it will return a list of all entries that exist now and all that have been deleted.'
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '""'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      adds:
                        type: string
                        description: 'Array of entry Unique IDs for those entries added on or after the modified timestamp.'
                      changes:
                        type: string
                        description: 'Array of entry Unique IDs for those entries updated on or after the modified timestamp'
                      deletes:
                        type: string
                        description: 'Array of entry Unique IDs for those entries deleted on or after the modified timestamp'
                      modified:
                        type: string
                        description: 'Timestamp in the format “YYYYMMDDHHMMSS” in GMT of your query --- so you can use this to as the modified parameter in your next call.'
              example:
                    {
                      "success": 1,
                      "data": {
                        "adds": [23539], 
                        "changes": [15617,15618,23540],  
                        "deletes": [23545,23544,23547,23546,23548,23553,23552,23551,23550,23549,23558,23555,23556,23554,23557,23560,23559], 
                        "modified": "20150318023708"
                      }
                    }                   
  '/user/{username}/webaides/{webaide_type}/{webaide_id}/entries/import':
    post:
      operationId: addUpdateWebAideEntries
      tags:
        - WebAides
      description: |-
        Add/update multiple entries of a WebAide all at once.
      
        Address Book Imports: SecureLine data can be sent in this way as well (i.e. Escrow question and answer, PGP key, S/MIME key, etc.). SecureLine data is imported if and only if the “SecureLine Mode” field is present and not empty for an entry. Any entries that are updated and for which “SecureLine Mode” is left blank, will have their existing SecureLine settings left “as-is”.
        
        Note: Each WebAide is limited to 25,000 entries by default. If your WebAide has this many entries (or more), then this AddUpdateWebAideEntries command will return an error (even if you are only intending to do updates). If you need larger WebAides, please contact support. Very large WebAides may require use of a dedicated server.
        
        See also [WebAide definitions](/rest-api/webaides.html).
        
        {{ACL: Access to that specific type of WebAides; Add/Update Accessible WebAides and Entries }}
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - fields
              properties:
                entry_data:
                  description: |-
                    Each interior array corresponds to one entry. The nth element in that array corresponds to the nth entry in the array of fields.
                  
                    A maximum of 500 entries can be sent per request.
                  type: array
                  items:
                    type: array
                    items:
                      type: string
                fields:
                  description: 'Required. An array of field names, as per WebAide entry data fields, below.'
                  type: array
                  items:
                    type: string
                import_mode:
                  type: string
                  description: |-
                    Optional. Enumeration: One of “ignore”, “update”, “replace”, “replace_ exact”. How to match these entries to the existing entries and what to do about matches?
                  
                    If this is left blank, ALL entries will be added even if they are duplicates of existing entries. Valid modes are
                    - ignore: If a similar entry already exists the new entry will not be added
                    - replace: if a similar entry already exists it will be replaced by the new entry
                    - update: if a similar entry already exists the most recent entry will be saved in the WebAide. Most recent is determined by the modified date times in the system and in the data that you are sending.
                    - replace_exact: Matches existing entries with your data based only on “Unique ID”. Matching entries will use the “replace”. Non- matching entries will be skipped and not added.In cases except with “replace_exact”, non-matches will be added as new entries.
                    
                    How are matches made? They are made based un “Unique ID” if you have passed that. Otherwise it tries to match based on fields like Title, Subject, Entry Date, email address, etc. These fuzzy matches are useful if you are synchronizing new data that may match some or all existing entries and you do not want to make duplicates. Generally, you should always include the “Unique ID” so that there is no ambiguity.
                  enum: ["ignore","update","replace","replace_exact"]
                import_recur:
                  type: integer
                  description: |-
                    Optional. Default 0. If 1, then the recurrence information uploaded will be imported.
                  
                    Note that recurrent entries that are updated without “import_recur” enabled will lose their recurrence.
                  enum: [0,1]
                  default: 0
                timezone:
                  type: string
                  description: 'Optional. Time zone code. E.g. “GMT”. The time zone to use for Calendar/Task dates and times. The user’s default time zone is used if no time zone is specified. Default is GMT.'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: webaide_type
          in: path
          required: true
          schema:
            type: string
        - name: webaide_id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response body for a successful request will have data in the “data” in the JSON response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      errors:
                        type: array
                        items:
                          type: string
                          description: 'An array of error strings.'
                      modified_date:
                        type: string
                        description: 'The new modified date/time of the WebAide after all the changes have been made. In the format “YYYY-MM-DD HH:MM:SS” in GMT. Note that if there are other modifications that were made concurrently, the modified date/time may be the same, but you might not know about the other changes.'
                      modified_ids:
                        type: string
                        description: 'A comma-delimited list of all entry Unique IDs that were created or modified as a result of this request.'
                      num_added:
                        type: integer
                        description: 'The number of entries that were added a new into the WebAide.'
                      num_received:
                        type: integer
                        description: 'The number of entries that the system detected in your request.'
                      num_skipped:
                        type: integer
                        description: 'The number of entries sent that were skipped. E.g. because of invalid or malformatted data or due to your choice of import_mode.'
                      num_updated:
                        type: string
                        description: 'The number of existing entries that were updated as a result of this request.'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "errors":[], 
                          "modified_date":"2015-03-18 13:47:01", 
                          "modified_ids":"23561,23563", 
                          "num_skipped":0,
                          "num_updated":1, 
                          "num_added":1, 
                          "num_received":2
                        }
                    }                   
  '/user/{username}/report/email/smtp/sent':
    get:
      operationId: getEmailSMTPSentReportUser
      tags:
        - UserReports
      description: 'Return a list of all email messages sent via SMTP by `username`. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sent). {{ACL: User: View Reports}}' 
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          in: query
          description: 'Case-insensitive substring search of the message “From” email address'
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: ip
          in: query
          description: 'Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          schema:
            type: string
        - name: opt_out
          description: 'Value:<br>0 – SecureLine Opt Out not used<br>-1 – SecureLine Opt Out use not recorded for some reason<br>1 – SecureLine Opt Out'
          in: query
          schema:
            type: string
            enum: ['0', '-1', '1']
        - name: secureline
          description: 'Value:<br>any – Match anything<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine encryption was used<br>0 – SecureLine encryption was not used<br><br>If SecureLine was used, use the delivery status report to see more details.'
          in: query
          schema:
            type: string
            enum: ['any', '0', '-1', '1']
        - name: sendmail_id
          description: 'Return only the message with the specified sendmail_id.'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: spam
          description: 'Value:<br>0 – Message was not marked as spam by a recipient and returned in a Feed Back Loop<br>1 – Message was marked as spam by a recipient and returned in a Feed Back Loop'
          in: query
          schema:
            type: string
            enum: ['0','1']
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF-8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - $ref: '#/components/parameters/tracked_headers'
        - name: user_id
          description: 'Restrict the report to the user with this specific User ID number.'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/webmail/sent':
    get:
      operationId: getEmailWebMailSentReportUser
      tags:
        - UserReports
      description: 'Return a list of all email messages sent via Webmail by `username`.  See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#sent). {{ACL: User: View Reports}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          in: query
          description: 'Case-insensitive substring search of the message “From” email address'
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: ip
          in: query
          description: 'Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          schema:
            type: string
        - name: opt_out
          description: 'Value:<br>0 – SecureLine Opt Out not used<br>-1 – SecureLine Opt Out use not recorded for some reason<br>1 – SecureLine Opt Out'
          in: query
          schema:
            type: string
            enum: ['0', '-1', '1']
        - name: secureline
          description: 'Value:<br>any – Match anything<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine encryption was used<br>0 – SecureLine encryption was not used<br><br>If SecureLine was used, use the delivery status report to see more details.'
          in: query
          schema:
            type: string
            enum: ['any', '0', '-1', '1']
        - name: sendmail_id
          description: 'Return only the message with the specified sendmail_id.'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: spam
          description: 'Value:<br>0 – Message was not marked as spam by a recipient and returned in a Feed Back Loop<br>1 – Message was marked as spam by a recipient and returned in a Feed Back Loop'
          in: query
          schema:
            type: string
            enum: ['0','1']
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF-8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/tracked_headers'
        - name: user_id
          description: 'Restrict the report to the user with this specific User ID number.'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/smtp/delivery':
    get:
      operationId: getEmailSMTPDeliveryStatusReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to see how each SMTP message sent by `username` was sent to each recipient and what the delivery status is for each of these recipients. Note that delivery status changes over time as messages progress to the recipient’s servers and as bounce messages are sent back and processed. As the delivery status changes, the `last_update` date is also updated.
        
        See also [API Reporting Basics](/rest-api/reporting.html)  and [report header columns in the response](/rest-api/report-responses.html#delivery).
      
        Dates, for the purposes of narrowing results, refer to the *date the row was last updated*. This corresponds to the last_update output field. This can be changed to the date the message was sent using the "sent_date" parameter or the date of the last delivery status update using the "delivery_date" parameter. {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: clicked
          description: 'Integer. If specified, the results are restricted as follows:<br>clicked < 0 – select messages where URL click tracking was not enabled.<br>clicked = 0 – select messages where URL click tracking was enabled, but where there have as yet been no clicks on any clinks in the messages.<br>clicked > 0 – select messages where URL click tracking was enabled and where there have been N or more clicks on links in the same message to the same recipient. N, in this case, is the number that you have specified as the value of the “clicked” parameter. I.e., using a value of “1” matches all messages that have had a link clicked on.'
          in: query
          schema:
            type: integer
        - name: from
          in: query
          description: 'String. Case-insensitive substring search of the message “From” email Address'
          schema:
            type: string
        - name: ip
          description: 'String. Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          description: 'Integer. If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least N times. N, in this case, is the number that you have specified as the value of the “opened” parameter. I.e., using a value of “1” matches all messages that have been opened.'
          in: query
          schema:
            type: integer
        - name: secureline
          description: 'Enum. Value:<br>u – Message to this recipient did not use SecureLine (or Opt Out was used)<br>e – Message did use SecureLine<br>-2 – SecureLine was not used due to Opt Out being selected<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine:PGP was used<br>2 – SecureLine:S/MIME was used<br>3 – SecureLine:Escrow was used<br>4 – SecureLine:TLS was used'
          in: query
          schema:
            type: string
            enum: ["u","e","-2","-1","1","2","3","4"]
        - name: sendmail_id
          description: 'String. Return only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: sent_date
          description: 'If set to true (i.e., 1), the email message sent date will be used for date/time selections, instead of the date of the last update of the row.'
          in: query
          schema:
            type: integer
            enum: [0,1]      
        - name: state
          description: 'Optionally, match only messages with specific delivery states.  This is a comma-delimited list of one or more states to match.  The possible states include:<br><b>delivered</b> - Successful delivery.<br><b>perm_fail</b> - Message immediately rejected by recipient servers.<br><b>ba_hard_fail</b> - Post-delivery hard bounce.<br><b>ba_soft_fail</b> - Post-delivery soft bounce.<br><b>temp_fail</b> - Message still queued after 1+ temporary delivery failures.<br><b>queued</b> - Message queued -- includes the "temp_fail" state.<br><b>lost</b> - Message delivery status unknown.<br><b>any_hard_fail</b> -  "perm_fail" or "ba_hard_fail".<br><b>failed</b> - "perm_fail" or "ba_hard_fail" or "ba_soft_fail".<br><b>not_queued</b> - "delivered" or "lost" or any of the "failed" states.'
          in: query
          schema:
            type: string
        - name: state_detail
          description: 'Optionally, match only messages where the "state_detail" delivery status description contains the specified text (case insensitive).'
          in: query
          schema:
            type: string 
        - name: delivery_date
          description: 'If set to true (i.e., 1), the email message last delivery status updated date will be used for date/time selections, instead of the date of the last update of the row.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: spam
          description: 'Enum. Value:<br>0 – Message was not marked as spam by a recipient and returned in a Feed Back Loop.<br>1 – Message was marked as spam by a recipient and returned in a Feed Back Loop'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: unsubscribed
          description: 'Enum. Value: 0 – The recipient did not unsubscribe based on this email message. 1 – The recipient did unsubscribe based on this email message.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: smtp_code
          in: query
          description: 'String. 1-3 characters.  Substring match to the beginning of the smtp_code field.  E.g., 5 matches all codes starting with 5.'
          schema:
            type: string 
        - name: tls
          description: 'Enum. Value:<br>0 – TLS was NOT used in the successful delivery of this message to the recipient server<br>1 – TLS was used in the successful delivery of this message to the recipient server.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - $ref: '#/components/parameters/tracked_headers' 
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: to
          in: query
          schema:
            type: string
          description: "Case-insensitive substring search of all recipient email addresses."
        - name: user_id
          in: query
          description: 'Integer. Restrict the report to the user with this specific User ID number'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/smtp/delivery_count':
    get:
      operationId: getEmailSMTPDeliveryStatusSummaryReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to retrieve a summary of the delivery status (and other statistics) across all messages in a given time range.
        See also [API Reporting Basics](/rest-api/reporting.html)  and [report header columns in the response](/rest-api/report-responses.html#delivery_count).
        Dates, for the purposes of narrowing results, refer to the *date the message delivery status was last updated*. This can be changed to the date the message was sent using the "sent_date" parameter. {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
        - name: clicked
          description: 'Integer. If specified, the results are restricted as follows:<br>clicked < 0 – select messages where URL click tracking was not enabled.<br>clicked = 0 – select messages where URL click tracking was enabled, but where there have as yet been no clicks on any clinks in the messages.<br>clicked > 0 – select messages where URL click tracking was enabled and where there have been N or more clicks on links in the same message to the same recipient. N, in this case, is the number that you have specified as the value of the “clicked” parameter. I.e., using a value of “1” matches all messages that have had a link clicked on.'
          in: query
          schema:
            type: integer
        - name: from
          in: query
          description: 'String. Case-insensitive substring search of the message “From” email Address'
          schema:
            type: string
        - name: ip
          description: 'String. Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          description: 'Integer. If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least N times. N, in this case, is the number that you have specified as the value of the “opened” parameter. I.e., using a value of “1” matches all messages that have been opened.'
          in: query
          schema:
            type: integer
        - name: secureline
          description: 'Enum. Value:<br>u – Message to this recipient did not use SecureLine (or Opt Out was used)<br>e – Message did use SecureLine<br>-2 – SecureLine was not used due to Opt Out being selected<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine:PGP was used<br>2 – SecureLine:S/MIME was used<br>3 – SecureLine:Escrow was used<br>4 – SecureLine:TLS was used'
          in: query
          schema:
            type: string
            enum: ["u","e","-2","-1","1","2","3","4"]
        - name: sent_date
          description: 'If set to true (i.e., 1), the email message sent date will be used for date/time selections, instead of the date of the last update of the delivery status.'
          in: query
          schema:
            type: integer
            enum: [0,1]      
        - name: queue_age_sec
          description: 'If provided, then the "queued" and "pct_queued" results will reflect only those messages that have been not delivered for at least this number of seconds.  I.e., use this to eliminate very recently sent messages from your analysis or how mange messages were queued and not yet delivered.'
          in: query
          schema:
            type: integer
        - name: unsubscribed
          description: 'Enum. Value: 0 – The recipient did not unsubscribe based on this email message. 1 – The recipient did unsubscribe based on this email message.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: tls
          description: 'Enum. Value:<br>0 – TLS was NOT used in the successful delivery of this message to the recipient server<br>1 – TLS was used in the successful delivery of this message to the recipient server.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - $ref: '#/components/parameters/tracked_headers' 
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: to
          in: query
          schema:
            type: string
          description: "Case-insensitive substring search of all recipient email addresses."
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/smtp/temp_fail':
    get:
      operationId: getEmailSMTPTempFailReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to download all temporary failure responses that were experienced when trying to deliver a message or messages to recipients.  These provide insight into why it may have taken longer than expected to deliver a specific email message.

        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#temp_fail).
      
        {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: sendmail_id
          description: 'String. Return temp failures only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns temporary failures for any matching messages.'
          in: query
          schema:
            type: string
        - name: to
          in: query
          schema:
            type: string
          description: "Case-insensitive substring search of all recipient email addresses."
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse' 
  '/user/{username}/report/email/webmail/delivery':
    get:
      operationId: getEmailWebMailDeliveryStatusReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to see how each Webmail message sent by `username` was sent to each recipient and what the delivery status is for each of these recipients. Note that delivery status changes over time as messages progress to the recipient’s servers and as bounce messages are sent back and processed. As the delivery status changes, the “last_update” date is also updated.
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#delivery).
      
        Dates, for the purposes of narrowing results, refer to the *date the message delivery status was last updated*. This corresponds to the `last_update` output field.  This can be changed to the date the message was sent using the "sent_date" parameter. {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: clicked
          description: 'Integer. If specified, the results are restricted as follows:<br>clicked < 0 – select messages where URL click tracking was not enabled.<br>clicked = 0 – select messages where URL click tracking was enabled, but where there have as yet been no clicks on any clinks in the messages.<br>clicked > 0 – select messages where URL click tracking was enabled and where there have been N or more clicks on links in the same message to the same recipient. N, in this case, is the number that you have specified as the value of the “clicked” parameter. I.e., using a value of “1” matches all messages that have had a link clicked on.'
          in: query
          schema:
            type: integer
        - name: from
          in: query
          description: 'String. Case-insensitive substring search of the message “From” email Address'
          schema:
            type: string
        - name: ip
          description: 'String. Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          description: 'Integer. If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least N times. N, in this case, is the number that you have specified as the value of the “opened” parameter. I.e., using a value of “1” matches all messages that have been opened.'
          in: query
          schema:
            type: integer
        - name: secureline
          description: 'Enum. Value:<br>u – Message to this recipient did not use SecureLine (or Opt Out was used)<br>e – Message did use SecureLine<br>-2 – SecureLine was not used due to Opt Out being selected<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine:PGP was used<br>2 – SecureLine:S/MIME was used<br>3 – SecureLine:Escrow was used<br>4 – SecureLine:TLS was used'
          in: query
          schema:
            type: string
            enum: ["u","e","-2","-1","1","2","3","4"]
        - name: sendmail_id
          description: 'String. Return only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: sent_date
          description: 'If set to true (i.e., 1), the email message sent date will be used for date/time selections, instead of the date of the last update of the delivery status.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: spam
          description: 'Enum. Value:<br>0 – Message was not marked as spam by a recipient and returned in a Feed Back Loop.<br>1 – Message was marked as spam by a recipient and returned in a Feed Back Loop'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: tls
          description: 'Enum. Value:<br>0 – TLS was NOT used in the successful delivery of this message to the recipient server<br>1 – TLS was used in the successful delivery of this message to the recipient server'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - $ref: '#/components/parameters/tracked_headers' 
        - name: to
          in: query
          schema:
            type: string
          description: "Case-insensitive substring search of all recipient email addresses."
        - name: user_id
          in: query
          description: 'Integer. Restrict the report to the user with this specific User ID number'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/smtp/clicks':
    get:
      operationId: getEmailSMTPClickReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to query on the “URL click” events (or lack thereof) for email messages sent via SMTP by `username` that have email click tracking enabled. Using this command, it is possible to get a report of all individual clicks or to get reports about messages that have not yet been clicked on or for which click tracking was not enabled. See the query parameters for more detail.

        *Note that if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        
        See also [API Reporting Basics](/rest-api/reporting.html)  and [report header columns in the response](/rest-api/report-responses.html#click).
        
        Dates, for the purposes of narrowing results, refer to the date the message was sent. This corresponds to the `date_sent` output field. However, if you set the `click_date` input parameter to true, then the `click_date` field will be used for date selections.  {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - name: clicked
          description: 'If specified, the results are restricted as follows:<br>clicked < 0 – select messages where click tracking was not enabled.<br>clicked = 0 – select messages where click tracking was enabled, but where no URLs have yet been clicked by the recipient.<br>clicked > 0 – select messages where one or more URLs have been clicked by the recipient. When “clicked” is positive, you will get one row back for each click; so,<i>you can get multiple rows per message</i>.<br><br>If a value for “clicked” is not specified, a value of “1” will be assumed.'
          in: query
          schema:
            type: integer
        - name: click_date
          description: 'If true, the ”click_date” field will be used for all date selections. If false or not specified, the sent date (“date_sent”) will be used.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled, and which have been opened at least once. '
          schema:
            type: integer
        - name: sendmail_id
          description: 'String. Return only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: status
          description: 'Values:<br><b>delivered</b> – Accepted by the recipient’s email servers and presumed delivered. If bounce processing is enabled, then this status could change later to ba_soft_fail or ba_hard_fail.<br><b>perm_fail</b> – Messages that have permanently failed to be delivered to the recipient’s servers. If bounce processing is on, this status could change shortly to ba_soft_fail, depending on the nature of the failure message.<br><b>lost</b> – Messages where the tracking was lost and it is unclear if it was delivered or lost from the queue.<br><b>queued</b> – Message is in the email server queue still waiting to be delivered to the recipient.<br><b>not_queued</b> -- all statuses except "queued". <br><b>ba_soft_fail</b> – Soft failure bounces received (when talking to the recipient’s servers or after successful delivery to the recipient’s servers).<br><b>ba_hard_fail</b> – Hard failure bounces received after successful delivery to the recipient’s servers,<br><b>any_hard_fail</b> – Results for ba_hard_fail OR perm_fail. I.e., all hard/permanent failures.'
          in: query
          schema:
            type: string
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'       
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
        - name: url
          in: query
          description: 'Substring match on the URL clicked.'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/smtp/clicks_count':
    get:
      operationId: getEmailSMTPClickSummaryReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to query the number of clicks on tracked links during the specified date period.
        *Note that if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#clicks_count).
        Dates, for the purposes of narrowing results, refer to the date the link was clicked on.  {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'       
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
        - name: url
          in: query
          description: 'Substring match on the URL clicked.'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/webmail/clicks':
    get:
      operationId: getEmailWebMailClickReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to query on the “URL click” events (or lack thereof) for Webmail email messages sent by `username` that have email click tracking enabled. Using this command, it is possible to get a report of all individual clicks or to get reports about messages that have not yet been clicked on or for which click tracking was not enabled. See the query parameters for more detail.
      
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#click).
      
        Dates, for the purposes of narrowing results, refer to the date the message was sent. This corresponds to the `date_sent` output field. However, if you set the `click_date` input parameter to true, then the `click_date` field will be used for date selections.  {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - name: clicked
          description: 'If specified, the results are restricted as follows:<br>clicked < 0 – select messages where click tracking was not enabled.<br>clicked = 0 – select messages where click tracking was enabled, but where no URLs have yet been clicked by the recipient.<br>clicked > 0 – select messages where one or more URLs have been clicked by the recipient. When “clicked” is positive, you will get one row back for each click; so,<i>you can get multiple rows per message</i>.<br><br>If a value for “clicked” is not specified, a value of “1” will be assumed.'
          in: query
          schema:
            type: integer
        - name: click_date
          description: 'If true, the ”click_date” field will be used for all date selections. If false or not specified, the sent date (“date_sent”) will be used.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled, and which have been opened at least once. '
          schema:
            type: integer
        - name: sendmail_id
          description: 'String. Return only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: status
          description: 'Values:<br><b>delivered</b> – Accepted by the recipient’s email servers and presumed delivered. If bounce processing is enabled, then this status could change later to ba_soft_fail or ba_hard_fail.<br><b>perm_fail</b> – Messages that have permanently failed to be delivered to the recipient’s servers. If bounce processing is on, this status could change shortly to ba_soft_fail, depending on the nature of the failure message.<br><b>lost</b> – Messages where the tracking was lost and it is unclear if it was delivered or lost from the queue.<br><b>queued</b> – Message is in the email server queue still waiting to be delivered to the recipient.<br><b>not_queued</b> -- all statuses except "queued". <br><b>ba_soft_fail</b> – Soft failure bounces received (when talking to the recipient’s servers or after successful delivery to the recipient’s servers).<br><b>ba_hard_fail</b> – Hard failure bounces received after successful delivery to the recipient’s servers,<br><b>any_hard_fail</b> – Results for ba_hard_fail OR perm_fail. I.e., all hard/permanent failures.'
          in: query
          schema:
            type: string
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'       
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
        - name: url
          in: query
          description: 'Substring match on the URL clicked.'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/smtp/opens':
    get:
      operationId: getEmailSMTPOpenReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to query on the “opened” events (or lack thereof) for email messages sent via SMTP by `username` that have email open tracking enabled. Using this command, it is possible to get a report of all individual opens for messages or to get reports about messages that have not yet been opened or for which open tracking was not enabled. See the query parameters for more detail.
      
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#open).
        
        Dates, for the purposes of narrowing results, refer to the date the message was sent. This corresponds to the “date_sent” output field. However, if you set the “open_date” input parameter to true, then the “open_date” field will be used for date selections.  {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least once. When opened is positive, you will get one row back for each open; so, <i>you can get multiple rows per message</i>.<br><br>If you do not specify a value for “opened”, a value of “1” will be assumed.'
          schema:
            type: integer
            default: 1
        - name: open_date
          in: query
          description: 'If true, the ”open_date” field will be used for all date selections. If false or not specified, the sent date (“date_sent”) will be used.'
          schema:
            type: boolean
        - name: sendmail_id
          in: query
          description: 'Return only the messages with the specified sendmail_id.'
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: status
          description: 'Values:<br><b>delivered</b> – Accepted by the recipient’s email servers and presumed delivered. If bounce processing is enabled, then this status could change later to ba_soft_fail or ba_hard_fail.<br><b>perm_fail</b> – Messages that have permanently failed to be delivered to the recipient’s servers. If bounce processing is on, this status could change shortly to ba_soft_fail, depending on the nature of the failure message.<br><b>lost</b> – Messages where the tracking was lost and it is unclear if it was delivered or lost from the queue.<br><b>queued</b> – Message is in the email server queue still waiting to be delivered to the recipient.<br><b>not_queued</b> -- all statuses except "queued". <br><b>ba_soft_fail</b> – Soft failure bounces received (when talking to the recipient’s servers or after successful delivery to the recipient’s servers).<br><b>ba_hard_fail</b> – Hard failure bounces received after successful delivery to the recipient’s servers,<br><b>any_hard_fail</b> – Results for ba_hard_fail OR perm_fail. I.e., all hard/permanent failures.'
          in: query
          schema:
            type: string
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'             
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/smtp/opens_count':
    get:
      operationId: getEmailSMTPOpenSummaryReportUser
      tags:
        - UserReports
      description: |-
        This report allows returns the number of opens that happened in the selected time period.  See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#opens_count).
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        Dates, for the purposes of narrowing results, refer to the date the message was opened.  {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least once. When opened is positive, you will get one row back for each open; so, <i>you can get multiple rows per message</i>.<br><br>If you do not specify a value for “opened”, a value of “1” will be assumed.'
          schema:
            type: integer
            default: 1
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'             
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse' 
  '/user/{username}/report/email/webmail/opens':
    get:
      operationId: getEmailWebMailOpenReportUser
      tags:
        - UserReports
      description: |-
        This report allows you to query on the “opened” events (or lack thereof) for email messages sent via Webmail by `username` that have email open tracking enabled. Using this command, it is possible to get a report of all individual opens for messages or to get reports about messages that have not yet been opened or for which open tracking was not enabled. See the query parameters for more detail.
      
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#open).
        
        Dates, for the purposes of narrowing results, refer to the date the message was sent. This corresponds to the `date_sent` output field. However, if you set the `open_date` input parameter to true, then the `open_date` field will be used for date selections.  {{ACL: User: View Reports}}
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least once. When opened is positive, you will get one row back for each open; so, <i>you can get multiple rows per message</i>.<br><br>If you do not specify a value for “opened”, a value of “1” will be assumed.'
          schema:
            type: integer
            default: 1
        - name: open_date
          in: query
          description: 'If true, the ”open_date” field will be used for all date selections. If false or not specified, the sent date (“date_sent”) will be used.'
          schema:
            type: boolean
        - name: sendmail_id
          in: query
          description: 'Return only the messages with the specified sendmail_id.'
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: status
          description: 'Values:<br><b>delivered</b> – Accepted by the recipient’s email servers and presumed delivered. If bounce processing is enabled, then this status could change later to ba_soft_fail or ba_hard_fail.<br><b>perm_fail</b> – Messages that have permanently failed to be delivered to the recipient’s servers. If bounce processing is on, this status could change shortly to ba_soft_fail, depending on the nature of the failure message.<br><b>lost</b> – Messages where the tracking was lost and it is unclear if it was delivered or lost from the queue.<br><b>queued</b> – Message is in the email server queue still waiting to be delivered to the recipient.<br><b>not_queued</b> -- all statuses except "queued". <br><b>ba_soft_fail</b> – Soft failure bounces received (when talking to the recipient’s servers or after successful delivery to the recipient’s servers).<br><b>ba_hard_fail</b> – Hard failure bounces received after successful delivery to the recipient’s servers,<br><b>any_hard_fail</b> – Results for ba_hard_fail OR perm_fail. I.e., all hard/permanent failures.'
          in: query
          schema:
            type: string
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'             
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/login_fail/smtp':
    get:
      operationId: getEmailSMTPLoginFailureReportUser
      tags:
        - UserReports
      description: 'This report allows to see all SMTP login failures to the user login `username`, as well as sending errors that resulted from our servers explicitly rejecting your request to send an email message for one reason or another.  See also [API Reporting Basics](/rest-api/reporting.html)  and [report header columns in the response](/rest-api/report-responses.html#smtp_login_fail). {{ACL: User: View Reports}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: ip
          in: query
          description: 'String. Case-insensitive substring search of the message “IP Address” if the email program or device that made the connection.'
          schema:
            type: string
        - name: Reason
          in: query
          description: 'String Case-insensitive substring search of the login failure / reason data.'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/fbl':
    get:
      operationId: getEmailFeedBackLoopsReportUser
      tags:
        - UserReports
      description: 'This report allows to see what messages that `username` havs sent successfully that have been “marked as spam” by recipients and this information has come back to LuxSci via one of our feed-back loops.  See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#fbl). {{ACL: User: View Reports}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          in: query
          description: 'String Case-insensitive substring search of the message “From” email address'
          schema:
            type: string
        - name: subject
          in: query
          description: 'String Case-insensitive substring search of the message subject (in UTF-8).'
          schema:
            type: string          
        - name: to
          in: query
          description: 'String. Case-insensitive substring search of all recipient email addresses.'
          schema:
            type: string          
        - name: user_id
          in: query
          description: 'Integer Restrict the report to the user with this specific User ID number.'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/user/{username}/report/email/fbl_count':
    get:
      operationId: getEmailFeedBackLoopsSummaryReportUser
      tags:
        - UserReports
      description: 'This report allows to see how many messages have been marked as spam.  The date of the compliant is used for date filters. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#fbl_count). {{ACL: User: View Reports}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
        - name: from
          in: query
          description: 'String Case-insensitive substring search of the message “From” email address'
          schema:
            type: string
        - name: subject
          in: query
          description: 'String Case-insensitive substring search of the message subject (in UTF-8).'
          schema:
            type: string          
        - name: to
          in: query
          description: 'String. Case-insensitive substring search of all recipient email addresses.'
          schema:
            type: string          
        - name: user_id
          in: query
          description: 'Integer Restrict the report to the user with this specific User ID number.'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content. The summary header field is named compliants.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse' 
  '/user/{username}/jobs':
   get:
     operationId: getUserJobs
     tags:
       - UserReports
     description: 'Return a list of all asynchronous reporting jobs submitted by this user in the past 7 days.'
     parameters:
       - name: username
         in: path
         required: true
         schema:
           type: string
     responses:
       '200':
         description: 'This will return a list of associated arrays each containing standard job description details.'
         content:
           application/json:
             schema:
               type: object
               properties:
                 auth:
                   type: string
                 success:
                   type: integer
                 data:
                   type: array
                   items: 
                      type: object             
                      properties:
                        job_id:
                          type: integer
                          description: 'Job ID.'
                        created:
                          type: string 
                          description: 'Date and time the job request was made.  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                        updated:
                          type: string 
                          description: 'Date and time the job status was last updated.  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                        completed:
                          type: string 
                          description: 'Date and time the job completed (for status = complete).  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                        uid:
                          type: integer 
                          description: 'User ID of the user who submitted the job.'
                        filename:
                          type: string 
                          description: 'The name of the file that the report CSV data will be saved into.'
                        expected_rows:
                          type: integer 
                          description: 'Number of rows of data in the CSV file that the job should generate.  This is available once the status has changed to running.'
                        completed_rows:
                          type: integer 
                          description: 'Number of rows of data that have been generated so far.  This, combined with expected_rows and status, enable determination of job progress.'
                        status:
                          type: string 
                          description: 'Overall job status.  One of: submitted, preparing, running, uploading, complete and failed.'
                        status_detail:
                          type: string 
                          description: 'For status = failed, this field indicates why.'
                        max_jobs:
                          type: integer 
                          description: 'Maximum number of asynchronous jobs, spawned by this customer account, that can be concurrently running.'
                        current_jobs:
                          type: integer 
                          description: 'Current number of running asynchronous jobs spawned by this customer account.'
  '/user/{username}/job/{job_id}':
   get:
     operationId: getUserJob
     tags:
       - UserReports
     description: 'Return the details of a specific asynchronous reporting job. If the job_id is not found, a not found API error will be emitted.'
     parameters:
       - name: username
         in: path
         required: true
         schema:
           type: string
       - name: job_id
         in: path
         required: true
         schema:
           type: integer
     responses:
       '200':
         description: 'This will return an associated array containing standard job description details.'
         content:
           application/json:
             schema:
               type: object
               properties:
                 auth:
                   type: string
                 success:
                   type: integer
                 data:
                   type: object
                   properties:
                     job_id:
                       type: integer
                       description: 'Job ID.'
                     created:
                       type: string 
                       description: 'Date and time the job request was made.  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                     updated:
                       type: string 
                       description: 'Date and time the job status was last updated.  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                     completed:
                       type: string 
                       description: 'Date and time the job completed (for status = complete).  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                     uid:
                       type: integer 
                       description: 'User ID of the user who submitted the job.'
                     filename:
                       type: string 
                       description: 'The name of the file that the report CSV data will be saved into.'
                     expected_rows:
                       type: integer 
                       description: 'Number of rows of data in the CSV file that the job should generate.  This is available once the status has changed to running.'
                     completed_rows:
                       type: integer 
                       description: 'Number of rows of data that have been generated so far.  This, combined with expected_rows and status, enable determination of job progress.'
                     status:
                       type: string 
                       description: 'Overall job status.  One of: submitted, preparing, running, uploading, complete and failed.'
                     status_detail:
                       type: string 
                       description: 'For status = failed, this field indicates why.'
                     max_jobs:
                       type: integer 
                       description: 'Maximum number of asynchronous jobs, spawned by this customer account, that can be concurrently running.'
                     current_jobs:
                       type: integer 
                       description: 'Current number of running asynchronous jobs spawned by this customer account.'
  '/user/{username}/marketing/lists':
    get:
      operationId: getLists
      tags:
        - Marketing3
      description: 'Return all Contact Lists. The list creation date is used with date matching criteria. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_lists) {{ACL: Marketing - Reports}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: list_group_id
          description: 'Group id getting all lists in a specific group'
          in: query
          schema:
            type: integer
        - $ref: '#/components/parameters/use_created_or_modified_date'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing standard list details.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {
                  'auth': 'OMITTED',
                  'data': {   'first': 0,
                  'header': [   'list_id',
                              'owner_id',
                              'created',
                              'modified',
                              'name',
                              'from_email',
                              'from_name',
                              'reply_email',
                              'n_subscribers',
                              'list_group_id'],
                  'matches_returned': 1,
                  'matches_total': 1,
                  'rows': [   [   58,
                                '100792',
                                '2023-08-15 01:38:32',
                                '2023-08-15 16:33:08',
                                'Test List 1',
                                'rbalest@luxsci.com',
                                'SM3 Tester NEW',
                                'rbalest@luxsci.com',
                                6,
                                0]]},
                  'success': 1}
  '/user/{username}/marketing/list':
    post:
      operationId: addList
      tags:
        - Marketing3
      description: 'Add New Contact List. {{ACL: User Marketing - List Management}}'
      requestBody:
        $ref: '#/components/requestBodies/SM3_List'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Includes ID and fields matching those sent in the request or which you would normally get from contact list queries. Ses the getLists.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      list_id:
                        type: string
                        description: 'Unique numerical List ID.'
              example:
                    {
                      "success": 1,
                      "data":
                      {
                        "list_id":20,
                      }
                    }
  '/user/{username}/marketing/list/{list_id}':
    get:
      operationId: getList
      tags:
        - Marketing3
      description: 'Return details about the specified Contact List. {{ACL: Marketing - List Management}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: list_id
          description: 'List id for the specific contact list you want details for.'
          in: path
          schema:
            type: integer
          required: true
      responses:
        '200':
          description: 'This will return the specified list containing standard list details.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3_List'
              example:
                {
                'auth': 'OMITTED',
                'data': {
                  'created': '2023-08-15 01:38:32',
                  'field_display_order': None,
                  'fields': 'custom_customer_no,first_name,last_name',
                  'from_email': 'rbalest@luxsci.com',
                  'from_name': 'SM3 Tester NEW',
                  'gid': 0,
                  'list_group_id': 0,
                  'list_id': 58,
                  'modified': '2023-08-15 16:33:08',
                  'n_subscribers': 6,
                  'name': 'Test List 1',
                  'reply_email': 'rbalest@luxsci.com',
                  'uid': '100792'},
                'success': 1}
    put:
      operationId: updateList
      tags:
        - Marketing3
      description: 'Update information for existing Contact Lists such as From Name or From Address. This can also be used to assign custom fields to specific lists, but the custom field must exist in the platform in advance. Return contact information and other general metadata for the user. {{ACL: Marketing - List Management}}'
      requestBody:
        $ref: '#/components/requestBodies/SM3_List'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: list_id
          description: 'List id for the specific contact list you want details for.'
          in: path
          schema:
            type: integer
          required: true
      responses:
        '200':
          description: 'Includes ID and fields matching those sent in the request or which you would normally get from contact list queries. Ses the getLists.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1,
                    }
    delete:
      operationId: deleteList
      tags:
        - Marketing3
      description: 'Note: deleting a contact list will delete any contacts in that list. {{ACL: Marketing - List Management}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: list_id
          description: 'List id for the specific contact list you want details for.'
          in: path
          schema:
            type: integer
          required: true
        - name: contacts_only
          in: query
          description: 'If passed and true, this call will delete all contacts in the list, but the list itself will not be deleted.'
          schema:
            type: integer 
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/user/{username}/marketing/list_group/{list_group_id}':
    post:
      operationId: updateListGroup
      tags:
        - Marketing3
      description: 'Update the List Group name. {{ACL: Marketing - List Management}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: 'Required. New List Group name.'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: list_group_id
          description: "Unique Id for this list group."
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'None'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":
                        {
                        }
                    }
    delete:
      operationId: deleteListGroup
      tags:
        - Marketing3
      description: 'Delete a specific email list group.  {{ACL: Marketing - List Management}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: list_group_id
          in: path
          required: true
          description: "Unique Id for this list group."
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data": {}
                    }
    put:
      operationId: addListGroup
      tags:
        - Marketing3
      description: 'Create a new email list group. {{ACL: Marketing - List Management}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
              properties:
                name:
                  type: string
                  description: 'Required. New List Group name.'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: list_group_id
          description: "Unique Id for this list group."
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the data component of the response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      list_group_id:
                        type: string
                        description: 'Unique numerical ID the new group.'
  '/user/{username}/marketing/list_groups':
    get:
      operationId: getListGroups
      tags:
        - Marketing3
      description: 'This function returns a list of all lists groups accessible to you.  {{ACL: Marketing - List Management}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Results in the data component of the response. The data component is a list of associated arrays. Each associate array corresponds to a single list group.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        list_group_id:
                          type: integer
                          description: 'Unique numerical list group ID.'
                        name:
                          type: string 
                          description: 'Name for this Group.'
                        user_id:
                          type: integer 
                          description: 'User ID of the user that owns this list.'
                        created:
                          type: string
                          description: 'DATETIME of when this Group was created.'
                        modified:
                          type: string
                          description: 'DATETIME of when this Group was last modified.'
                        n_items:
                          type: integer
                          description: 'Number of Lists in the Group.'
  '/user/{username}/marketing/contacts':
    get:
      operationId: getContacts
      tags:
        - Marketing3
      description: 'Return all Contacts in the specified List.  If no list is specified, then all contacts across all lists will be returned.  The contact creation date is used with date matching criteria. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_contacts) {{ACL: Marketing - Reports}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/use_created_or_modified_date'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: list_id
          description: 'List id to get all contacts in a specific List. If this is omitted, then all contacts across all Lists will be returned.'
          in: query
          schema:
            type: integer
        - name: segment_id
          description: 'Segment id to get all contacts in a specific Segment.  Note that you can specify both a segment_id and a list_id to get contacts in a specific List that are also in a specific Segment.'
          in: query
          schema:
            type: integer 
        - name: details
          description: 'Whe nset to true (1), data for all custom fields will also be included in the response.'
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: 'This will return a CSV style list of headers and list of associative arrays each containing standard contact details including custom fields.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                    {
                      "success": 1,
                      "data":
                      {
                      "matches_total":2,
                      "first":0,
                      "matches_returned":2,
                      "header":["contact_id","list_id","owner_id","created","modified","email","domain","is_active","last_name","test_field_1","first_name","custom_customer_no"],
                      "rows":[
                        ["190033",58,"100792","2023-08-25 01:51:29","2023-08-25 01:51:29","rusello@balest.com","balest.com",1,"Balestri","Foobaz","Ruskel","Acme LLC"],
                        ["190032",58,"100792","2023-08-25 01:47:42","2023-08-25 01:47:42","ruskel@balest.com","balest.com",1,"Balestri","Foobaz","Ruskel","Acme LLC"]]
                      }
                    }
    post:
      operationId: addContacts
      tags:
        - Marketing3
      description: 'Add New Contacts in Bulk. {{ACL: User Marketing - Contact Management}}'
      requestBody:
        $ref: '#/components/requestBodies/SM3_Contacts'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Returns the number of contacts added plus an array of hashes, one per contact posted.  The order of contacts in the response array matches the order in the request array.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      n_contacts:
                        type: integer
                        description: 'Number of contacts successfully added.'
                      n_skipped:
                        type: integer
                        description: 'Number of contacts not added due to errors.'
                      contacts:
                        type: array
                        items:
                          type: object
                          properties:
                            email:
                              type: string
                              description: 'Contact E-mail address'
                            contact_id:
                              type: integer
                              description: 'Contact ID'
                            list_id:
                              type: integer
                              description: 'List ID this contact belongs to'
                            success:
                              type: integer
                              description: 'Indicates that contact was added successfully when value is 1'
                            error_message:
                              type: string
                              description: 'Error string applicable when contact was not added successfully. i.e. success=0'
              example:
                {
                 'auth' : 'OMITTED',
                 'data' : {
                  'contacts':
                   [{'contact_id': 0,
                     'email': 'rusellino_1@balest.com',
                     'list_id': 58,
                     'error_message': 'A Contact with email address  [rusellino_1@balest.com] already exists in this list.',
                     'success': 0},
                    {'contact_id': '190068',
                     'email': 'rusellino_2@balest.com',
                     'list_id': 58,
                     'success': 1},
                    {'contact_id': '190069',
                     'email': 'rusellino_3@balest.com',
                     'list_id': 58,
                     'success': 1}],
                 'n_contacts': 2},
                 'success': 1}
  '/user/{username}/marketing/contact':
    post:
      operationId: addContact
      tags:
        - Marketing3
      description: 'Add New Contact List. {{ACL: User Marketing - Contact Management}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SM3_Contact_POST_Body'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Includes ID and fields matching those sent in the request or which you would normally get from contact list queries. Ses the getLists.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      contact_id:
                        type: string
                        description: 'Unique numerical Contact ID.'
              example:
                    {
                      "success": 1,
                      "data":
                      {
                        "contact_id":"190059"
                      }
                    }
  '/user/{username}/marketing/contact/{contact_id}':
    get:
      operationId: getContact
      tags:
        - Marketing3
      description: 'Return the specified Contact. {{ACL: Marketing - Contact Management}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: contact_id
          description: 'Contact id for the specific contact list you want details for.'
          in: path
          schema:
            type: integer
          required: true
        - name: details
          description: 'If details=1 (default) return custom fields.'
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: 'This will return the specified Contact containing standard contact details.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3_Contact'
              example:
                    {
                      "success": 1,
                      "data":
                      {
                        'added_via': 'api',
                        'bounced': 0,
                        'contact_id': '190032',
                        'created': '2023-08-25 01:47:42',
                        'custom_customer_no': 'Acme LLC',
                        'domain': 'balest.com',
                        'email': 'ruskel@balest.com',
                        'first_name': 'Ruskel',
                        'format': 'html',
                        'gid': 0,
                        'is_active': 1,
                        'last_name': 'Balestri',
                        'list_id': 58,
                        'modified': '2023-08-25 01:47:42',
                        'never_sent': 1,
                        'spammed': 0,
                        'stats_updated': '0000-00-00 00:00:00',
                        'suppressed': 0,
                        'test_field_1': 'Foobaz',
                        'uid': '100792'
                      }
                    }
    put:
      operationId: updateContact
      tags:
        - Marketing3
      description: 'Update information for existing Contact such as E-mail address or custom fields attached to the parent List. {{ACL: Marketing - Contact Management}}'
      requestBody:
        $ref: '#/components/requestBodies/SM3_PUT_Contact'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: contact_id
          in: path
          description: Contact Id.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Includes ID and fields matching those sent in the request or which you would normally get from contact queries. See the getContacts.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1,
                    }
    delete:
      operationId: deleteContact
      tags:
        - Marketing3
      description: 'Delete a contact. {{ACL: Marketing - Contact Management}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: contact_id
          in: path
          required: true
          description: List Id.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/user/{username}/marketing/campaigns':
    get:
      operationId: getCampaigns
      tags:
        - Marketing3
      description: 'Return summary data of all visible Campaigns. The Campaign creation date is used with date matching criteria. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_campaigns) {{ACL: User: Marketing - Reporting}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: user_id
          description: 'Select campaigns owned by the given user ID.'
          in: query
          schema:
            type: integer
        - $ref: '#/components/parameters/campaign_status'
        - name: use_date
          description: 'This report uses the Campaign created date by default for all date-related filtering and sorting.  Set this parameter to "modified" to instead used the modified date.  Set it to "send_at" to use the date/time that the Campaign is scheduled to be sent.  Any other value passed in this parameter will cause the "created" date to be used.'
          in: query
          schema:
            type: string
            enum: ["created","modified","send_at"]
            default: "created"
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing campaign summary data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {   'auth': '681-1696404559-639e57d63dc9e1e59cec562c84f411c20484b76b555d9f205a6a4554a386af7e',
                    'data': {
                      'first': 0,
                      'header': [
                              'campaign_id',
                              'title',
                              'template_id',
                              'send_at',
                              'send_started_at',
                              'hourly_rate_limit',
                              'queue_priority',
                              'n_staged',
                              'n_sent',
                              'n_queued',
                              'n_delivered',
                              'n_soft_bounce',
                              'n_hard_bounce',
                              'n_lost',
                              'n_opened_unique',
                              'n_opened_total',
                              'n_clicked_unique',
                              'n_clicked_total',
                              'n_opened_clicked_unique',
                              'n_suppressed',
                              'n_spam',
                              'status',
                              'status_detail',
                              'created',
                              'modified'],
                'matches_returned': 1,
                'matches_total': 1,
                'rows': [   [   89,
                                'Travel time',
                                271,
                                '2023-10-03 23:00:00',
                                '2023-10-03 23:00:06',
                                12,
                                4,
                                13,
                                0,
                                13,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                0,
                                'failed',
                                'Missing or empty body.',
                                '2023-10-02 17:36:26',
                                '2023-10-02 23:50:56']]},
                     'success': 1}
    post:
      operationId: addCampaign
      tags:
        - Marketing3
      description: 'Add New Campaign. {{ACL: User Marketing - Campaign Management}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SM3_Campaign_POST_Body'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Includes new campaign ID.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      campaign_id:
                        type: string
                        description: 'Unique numerical Campaign ID.'
              example:
                    {
                      "success": 1,
                      "data":
                      {
                        "campaign_id":"3059"
                      }
                    }
  '/user/{username}/marketing/campaign/{campaign_id}':
    get:
      operationId: getCampaign
      tags:
        - Marketing3
      description: 'Return details about the specified Campaign. {{ACL: User: Marketing - Campaign Management}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_id
          description: 'Campaign id for the specific campaign you want details for.'
          in: path
          schema:
            type: integer
          required: true
      responses:
        '200':
          description: 'This will return the specified Campign containing standard campaign details.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3_Campaign'
              example:
                { 'auth': '682-1696446799-4fb72d8849ff6a9bb11d67e737bd6062f9bb54549c9ae7428afa92e4f665d89c',
                  'data': {   'api_id': 27,
                  'created': '2023-10-02 17:36:26',
                  'deduplicate': 1,
                  'gid': 0,
                  'hourly_rate_limit': 12,
                  'last_send_block_size': 0,
                  'last_send_date': '0000-00-00 00:00:00',
                  'list_ids': '58,86',
                  'modified': '2023-10-02 23:50:56',
                  'n_clicked_total': 0,
                  'n_clicked_unique': 0,
                  'n_opened_clicked_unique': 0,
                  'n_delivered': 0,
                  'n_hard_bounce': 0,
                  'n_lost': 0,
                  'n_opened_total': 0,
                  'n_opened_unique': 0,
                  'n_queued': 13,
                  'n_sent': 0,
                  'n_soft_bounce': 0,
                  'n_spam': 0,
                  'n_staged': 13,
                  'n_suppressed': 0,
                  'queue_priority': 4,
                  'retries': 0,
                  'retry_after_date': '0000-00-00 00:00:00',
                  'campaign_id': 89,
                  'seconds_to_last_fail': 0,
                  'seconds_to_last_success': 0,
                  'seconds_to_send': 0,
                  'seconds_to_stage': 0,
                  'segment_ids': None,
                  'send_at': '2023-10-03 23:00:00',
                  'send_started_at': '2023-10-03 23:00:06',
                  'stats_last_updated': '2023-10-03 23:00:38',
                  'status': 'failed',
                  'status_detail': 'Missing or empty body.',
                  'status_prepause': 'failed',
                  'template_id': 271,
                  'title': 'Travel time',
                  'trigger_id': 0,
                  'type': 'list',
                  'uid': '100792',
                  'underlying_data_updated': '2023-10-02 23:50:56'},
                 'success': 1}
    put:
      operationId: updateCampaign
      tags:
        - Marketing3
      description: 'Update information for existing Campaign. {{ACL: Marketing - Campaign Management}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SM3_Campaign_PUT_Body'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_id
          in: path
          description: Campaign Id.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1,
                    }
    delete:
      operationId: deleteCampaign
      tags:
        - Marketing3
      description: 'Delete a campaign.  Note that deleing a campaign will also delete logs and statistics and other data related to that campaign. {{ACL: Marketing - Campaign Management}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_id
          in: path
          required: true
          description: Campaign Id.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/user/{username}/marketing/report/logs':
    get:
      operationId: getReportLogs
      tags:
        - Marketing3
      description: 'Return sending log data of all selected Campaigns.  This includes all metadata for each recipient, including the delivery status, open status, click staus, etc.  The delivery status last updated date is used with date matching criteria. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_campaign_report_logs) {{ACL: User: Marketing - Reporting}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_ids
          description: 'Select campaigns as string of comma-separated campaign ids. If omitted, all campaigns are selected.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/detail'
        - $ref: '#/components/parameters/email'
        - $ref: '#/components/parameters/domain'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing sending event data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {   'auth': '681-1696404559-639e57d63dc9e1e59cec562c84f411c20484b76b555d9f205a6a4554a386af7e',
                    'data': {
                      'first': 0,
                      'header': [
                              'log_id',
                              'tracking_code',
                              'sendmail_id',
                              'campaign_id',
                              'campaign_title',
                              'delivery_status_updated',
                              'contact_id',
                              'list_id',
                              'email',
                              'disposition',
                              'smtp_code',
                              'state_detail',
                              'opens',
                              'clicks',
                              'unsubscribed',
                              'complained',
                              'tls_used',
                              'sl_type',
                              'custom_customer_no',
                              'first_name',
                              'last_name',
                              'phone',
                              'test_field_1'
                             ],
                      'matches_returned': 1,
                      'matches_total': 1,
                      'rows': [
                               [
                                '352317',
                                'bP2Kfac4C00SwQgn9oBcP1',
                                '3CG30D001H28833',
                                153,
                                'TEST CAMPAIGN FOR REPORTS',
                                '2023-12-16 03:26:24',
                                '190032',
                                58,
                                'ruskel@balest.com',
                                'soft_bounce',
                                583,
                                'Queued too long or too many retries; deleted. ',
                                0,
                                0,
                                0,
                                0,
                                0,
                                4,
                                'X LLC',
                                'Ruskel',
                                'Balestri',
                                '685-223-9091',
                                'Test field data'
                              ]]},
                    'success': 1}
  '/user/{username}/marketing/report/opened':
    get:
      operationId: getReportOpened
      tags:
        - Marketing3
      description: 'Return open event data of all selected Campaigns. The open date is used with date matching criteria, unless the "use_date" parameter is set to "sent". See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_campaign_report_opened) {{ACL: User: Marketing - Reporting}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_ids
          description: 'Select campaigns as string of comma-separated campaign ids. If omitted, all campaigns are selected.'
          in: query
          schema:
            type: string
        - name: use_date
          description: 'If set to "sent", use the date the message was sent, instead of the date of the open event, for date selections.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/detail'
        - $ref: '#/components/parameters/email'
        - $ref: '#/components/parameters/domain'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing campaign opened data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {   'auth': '681-1696404559-639e57d63dc9e1e59cec562c84f411c20484b76b555d9f205a6a4554a386af7e',
                    'data': {
                      'first': 0,
                      'header': [
                        'log_id',
                        'tracking_code',
                        'campaign_id',
                        'campaign_title',
                        'open_date',
                        'contact_id',
                        'list_id',
                        'email',
                        'ip_address',
                        'user_agent'],
                      'matches_returned': 1,
                      'matches_total': 1,
                      'rows': [ [
                        10089,
                        'xp9099a7',
                        1279,
                        'My Campaign Name',
                        '2022-09-27 23:50:56',
                        1703,
                        10089,
                        327,
                        'joe@gmail.com',
                        '172.27.34.28',
                        'Firefox']]},
                     'success': 1}
  '/user/{username}/marketing/report/urls':
    get:
      operationId: getReportUrls
      tags:
        - Marketing3
      description: 'Return clicked-on urls of all selected Campaigns. The click date is used with date matching criteria unless the "use_date" parameter is set to "sent".  See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_campaign_report_urls) {{ACL: User: Marketing - Reporting}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_ids
          description: 'Select campaigns as string of comma-separated campaign ids.  If omitted, all campaigns are selected.'
          in: query
          schema:
            type: string
        - name: use_date
          description: 'If set to "sent", use the date the message was sent, instead of the date of the open event, for date selections.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/detail'
        - $ref: '#/components/parameters/email'
        - $ref: '#/components/parameters/domain'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing campaign url data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {   'auth': '681-1696404559-639e57d63dc9e1e59cec562c84f411c20484b76b555d9f205a6a4554a386af7e',
                    'data': { 'first': 0,
                              'header': ['campaign_id', 'campaign_title', 'url', 'clicks'],
                              'matches_returned': 1,
                              'matches_total': 1,
                              'rows': [[153, 'TEST CAMPAIGN FOR REPORTS', 'foobar.com', 1]]},
                   'success': 1}
  '/user/{username}/marketing/report/clicked':
    get:
      operationId: getReportClicked
      tags:
        - Marketing3
      description: 'Return click data of all selected Campaigns. The click date is used with date matching criteria unless the "use_date" parameter is set to "sent". See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_campaign_report_clicked) {{ACL: User: Marketing - Reporting}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_ids
          description: 'Select campaigns as string of comma-separated campaign ids.  If omitted, all campaigns are selected.'
          in: query
          schema:
            type: string
        - name: use_date
          description: 'If set to "sent", use the date the message was sent, instead of the date of the open event, for date selections.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/detail'
        - $ref: '#/components/parameters/email'
        - $ref: '#/components/parameters/domain'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing campaign click data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {   'auth': '681-1696404559-639e57d63dc9e1e59cec562c84f411c20484b76b555d9f205a6a4554a386af7e',
                    'data': {
                      'first': 0,
                      'header': [
                        'log_id',
                        'tracking_code',
                        'campaign_id',
                        'campaign_title',
                        'click_date',
                        'contact_id',
                        'list_id',
                        'email',
                        'ip_address',
                        'user_agent'],
                      'matches_returned': 1,
                      'matches_total': 1,
                      'rows': [ [
                        10089,
                        'xp9099a7',
                        1279,
                        'My Campaign Name',
                        '2022-09-27 23:50:56',
                        1703,
                        10089,
                        327,
                        'joe@gmail.com',
                        '172.27.34.28',
                        'Firefox']]},
                     'success': 1}
  '/user/{username}/marketing/report/unsubscribed':
    get:
      operationId: getReportUnsubscribed
      tags:
        - Marketing3
      description: 'Return unsubscribe data of all selected Campaigns. The unsubscribe date is used with date matching criteria, unless the "use_date" parameter is set to "sent". See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_campaign_report_unsubscribed) {{ACL: User: Marketing - Reporting}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_ids
          description: 'Select campaigns as string of comma-separated campaign ids.  If omitted, all campaigns are selected.'
          in: query
          schema:
            type: string
        - name: use_date
          description: 'If set to "sent", use the date the message was sent, instead of the date of the open event, for date selections.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/detail'
        - $ref: '#/components/parameters/email'
        - $ref: '#/components/parameters/domain'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing campaign unsubscribe data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {   'auth': '681-1696404559-639e57d63dc9e1e59cec562c84f411c20484b76b555d9f205a6a4554a386af7e',
                    'data': {
                      'first': 0,
                      'header': [
                        'log_id',
                        'tracking_code',
                        'campaign_id',
                        'campaign_title',
                        'u_date',
                        'contact_id',
                        'list_id',
                        'email',
                        'note'],
                      'matches_returned': 1,
                      'matches_total': 1,
                      'rows': [ [
                        10089,
                        'xp9099a7',
                        1279,
                        'My Campaign Name',
                        '2022-09-27 23:56:30',
                        1703,
                        10089,
                        327,
                        'joe@gmail.com',
                        'Suppression has been deleted']]},
                     'success': 1}
  '/user/{username}/marketing/report/complaints':
    get:
      operationId: getReportComplaints
      tags:
        - Marketing3
      description: 'Return spam complaint data from all selected Campaigns. The message delivery status updated date is used by default for date selections, unless "use_date" is set to "sent". See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_campaign_report_complaints) {{ACL: User: Marketing - Reporting}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_ids
          description: 'Select campaigns as string of comma-separated campaign ids.  If omitted, all campaigns are selected.'
          in: query
          schema:
            type: string
        - name: use_date
          description: 'If set to "sent", use the date the message was sent, instead of the date of the open event, for date selections.'
          in: query
          schema:
            type: string 
        - $ref: '#/components/parameters/detail'
        - $ref: '#/components/parameters/email'
        - $ref: '#/components/parameters/domain'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing campaign complaint data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {   'auth': '681-1696404559-639e57d63dc9e1e59cec562c84f411c20484b76b555d9f205a6a4554a386af7e',
                    'data': {
                      'first': 0,
                      'header': [
                        'log_id',
                        'tracking_code',
                        'campaign_id',
                        'campaign_title',
                        'contact_id',
                        'list_id',
                        'email'],
                      'matches_returned': 1,
                      'matches_total': 1,
                      'rows': [ [
                        10089,
                        'xp9099a7',
                        1279,
                        'My Campaign Name',
                        1703,
                        10089,
                        327,
                        'joe@gmail.com']]},
                     'success': 1}
  '/user/{username}/marketing/report/bounced':
    get:
      operationId: getReportBounced
      tags:
        - Marketing3
      description: 'Return bounce data/email delivery failure data of all selected Campaigns. Uses delivery_status_updated as the date matching criteria. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response.](/rest-api/report-responses.html#sm3_campaign_report_bounces) {{ACL: User: Marketing - Reporting}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: campaign_ids
          description: 'Select campaigns as string of comma-separated campaign ids.  If omitted, all campaigns are selected.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/detail'
        - $ref: '#/components/parameters/email'
        - $ref: '#/components/parameters/domain'
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing campaign bounce data.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SM3CSVResponse'
              example:
                {   'auth': '681-1696404559-639e57d63dc9e1e59cec562c84f411c20484b76b555d9f205a6a4554a386af7e',
                    'data': {
                      'first': 0,
                      'header': [
                        'log_id',
                        'tracking_code',
                        'orig_sendmail_id',
                        'campaign_id',
                        'campaign_title',
                        'delivery_status_updated',
                        'contact_id',
                        'list_id',
                        'email',
                        'disposition',
                        'smtp_code',
                        'state_detail'],
                      'matches_returned': 1,
                      'matches_total': 1,
                      'rows': [ [
                        10089,
                        'xp9099a7',
                        'Qf9892349822',
                        1279,
                        'My Campaign Name',
                        '2023-11-17 23:50:56',
                        1703,
                        10089,
                        327,
                        'joe@gmail.com',
                        'hard_bounce',
                        '583',
                        'Final delivery status unknown']]},
                     'success': 1}
  '/user/{username}/fields':
    get:
      operationId: 'getCustomFields'
      tags:
        - EmailSending
      description: 'Retrieve a list of all Custom Fields visible to user {username}.  These Custom Fields are useful for Secure Marketing and for Advanced Secure High Volume. {{ACL: User Email: Custom Fields}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: Cookie
          in: header
          schema:
            type: string
          example: >-
            signature=66843253-1617892797-e5a3f01353817e6fb1fc9bdd0cb2466fa0c4cab44206b52a929ec850510a3b9c:cb814df2717ce7240594092eba854fbb67e9a2504c38b6f525687b4d0c079857
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        field_id:
                          type: integer
                          description: 'Unique ID of this field.'
                        name:
                          type: string
                          description: 'Frieldly, readable name for this field.'
                        code_word:
                          type: string
                          description: 'Code Word for the field.'
                        is_default:
                          type: integer
                          description: 'Indicates if this field is a system-default [1] field or not [0].'
                        type:
                          type: string
                          description: 'The type of data to be stored in this field.'
                        options:
                          type: string
                          description: 'For option-selection data types (checkbox, select, and radio), this is a newline-delimited list of the possible values.'
                        example:
                          type: string
                          description: 'Plain text example value for this field.'
                        used_in_lists_n:
                          type: integer
                          description: 'Number of Lists with which this field is currently associated.'
                        created:
                          type: string
                          description: 'Date/time of field creation in GMT in format [YYYY-MM-DD HH:MM:SS]'
                        modified:
                          type: string
                          description: 'Date/time of field last modified in GMT in format [YYYY-MM-DD HH:MM:SS]'
                        user_id:
                          type: integer
                          description: 'The unique ID of the user who owns/created this field.'
    put:
      operationId: 'createCustomField'
      tags:
        - EmailSending
      description: 'Create a Custom Field.  These Custom Fields are useful for Secure Marketing and for Advanced Secure High Volume.  Note that for users in Teams, only Team Administrators are permitted to make new Custom Fields. {{ACL: User Email: Custom Fields}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: Cookie
          in: header
          schema:
            type: string
          example: >-
            signature=66843253-1617892797-e5a3f01353817e6fb1fc9bdd0cb2466fa0c4cab44206b52a929ec850510a3b9c:cb814df2717ce7240594092eba854fbb67e9a2504c38b6f525687b4d0c079857 
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - code_word
                - type
              properties:
                name:
                  type: string
                  description: 'Frieldly, readable name for this field.'
                code_word:
                  type: string
                  description: 'Code Word for the field.  This must be unique across all fields owned by all Teams in your account.  Code Word can only contain letters, numbers, - and _ characters and can not be the words "email", "is_active" or "format".'
                field_order:
                  type: integer
                  description: 'Default sort order for this custom field.  Default value is 1.'
                is_required:
                  type: integer
                  description: 'Indicates if this field is required to be filled in on contact updates/creations in lists that include this field.  Default is 0 (false).  Specify 1 for true.'
                type:
                  type: string
                  description: 'The type of data to be stored in this field.  This impacts data validation. Choose "text" or "textarea" for arbitrary data. The possible types include: (text, number, email, textarea, checkbox, select, radio, date, json).'
                options:
                  type: string
                  description: 'For option-selection data types (checkbox, select, and radio), this is a newline-delimited list of the possible values.  Commas are not permitted in options.'
                example:
                  type: string
                  description: 'Plain text example value for this field.  An example is required for all data types other than (checkbox, select, radio, json).  Examples for data data types must be in the format "YYYY-MM-DD".'
                lists:
                  type: string
                  description: 'Comma-delimited list of "list_ids" for the Lists to which this new field should be immediately associated. If lists are specified, all list_ids must be valid.'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer 
  '/user/{username}/content_library/':
    get:
      operationId: 'getContentLibraryTopDirectory'
      tags:
        - ContentLibrary
      description: 'Retrieve details about the Top Content Library directory. {{ACL: User Email: Content Library}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response contains two main parts.  "meta" reflects details about the directory requested and "items" is a list of details about the files and directories in this directory.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      meta:
                        $ref: '#/components/schemas/ContentLibraryMeta'
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/ContentLibraryMeta'
  '/user/{username}/content_library/{directory}':
    get:
      operationId: 'getContentLibraryDirectory'
      tags:
        - ContentLibrary
      description: 'Retrieve details about the specific Content Library directory. {{ACL: User Email: Content Library}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: directory
          in: path
          required: true
          description: 'Starting with the / following /content_library, this is the directory in {username} to examine.  The path must end in a training slash. Be sure to not use double slashes.  Note, for example, that for directory "/files/media/" you would insert "files/media/" in this variable. If this value is omitted, the contents of the top-level directory will be returned.'
          schema:
            type: string
          example: 'files/media/'
      responses:
        '200':
          description: 'The response contains two main parts.  "meta" reflects details about the directory requested and "items" is a list of details about the files and directories in this directory.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      meta:
                        $ref: '#/components/schemas/ContentLibraryMeta'
                      items:
                        type: array
                        items:
                          $ref: '#/components/schemas/ContentLibraryMeta'
    put:
      operationId: 'createContentLibraryDirectory'
      tags:
        - ContentLibrary
      description: 'Create a new Content Library directory.  {{ACL: User Email: Content Library}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: directory
          in: path
          required: true
          description: 'Starting with the / following /content_library, this is the directory in {username} to create. This directory must not exist and, if it is a subdirectory, the parent directories must all exist.'
          schema:
            type: string
          example: 'files/media/'
      responses:
        '200':
          description: 'Success response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1,
                    }
    delete:
      operationId: 'deleteContentLibraryDirectory'
      tags:
        - ContentLibrary
      description: 'Delete an empty Content Library directory.  {{ACL: User Email: Content Library}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: directory
          in: path
          required: true
          description: 'Starting with the / following /content_library, this is the directory in {username} to create. This directory must not exist and, if it is a subdirectory, the parent directories must all exist.'
          schema:
            type: string
          example: 'files/media/'
      responses:
        '200':
          description: 'Success response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1,
                    }  
  '/user/{username}/content_library/{file_path}':
    get:
      operationId: 'getContentLibraryFile'
      tags:
        - ContentLibrary
      description: 'Retrieve details about the specific Content Library file.  {{ACL: User Email: Content Library}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: file_path
          in: path
          required: true
          description: 'Required. Starting with the / following /content_library, this is the path of the file in {username}.  The path must not end in a training slash. Be sure to not use double slashes.  Example: "/files/media/image.jpg".'
          schema:
            type: string
          example: 'files/media/image.jpg'
      responses:
        '200':
          description: 'Success response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ContentLibraryMeta'
    put:
      operationId: 'uploadContentLibraryFile'
      tags:
        - ContentLibrary
      description: 'Upload a new file to the Content Library.  {{ACL: User Email: Content Library}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: file_path
          in: path
          required: true
          description: 'Required. Starting with the / following /content_library, this is the path in {username} to place the file.  The path must not end in a training slash. Be sure to not use double slashes. Example: "files/media/image.jpg".'
          schema:
            type: string
          example: 'files/media/image.jpg'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  description: 'Optionally, specify a public URL (web site address) from which the content of this file should be downloaded.'
                data:
                  type: string
                  description: 'Optionally, specify the base64-encoded content of the file.  Note, you must specify either url or data.  If you specify both, the url will be used.'
      responses:
        '200':
          description: 'Success response.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ContentLibraryMeta'
    delete:
      operationId: 'deleteContentLibraryFile'
      tags:
        - ContentLibrary
      description: 'Delete a file.  {{ACL: User Email: Content Library}}'
      parameters:
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: file_path
          in: path
          required: true
          description: 'Required. Starting with the / following /content_library, this is the path of the file in {username} to delete.  The path must not end in a training slash. Be sure to not use double slashes.  Example: "/files/media/image.jpg".'
          schema:
            type: string
          example: 'files/media/image.jpg'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1,
                    } 
  '/account/{accountId}/marketing/addList':
    post:
      operationId: addMarketingList
      tags:
        - Marketing
      description: 'Add New Contact List. {{ACL: Marketing - List Management}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - list_name
                - owner_name
                - owner_email
                - reply_email
                - bounce_email
              properties:
                list_name:
                  type: string
                  description: "Name of the contact list you're adding."
                owner_name:
                  type: string
                  description: 'From name for email sent with this contact list'
                owner_email:
                  type: string
                  description: 'From email for email messages sent with this contact list'
                reply_email:
                  type: string
                  description: 'The email where you should get replies'
                bounce_email:
                  type: string
                  description: ' This must be set to: **bounces@bounces.secured-message.com**, unless you have a dedicated bounce processing address configured in your Secure Marketing instance, in which case you would use that specific email address.'
                group_name:
                  type: string
                  description: 'Add this list to a group'
                additional_field:
                  type: string
                  description: 'Assign additional fields to this list. The field name “response” is reserved, so don’t use that!
                  
                  Add the custom fields assigned to a contact list. The format is a comma-delimited list of field names. I.e., “income_level,gender”.  These field names must already be defined in the user interface.
                  
                  The format for custom fields is always in all lower case and you should replace spaces with underscore characters.'
            example: {"reply_email":"support+reply@luxsci.com","list_name":"TEST_LIST_1591809030","owner_email":"support@secured-message.com","owner_name":"LUXAPITEST"}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Includes ID and fields matching those sent in the request or which you would normally get from contact list queries. Ses the getLists.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    additionalProperties: true
                    # properties:
                    #   id:
                    #     type: integer
                    #     description: 'New list ID.'
                    # required:
                    #   - id
              example:
                    {
                      "success": 1,
                      "data":
                      {
                        "custom_fields":[],
                        "bounce_email_id":1,
                        "import_cancel":0,
                        "copying":0,
                        "reply_email":"support+reply@luxsci.com",
                        "name":"TEST_LIST_1591809030",
                        "owner_email":"support@secured-message.com",
                        "created_at":"2020-06-10 17:10:30",
                        "group_id":15,
                        "updated_at":"2020-06-10 17:10:30",
                        "id":20,
                        "user_id":3,
                        "owner_name":"LUXAPITEST"
                      }
                    }
  '/account/{accountId}/marketing/getLists':
    get:
      operationId: getMarketingLists
      tags:
        - Marketing
      description: 'Return details about one or more specific Contact List(s). If you omit all parameters, all lists should be returned. {{ACL: Marketing - List Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: list_id
          description: 'List id for the specific contact list you want details for.'
          in: query
          schema:
            type: integer
        - name: group_id
          description: 'Group id for all getting lists in a specific group'
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: 'This will return a list of associated arrays each containing standard list details.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: 'List ID.'
                      name:
                        type: string 
                        description: 'List Name'
                      owner_name:
                        type: string 
                        description: 'From address for messages sent using this list'
                      owner_email:
                        type: string 
                        description: 'From email for messages sent using this list'
                      reply_email:
                        type: string 
                        description: 'Reply-To email for messages sent using this list'
                      user_id:
                        type: integer 
                        description: 'ID of the user who owns this list'
                      group_id:
                        type: integer 
                        description: 'ID of the group in which this list resides'
                      total_subscribers:
                        type: integer 
                        description: 'Number of subscribers in the list'
                      bounce_id:
                        type: integer 
                      bounce_email:
                        type: string 
                        description: 'Email address to which bounces should ne sent.'
                      custom_fields:
                        type: string
                        description: 'Hash of additional custom field information.
                        
                        The field name “response” is reserved, so don’t use that!
                        
                        This can be undefined/null if there are none.'
                      created_at:
                        type: string
                        description: 'DATETIME When the list was created, in GMT. Format "YYYY-MM-DD HH:MM:SS".'
                      updated_at:
                        type: string
                        description: 'DATETIME When the list was updated, in GMT. Format "YYYY-MM-DD HH:MM:SS".'
              example:
                    {
                      "success": 1,
                      "data":
                      {
                        "custom_fields":[],
                        "bounce_email_id":1,
                        "import_cancel":0,
                        "copying":0,
                        "reply_email":"support+reply@luxsci.com",
                        "name":"TEST_LIST_1591809030",
                        "owner_email":"support@secured-message.com",
                        "created_at":"2020-06-10 17:10:30",
                        "group_id":15,
                        "updated_at":"2020-06-10 17:10:30",
                        "id":20,
                        "user_id":3,
                        "owner_name":"LUXAPITEST"
                      }
                    }
  '/account/{accountId}/marketing/updateList/{id}':
    put:
      operationId: updateMarketingList
      tags:
        - Marketing
      description: 'Update information for existing Contact Lists such as From Name or From Address. This can also be used to assign custom fields to specific lists, but the custom field must exist in the platform in advance. Return contact information and other general metadata for the user. {{ACL: Marketing - List Management}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                list_name:
                  type: string
                  description: 'Update contact list name'
                group_name:
                  type: string
                  description: 'Update contact list group'
                owner_name:
                  type: string
                  description: 'Update contact list group'
                owner_email:
                  type: string
                  description: 'Update owner name'
                reply_email:
                  type: string
                  description: 'Update owner email address'
                additional_field:
                  type: string
                  description: 'Re-assign the value of a custom fields. If omitted then no change will apply to the pre-assigned custom fields.
                  
                  Update the custom fields assigned to a contact list. ***Note: this will override existing custom fields assigned to the list-- be sure to include ALL custom fields desired in this field, separated by commas.
                  
                  If omitted then no change will apply to the pre-existing assigned custom fields. The format is a comma-delimited list of field names. I.e.,
                  
                  “income_level,gender”
                  
                  The format for custom fields is always in all lower case and you should replace spaces with underscore characters.  These field names must already be defined in the user interface.'
            example: {"reply_email":"support+reply-new@luxsci.com"}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: List Id.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'Includes ID and fields matching those sent in the request or which you would normally get from contact list queries. Ses the getLists.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    additionalProperties: true
                    # properties:
                    #   id:
                    #     type: integer
                    #     description: 'New list ID.'
                    # required:
                    #   - id
              example:
                    {
                      "success": 1,
                      "data":
                      {
                        "bounce_email_id":1,
                        "import_cancel":0,
                        "import_status":0,
                        "owner_email":"support@secured-message.com",
                        "created_at":"2020-06-10 18:00:30",
                        "total_subscribers":null,
                        "is_deleted":0,
                        "id":24,
                        "owner_name":"LUXAPITEST",
                        "validate":0,
                        "download_status":0,
                        "custom_fields":[],
                        "name":"TEST_LIST_1591812029",
                        "reply_email":"support+reply-new@luxsci.com",
                        "copying":0,
                        "export_status":0,
                        "group_id":15,
                        "updated_at":"2020-06-10 18:00:31",
                        "user_id":3

                      }
                    }
  '/account/{accountId}/marketing/deleteList/{id}':
    delete:
      operationId: deleteMarketingList
      tags:
        - Marketing
      description: 'Note: deleting a contact list will delete any contacts in that list. {{ACL: Marketing - List Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: List Id.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/account/{accountId}/deleteListGroup/{id}':
    delete: 
      operationId: deleteMarketingListGroup
      tags:
        - Marketing
      description: 'Note: deleting a contact list group will NOT delete any contact lists in that group; they will merely become unassociated with any group. {{ACL: Marketing - List Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          description: List group Id.
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/account/{accountId}/marketing/addContact':
    post:
      operationId: addMarketingContact
      tags:
        - Marketing
      description: 'Add New Contact. {{ACL: Marketing - Contact Management}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - email
                - list_id
              properties:
                email:
                  type: string
                  description: 'Email address of the contact'
                list_id:
                  type: integer
                  description: 'ID of the contact list where this contact will be added'
                format:
                  type: string
                  description: 'Which format this contact should receive the email
                  
                    HTML = Wil receive HTML version of the email   
                    TEXT = Will receive simple text version'
                  enum: ["HTML","TEXT"]
                  default: "HTML"
                is_confirmed:
                  type: integer
                  description: 'Confirmation status of the contact
                  
                    0 = Add this contact as unconfirmed  
                    1 = Add this contact as confirmed'
                  enum: [0,1]
                  default: 1
                is_active:
                  type: integer
                  description: 'Status of the contact
                  
                    0 = Mark as inactive (will not receive emails)  
                    1 = Mark as active'
                  enum: [0,1]
                  default: 1
                bounced:
                  type: integer
                  description: 'Bounced status of the contact  
                    0 = Add as not bounced  
                    1 = Add as soft bounced  
                    2 = Add as hard bounced'
                  enum: [0,1,2]
                  default: 0
                is_unsubscribed:
                  description: 'Subscription status of the contact
                  
                    0 = Mark as subscribed  
                    1 = Mark as unsubscribed'
                  type: integer
                  enum: [0,1]
                  default: 0
                is_spam:
                  type: integer
                  description: 'If this contact has produced a spam complaint
                  
                    0 = Mark as not having made a spam complaint  
                    1 = Mark as having made a complaint'
                  enum: [0,1]
                  default: 0
                additionalProperties:
                  type: string
                  description: 'Set additional custom field values. The field “response” is reserved. For any date-based fields custom fields, the format needs to be "ISO 8601" which is: YYYY-MM-DD.'
              example: {"email":"support@luxsci.com","customer_id_custom_field":999,"list_id":"28"}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Contact'
              example:
                {
                  "auth": "OMITTED",
                  "success": 1,
                  "data":
                  {
                    "is_spamed":0,
                    "import_id":null,
                    "additional_fields_data":{"customer_id_custom_field":999},
                    "is_verified":0,
                    "email":"support@luxsci.com",
                    "created_at":"2020-06-10 18:38:26",
                    "id":19,
                    "list_id":28,
                    "never_sent":null,
                    "bounced":"no_process",
                    "image":null,
                    "is_unsubscribed":0,
                    "is_active":1,
                    "format":"html",
                    "updated_at":"2020-06-10 18:38:26",
                    "is_confirmed":1,
                    "user_id":3
                  }
                }
  '/account/{accountId}/marketing/addContacts':
    post:
      operationId: addMarketingContacts
      tags:
        - Marketing
      description: 'Add New Contacts. {{ACL: Marketing - Contact Management}}  This is a bulk wrapper around addContact.  You specify multiple contacts in the contacts list element.  The response contains a list of API response call results for each API add request.  Use of addContacts is the same as calling addContact multiple times; however, it is somewhat more efficient.'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - contacts
              properties:
                contacts:
                  type: array
                  items:
                    type: object
                  description: 'Array of new contact objects, each one as per the addContact body specification.'
              example: {contacts:[{"email":"support@luxsci.com","customer_id_custom_field":999,"list_id":"28"}]}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                {
                  "auth": "OMITTED",
                  "success": 1,
                  "data": {
                     results: [
                       "support@luxsci.com",
                       200,
                       {
                          "is_spamed":0,
                          "import_id":null,
                          "additional_fields_data":{"customer_id_custom_field":999},
                          "is_verified":0,
                          "email":"support@luxsci.com",
                          "created_at":"2020-06-10 18:38:26",
                          "id":19,
                          "list_id":28,
                          "never_sent":null,
                          "bounced":"no_process",
                          "image":null,
                          "is_unsubscribed":0,
                          "is_active":1,
                          "format":"html",
                          "updated_at":"2020-06-10 18:38:26",
                          "is_confirmed":1,
                          "user_id":3
                        }
                      ],
                    }
                }
  '/account/{accountId}/marketing/getContacts':
    get:
      operationId: getMarketingContacts
      tags:
        - Marketing
      description: 'This call permits you to get your contacts’ data from the system by specific list or in aggregate. None of the request body parameters are required, and if you leave them blank, the call will return all contacts’ data from all your lists. {{ACL: Marketing - Contact Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: full_details
          in: query
          description: 'If specified and set to 1, add contact details will be returned, including the values of all additional fields.'
          required: false
          schema:
            type: integer
        - name: list_id
          in: query
          description: 'Contact list id for the contacts you want to get.'
          required: true
          schema:
            type: integer
        - name: limit_start
          in: query
          description: 'Starting row of result. Default: 0'
          required: true
          schema:
            type: integer
            default: 0
        - name: limit_count
          description: 'Number of records to get. Default: 25'
          in: query
          required: true
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Contact'
              example:
                    {
                      "success": 1,
                      "data":
                      [
                        {
                          "is_spamed":0,
                          "bounced":"no_process",
                          "is_verified":0,
                          "email":"support@luxsci.com",
                          "is_unsubscribed":0,
                          "created_at":"2020-06-10 18:59:27",
                          "format":"html",
                          "is_active":1,
                          "updated_at":"2020-06-10 18:59:27",
                          "user_id":3,
                          "id":20,
                          "list_id":29,
                          "is_confirmed":1

                        }
                      ]
                    }
  '/account/{accountId}/marketing/getContact/{id}':
    get:
      operationId: getMarketingContactById
      tags:
        - Marketing
      description: 'This function allows you to get the details for specific contact using his/her contact ID. {{ACL: Marketing - Contact Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: full_details
          in: query
          description: 'If specified and set to 1, add contact details will be returned, including the values of all additional fields.'
          required: false
          schema:
            type: integer
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Contact'
                    minItems: 1
                    maxItems: 1
              example:
                    {
                      "success": 1,
                      "data":
                      [
                        {"is_spamed":0,
                        "bounced":"no_process",
                        "is_verified":0,
                        "email":"support@luxsci.com",
                        "is_unsubscribed":0,
                        "created_at":"2020-06-10 18:59:27",
                        "format":"html",
                        "is_active":1,
                        "updated_at":"2020-06-10 18:59:27",
                        "user_id":3,
                        "id":20,
                        "list_id":29,
                        "is_confirmed":1
                        }
                      ]
                    }
  '/account/{accountId}/marketing/updateContact/{id}':
    put:
      operationId: updateMarketingContactById
      tags:
        - Marketing
      description: 'Update the details, including custom field values, of a contact, using their contact ID. {{ACL: Marketing - Contact Management}}'
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateContactRequestBody'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Contact'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "is_spamed":0,
                          "import_id":null,
                          "additional_fields_data":
                            {
                              "customer_id_custom_field":888
                            },
                          "is_verified":0,
                          "email":"support@luxsci.com",
                          "created_at":"2020-06-10 19:26:47",
                          "id":24,
                          "list_id":33,
                          "never_sent":null,
                          "bounced":"no_process",
                          "image":null,
                          "is_unsubscribed":0,
                          "is_active":1,
                          "format":"html",
                          "updated_at":"2020-06-10 19:26:47",
                          "is_confirmed":1,
                          "user_id":3

                        }
                    }
  '/account/{accountId}/marketing/updateContact/{email}':
    put:
      operationId: updateMarketingContactByEmail
      tags:
        - Marketing
      description: 'Update the details, including custom field values, of contacts with the specified email address. {{ACL: Marketing - Contact Management}}'
      requestBody:
        content:
          application/json:
            schema:
              allOf:
                - type: object
                  properties:
                    list_id:
                      type: integer
                      description: 'Only match contacts with this email address in this list. If you leave the “list_id” parameter blank, then this call will update ALL instances of this email address across ALL of your Contact Lists.'
                - $ref: '#/components/schemas/UpdateContactRequestBody'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: email
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Contact'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "is_spamed":0,
                          "import_id":null,
                          "additional_fields_data":
                            {
                              "customer_id_custom_field":888
                            },
                          "is_verified":0,
                          "email":"support@luxsci.com",
                          "created_at":"2020-06-10 19:26:47",
                          "id":24,
                          "list_id":33,
                          "never_sent":null,
                          "bounced":"no_process",
                          "image":null,
                          "is_unsubscribed":0,
                          "is_active":1,
                          "format":"html",
                          "updated_at":"2020-06-10 19:26:47",
                          "is_confirmed":1,
                          "user_id":3

                        }
                    }
  '/account/{accountId}/marketing/deleteContact/{id}':
    delete:
      operationId: deleteMarketingContactById
      tags:
        - Marketing
      description: 'Delete Contact By ID. {{ACL: Marketing - Contact Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: '""'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/account/{accountId}/markAsUnsubscribed/{id}':
    put:
      operationId: markContactAsUnsubscribed
      tags:
        - Marketing
      description: 'Changes a contact’s status to “unsubscribed.” This is more efficient than calling updateContact to make this change. {{ACL: Marketing - Contact Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/account/{accountId}/marketing/getCampaigns':
    get:
      operationId: getMarketingCampaigns
      tags:
        - Marketing
      description: 'This call allows you to retrieve details on your campaigns. {{ACL: Marketing - Campaign Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: query
          required: true
          description: 'Use if you want to restrict details to specific Campaign id. If left blank, all your campaigns’ details will be returned.'
          schema:
            type: integer
        - name: group_id
          in: query
          required: true
          description: 'Group id of the campaigns you want to get.'
          schema:
            type: integer
        - name: limit_start
          in: query
          required: true
          description: 'Starting row of result. Default: 0'
          schema:
            type: integer
            default: 0
        - name: limit_count
          in: query
          description: 'Number of records to get. Default: 25'
          required: true
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: The response is an array of associated arrays 
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Campaign'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "subject":"LUXSCI TEST CAMPAIGN",
                          "name":"LUXSCI TEST CAMPAIGN",
                          "content_text":"Hello World!",
                          "created_at":"2020-06-10 20:22:18",
                          "group_id":24,
                          "updated_at":"2020-06-10 20:22:18",
                          "content_html":"<h1>Hello World!</h1>",
                          "id":8,
                          "user_id":3
                          
                        }
                    }
  '/account/{accountId}/marketing/addCampaign':
    post:
      operationId: addMarketingCampaign
      tags:
        - Marketing
      description: 'Create a new email broadcast campaign. {{ACL: Marketing - Campaign Management}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - group_name
                - broadcast_name
                - email_subject
                - content_html
                - context_text
              properties:
                group_name:
                  type: string
                  description: 'In which group do you want to sort this campaign'
                broadcast_name:
                  type: string
                  description: 'Name your campaign'
                email_subject:
                  type: string
                  description: 'Email subject of this campaign'
                content_html:
                  type: string
                  description: 'HTML content for the campaign'
                content_text:
                  description: 'es TEXT version of the campaign'
                  type: string
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Campaign'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "subject":"LUXSCI TEST CAMPAIGN",
                          "name":"LUXSCI TEST CAMPAIGN",
                          "content_text":"Hello World!",
                          "created_at":"2020-06-10 20:22:18",
                          "group_id":24,
                          "updated_at":"2020-06-10 20:22:18",
                          "content_html":"<h1>Hello World!</h1>",
                          "id":8,
                          "user_id":3
                        }
                    }
  '/account/{accountId}/marketing/updateCampaign/{id}':
    put:
      operationId: updateMarketingCampaign
      tags:
        - Marketing
      description: 'Update a Campaign. {{ACL: Marketing - Campaign Management}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                group_name:
                  type: string
                  description: 'Re-sort campaign into another group'
                broadcast_name:
                  type: string
                  description: 'Update Campaign name'
                email_subject:
                  type: string
                  description: 'Update email subject of the campagn'
                content_html:
                  type: string
                  description: 'Update HTML content for the campaign'
                content_text:
                  type: string
                  description: 'Update Text version of the campaign'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Campaign'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "subject":"LUXSCI TEST CAMPAIGN SUBJECT",
                          "name":"LUXSCI TEST CAMPAIGN",
                          "content_text":"HelloWorld!",
                          "created_at":"2020-06-10 20:28:45",
                          "group_id":24,
                          "updated_at":"2020-06-10 20:28:47",
                          "content_html":"<h1>Hello World!</h1>",
                          "id":10,
                          "user_id":3
                        
                        }
                    }
  '/account/{accountId}/marketing/deleteCampaign/{id}':
    delete:
      operationId: deleteMarketingCampaign
      tags:
        - Marketing
      description: 'Delete a Campaign. {{ACL: Marketing - Campaign Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          in: path
          required: true
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/account/{accountId}/marketing/suppress':
    post:
      operationId: addNewMarketingSuppression
      tags:
        - Marketing
      description: 'Add New Suppression. {{ACL: Marketing - Suppression}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - type
                - reference
              properties:
                type:
                  description: '0 = Global suppression.  
                    1 = List based suppression'
                  type: integer
                  enum: [0,1]
                reference:
                  description: 'Reference for the suppression'
                  type: string
                email:
                  description: 'Email address you want to add in suppression'
                  type: string
                domain:
                  description: 'Domain you want to add in suppression'
                  type: string
                ip:
                  description: 'IP you want to add in suppression'
                  type: string                                    
                list_id:
                  description: 'id of the contact list in which you want to suppress (0 will add in global list)'
                  type: integer
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The response is an associative array'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      id:
                        type: string
                        description: 'Unique ID of this suppression'
                      user_id:
                        type: integer
                        description: 'User ID of the person owning this suppression'
                      list_id:
                        type: integer
                        description: 'List ID in which this suppression lives.'
                      label:
                        type: string
                        description: 'Label of suppression given by reference.'
                      email:
                        type: string
                        description: 'Email being suppressed'
                      domain:
                        type: string
                        description: 'Domain being suppressed'
                      ip:
                        type: string
                        description: 'IP being suppressed  '
                      is_suppressed:
                        type: integer
                        description: '0,1 Boolean indicating suppression state'
                        enum: [0,1]
                      created_at:
                        type: string
                        description: 'DATETIME When this suppression was created, in GMT'
                      updated_at: 
                        type: string
                        description: 'DATETIME When this suppression was last updated, in GMT'
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "email":"customer@domain.com",
                          "label":"suppression via api",
                          "created_at":"2020-06-10 20:22:18",
                          "is_suppressed":1,
                          "updated_at":"2020-06-10 20:22:18",
                          "list_id":7,
                          "id":8,
                          "user_id":3
                          
                        }
                    }
  '/account/{accountId}/marketing/getSuppressed':
    get:
      operationId: getMarketingSuppressions
      tags:
        - Marketing
      description: 'Get Suppressions. {{ACL: Marketing - Suppression}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: type
          in: query
          description: 'email, domain, ip Select type of suppression list you want to get'
          required: true
          schema:
            type: string
            enum: ["email","domain", "ip"]
        - name: id
          in: query
          description: 'id of the suppressed entry'
          schema:
            type: integer
        - name: reference
          in: query
          description: 'Get suppressed records according to this reference'
          schema:
            type: string
        - name: limit_start
          description: 'Starting row of result. Default: 0'
          in: query
          schema:
            type: integer
            default: 0
        - name: limit_count
          description: 'Number of records to get. Default: 25'
          in: query
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: 'The response is an array of associative arrays. '
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: integer
                          description: 'Unique ID of this suppression'
                        user_id:
                          type: integer
                          description: 'User ID of the person owning this suppression'
                        list_id:
                          type: integer
                          description: 'List ID in which this suppression lives.'
                        label:
                          type: string
                          description: 'Label of suppression given by reference.'
                        email:
                          type: string
                          description: 'Email being suppressed'
                        domain:
                          type: string
                          description: 'Domain being suppressed'
                        ip:
                          type: string
                          description: 'IP being suppressed  '
                        is_suppressed:
                          type: integer
                          description: '0,1 Boolean indicating suppression state'
                          enum: [0,1]
                        created_at:
                          type: string
                          description: 'DATETIME. When this suppression was created, in GMT'
                        updated_at: 
                          type: string
                          description: 'DATETIME. When this suppression was last updated, in GMT'
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "email":"customer@domain.com",
                            "label":"suppression via api",
                            "created_at":"2020-06-10 20:22:18",
                            "is_suppressed":1,
                            "updated_at":"2020-06-10 20:22:18",
                            "list_id":7,
                            "id":8,
                            "user_id":3
                            
                          }
                          ,
                          {
                              "email":"customer2@domain.com",
                            "label":"suppression via api",
                            "created_at":"2020-06-10 20:22:18",
                            "is_suppressed":1,
                            "updated_at":"2020-06-10 20:22:18",
                            "list_id":7,
                            "id":9,
                            "user_id":3
                              
                          }
                        ]
                    }
  '/account/{accountId}/marketing/deleteSuppressed/{type}':
    delete:
      operationId: deleteMarketingSuppression
      tags:
        - Marketing
      description: 'Delete Suppression. {{ACL: Marketing - Suppression}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: type
          in: path
          required: true
          description: 'email, domain, ip Select type of suppression'
          schema:
            type: string
            enum: ["email","domain","ip"]
        - name: id
          in: query
          description: 'id of the suppressed entry'
          schema:
            type: integer
        - name: reference
          in: query
          description: 'Select suppressed records according to this reference you want to delete'
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/account/{accountId}/marketing/campaignSchedule':
    post:
      operationId: scheduleMarketingCampaign
      tags:
        - Marketing
      description: 'Schedule Campaign. {{ACL: Marketing - Scheduling}}'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - name
                - type
                - broadcast_ids
                - smtp_ids
                - smtp_sequence
                - sending_pattern
                - sending_time
                - sender_type
              properties:
                name:
                  type: string
                  description: 'Title for campaign schedule'
                type:
                  type: string
                  description: 'subscriber = scheduling on lists   
                    segments = scheduling on segment'
                  enum: ["subscriber","segments"]
                broadcast_ids:
                  type: string
                  description: 'Comma separated broadcast id(s). Campaign id(s) of campaigns you want to schedule on.'
                smtp_ids:
                  type: string
                  description: 'Comma separated smtp id(s). Node id(s) of Sending Nodes you want to use to send emails.'
                list_ids:
                  description: 'Comma separated list id(s). Required if param type = subscriber. List id(s) of Lists you want to schedule on.'
                  type: string
                segment_ids:
                  description: 'Comma separated segment id(s). Required if param type = segment. Segment id(s) of segments you want to schedule on.'
                  type: string
                smtp_sequence:
                  description: 'batch = a node will create connection once for a batch of contacts.  
                  
                    loop = one node for each contact'
                  type: string
                  enum: ["batch","loop"]
                sending_pattern:
                  description: 'random = system will use random node from selected node list for sending.
                  
                  sequential = system will use node in sequential order from selected node list for sending'
                  type: string
                  enum: ["random","sequential"]
                sending_time:
                  description: 'now = send broadcast now  
                    later = schedule in future'
                  type: string
                  enum: ["now","later"]
                send_datetime:
                  description: 'timestamp (format: Ym-d H:i:s). Required if param sending_time = `later`. Value must be greater than current datetime.'
                  type: string
                sender_type:
                  type: string
                  description: 'smtp = use sender information from smtp  
                   
                    list = use sender information from list'
                  enum: ["smtp","list","custom"]
                track_opens:
                  type: integer
                  description: '0 = open tracking disabled  
                  
                    1 = open tracking enabled'
                  enum: [0,1]
                  default: 0
                track_clicks:
                  description: '0 = clicks tracking disabled  
                  
                    1 = clicks tracking enabled'
                  type: integer
                  enum: [0,1]
                  default: 0
                unsub_shows:
                  description: 'Status of bounce account  
                  
                    0 = Inactive  
                  
                    1 = Active'
                  type: integer
                  enum: [0,1]
                  default: 0
                track_duplicates:
                  type: integer
                  description: '0 = duplicate tracking diasbled  
                  
                    1 = duplicate tracking enabled'
                  enum: [0,1]
                  default: 0
                threads:
                  description: 'number of threads for sending'
                  type: integer
                unsubscribe_headers:
                  description: '0 = unsubscribe headers diasbled  
                  
                    1 = unsubscribe headers enabled'
                  type: integer
                  enum: [0,1]
                  default: 0
                unsubscriber_by_email:
                  description: '0 = unsubscribe by email diasbled  
                  
                    1 = unsubscribe by email enabled'
                  type: integer
                unsubscribe_email:
                  description: 'email. Required if param unsubscriber_ by_email = 1'
                  type: string
                unsubscribe_link:
                  description: '0 = unsubscribe link diasbled  
                  
                    1 = unsubscribe link enabled'
                  type: integer
                  enum: [0,1]
                  default: 0
                hourly_speed:
                  description: 'rate of emails/hour'
                  type: integer
                from_name:
                  description: 'Required if param sender_type = custom. From name to use in email'
                  type: string
                from_email:
                  description: 'Email. Required if param sender_type = custom. From email to use in email'
                  type: string
                bounce_email:
                  description: 'Email. Required if param sender_type = custom. Bounce Account to use in email'
                  type: string
                reply_email:
                  description: 'Email. Required if param sender_type = custom. Reply email to use in email'
                  type: string
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "campaign_type": "regular",
                          "threads":1,
                          "send_datetime": "2020-10-21 13:23:45",
                          "list_ids": "90",
                          "from_attributes": "{\"unsubscribe_email\":null,\"unsubscribe_link\":null,\"unsubscribe_by_email\":null,\"from_name_list\":\"N\",\"from_name_smtp\":\"Y\",\"from_name\":null,\"bounce_email\":null,\"reply_email\":null,\"from_email\":null}",
                          "name": "james@anydomain.com",
                          "unsub_show": 0,
                          "track_opens": 0,
                          "track_clicks": 0,
                          "track_duplicate": 0,
                          "unsubscribe_header": 0,
                          "smtp_ids": "26",
                          "current_smtp": 26,
                          "smtp_sequence": "loop",
                          "sending_pattern": "random",
                          "campaign_ids": "18",
                          "send_campaign": "now",
                          "user_id": 2,
                          "sender_option": "smtp",
                          "hourly_speed": null,
                          "masked_domain": null,
                          "notification_email": null,
                          "type": "subscriber",
                          "thread_settings": 1,
                          "updated_at": "2020-10-21 13:23:45",
                          "created_at": "2020-10-21 13:23:45",
                          "id": 193
                          
                        }
                    }
  '/account/{accountId}/marketing/getCampaignStatsSummary/{schedule_id}':
    get:
      operationId: getMarketingCampaignStatisticsSummary
      tags:
        - Marketing
      description: 'Get Campaign statistics summary. {{ACL: Marketing - Statistics}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: schedule_id
          description: 'Schedule id of schedule to get its statatistics summary.'
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1,
                      "data":
                        {
                          "campaign_name": "testing",
                          "sent_by": 2,
                          "contact_list": "Active List",
                          "campaign_list": "Testing Dynamic Tag",
                          "sending_node": "Admin Zone1",
                          "time_start": "Nov 03, 2020 05:58:52 PM",
                          "time_finished": "Nov 03, 2020 06:03:13 PM",
                          "status": "complete",
                          "total_contacts": 4,
                          "sent": 4,
                          "opened": "25 %",
                          "clicked": "0 %",
                          "ctr": "0 %",
                          "bounced": "0 %",
                          "unsubscribed": "25 %",
                          "threads": 5,
                          "track_opens": "Yes",
                          "track_clicks": "Yes",
                          "unsubscribe_link": "Yes",
                          "hourly_speed": "N/A",
                          "scheduled_by": "admin@dev1.com on Nov 03, 2020 05:58:52 PM"
                        }
                    }
  '/account/{accountId}/marketing/getCampaignStatsBounced/{schedule_id}':
    get:
      operationId: getMarketingCampaignBouncedStatistics
      tags:
        - Marketing
      description: 'Get Campaign bounced statistics.  {{ACL: Marketing - Statistics}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: schedule_id
          description: 'Schedule id of schedule to get bounced stats'
          in: path
          required: true
          schema:
            type: integer
        - name: limit_start
          description: 'Starting row of result. Default: 0'
          in: query
          schema:
            type: integer
            default: 0
        - name: limit_count
          description: 'Number of records to get. Default: 25'
          in: query
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
              example:
                    {
                      "success": 1,
                      "data":
                          {
                            "id": 5,
                            "created_at": "2020-07-19 11:37:20",
                            "email": "edward@yahoo.com",
                            "type": "hard",
                            "code": " (344)",
                            "reason": "421 4.7.0 [TSS04] Messages from 50.31.49.42 temporarily deferred due to user complaints -4.16.55.1; see https://help.yahoo.com/kb/postmaster/SLN3434.html",
                            "smtp_id": 25,
                            "message_id": "<312a04168e5cd4fb3672889f0ded84f58@domain.com>",
                            "smtp": "luxsci",
                            "subscribers_id": 72
                          }
                    }
  '/account/{accountId}/marketing/getMarketingCampaignGroups':
    get:
      operationId: getMarketingCampaignGroups
      tags:
        - Marketing
      description: 'Get Campaign Groups.  {{ACL: Marketing - Campaign Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          description: 'id of the campaign group to fetch details for.'
          in: query
          schema:
            type: integer
        - name: user_id
          description: 'Get campaign groups of a particular user.'
          in: query
          schema:
            type: integer
        - name: limit_start
          description: 'Starting row of result. Default: 0'
          in: query
          schema:
            type: integer
            default: 0
        - name: limit_count
          description: 'Number of records to get. Default: 25'
          in: query
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "id":"14",
                            "user_id":"2",
                            "limit_start":"0",
                            "limit_count":"25",
                          }
                        ]
                    }
  '/account/{accountId}/marketing/getMarketingScheduledCampaigns':
    get:
      operationId: getMarketingScheduledCampaigns
      tags:
        - Marketing
      description: 'Get Scheduled Campaigns.  {{ACL: Marketing - Campaign Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          description: 'id of the campaign to fetch details for.'
          in: query
          schema:
            type: integer
        - name: user_id
          description: 'Get campaigns of a particular user.'
          in: query
          schema:
            type: integer
        - name: limit_start
          description: 'Number of records to get. Default: 25.'
          in: query
          schema:
            type: integer
            default: 25
        - name: limit_count
          description: 'Number of records to get. Default: 25.'
          in: query
          schema:
            type: integer
            default: 25
        - name: t_start
          description: The start time from when to fetch the scheduled campaign. Supported format (dd-mm-yyyy_hh-mm-ss)
          in: query
          schema:
            type: integer
        - name: t_end
          description: The end time from when to fetch the scheduled campaign. Supported format (dd-mm-yyyy_hh-mm-ss)
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "id":"14",
                            "user_id":"2",
                            "limit_start":"0",
                            "limit_count":"25",
          "t_start":"2022-10-20 14:01:00", 
          "t_end":"2022-10-20 14:01:00"
                          }
                        ]
                    }
  '/account/{accountId}/marketing/getMarketingListGroups':
    get:
      operationId: getMarketingListGroups
      tags:
        - Marketing
      description: 'Get Campaign List Groups.  {{ACL: Marketing - Campaign Management}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: id
          description: 'id of the List Group to fetch details for.'
          in: query
          schema:
            type: integer
        - name: user_id
          description: 'Get list groups of a particular user.'
          in: query
          schema:
            type: integer
        - name: limit_start
          description: 'Starting row of result. Default: 0'
          in: query
          schema:
            type: integer
            default: 0
        - name: limit_count
          description: 'Number of records to get. Default: 25'
          in: query
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "id":"14",
                            "user_id":"2",
                            "limit_start":"0",
                            "limit_count":"25",
                          }
                        ]
                    }
  '/account/{accountId}/marketing/getCampaignStatsOpened/{schedule_id}':
    get:
      operationId: getMarketingCampaignOpenedStatistics
      tags:
        - Marketing
      description: 'Get Campaign email opened statistics.  {{ACL: Marketing - Statistics}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: schedule_id
          description: 'Schedule id of schedule to get open stats'
          in: path
          required: true
          schema:
            type: integer
        - name: limit_start
          description: 'Starting row of result. Default: 0'
          in: query
          schema:
            type: integer
            default: 0
        - name: limit_count
          description: 'Number of records to get. Default: 25'
          in: query
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "id": 23,
                            "broadcast_id": 18,
                            "scheduled_id": 111,
                            "contact_id": 3820183,
                            "sd_id": null,
                            "sn_id": null,
                            "campaign_schedule_logs_id": 498,
                            "is_clicked": 1,
                            "ip_address": "39.34.209.252",
                            "ip_country": "Pakistan",
                            "ip_region": "Punjab",
                            "ip_city": "Mianwali",
                            "ip_zip": "42201",
                            "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36",
                            "user_id": null,
                            "created_at": "2020-10-02 13:19:49",
                            "updated_at": "2020-10-02 13:19:49",
                            "smtp": "Admin Zone1",
                            "email": "johny@gmail.com",
                            "subscribers_id": 3820183
                            
                          }
                        ]
                    }
  '/account/{accountId}/marketing/getCampaignStatsClicked/{schedule_id}':
    get:
      operationId: getMarketingCampaignClickedStatistics
      tags:
        - Marketing
      description: 'Get Campaign email link clicked statistics.  {{ACL: Marketing - Statistics}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: schedule_id
          in: path
          description: 'Schedule id of schedule to get clicked stats'
          required: true
          schema:
            type: integer
        - name: limit_start
          in: query
          description: 'Starting row of result. Default: 0'
          schema:
            type: integer
            default: 0
        - name: limit_count
          in: query
          description: 'Number of records to get. Default: 25'
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "id": 15,
                            "broadcast_id": 18,
                            "scheduled_id": 111,
                            "contact_id": 3820183,
                            "sd_id": null,
                            "sn_id": null,
                            "campaign_schedule_logs_id": 498,
                            "link_id": 111,
                            "link": "https://www.youtube.com/watch?v=ECvGtQjhjy0&list=RDECvGtQjhjy0&start_radio=1",
                            "ip_address": "39.34.209.252",
                            "ip_country": "Pakistan",
                            "ip_region": "Punjab",
                            "ip_city": "Mianwali",
                            "ip_zip": "42201",
                            "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36",
                            "created_at": "2020-10-02 13:19:49",
                            "updated_at": "2020-10-02 13:19:49",
                            "subscriber_email": "adam@gmail.com",
                            "link_url": "https://www.youtube.com/watch?v=ECvGtQjhjy0&list=RDECvGtQjhjy0&start_radio=1",
                            "is_unsubscribed": 0,
                            "subscribers_id": 3820183
                          }
                        ]
                    }
  '/account/{accountId}/marketing/getCampaignStatsUnsubscribed/{schedule_id}':
    get:
      operationId: getMarketingCampaignUnsubscribedStatistics
      tags:
        - Marketing
      description: 'Get Campaign email unsubscribed statistics.  {{ACL: Marketing - Statistics}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: schedule_id
          description: 'Schedule id of schedule to get unsubscribe stats'
          in: path
          required: true
          schema:
            type: integer
        - name: limit_start
          description: 'Starting row of result. Default: 0'
          in: query
          schema:
            type: integer
            default: 0
        - name: limit_count
          description: 'Number of records to get. Default: 25'
          in: query
          schema:
            type: integer
            default: 25
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
              example:
                    {
                      "success": 1,
                      "data":
                        [
                          {
                            "subscribers_id": 3820181,
                            "email": "david@yahoo.com",
                            "updated_at": "2020-11-03 13:10:58",
                            "id": 29,
                            "broadcast_id": 19,
                            "scheduled_id": 195,
                            "contact_id": 3820181,
                            "sd_id": null,
                            "sn_id": null,
                            "campaign_schedule_logs_id": 944,
                            "is_clicked": 0,
                            "ip_address": "39.34.221.158",
                            "ip_country": "Pakistan",
                            "ip_region": "Punjab",
                            "ip_city": "Jauharabad",
                            "ip_zip": "29211",
                            "user_agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.111 Safari/537.36",
                            "user_id": 2,
                            "created_at": "2020-11-03 13:10:58"
                          }
                        ]
                    }
  '/account/{accountId}/users/report':
    get:
      operationId: getUserReport2
      tags:
        - Users
      description: 'This report-style API call returns a list of all users in the account, with optional date range selection by user creation date. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#users). {{ACL: Account: View Reports}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: status
          description: 'Specify one of enabled or disabled to retrieve only enabled or disabled users.'
          in: query
          schema:
            type: string
        - name: domain
          description: 'Enter the name of a domain to retrieve only users whose login is in that domain.'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/users/report_count':
    get:
      operationId: getUserSummaryReport
      tags:
        - Users
      description: 'This report the number of users in the account, with optional date range selection by user creation date. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#users_count).  {{ACL: Account: View Reports}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: status
          description: 'Specify one of enabled or disabled to retrieve only enabled or disabled users.'
          in: query
          schema:
            type: string
        - name: domain
          description: 'Enter the name of a domain to retrieve only users whose login is in that domain.'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/users':
    get:
      operationId: getUserReport
      tags:
        - Users
      description: |-
        Return an array of information about all users matching your query request.
      
        The Request query string can contain any or all of the following keywords parameters to refine the search. If all are omitted, the report will include information about all users in the account. In all cases, any users protected from API access will not be included in the report. {{ACL: User Settings: Read Access }}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: status
          in: query
          description: 'Value ‘enabled’ – return only active/enabled users.<br>Value ‘disabled’ – return only disabled users.'
          schema:
            type: string
            enum: ['enabled','disabled']
        - name: domain
          description: 'Domain name in your account. If supplied, only users in this domain will be returned.'
          in: query
          schema:
            type: string
        - name: younger_than
          in: query
          description: 'Return only users created less than this number of days ago.'
          schema:
            type: integer
        - name: older_than
          in: query
          description: 'Return only users created more than this number of days ago.'
          schema:
            type: integer
      responses:
        '200':
          description: 'The successful response will be an array of objects, one for each matching user in your account.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        city:
                          type: string
                          description: 'City'
                        company:
                          type: string
                          description: 'Company / organization'
                        contact:
                          type: string
                          description: 'Full name. E.g. “John Smith”'
                        country:
                          type: string
                          description: 'Country'
                        created:
                          type: string
                          description: 'Date and time this user was created (YYYY-MM-DD HH:MM:SS in GMT)'
                        custom1:
                          type: string
                          description: 'Custom field #1'
                        custom2:
                          type: string
                          description: 'Custom field #2'
                        custom3:
                          type: string
                          description: 'Custom field #3'
                        disk_quota:
                          type: string
                          description: 'Floating point limit on the user’s total disk space usage. A value of “-1” signifies that the user does not have a disk usage limit.'
                        disk_usage:
                          type: string
                          description: 'Floating point value for the user’s current (last measured) total disk space usage. In gigabytes.'
                        email1:
                          type: string
                          description: 'Primary email address'
                        email2:
                          type: string
                          description: 'Alternate email address'
                        fax:
                          type: string
                          description: 'FAX number. Deprecated.'
                        flags:
                          type: array
                          items:
                            type: string
                          description: |-
                            Array. Lists which of the following flags, if any, are set on this user:
                            - poor_password – User must change his/her password on the next login to the Web Interface
                            - can_autodelete – User account can be auto-deleted if the user has not logged in in a long time
                        uid:
                          type: integer
                          description: 'Unique user ID (integer).'
                        last_access_date:
                          type: string
                          description: 'Date Time the user last logged into any of WebMail, POP, IMAP, or SMTP (not updated real time). If the user has never logged in, this should be the same as the “created” date time. (YYYY-MM-DD HH:MM:SS in GMT)'
                        modified:
                          type: string
                          description: 'Date and time this user was last modfiied (YYYY-MM-DD HH:MM:SS in GMT)'
                        phone1:
                          type: string
                          description: 'Primary contact phone number'
                        phone2:
                          type: string
                          description: 'Alternate contact phone number'
                        services:
                          type: array
                          items:
                            type: string
                          description: |-
                            Array. Lists which of the following services the user has permission to use:
                            - pop – POP3 access to email
                            - imap – IMAP4 access to email
                            - smtp – SMTP for sending email
                            - spam – Basic Spam and Virus Filtering
                            - ftp – SFTP access
                            - website – permission to login to the Web Interface
                        state:
                          type: string
                          description: 'State/Province'
                        status:
                          type: string
                          description: 'One of ‘enabled’ or ‘disabled’'
                        street1:
                          type: string
                          description: 'Street address (line 1)'
                        street2:
                          type: string
                          description: 'Street address (line 2)'
                        user:
                          type: string
                          description: 'user name (e.g. joe@doman.com)'
                        zip:
                          type: string
                          description: 'Zip / postal code'
              example:
                    {
                      "success": 1,
                      "data": [{}]
                    }
    post:
      operationId: createUser
      tags:
        - Users
      description: |-
        Create a new user in your account.
      
        Your API Interface looks to see how many users were added to your account in the past 24 hours. If this number is equal or greater than your API create limit, then your API will reject additional user creation requests until that situation changes. See your API Interface configuration page for your user creation limit.
        
        If you would like to update other user information, such as contact information, disk quota, etc., you would use other, specific API calls. The user’s initial preferences are copied from the account main administrator user. This user will have all licenses and services that are currently being purchased “for all users” in your account or which are required (e.g. SecureLine for HIPAA or Archival in a domain provisioned for Archival).
        
        **Upgrades:** If your account does not have available user licenses (or licenses for SecureLine, Archival, or other needed services) for this new user, then either the request will be rejected, or your account will be auto-upgraded if you have “Permit auto-upgrades as needed for fulfill requests” enabled. In the latter case, your account will be upgraded by a block of at least your specified “licenses at a time” upgrade setting from your API Interface configuration. {{ACL: Account: Users - Add}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - user
                - contact
                - password
              properties:
                user:
                  type: string
                  description: 'Required. The new username. E.g. “john@domain.com”. The domain name used must already be an active domain in your account.'
                basic_spam_filter:
                  type: integer
                  description: 'Optional. If this is specified and its value is true (e.g. 1) AND your account has Basic Spam Filtering licenses for all users (which most do), then the Basic Spam Filter will be enabled for this new user. Otherwise, the Basic Spam Filtering will not be enabled by default.'
                contact:
                  type: string
                  description: 'Required. The user’s full name. E.g. “John Sample”.'
                password:
                  type: string
                  description: |-
                    Required. The user’s password. This password must pass the password strength requirements set for your account (unless you send a hash).
                  
                    The password sent can also ba an SHA512 hash (e.g., of the form `$6$16charsalt$86-char-hash`) of the actual password.
      responses:
        '200':
          description: '""'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      uid:
                        type: integer
                        description: 'The new user’s unique user ID.'
              example:
                    {
                      "success": 1,
                      "data": { 
                        "uid": "100526"
                      }
                    }
  '/account/{accountId}/users/{username}/rename':
    post:
      operationId: renameUser
      tags:
        - Users
      description: |-
        Change the user’s login email address from `username` to `new_address`. E.g., change `john@sample.com` to `fred@newdomain.com`. Please note the following restrictions on this command:
          
        1.  Users cannot be renamed with the API in the following situations:
          1.  Users with account administration permission cannot be renamed.
          2.  If this user is currently HIPAA compliant, s/he cannot be renamed into a domain that is not HIPAA compliant
          3.  If this user does not have a SecureLine license, s/he cannot be renamed into a domain that is HIPAA- ompliant
          4.  Users with Secure Marketing user logins associated with them cannot be renamed.
          5.  Users cannot be renamed from a domain that does not have Premium Email Filtering or Archival into a domain that does.
        2.  The new domain name (e.g. `newdomain.com`) must exist in this account.
        3.  The user part of the new login (e.g. `fred`) must be valid for an email address and must not correspond to an existing user or email alias.
        4.  Any existing PGP or S/MIME certificates associated with this user in the system will be deleted and become inaccessible, as they are explicitly related to the user’s login email address.
        
        {{ACL: Account: Users - Enable / Disable / Delete Users}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: username
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - new_address
              properties:
                new_address:
                  description: 'Required. The new login username (email address) for this user.'
                  type: string
      responses:
        '200':
          description: "none"
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/account/{accountId}/users/{username}':
    delete:
      operationId: deleteUser
      tags:
        - Users
      description: |-
        Delete the user from the system. This eliminates all the user’s data, history, web/ftp files, and email. After this command is complete, there will no longer be any record that the user existed. **This command cannot be undone.**
      
        Note that some users cannot be deleted in this way. For example, any user with “account management” permission cannot be deleted. Other users may not be able to be deleted if there are things in your account (e.g., web sites) that are still owned by them. You will receive an error if you try to delete a user that is not currently deletable.
        
        Note that deletion of a user does not downgrade your account. Please contact billing for account downgrade requests. {{ACL: Account: Users - Enable/Disable/Delete}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: username
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: '""'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1
                    }
    put:
      operationId: updateUserSettings
      tags:
        - Users
      description: 'Change one or more properties of the user. {{ACL: Account: Users - Modify}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: username
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                add_service:
                  description: |-
                    Enable the specified service for the user.Valid service names include:
                    - “pop” – POP3 access to email
                    - “imap” – IMAP4 access to email
                    - “smtp” – SMTP for sending email
                    - “spam” – Basic Spam and Virus Filtering
                    - “ftp” – SFTP access
                    - “website” – permission to login to the Web Interface
                    
                    SFTP service can only be added to users in accounts with web server access.
                    
                    If your account does not have enough licenses to add the requested service to the user, then the request will error out unless you have “Permit auto-upgrades as needed to fulfill request” enabled in your API Interface access control settings; in that case, your account will be upgraded and charged for the added licenses.
                  type: string
                copy_preferences_from:
                  description: 'Pass the user name of another user in this account (e.g. “john@domain.com”). Web Interface preferences will be copied from that user into the API target user (items like time zone, language, date and time formatting preferences, some WebMail interface preferences, etc.).'
                  type: string
                disable:
                  description: |-
                    If a “1” is passed, then the user will be disabled. Disabling a user simply prevents the user from logging into any services. It does not affect the user’s data and it does not block incoming email. This action is performed by temporarily changing the user’s password to a random string.
                  
                    Only currently-enabled users can be disabled. {{ACL: Account: Enable/Disable/Delete users}}
                  type: integer
                disk_quota:
                  type: number
                  description: |-
                    Set a new hard total disk quota for this user. The value passed should be in Gigabytes. E.g. a value of 0.5 would set the limit to 500 MB. A value of zero is not permitted. A negative value will clear the disk quota ... resulting in the user no longer having a disk space limit (which is the default for all users).
                  
                    Disk space is measured hourly. If the user’s individual disk usage (the sum of all disk space used by email, web, ftp, WebAides, etc.) exceeds his/her disk space quota, then many services will be explicitly disabled and incoming email will bounce. Since the disk usage is only checked hourly, it is possible that the user’s disk space usage will exceed the quota before the user’s account is suspended.
                enable:
                  description: 'If a “1” is passed, then the user will be re-enabled. Only currently-disabled users can be enabled.  {{ACL: Account: Enable/Disable/Delete users}}'
                  type: integer
                remove_flag:
                  description: 'flag_name type. Remove the specified flag from the user.'
                  type: string
                remove_service:
                  description: 'service_name type. Remove the specified service from the user.'
                  type: string
                set_flag:
                  type: string
                  description: |-
                    flag_name type. Enable the specified flag on this user. Valid flags include:
                    - “poor_password” – User must change his/her password on the next login to the Web Interface
                    - “can_autodelete” – User account can be auto-deleted if the user has not logged in in a long time'
      responses:
        '200':
          description: "none"
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
  '/account/{accountId}/domains':
    post:
      operationId: createDomain
      tags:
        - Domains
      description: |-
        Create a new domain in your account. Note: the domain MUST be either a subdomain or have client-managed DNS.
      
        For HIPAA accounts, all new domains will be locked down for HIPAA compliance unless the account is configured as “HIPAA Flexible.” In that case, all new domains cannot be created via the API.
        
        Your API Interface looks to see how many domains were added to your account in the past 24 hours. If this number is equal or greater than your API create limit, then your API will reject additional domain creation requests until that situation changes. See your API Interface configuration page for your domain creation limit. {{ACL: Account: Domains - Manage}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - domain_name
              properties:
                accept_mail:
                  description: 'Optional: default false (“0”). True values (e.g. “1”) will result in the domain being able to accept new email (once validated by updating MX or A records).'
                  type: string
                catchall_status:
                  description: 'Optional: default value “disabled”. If set to “enabled”, then the domain-wide email catchall alias will be turned on. We do not recommend that these be used in general ... as they are magnets for inbound spam. If enabled, the catchall email alias will forward all email, by default, to the main administrator of this account (specifically, to the main admin’s username).'
                  type: string
                  default: 'disabled'
                  enum: ['disabled','enabled']
                domain_name:
                  description: 'Required. The name of the domain to add, e.g. “mydomain.com”. This must be a valid domain name that does not yet exist in your account or any other account in the system.'
                  type: string
      responses:
        '200':
          description: 'OK'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      id:
                        type: integer
                        description: 'The new domain’s unique user ID.'
              example:
                    {
                      "success": 1,
                      "data": {
                        "id": "45623"
                      }
                    }
    get:
      operationId: getDomainsReport
      tags:
        - Domains
      description: 'Get information about your domains. {{ACL: Account: Domains - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The data field of the response is an array of all domains in your account.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DomainReport'
              example:
                    {
                      "success": 1,
                      "data": [
                        { 
                          "is_enabled": 1, 
                          "is_hipaa": 0, 
                          "msync_users": 5, 
                          "users": 5,
                          "is_verified": 1, 
                          "created": "2015-01-07 12:18:37", 
                          "domain": "my-secure-domain.com", 
                          "accept_mail": 1, 
                          "id": 77351, 
                          "secureline_users": 5, 
                          "gid": 73462
                        }]
                    }
  '/account/{accountId}/domains/{domainName}':
    delete:
      operationId: 'deleteDomain'
      tags:
        - Domains
      description: 'Remove a domain from your account. 
      
      If the domain is currently in use (e.g. has users, web sites, has premium filtering or archival, has managed DNS, etc.), then it cannot be deleted. Note: the domain MUST be either a subdomain or have client-managed DNS. {{ACL: Account: Domains - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: domainName
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
              example:
                    {
                      "success": 1
                    }
    put:
      operationId: updateDomain
      tags:
        - Domains
      description: |-
        Change selected domain settings.
      
        You can change one or multiple settings via one call. Settings that are omitted will not be altered. {{ACL: Account: Domains - Manage}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: domainName
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                accept_mail:
                  type: string
                  description: |-
                    Optional: False (“0”). True values (e.g. “1”) will result in the domain being able to accept new email (once validated by updating MX or A records).
                  
                    Note that if “is_enabled” is false, then the domain will not accept email, even if this setting is true.
                    
                    This setting will not be changed if you omit this keyword from your request.'
                catchall_action:
                  type: string
                  description: |-
                    Can be one of:
                    - “email” – to forward email messages
                    - “delete” – to delete email message
                    - “bounce” – to bounce back email messages with a custom message.
                    
                    This field is required if catchall_on is true and ignored otherwise.
                  enum: ["email","delete","bounce"]
                catchall_data:
                  type: string
                  description: |-
                    This contains data for your “catchall_action”:
                    - “email” – Is a comma-delimited list of email addresses to forward email to. This list will be validted.
                    - “bounce” – is a short plain text message (50 characters or less) to explain why the bounce is happening.
                    - “delete” – “catchall_data” ignored.
                    
                    This field is required if catchall_on is true and catchall_action is not “delete”, and ignored otherwise.
                  enum: ["email","bounce","delete"]
                catchall_on:
                  type: string
                  description: |-
                    Optional: False (e.g. “0”). True (e.g. “1”). If enabled, then the domain-wide email catchall alias will be turned on. We do not recommend that these be used in general ... as they are magnets for inbound spam.
                  
                    If enabled, then the other catchall action parameters are required.
                    
                    Domain catchall settings will not be changed if you omit this keyword from your request.'
                is_enabled:
                  description: |-
                    Optional: False (“0”). True values (e.g. “1”) will result in the domain globally enabled for use (e.g. email, users, etc.). This is the big “domain on/off” switch.
                  
                    This setting will not be changed if you omit this keyword from your request.'
                  type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
    get:
      operationId: getDomainDetails
      tags:
        - Domains
      description: 'Get information about a specific domain. This is the same as the “Get Domain Report,” except that it returns data for 1 specific domain. {{ACL: Account: Domains - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: domainName
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: |-
            The data will be a single object with the keys and values for the domain requested, as per the “Get Domains Report” API call, above.
          
            Note that for this call, the data is returned without an enclosing array, as there is always exactly 1 object in the response.
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/DomainReport'
              example:
                    {
                      "success": 1,
                      "data": { 
                        "is_enabled": 1,
                        "is_hipaa": 0,
                        "msync_users": 5,
                        "users": 5,
                        "is_verified": 1,
                        "created": "2015-01-07 12:18:37",
                        "domain": "my-secure-domain.com",
                        "accept_mail": 1,
                        "id": 77351,
                        "secureline_users": 5,
                        "gid": 73462
                      }
                               
                    }
  '/account/{accountId}/bounce_domain':
    post:
      operationId: createCustomBounceDomain
      tags:
        - Email
      description: 'Add a new Custom Bounce Domain to the account.  The bounce domain must be a subdomain of the from domain in question, have DKIM configured already, and the DNS must already be a CNAME to any of the target domains listed in the Custom Bounce Domains user interface area. {{ACL: Account: Domains - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - domain
                - bounce_domain
              properties:
                domain:
                  description: 'Required. Email from domain name.  There must be a DKIM definition for this from domain already added to the system.'
                  type: string
                bounce_domain:
                  type: string
                  description: 'Required: Subdomain of "domain".  This will be the domain name to which bounces are sent.  This must already be CNAMED in DNS to a proper target domain name.  See the Custom Domain Names ser interface - Add Custom Bounce Domain dialog - for a list.'
      responses:
        '200':
          description: 'OK'
  '/account/{accountId}/dkim':
    post:
      operationId: createDkim
      tags:
        - Email
      description: 'Create a new DKIM configuration in your account. {{ACL: Account: Domains - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - domain
              properties:
                domain:
                  description: 'Required. Domain name that this DKIM definition should apply to. This is the “From” domain in email messages sent. A DKIM definition for this domain must not already exist in the account.'
                  type: string
                selector:
                  type: string
                  description: 'Optional: default value “dkim”. Text tag to denote messages sent using this DKIM definition (e.g., “dkim”). This must contain only letters and numbers.'
                bits:
                  description: 'Optional: default value 2048. Valid values: 1024, 2048, 4096.'
                  type: integer
            example:
                  {
                    "domain": "sample-domain.com"
                  }
      responses:
        '200':
          description: 'OK'
    get:
      operationId: getDkimReport
      tags:
        - Email
      description: 'Get information about your DKIM configurations. {{ACL: Account: Domains - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The data field of the response is an array of all DKIM definitions in your account.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/DkimReport'
  '/account/{accountId}/dkim/{domainName}':
    delete:
      operationId: deleteDkim
      tags:
        - Email
      description: 'Remove a DKIM definition from your account. {{ACL: Account: Domains - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: domainName
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }  
    get:
      operationId: getDkimDetails
      tags:
        - Email
      description: 'Get information about a specific DKIM configuration. This is the same as the “Get DKIM Report,” except that it returns data for 1 specific domain.  {{ACL: Account: Domains - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: domainName
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: |-
            The data will be a single object with the keys and values for the domain requested, as per the “Get DKIM Report” API call, above.
          
            Note that for this call, the data is returned without an enclosing array, as there is always exactly 1 object in the response'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/DkimReport'
              example:
                    {
                      "success": 1,
                      "data": {}
                    }
  '/account/{accountId}/aliases':
    post:
      operationId: createAlias
      tags:
        - EmailAliases
      description: |-
        Create new alias(es) in your account.
      
        Your API Interface looks to see how many aliases were added to your account in the past 24 hours. If this number is equal or greater than your API create limit, then your API will reject additional alias creation requests until that situation changes. See your API Interface configuration page for your alias creation limit.
        
        Note also that accounts are limited in the maximum number of email aliases permitted per domain. By default, this is 100 + 10 aliases per user in the domain. So, for a domain with 20 users, this would be 100 + 10x20 = 300 aliases. {{ACL: Account: Email Aliases - Manage}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: "The Request body contains the following settings for new email aliases. While you can add multiple aliases at once, you should not have duplicates in your list."
        content:
          application/json:
            schema:
              type: object
              properties:
                aliases:
                  description: 'Array of objects for aliases to create. Each object can have the following keywords'
                  type: array
                  items:
                    type: object
                    required:
                      - user
                      - domain
                      - action
                    properties:
                      user:
                        type: string
                        description: 'Required. The user part of the alias address. E.g. “john” in “john@sample.com”. This must be a valid user part of an email address and less than 65 characters ling.'
                      domain:
                        type: string
                        description: 'Required. The domain part of the alias addres. E.g. “sample.com”. This must be an active domain in this account.'
                      action:
                        type: string
                        description: 'Required. One of “email”, “bounce”, or “delete” to define what happens to messages to this alias: forward them via email, bounce them with a message, or delete them.'
                        enum: ["email","bounce","delete"]
                      dest:
                        type: string
                        description: 'The “destination” for actions of type “email”. This is a comma-delimited list of email addresses to whom to forward the message.'
                      bounce:
                        type: string
                        description: 'The short 50-character or less ANSI-encoded failure message to send back when the action is “bounce”'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      added:
                        type: integer
                        description: 'Number of new aliases that were created (e.g., for validation purposes).'
              example:
                    {
                      "success": 1,
                      "data": {
                        "added": 1 
                      }
                    }
    get:
      operationId: getAliasesReport
      tags:
        - EmailAliases
      description: 'Get information about your email aliases including regular aliases user forwards, domain catchalls, and WebAide Group distribution lists. {{ACL: Account: Email Aliases - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The data field of the response is an array of all aliases in your account.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Alias'
              example:
                    {
                      "success":1, 
                      "data": 
                        [
                          {
                        "bounce": null, 
                        "dest": "other@address.com", 
                        "status": "enabled",
                        "domain": "sample.com", 
                        "user": "john", 
                        "action": "email", 
                        "type": "Alias", 
                        "distribution_list_group": null,
                        "created": "2015-03-02 07:11:33"
                            
                          }
                        ]
                    }
  '/account/{accountId}/aliases/{aliasAddress}':
    put:
      operationId: updateAlias
      tags:
        - EmailAliases
      description: |-
        Modify an existing alias in your account.
      
        This function allows you to modify regular email aliases in your account. It does not permit modification of “catch all” aliases, “user forwards,” and system aliases such as WebAide Group Distribution Lists. You can use this function to enable and disable aliases; however, you must use a separate API call to actually delete them. {{ACL: Account: Email Aliases - Manage}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: aliasAddress
          in: path
          required: true
          schema:
            type: string
      requestBody:
        description: 'The Request body contains the following settings for updating an email alias.'
        content:
          application/json:
            schema:
              type: object
              required:
                - action
                - status
              properties:
                action:
                  type: string
                  description: 'Required. One of “email”, “bounce”, or “delete” to define what happens to messages to this alias: forward them via email, bounce them with a message, or delete them.'
                  enum: ["email", "bounce","delete"]
                bounce:
                  type: string
                  description: 'The short 50-character or less ANSI-encoded failure message to send back when the action is “bounce”. Required for aliases of action “bounce”.'
                dest:
                  type: string
                  description: 'The “destination” for actions of type “email”. This is a comma-delimited list of email addresses to whom to forward the message. Required for aliases of action “email”.'
                status:
                  type: string
                  description: 'Required. Must be “enabled” or “disabled”. This sets the status of the email alias.'
                  enum: ["enabled","disabled"]
      responses:
        '200':
          description: 'None'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }  
    delete:
      operationId: deleteAlias
      tags:
        - EmailAliases
      description: 'Remove an alias with the specified alias email address from your account. {{ACL: Account: Email Aliases - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: aliasAddress
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'none'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
    get:
      operationId: getAliasDetails
      tags:
        - EmailAliases
      description: 'Get information about a specific email alias. {{ACL: Account: Email Aliases - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: aliasAddress
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The data field of the response is an on object whose keywords and values correspond to those in the “Get Aliases Report”. This is the same as that function, except that it is targeted at a specific alias and thus instead of returning a list of alias detail objects, it simply returns the single alias detail object.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/Alias'
              example:
                    {
                      "success":1, 
                      "data": 
                        {
                        "bounce": null, 
                        "dest": "other@address.com", 
                        "status": "enabled",
                        "domain": "sample.com", 
                        "user": "john", 
                        "action": "email", 
                        "type": "Alias", 
                        "distribution_list_group": null,
                        "created": "2015-03-02 07:11:33"
                        }
                    }
  '/account/{accountId}/secureforms':
    get:
      operationId: getSecureFormList
      tags:
        - SecureForm
      description: 'Return a list of all SecureForm configurations currently defined in your account. {{ACL: Account: SecureForm Configuration}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The Response Body contains a “data” keyword which is an array of objects, one for each SecureForm configuration.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/SecureForm'
              example:
                    {
                      "success":1, 
                      "data": [
                        { "archive_content": "csv", 
                        "status": 1, 
                        "secure": 1, 
                        "ftp_content": null,
                        "modified": "2015-02-07 16:25:44", 
                        "mysql_encrypt": 1, 
                        "last_post": "2015-05-01 11:33:17", 
                        "notes": null,
                        "email_content": "text,pdf", 
                        "action": "email_data,mysql", 
                        "type": "pdf", 
                        "title": "My Example Form", 
                        "id": 2567981, 
                        "db_host": "mysql55.web10.luxsci.com", 
                        "db_name": "dr_office_db", 
                        "db_table": "intake_forms" 
                        }]
                    }
  '/account/{accountId}/secureforms/{formID}':
    get:
      operationId: getSecureForm
      tags:
        - SecureForm
      description: 'Returns details on a specific SecureForm configuration, based on the configuration’s unique ID.  {{ACL: Account: SecureForm Configuration}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: formID
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The Response Body contains a “data” keyword contains one object which provides details about the specified form. The keywords and values in this object are the same as those defined for the “Get SecureForm List” operation.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/SecureForm'
              example:
                    {
                      "success":1, 
                      "data": 
                        { "archive_content": "csv", 
                        "status": 1, 
                        "secure": 1, 
                        "ftp_content": null,
                        "modified": "2015-02-07 16:25:44", 
                        "mysql_encrypt": 1, 
                        "last_post": "2015-05-01 11:33:17", 
                        "notes": null,
                        "email_content": "text,pdf", 
                        "action": "email_data,mysql", 
                        "type": "pdf", 
                        "title": "My Example Form", 
                        "id": 2567981, 
                        "db_host": "mysql55.web10.luxsci.com", 
                        "db_name": "dr_office_db", 
                        "db_table": "intake_forms" 
                        }
                    }
  '/account/{accountId}/secureforms/{formID}/db':
    get:
      operationId: getSecureFormDatabasePosts
      tags:
        - SecureForm
      description: |-
        Returns details on the posts currently stored in the database table associated with a specific SecureForm configuration. This function is recommended for use when synchronizing or periodically downloading new rows to an external source: it allows you to quickly and easily see what, if any, entries are new relative to your last actions (if you saved the last index or date when you previously downloaded data).
      
        You can optionally pass one or more parameters to narrow down the scope of what rows are examined to produce the summary results. By default, all table rows are examined. All criteria passed as parameters are used; it is possible (and easy) to specify mutually exclusive parameters that result in no rows being examined (e.g. all rows with an index greater than 100 and less than 50). {{ACL: Account: SecureForm Database - Read}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: formID
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/secureform_after_date'
        - $ref: '#/components/parameters/secureform_after_index'
        - $ref: '#/components/parameters/secureform_before_date'
        - $ref: '#/components/parameters/secureform_before_index'
        - $ref: '#/components/parameters/secureform_from_date'
        - $ref: '#/components/parameters/secureform_from_index'
        - $ref: '#/components/parameters/secureform_through_date'
        - $ref: '#/components/parameters/secureform_through_index'
      responses:
        '200':
          description: 'The Response Body contains a “data” object with keywords and values.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      oldest_post:
                        type: string
                        description: 'DATETIME. Date when the oldest matching row was added (in GMT, format “YYYY-MM-DD HH:MM:SS”).'
                      newest_post:
                        type: string
                        description: 'DATETIME. Date when the newest matching row was added.'
                      number_of_entries:
                        type: integer
                        description: 'Number of matching rows.'
                      max_index:
                        type: integer
                        description: 'Index of the newest matching row.'
              example:
                    {
                      "success":1, 
                      "data": 
                        {"number_of_entries": 3,
                        "oldest_post":"2014-03-26 20:41:56",
                        "newest_post":"2014-03-26 20:45:13",
                        "max_index":13
                        }
                    }
  '/account/{accountId}/secureforms/{formID}/db/rows':
    get:
      operationId: getSecureFormDatabaseRows
      tags:
        - SecureForm
      description: |-
        This function returns the actual content of all database rows matching your query. Encrypted database fields will be automatically decrypted and the actual values of the fields returned.
      
        This API call is audited: a record will be made of the particular API Integration and IP address that “read” each matching row.
        
        You can optionally pass one or more parameters to narrow down the scope of what rows are returned. These parameters are the same as those for “Get SecureForm Database Info”. {{ACL: Account: SecureForm Database - Read}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: formID
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/secureform_after_date'
        - $ref: '#/components/parameters/secureform_after_index'
        - $ref: '#/components/parameters/secureform_before_date'
        - $ref: '#/components/parameters/secureform_before_index'
        - $ref: '#/components/parameters/secureform_from_date'
        - $ref: '#/components/parameters/secureform_from_index'
        - $ref: '#/components/parameters/secureform_through_date'
        - $ref: '#/components/parameters/secureform_through_index'
      responses:
        '200':
          description: |-
            Up to 500 rows can be returned per API call. If more rows match, only the first 500 (sorted by row index) are actually returned. The “data” body element will contain 2 items.
          
            The first is called `fields`. This is an object where the keywords are the physical database column names in use for each column of data. These keywords correspond to the keywords in the objects returned in the `rows` array. The values of these keywords are corresponding the actual field names from your form. E.g., in many cases the form field name cannot be used “as is” as a database column name and must be “sanitized”. You can use this `fields` object to map between the database column names and the original form field names.
            
            The second is called `rows`. This is an array of objects. Each object contains the data for a single matching row. The keywords are the database column names, the values are the row values for those columns. Values that were encrypted in the database are automatically decrypted and the real value is returned. If the row cannot be decrypted using the saved encryption key for this SecureForm configuration (e.g. if it was saved using some other SecureForm configuration and a different key), then the encrypted row values will all have the value of the word `ENCRYPTED`.
            
            Files are not downloaded with this function; however, information as to what files are available is included with each row of data.
            
            Separate functions are used to request individual files
            
            Explanations of common database columns shown below. {{ACL: Account: SecureForm Database - Read}}
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      fields:
                        type: object
                        additionalProperties:
                          type: string
                      rows:
                        type: array
                        items:
                          $ref: '#/components/schemas/SecureFormDbRow'
              example:
                    {
                      "success":1, 
                      "data": 
                        { "fields": {
                          "__ip_address__": "__ip_address__",
                          "__index__": "__index__",
                          "__referrer__": "__referrer__", 
                          "__posted__": "__posted__",
                          "example_field_name": "Example Field Name"
                          }, 
                          "rows": [ 
                            { "__index__": 13, 
                              "__referrer__": null,
                              "__posted__": "2015-05-15 11:15:03", 
                              "__n_files__": 1, 
                              "__files_": [ 
                                {"file_id": 179, 
                                "size": 67996, 
                                "name": "test_file.txt"
                                }], 
                              "__encrypt__": 1, 
                              "__ip_address__": "4.2.2.1", 
                              "example_field_name": "example_field_value" 
                              
                            }, 
                            { "__index__": 14, 
                            "__referrer__": null, 
                            "__posted__": "2015-05-16 12:02:43",
                            "__n_files__": 0, 
                            "__files_": [], 
                            "__encrypt__": 1, 
                            "__ip_address__": "65,43,123,41", 
                            "example_field_name":"another example value" } ] }
                    }
  '/account/{accountId}/secureforms/{formID}/db/rows/{index}':
    get:
      operationId: getSecureFormDatabaseRow
      tags:
        - SecureForm
      description: |-
        This function works the same as “Get SecureForm Database Rows”, except that you specify the row index and get back up to 1 row. This index is the `\_\_index\_\_` field for the row.
      
        This API call is audited: a record will be made of the particular API Integration and IP address that “read” each matching row.  {{ACL: Account: SecureForm Database - Read}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: formID
          in: path
          required: true
          schema:
            type: string
        - name: index
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The JSON response body is the SAME as that returned for the “Database Rows” command, except that insted of a “rows” keyword with an array of matching rows, there is a `row` keyword which holds the object data for the requested row. This will be `null` if that row was not found.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      fields:
                        type: object
                        additionalProperties:
                          type: string
                      row:
                        anyOf:
                          - $ref: '#/components/schemas/SecureFormDbRow'
                        nullable: true
              example:
                    {
                      "success":1, 
                      "data": 
                        { 
                          "fields": 
                            {
                              "__ip_address__":"__ip_address__",
                              "__index__":"__index__",
                              "__referrer__":"__referrer__", 
                              "__posted__":"__posted__",
                              "example_field_name":"Example Field Name"
                            }, 
                          "row": 
                            { 
                              "__index__": 13, 
                              "__referrer__": null,
                              "__posted__": "2015-05-15 11:15:03", 
                              "__n_files__": 1, 
                              "__files_": [ 
                                {
                                  "file_id": 179, 
                                  "size": 67996, 
                                  "name": "test_file.txt"
                                }], 
                              "__encrypt__": 1, 
                              "__ip_address__": "4.2.2.1", 
                              "example_field_name": "example_field_value" 
                            } 
                          
                        }
                    }  
    delete:
      operationId: deleteSecureFormDatabaseRow
      tags:
        - SecureForm
      description: |-
        This function allows you to delete a row from your SecureForm database, based on the row index. This function will delete the row and any associated files.
      
        This API call is audited: a record will be made of the particular API Integration and IP address that “deleted” each matching row (also implying that any associated files have been removed). {{ACL: Account: SecureForm Database - Delete}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: formID
          in: path
          required: true
          schema:
            type: string
        - name: index
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'standard simple response'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success":1 
                    }
  '/account/{accountId}/secureforms/{formID}/db/{rowIndex}/file/{fileIndex}':
    get:
      operationId: getSecureFormDatabaseFile
      tags:
        - SecureForm
      description: |-
        This function is used to retrieve a file associated with a row in your SecureForm database. You will need the row index and the file ID (which you can retrieve by reading the row data using other API calls).
      
        If the file was encrypted at rest in the database, it will be decrypted for you.
        
        This API call is audited: a record will be made of the particular API Integration and IP address that “read” each file. {{ACL: Account: SecureForm Database - Read}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: formID
          in: path
          required: true
          schema:
            type: string
        - name: rowIndex
          in: path
          required: true
          schema:
            type: string
        - name: fileIndex
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'The JSON response body has a data object'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      __encrypt__:
                        type: integer
                        description: '1 if the file was encrypted at rest, 0 otherwise.'
                        enum: [0,1]
                      file_base64:
                        type: string
                        description: 'BASE64-encoded file data. If you decode this, you will have the raw file content.'
                      name:
                        type: string
                        description: 'The file’s name.'
                      size:
                        type: number
                        description: 'Size in bytes of the raw file (un-encoded).'
                      uploaded:
                        type: string
                        description: 'DATETIME (in GMT, the usual format) when the file was uploaded/saved to the database                    '
              example:
                    {
                      "success":1, 
                      "data": 
                        {
                          "uploaded":"2015-05-12 11:49:36",
                          "__encrypt__":1,
                          "name":"test.html", 
                          "file_ base64":"PGI+dGVzdCBodG1sPC9iPg==",
                          "size":17
                        }
                    }    
    delete:
      operationId: deleteSecureFormDatabaseFile
      tags:
        - SecureForm
      description: 'This function is used to remove a file associated with a row in your SecureForm database. {{ACL: Account: SecureForm Database - Delete}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: formID
          in: path
          required: true
          schema:
            type: string
        - name: rowIndex
          in: path
          required: true
          schema:
            type: string
        - name: fileIndex
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'standard'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success":1

                    }  
  '/account/{accountId}/pl/namespaces/{namespaceId}/users/{username}':
    put:
      operationId: createOrUpdateSecureSendUser
      tags:
        - SecureSend
      description: |-
        Create a new SecureSend User in a specific NameSpace. This function also validates the user’s account so the user does not have to do anything (like checking a link in his/her email) to start using the account.
      
        If an account already exists for the specified user, then this request will merely update the user’s account, changing any data passed through. The “username” must be the email address (which is also the login) of the user to be created or updated.
      
        When updating a user, request parameters omitted will not be updated. {{ACL: Account: SecureSend Namespaces - Manage}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: namespaceId
          in: path
          required: true
          schema:
            type: string
        - name: username
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 'Real name of the user. E.g., “John Sample”. This is required for user creation and optional for user update.'
                password:
                  type: string
                  description: 'Password for this user to the SecureSend Portal. This is required for user creation and optional for user update.  The password strength restrictions imposed by your Pribate Labeling settings will be applied here.  You can optionally send the password value as a SHA512 salted hash of the form "$6$16charsalt$86-character-hash"; passwords sent in this way are not validated.'
                timezone:
                  description: 'Valid time zone code. E.g. “EST5EDT”. Optional. If omitted on user creation, a time zone of “GMT” will be used.'
                  type: string
            example:
              value: {"name": "John Sample", "timezone": "EST5EDT", "password": "slkjf656g!" }
      responses:
        '200':
          description: 'Standard simple success'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                {
                  "auth": "OMITTED",
                  "success": 1
                }
  '/account/{accountId}/pl/namespaces/{namespaceId}/users/{username}/password':
    put:
      operationId: changeSecureSendUserPassword
      tags:
        - SecureSend
      description: 'You can do this with the User Update function, above. We provide a simple, direct method here as well. {{ACL: Account: SecureSend Namespaces - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: namespaceId
          in: path
          required: true
          schema:
            type: string
        - name: username
          in: path
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - password
              properties:
                password:
                  type: string
                  description: 'Password for this user to the SecureSend Portal. The password strength restrictions imposed by your Pribate Labeling settings will be applied here.  You can optionally send the password value as a SHA512 salted hash of the form "$6$16charsalt$86-character-hash"; passwords sent in this way are not validated.'
            example: {"password": "$6$4YHeLCPhBYqyjfUR$J2ZiV1tW5oXzXaJq/o/TY/k4LELtY0l3G7YhaR3oCoe8K8I7Nd69Sqc.lLSBrPGj8EzZaBvsa5X56ausa7EY71"}
                     
      responses:
        '200':
          description: 'Standard simple success'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
              example:
                    {
                      "success": 1
                    }
    get:
      operationId: getSecureSendUserSingleSignOnLink
      tags:
        - SecureSend
      description: |-
        Create a URL that the user can click on which will automatically log the user into the SecureSend Interface without needing to enter his/her username and password. For example, if the user has already authenticated him/herself in your system, you can use this API call to get a link that can be presented to the user so the user can then access SecureSend without needing to login again (e.g. “single sign-on”).
      
        Note
        1. This API call returns a URL. You can have the user click on that URL or you can redirect him/her to it.
        2. This URL is valid for 15 minutes from the time of issuance. It can be used multiple times while it is in use.
        3. These URLs are invalidated if the user’s password is changed.
        4. These URLs will only work for someone coming from the IP address that your specified in your request for the URL.
        5. All logins via Single Sign-on are logged in the user’s History and are denoted as Single Sign-on logins therein.
        
         {{ACL: Account: SecureSend Single Sign-On}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: namespaceId
          in: path
          required: true
          schema:
            type: string
        - name: username
          in: path
          required: true
          schema:
            type: string
        - name: ip
          in: query
          schema:
            type: string
            example:  "5.33.44.1"
          description: 'The public IP address that the user is currently using. The resulting URL will only work for people accessing it from this IP.'
        - name: theme
          in: query
          schema:
            type: integer
            example: 1788906572
          description: 'The numerical Private Labeled Theme ID that this link should be generated for. You can find these IDs in your theme management area.<br><br>Not that the SecureSend NameSpace specified must be associated with this Theme, or the API will return an error.'
      responses:
        '200':
          description: 'Returns the URL'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        description: 'URL for the end user to go to so that s/he can login to SecureSend without a username or password.'
              example:
                    {
                      "success": 1,
                      "data": 
                      { 
                        "url": "https://rest.luxsci.com/perl/public/securesendpl/37/6451?login-single-signon=1-6451-1429730454-433647730c8572bd1b6e17b01c19b1174deb88823d56f737f3aba7b491cf5be&settheme=1788906572"
                      } 
                    }  
  '/account/{accountId}/pl/namespaces/{namespaceId}/users':
    get:
      operationId: getSecureSendUserList
      tags:
        - SecureSend
      description: 'Return a list of all users in this NameSpace. {{ACL: Account: SecureSend Namespaces - Manage}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: namespaceId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'This returns a list of objects.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        created:
                          type: string
                          description: 'DATETIME. When the user was created, in GMT. Format “YYYY-MM-DD HH:MM:SS”'
                        email:
                          type: string
                          description: 'Email address and login username for the user'
                        lastlogin:
                          type: string
                          description: 'DATETIME. When the user last logged into SecureSend (in any way). In GMT.. Format “YYYY-MM-DD HH:MM:SS”. If the user has never logged in, this will have the value “0000-00-00 00:00:00”.'
                        name:
                          type: string
                          description: 'User’s name'
                        status:
                          type: string
                          description: |-
                            - verified: user can login
                            - pending: user has registered but not verified his/her identity/email
                            - suspended: user account suspended
                          enum: ['verified','pending','suspended']
                        timezone:
                          type: string
                          description: 'Time zone code for this user'
              example:
                    {
                      "success": 1,
                      "data": [
                        { 
                          "email": "john@sample.com", 
                          "name": "John Sample", 
                          "timezone": "EST5EDT", 
                          "status": "verified", 
                          "created": "2015-04-22 15:34:01", 
                          "lastlogin": "2015-04-22 15:02:45" 
                        } 
                      ]
                    }  
  '/account/{accountId}/report/email/smtp/sent':
    get:
      operationId: getEmailSMTPSentReportAccount
      tags:
        - Reports
      description: 'Return a list of all email messages sent sent via SMTP by users in this account. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#sent). {{ACL: Account: View Reports}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          in: query
          description: 'Case-insensitive substring search of the message “From” email address'
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: ip
          in: query
          description: 'Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          schema:
            type: string
        - name: opt_out
          description: 'Value:<br>0 – SecureLine Opt Out not used<br>-1 – SecureLine Opt Out use not recorded for some reason<br>1 – SecureLine Opt Out'
          in: query
          schema:
            type: string
            enum: ['0', '-1', '1']
        - name: secureline
          description: 'Value:<br>any – Match anything<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine encryption was used<br>0 – SecureLine encryption was not used<br><br>If SecureLine was used, use the delivery status report to see more details.'
          in: query
          schema:
            type: string
            enum: ['any', '0', '-1', '1']
        - name: sendmail_id
          description: 'Return only the message with the specified sendmail_id.'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: spam
          description: 'Value:<br>0 – Message was not marked as spam by a recipient and returned in a Feed Back Loop<br>1 – Message was marked as spam by a recipient and returned in a Feed Back Loop'
          in: query
          schema:
            type: string
            enum: ['0','1']
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF-8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/tracked_headers'
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: user_id
          description: 'Restrict the report to the user with this specific User ID number.'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/webmail/sent':
    get:
      operationId: getEmailWebMailSentReportAccount
      tags:
        - Reports
      description: 'Return a list of all WebMail email messages sent by users in this account. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#sent). {{ACL: Account: View Reports}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          in: query
          description: 'Case-insensitive substring search of the message “From” email address'
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: ip
          in: query
          description: 'Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          schema:
            type: string
        - name: opt_out
          description: 'Value:<br>0 – SecureLine Opt Out not used<br>-1 – SecureLine Opt Out use not recorded for some reason<br>1 – SecureLine Opt Out'
          in: query
          schema:
            type: string
            enum: ['0', '-1', '1']
        - name: secureline
          description: 'Value:<br>any – Match anything<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine encryption was used<br>0 – SecureLine encryption was not used<br><br>If SecureLine was used, use the delivery status report to see more details.'
          in: query
          schema:
            type: string
            enum: ['any', '0', '-1', '1']
        - name: sendmail_id
          description: 'Return only the message with the specified sendmail_id.'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: spam
          description: 'Value:<br>0 – Message was not marked as spam by a recipient and returned in a Feed Back Loop<br>1 – Message was marked as spam by a recipient and returned in a Feed Back Loop'
          in: query
          schema:
            type: string
            enum: ['0','1']
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF-8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/tracked_headers'
        - name: user_id
          description: 'Restrict the report to the user with this specific User ID number.'
          in: query
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/smtp/delivery':
    get:
      operationId: getEmailSMTPDeliveryStatusReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to see how each SMTP message was sent to each recipient and what the delivery status is for each of these recipients. Note that delivery status changes over time as messages progress to the recipient’s servers and as bounce messages are sent back and processed. As the delivery status changes, the “last_update” date is also updated.
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#delivery).
      
        Dates, for the purposes of narrowing results, refer to the *date the row was last updated*. This corresponds to the last_update output field. This can be changed to the date the message was sent using the "sent_date" parameter or the date of the last delivery status update using the "delivery_date" parameter. {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: clicked
          description: 'Integer. If specified, the results are restricted as follows:<br>clicked < 0 – select messages where URL click tracking was not enabled.<br>clicked = 0 – select messages where URL click tracking was enabled, but where there have as yet been no clicks on any clinks in the messages.<br>clicked > 0 – select messages where URL click tracking was enabled and where there have been N or more clicks on links in the same message to the same recipient. N, in this case, is the number that you have specified as the value of the “clicked” parameter. I.e., using a value of “1” matches all messages that have had a link clicked on.'
          in: query
          schema:
            type: integer
        - name: from
          in: query
          description: 'String. Case-insensitive substring search of the message “From” email Address'
          schema:
            type: string
        - name: ip
          description: 'String. Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          description: 'Integer. If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least N times. N, in this case, is the number that you have specified as the value of the “opened” parameter. I.e., using a value of “1” matches all messages that have been opened.'
          in: query
          schema:
            type: integer
        - name: secureline
          description: 'Enum. Value:<br>u - message to this recipient did not use SecureLine (or Opt Out was used)<br>e - message did use SecureLine<br>-2 - SecureLine was not used due to Opt Out being selected<br>-1 - SecureLine usage not recorded for some reason<br>1 - SecureLine:PGP was used<br>2 - SecureLine:S/MIME was used<br>3 - SecureLine:Escrow was used<br>4 - SecureLine:TLS was used'
          in: query
          schema:
            type: string
            enum: ["u","e","-2","-1","1","2","3","4"]
        - name: sendmail_id
          description: 'String. Return only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sent_date
          description: 'If set to true (i.e., 1), the email message sent date will be used for date/time selections, instead of the date of the last update of the row.'
          in: query
          schema:
            type: integer
            enum: [0,1]      
        - name: state
          description: 'Optionally, match only messages with specific delivery states.  This is a comma-delimited list of one or more states to match.  The possible states include:<br><b>delivered</b> - Successful delivery.<br><b>perm_fail</b> - Message immediately rejected by recipient servers.<br><b>ba_hard_fail</b> - Post-delivery hard bounce.<br><b>ba_soft_fail</b> - Post-delivery soft bounce.<br><b>temp_fail</b> - Message still queued after 1+ temporary delivery failures.<br><b>queued</b> - Message queued -- includes the "temp_fail" state.<br><b>lost</b> - Message delivery status unknown.<br><b>any_hard_fail</b> -  "perm_fail" or "ba_hard_fail".<br><b>failed</b> - "perm_fail" or "ba_hard_fail" or "ba_soft_fail".<br><b>not_queued</b> - "delivered" or "lost" or any of the "failed" states.'
          in: query
          schema:
            type: string
        - name: state_detail
          description: 'Optionally, match only messages where the "state_detail" delivery status description contains the specified text (case insensitive).'
          in: query
          schema:
            type: string 
        - name: delivery_date
          description: 'If set to true (i.e., 1), the email message last delivery status updated date will be used for date/time selections, instead of the date of the last update of the row.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: spam
          description: 'Enum. Value:<br>0 – Message was not marked as spam by a recipient and returned in a Feed Back Loop.<br>1 – Message was marked as spam by a recipient and returned in a Feed Back Loop'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: unsubscribed
          description: 'Enum. Value:<br>0 – Recipient did not unsubscribe based on this email message.<br>1 – Recipeient did unsubscribe based on this email message.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: smtp_code
          in: query
          description: 'String. 1-3 characters.  Substring match to the beginning of the smtp_code field.  E.g., 5 matches all codes starting with 5.'
          schema:
            type: string 
        - name: tls
          description: 'Enum. Value:<br>0 – TLS was NOT used in the successful delivery of this message to the recipient server<br>1 – TLS was used in the successful delivery of this message to the recipient server'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - $ref: '#/components/parameters/tracked_headers' 
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: to
          in: query
          schema:
            type: string
          description: "Case-insensitive substring search of all recipient email addresses."
        - name: user_id
          in: query
          description: 'Integer. Restrict the report to the user with this specific User ID number'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/smtp/delivery_count':
    get:
      operationId: getEmailSMTPDeliveryStatusSummaryReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to retrieve a summary of the delivery status (and other statistics) across all messages in a given time range.
        See also [API Reporting Basics](/rest-api/reporting.html)  and [report header columns in the response](/rest-api/report-responses.html#delivery_count).
        Dates, for the purposes of narrowing results, refer to the *date the message delivery status was last updated*. This can be changed to the date the message was sent using the "sent_date" parameter. {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
        - name: clicked
          description: 'Integer. If specified, the results are restricted as follows:<br>clicked < 0 – select messages where URL click tracking was not enabled.<br>clicked = 0 – select messages where URL click tracking was enabled, but where there have as yet been no clicks on any clinks in the messages.<br>clicked > 0 – select messages where URL click tracking was enabled and where there have been N or more clicks on links in the same message to the same recipient. N, in this case, is the number that you have specified as the value of the “clicked” parameter. I.e., using a value of “1” matches all messages that have had a link clicked on.'
          in: query
          schema:
            type: integer
        - name: from
          in: query
          description: 'String. Case-insensitive substring search of the message “From” email Address'
          schema:
            type: string
        - name: ip
          description: 'String. Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          description: 'Integer. If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least N times. N, in this case, is the number that you have specified as the value of the “opened” parameter. I.e., using a value of “1” matches all messages that have been opened.'
          in: query
          schema:
            type: integer
        - name: secureline
          description: 'Enum. Value:<br>u – Message to this recipient did not use SecureLine (or Opt Out was used)<br>e – Message did use SecureLine<br>-2 – SecureLine was not used due to Opt Out being selected<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine:PGP was used<br>2 – SecureLine:S/MIME was used<br>3 – SecureLine:Escrow was used<br>4 – SecureLine:TLS was used'
          in: query
          schema:
            type: string
            enum: ["u","e","-2","-1","1","2","3","4"]
        - name: sent_date
          description: 'If set to true (i.e., 1), the email message sent date will be used for date/time selections, instead of the date of the last update of the delivery status.'
          in: query
          schema:
            type: integer
            enum: [0,1]      
        - name: queue_age_sec
          description: 'If provided, then the "queued" and "pct_queued" results will reflect only those messages that have been not delivered for at least this number of seconds.  I.e., use this to eliminate very recently sent messages from your analysis or how mange messages were queued and not yet delivered.'
          in: query
          schema:
            type: integer
        - name: unsubscribed
          description: 'Enum. Value: 0 – The recipient did not unsubscribe based on this email message. 1 – The recipient did unsubscribe based on this email message.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: tls
          description: 'Enum. Value:<br>0 – TLS was NOT used in the successful delivery of this message to the recipient server<br>1 – TLS was used in the successful delivery of this message to the recipient server.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - $ref: '#/components/parameters/tracked_headers' 
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: to
          in: query
          schema:
            type: string
          description: "Case-insensitive substring search of all recipient email addresses."
        - name: user_id
          in: query
          description: 'Integer. Restrict the report to the user with this specific User ID number'
          schema:
            type: integer
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/smtp/temp_fail':
    get:
      operationId: getEmailSMTPTempFailReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to download all temporary failure responses that were experienced when trying to deliver a message or messages to recipients.  These provide insight into why it may have taken longer than expected to deliver a specific email message.

        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#temp_fail).
      
        {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: sendmail_id
          description: 'String. Return temp failures only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns temporary failures for any matching messages.'
          in: query
          schema:
            type: string
        - name: to
          in: query
          schema:
            type: string
          description: "Case-insensitive substring search of all recipient email addresses."
        - name: user_id
          in: query
          description: 'Integer. Restrict the report to the user with this specific User ID number'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/webmail/delivery':
    get:
      operationId: getEmailWebMailDeliveryStatusReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to see how each Webmail message was sent to each recipient and what the delivery status is for each of these recipients. Note that delivery status changes over time as messages progress to the recipient’s servers and as bounce messages are sent back and processed. As the delivery status changes, the “last_update” date is also updated.
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#delivery).
      
        Dates, for the purposes of narrowing results, refer to the *date the message delivery status was last updated*. This corresponds to the “last_update” output field.  This can be changed to the date the message was sent using the "sent_date" parameter. {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: clicked
          description: 'Integer. If specified, the results are restricted as follows:<br>clicked < 0 – select messages where URL click tracking was not enabled.<br>clicked = 0 – select messages where URL click tracking was enabled, but where there have as yet been no clicks on any clinks in the messages.<br>clicked > 0 – select messages where URL click tracking was enabled and where there have been N or more clicks on links in the same message to the same recipient. N, in this case, is the number that you have specified as the value of the “clicked” parameter. I.e., using a value of “1” matches all messages that have had a link clicked on.'
          in: query
          schema:
            type: integer
        - name: from
          in: query
          description: 'String. Case-insensitive substring search of the message “From” email Address'
          schema:
            type: string
        - name: ip
          description: 'String. Case-insensitive substring search of the sender IP address (for SMTP reports only).'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          description: 'Integer. If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least N times. N, in this case, is the number that you have specified as the value of the “opened” parameter. I.e., using a value of “1” matches all messages that have been opened.'
          in: query
          schema:
            type: integer
        - name: secureline
          description: 'Enum. Value:<br>u – Message to this recipient did not use SecureLine (or Opt Out was used)<br>e – Message did use SecureLine<br>-2 – SecureLine was not used due to Opt Out being selected<br>-1 – SecureLine usage not recorded for some reason<br>1 – SecureLine:PGP was used<br>2 – SecureLine:S/MIME was used<br>3 – SecureLine:Escrow was used<br>4 – SecureLine:TLS was used'
          in: query
          schema:
            type: string
            enum: ["u","e","-2","-1","1","2","3","4"]
        - name: sendmail_id
          description: 'String. Return only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: sent_date
          description: 'If set to true (i.e., 1), the email message sent date will be used for date/time selections, instead of the date of the last update of the delivery status.'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: spam
          description: 'Enum. Value:<br>0 – Message was not marked as spam by a recipient and returned in a Feed Back Loop.<br>1 – Message was marked as spam by a recipient and returned in a Feed Back Loop'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - name: tls
          description: 'Enum. Value:<br>0 – TLS was NOT used in the successful delivery of this message to the recipient server<br>1 – TLS was used in the successful delivery of this message to the recipient server'
          in: query
          schema:
            type: integer
            enum: [0,1]
        - $ref: '#/components/parameters/tracked_headers' 
        - name: to
          in: query
          schema:
            type: string
          description: "Case-insensitive substring search of all recipient email addresses."
        - name: user_id
          in: query
          description: 'Integer. Restrict the report to the user with this specific User ID number'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/smtp/clicks':
    get:
      operationId: getEmailSMTPClickReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to query on the “URL click” events (or lack thereof) for email messages sent via SMTP that have email click tracking enabled. Using this command, it is possible to get a report of all individual clicks or to get reports about messages that have not yet been clicked on or for which click tracking was not enabled. See the query parameters for more detail.
      
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#click).
        
        Dates, for the purposes of narrowing results, refer to the date the message was sent. This corresponds to the “date_sent” output field. However, if you set the “click_date” input parameter to true, then the “click_date” field will be used for date selections. {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - name: clicked
          description: 'If specified, the results are restricted as follows:<br>clicked < 0 – select messages where click tracking was not enabled.<br>clicked = 0 – select messages where click tracking was enabled, but where no URLs have yet been clicked by the recipient.<br>clicked > 0 – select messages where one or more URLs have been clicked by the recipient. When “clicked” is positive, you will get one row back for each click; so,<i>you can get multiple rows per message</i>.<br><br>If a value for “clicked” is not specified, a value of “1” will be assumed.'
          in: query
          schema:
            type: integer
        - name: click_date
          description: 'If true, the ”click_date” field will be used for all date selections. If false or not specified, the sent date (“date_sent”) will be used.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled, and which have been opened at least once. '
          schema:
            type: integer
        - name: sendmail_id
          description: 'String. Return only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: status
          description: 'Values:<br><b>delivered</b> – Accepted by the recipient’s email servers and presumed delivered. If bounce processing is enabled, then this status could change later to ba_soft_fail or ba_hard_fail.<br><b>perm_fail</b> – Messages that have permanently failed to be delivered to the recipient’s servers. If bounce processing is on, this status could change shortly to ba_soft_fail, depending on the nature of the failure message.<br><b>lost</b> – Messages where the tracking was lost and it is unclear if it was delivered or lost from the queue.<br><b>queued</b> – Message is in the email server queue still waiting to be delivered to the recipient.<br><b>not_queued</b> -- all statuses except "queued". <br><b>ba_soft_fail</b> – Soft failure bounces received (when talking to the recipient’s servers or after successful delivery to the recipient’s servers).<br><b>ba_hard_fail</b> – Hard failure bounces received after successful delivery to the recipient’s servers,<br><b>any_hard_fail</b> – Results for ba_hard_fail OR perm_fail. I.e., all hard/permanent failures.'
          in: query
          schema:
            type: string
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'       
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
        - name: url
          in: query
          description: 'Substring match on the URL clicked.'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/smtp/clicks_count':
    get:
      operationId: getEmailSMTPClickSummaryReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to query the number of clicks on tracked links during the specified date period.
        *Note that if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#clicks_count).
        Dates, for the purposes of narrowing results, refer to the date the link was clicked on.  {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'       
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
        - name: url
          in: query
          description: 'Substring match on the URL clicked.'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/webmail/clicks':
    get:
      operationId: getEmailWebMailClickReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to query on the “URL click” events (or lack thereof) for Webmail email messages that have email click tracking enabled. Using this command, it is possible to get a report of all individual clicks or to get reports about messages that have not yet been clicked on or for which click tracking was not enabled. See the query parameters for more detail.
      
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#click).
        
        Dates, for the purposes of narrowing results, refer to the date the message was sent. This corresponds to the “date_sent” output field. However, if you set the “click_date” input parameter to true, then the “click_date” field will be used for date selections. {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - name: clicked
          description: 'If specified, the results are restricted as follows:<br>clicked < 0 – select messages where click tracking was not enabled.<br>clicked = 0 – select messages where click tracking was enabled, but where no URLs have yet been clicked by the recipient.<br>clicked > 0 – select messages where one or more URLs have been clicked by the recipient. When “clicked” is positive, you will get one row back for each click; so,<i>you can get multiple rows per message</i>.<br><br>If a value for “clicked” is not specified, a value of “1” will be assumed.'
          in: query
          schema:
            type: integer
        - name: click_date
          description: 'If true, the ”click_date” field will be used for all date selections. If false or not specified, the sent date (“date_sent”) will be used.'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled, and which have been opened at least once. '
          schema:
            type: integer
        - name: sendmail_id
          description: 'String. Return only the messages with the specified sendmail_id'
          in: query
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: status
          description: 'Values:<br><b>delivered</b> – Accepted by the recipient’s email servers and presumed delivered. If bounce processing is enabled, then this status could change later to ba_soft_fail or ba_hard_fail.<br><b>perm_fail</b> – Messages that have permanently failed to be delivered to the recipient’s servers. If bounce processing is on, this status could change shortly to ba_soft_fail, depending on the nature of the failure message.<br><b>lost</b> – Messages where the tracking was lost and it is unclear if it was delivered or lost from the queue.<br><b>queued</b> – Message is in the email server queue still waiting to be delivered to the recipient.<br><b>not_queued</b> -- all statuses except "queued". <br><b>ba_soft_fail</b> – Soft failure bounces received (when talking to the recipient’s servers or after successful delivery to the recipient’s servers).<br><b>ba_hard_fail</b> – Hard failure bounces received after successful delivery to the recipient’s servers,<br><b>any_hard_fail</b> – Results for ba_hard_fail OR perm_fail. I.e., all hard/permanent failures.'
          in: query
          schema:
            type: string
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'       
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
        - name: url
          in: query
          description: 'Substring match on the URL clicked.'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/smtp/opens':
    get:
      operationId: getEmailSMTPOpenReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to query on the “opened” events (or lack thereof) for email messages sent via SMTP that have email open tracking enabled. Using this command, it is possible to get a report of all individual opens for messages or to get reports about messages that have not yet been opened or for which open tracking was not enabled. See the query parameters for more detail.
      
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#open).
        
        Dates, for the purposes of narrowing results, refer to the date the message was sent. This corresponds to the “date_sent” output field. However, if you set the “open_date” input parameter to true, then the “open_date” field will be used for date selections. {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least once. When opened is positive, you will get one row back for each open; so, <i>you can get multiple rows per message</i>.<br><br>If you do not specify a value for “opened”, a value of “1” will be assumed.'
          schema:
            type: integer
            default: 1
        - name: open_date
          in: query
          description: 'If true, the ”open_date” field will be used for all date selections. If false or not specified, the sent date (“date_sent”) will be used.'
          schema:
            type: boolean
        - name: sendmail_id
          in: query
          description: 'Return only the messages with the specified sendmail_id.'
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: status
          description: 'Values:<br><b>delivered</b> – Accepted by the recipient’s email servers and presumed delivered. If bounce processing is enabled, then this status could change later to ba_soft_fail or ba_hard_fail.<br><b>perm_fail</b> – Messages that have permanently failed to be delivered to the recipient’s servers. If bounce processing is on, this status could change shortly to ba_soft_fail, depending on the nature of the failure message.<br><b>lost</b> – Messages where the tracking was lost and it is unclear if it was delivered or lost from the queue.<br><b>queued</b> – Message is in the email server queue still waiting to be delivered to the recipient.<br><b>not_queued</b> -- all statuses except "queued". <br><b>ba_soft_fail</b> – Soft failure bounces received (when talking to the recipient’s servers or after successful delivery to the recipient’s servers).<br><b>ba_hard_fail</b> – Hard failure bounces received after successful delivery to the recipient’s servers,<br><b>any_hard_fail</b> – Results for ba_hard_fail OR perm_fail. I.e., all hard/permanent failures.'
          in: query
          schema:
            type: string
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'             
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/smtp/opens_count':
    get:
      operationId: getEmailSMTPOpenSummaryReportAccount
      tags:
        - Reports
      description: |-
        This report allows returns the number of opens that happened in the selected time period. See [report header columns in the response](/rest-api/report-responses.html#opens_count).
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        Dates, for the purposes of narrowing results, refer to the date the message was opened.  {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least once. When opened is positive, you will get one row back for each open; so, <i>you can get multiple rows per message</i>.<br><br>If you do not specify a value for “opened”, a value of “1” will be assumed.'
          schema:
            type: integer
            default: 1
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'             
        - name: template_id
          description: 'Optional template ID to select results only for those messages sent using the specified template.  A value of 0 selects all.'
          in: query
          schema:
            type: integer
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse' 
  '/account/{accountId}/report/email/webmail/opens':
    get:
      operationId: getEmailWebMailOpenReportAccount
      tags:
        - Reports
      description: |-
        This report allows you to query on the “opened” events (or lack thereof) for email messages sent via Webmail that have email open tracking enabled. Using this command, it is possible to get a report of all individual opens for messages or to get reports about messages that have not yet been opened or for which open tracking was not enabled. See the query parameters for more detail.
      
        *Note: if you are using LuxSci Legacy Secure Marketing to send your email messages, then normal LuxSci click and open reporting is disabled (and you will not see click and open data in this report). The LuxSci Legacy Secure Marketing platform his its own click and open tracking and reporting system and you should look in that interface for reports.*
        
        See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#open).
        
        Dates, for the purposes of narrowing results, refer to the date the message was sent. This corresponds to the “date_sent” output field. However, if you set the “open_date” input parameter to true, then the “open_date” field will be used for date selections. {{ACL: Account: View Reports}}
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          description: 'Case-insensitive substring search of the message “From” email address'
          in: query
          schema:
            type: string
        - $ref: '#/components/parameters/header1'
        - $ref: '#/components/parameters/header1_operator'
        - $ref: '#/components/parameters/header1_value'
        - $ref: '#/components/parameters/header2'
        - $ref: '#/components/parameters/header2_operator'
        - $ref: '#/components/parameters/header2_value'
        - $ref: '#/components/parameters/header3'
        - $ref: '#/components/parameters/header3_operator'
        - $ref: '#/components/parameters/header3_value'
        - name: opened
          in: query
          description: 'If specified, the results are restricted as follows:<br>opened < 0 – select messages where open tracking was not enabled.<br>opened = 0 – select messages where open tracking was enabled, but which have not yet been opened.<br>opened > 0 – select messages where open tracking was enabled and which have been opened at least once. When opened is positive, you will get one row back for each open; so, <i>you can get multiple rows per message</i>.<br><br>If you do not specify a value for “opened”, a value of “1” will be assumed.'
          schema:
            type: integer
            default: 1
        - name: open_date
          in: query
          description: 'If true, the ”open_date” field will be used for all date selections. If false or not specified, the sent date (“date_sent”) will be used.'
          schema:
            type: boolean
        - name: sendmail_id
          in: query
          description: 'Return only the messages with the specified sendmail_id.'
          schema:
            type: string
        - name: sendmail_ids
          description: 'Comma-delimited list of up to 100 sendmail ids. Returns any matching messages.'
          in: query
          schema:
            type: string
        - name: status
          description: 'Values:<br><b>delivered</b> – Accepted by the recipient’s email servers and presumed delivered. If bounce processing is enabled, then this status could change later to ba_soft_fail or ba_hard_fail.<br><b>perm_fail</b> – Messages that have permanently failed to be delivered to the recipient’s servers. If bounce processing is on, this status could change shortly to ba_soft_fail, depending on the nature of the failure message.<br><b>lost</b> – Messages where the tracking was lost and it is unclear if it was delivered or lost from the queue.<br><b>queued</b> – Message is in the email server queue still waiting to be delivered to the recipient.<br><b>not_queued</b> -- all statuses except "queued". <br><b>ba_soft_fail</b> – Soft failure bounces received (when talking to the recipient’s servers or after successful delivery to the recipient’s servers).<br><b>ba_hard_fail</b> – Hard failure bounces received after successful delivery to the recipient’s servers,<br><b>any_hard_fail</b> – Results for ba_hard_fail OR perm_fail. I.e., all hard/permanent failures.'
          in: query
          schema:
            type: string
        - name: subject
          description: 'Case-insensitive substring search of the message subject (in UTF8).'
          in: query
          schema:
            type: string          
        - name: to
          description: 'Case-insensitive substring search of all recipient email addresses.'
          in: query
          schema:
            type: string          
        - $ref: '#/components/parameters/tracked_headers'             
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/login_fail/smtp':
    get:
      operationId: getSMTPLoginFailureReportAccount
      tags:
        - Reports
      description: 'This report allows to see all SMTP login failures, as well as sending errors that resulted from our servers explicitly rejecting your request to send an email message for one reason or another. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#smtp_login_fail). {{ACL: Account: View Reports}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: ip
          in: query
          description: 'String. Case-insensitive substring search of the message “IP Address” if the email program or device that made the connection.'
          schema:
            type: string
        - name: Reason
          in: query
          description: 'String Case-insensitive substring search of the login failure / reason data.'
          schema:
            type: string
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/report/email/fbl_count':
    get:
      operationId: getEmailFeedBackLoopsSummaryReportAccount
      tags:
        - Reports
      description: 'This report allows to see how many messages have been marked as spam.  The date of the compliant is used for date filters. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#fbl_count). {{ACL: Account: View Reports}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - $ref: '#/components/parameters/filter1'
        - $ref: '#/components/parameters/filter2'
        - $ref: '#/components/parameters/filter3'
        - name: from
          in: query
          description: 'String Case-insensitive substring search of the message “From” email address'
          schema:
            type: string
        - name: subject
          in: query
          description: 'String Case-insensitive substring search of the message subject (in UTF-8).'
          schema:
            type: string          
        - name: to
          in: query
          description: 'String. Case-insensitive substring search of all recipient email addresses.'
          schema:
            type: string          
        - name: user_id
          in: query
          description: 'Integer Restrict the report to the user with this specific User ID number.'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content. The summary header field is named compliants.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse' 
  '/account/{accountId}/report/email/fbl':
    get:
      operationId: getEmailFeedBackLoopsReportAccount
      tags:
        - Reports
      description: 'This report allows to see what messages that you have sent successfully have been “marked as spam” by recipients and this information has come back to us via one of our feedback loops. See also [API Reporting Basics](/rest-api/reporting.html) and [report header columns in the response](/rest-api/report-responses.html#fbl). {{ACL: Account: View Reports}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - $ref: '#/components/parameters/after_date'
        - $ref: '#/components/parameters/before_date'
        - $ref: '#/components/parameters/first_row'
        - $ref: '#/components/parameters/from_date'
        - $ref: '#/components/parameters/matches'
        - $ref: '#/components/parameters/through_date'
        - $ref: '#/components/parameters/destination'
        - $ref: '#/components/parameters/destination_directory'
        - $ref: '#/components/parameters/destination_hostname'
        - $ref: '#/components/parameters/destination_password'
        - $ref: '#/components/parameters/destination_username'
        - name: from
          in: query
          description: 'Case-insensitive substring search of the message “From” email address'
          schema:
            type: string
        - name: subject
          in: query
          description: 'Case-insensitive substring search of the message subject (in UTF-8).'
          schema:
            type: string          
        - name: to
          in: query
          description: 'Case-insensitive substring search of all recipient email addresses.'
          schema:
            type: string          
        - name: user_id
          in: query
          description: 'Restrict the report to the user with this specific User ID number.'
          schema:
            type: integer
      responses:
        '200':
          description: 'Report content'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    $ref: '#/components/schemas/ReportResponse'
  '/account/{accountId}/jobs':
   get:
     operationId: getAccountJobs
     tags:
       - Reports
     description: 'Return a list of all asynchronous reporting jobs submitted by this account in the past 7 days.'
     parameters:
       - name: accountId
         in: path
         required: true
         schema:
           type: string
     responses:
       '200':
         description: 'This will return a list of associated arrays each containing standard job description details.'
         content:
           application/json:
             schema:
               type: object
               properties:
                 auth:
                   type: string
                 success:
                   type: integer
                 data:
                   type: array
                   items: 
                      type: object             
                      properties:
                        job_id:
                          type: integer
                          description: 'Job ID.'
                        created:
                          type: string 
                          description: 'Date and time the job request was made.  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                        updated:
                          type: string 
                          description: 'Date and time the job status was last updated.  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                        completed:
                          type: string 
                          description: 'Date and time the job completed (for status = complete).  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                        uid:
                          type: integer 
                          description: 'User ID of the user who submitted the job.'
                        filename:
                          type: string 
                          description: 'The name of the file that the report CSV data will be saved into.'
                        expected_rows:
                          type: integer 
                          description: 'Number of rows of data in the CSV file that the job should generate.  This is available once the status has changed to running.'
                        completed_rows:
                          type: integer 
                          description: 'Number of rows of data that have been generated so far.  This, combined with expected_rows and status, enable determination of job progress.'
                        status:
                          type: string 
                          description: 'Overall job status.  One of: submitted, preparing, running, uploading, complete and failed.'
                        status_detail:
                          type: string 
                          description: 'For status = failed, this field indicates why.'
                        max_jobs:
                          type: integer 
                          description: 'Maximum number of asynchronous jobs, spawned by this customer account, that can be concurrently running.'
                        current_jobs:
                          type: integer 
                          description: 'Current number of running asynchronous jobs spawned by this customer account.'
  '/account/{accountId}/job/{job_id}':
   get:
     operationId: getAccountJob
     tags:
       - Reports
     description: 'Return the details of a specific asynchronous reporting job. If the job_id is not found, a not found API error will be emitted.'
     parameters:
       - name: accountId
         in: path
         required: true
         schema:
           type: string
       - name: job_id
         in: path
         required: true
         schema:
           type: integer
     responses:
       '200':
         description: 'This will return an associated array containing standard job description details.'
         content:
           application/json:
             schema:
               type: object
               properties:
                 auth:
                   type: string
                 success:
                   type: integer
                 data:
                   type: object
                   properties:
                     job_id:
                       type: integer
                       description: 'Job ID.'
                     created:
                       type: string 
                       description: 'Date and time the job request was made.  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                     updated:
                       type: string 
                       description: 'Date and time the job status was last updated.  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                     completed:
                       type: string 
                       description: 'Date and time the job completed (for status = complete).  Format: YYYY-MM-DD HH:MM:SS in GMT.'
                     uid:
                       type: integer 
                       description: 'User ID of the user who submitted the job.'
                     filename:
                       type: string 
                       description: 'The name of the file that the report CSV data will be saved into.'
                     expected_rows:
                       type: integer 
                       description: 'Number of rows of data in the CSV file that the job should generate.  This is available once the status has changed to running.'
                     completed_rows:
                       type: integer
                       description: 'Number of rows of data that have been generated so far.  This, combined with expected_rows and status, enable determination of job progress.'
                     status:
                       type: string 
                       description: 'Overall job status.  One of: submitted, preparing, running, uploading, complete and failed.'
                     status_detail:
                       type: string 
                       description: 'For status = failed, this field indicates why.'
                     max_jobs:
                       type: integer 
                       description: 'Maximum number of asynchronous jobs, spawned by this customer account, that can be concurrently running.'
                     current_jobs:
                       type: integer 
                       description: 'Current number of running asynchronous jobs spawned by this customer account.'
  '/account/{accountId}/servers':
    get:
      operationId: getServers
      tags:
        - Servers
      description: 'This report allows you to retrieve general information about all of the dedicated servers associated with your account. {{ACL: Account: Servers - Report}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
      responses:
        '200':
          description: 'List of servers. The data field in the JSON response is a list of hashes, one for every server. This list will be empty if your account does not have any dedicated servers.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/Server'
              example:
                    {
                      "success": 1,
                      "data": []
                    } 
  '/account/{accountId}/server/{serverId}':
    get:
      operationId: getServerStatus
      tags:
        - Servers
      description: 'This report allows you to retrieve specific current status of a specific server. This request will actually directly interrogate the server for some of this information; in situations where the server is overloaded or down or very slow, *this API will fail.*  {{ACL: Account: Servers - Report}}'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: serverId
          in: path
          required: true
          schema:
            type: string
          description: 'Should be the numeric server_id returned by the Server List API call, above. However, it can also be the short host name. I.e., if server with host rs999 has a server_id of 197890 then you can use either 197890 or 999 as the server_id.'
      responses:
        '200':
          description: 'Server information. The data field in the JSON response has all of the keywords defined in the “Server List” command, above, as well as additional keywords.'
          content:
            application/json:
              schema:
                type: object
                properties:
                  auth:
                    type: string
                  success:
                    type: integer
                  data:
                    allOf:
                    - $ref: '#/components/schemas/Server'
                    - type: object
                      properties:
                        cpu_pct_load_1:
                          type: integer
                          description: 'Percentage CPU utilization per core over the past 1 minute. This is derived from the Linux “uptime” command and is computed as the “(1-minute load average) * 100% / (CPU Cores)”'
                        cpu_pct_load_5:
                          type: integer
                          description: 'Percentage CPU utilization per core over the past 5 minutes.'
                        cpu_pct_load_10:
                          type: integer
                          description: 'Percentage CPU utilization per core over the past 15 minutes.'
                        seconds_since_reboot:
                          type: integer
                          description: 'Number of seconds since the server was last rebooted. This is derived from the “uptime” Linux command.'
                        ram_free_mb:
                          type: string
                          description: 'Megabyes of RAM still available for use. This does not include swap space but does include used cache and buffer space.'
                        ram_pct_used:
                          type: integer
                          description: 'Percentage of the RAM that is used, based on ram_free_mb and ram_gb'
                        swap_mb:
                          type: integer
                          description: 'MB of SWAP space that the server has'
                        swap_free_mb:
                          type: integer
                          description: 'MB of SWAP space that is not used.'
                        swap_pct_used:
                          type: integer
                          description: 'Percentage of the SWAP space that is in use.'
                        bw_in_mb:
                          type: number
                          description: 'MB of inbound bandwidth, across all protocols, recorded over the most recent 15-minute interval.'
                        bw_out_mb:
                          type: number
                          description: 'MB of outbound bandwidth, across all protocols, recorded over the most recent 15-minute interval.'
                        bw_in_rate_mbps:
                          type: number
                          description: 'Megabytes/second of average sustained inbound bandwidth observed over the most recent 15-minute interval.'
                        Bw_out_rate_mbps:
                          type: number
                          description: 'Megabytes/second of average sustained outbound bandwidth observed over the most recent 15-minute interval.'
                        mail_queue_processing_paused:
                          type: integer
                          description: 'Values 1 or 0.  When 1, processing of additional messages (the ones indicated in the mail_queue_unprocessed parameter is suspended.  This does not impact messages that have been processed and are merely trying to be delivered.'
                        mail_queue_trying:
                          type: integer
                          description: 'Number of email messages that are in the email queues waiting to be delivered to their ultimate recipients. This includes messages that have tried and failed to be delivered due to temporary failures or blocks.'
                        mail_queue_unprocessed:
                          type: integer
                          description: 'Number of email messages that have been received, but which are waiting to be processed (i.e., for encryption or other activities) before being re-queued for delivery to their ultimate recipients. Note: if you have delivery rate limiting on, messages that are not being processed and delivered due to IP Warmup Rate Limiting will show as unprocessed.'
                        mail_queue_warmup_on:
                          type: integer
                          description: 'Values 1 or 0.  When 1, automatic progression of the email processing rate limit is enabled based on sending volume.  When 0, the mail_queue_warmup_rate_hr not automatically change.'
                        mail_queue_warmup_rate_hr:
                          type: integer
                          description: 'Integer value -1 or 20+.  This is the maximum number of messages that will be processed for delivery per hour for IP Warmup reasons.  This value is divided into parts which determine the actual per-5-minute processing rate.   A value of -1 indicates that the processing rate is not limited.'
                        disks:
                          type: array
                          items:
                            type: string
                          description: |-
                            Array This is an array of hashes, one for each mount point on the server. The hashes for each mount point include the following keywords:
                            - mount – the name of the mount point
                            - size_mb – the size of the disk in MB 
                            - used_mb – the space used in MB
                            - io_used_pct – the disk IO utilization percentage. When this is high, processes that read and write to the drive will be slower.
              example:
                    {
                      "success": 1,
                      "data": 
                        { 
                        } 
                      
                    }
  '/account/{accountId}/server/{serverId}/sending_rate':
    post:
      operationId: setServerSendngRate
      tags:
        - Servers
      description: 'This command allows you to update the email processing rate limits for this server.  These rate limits govern the rate at which messages are processed and delivered to the queues for delivery to recipients, for IP Warmup purposes.  These settings to not impact messages already processed trying to be delivered to recipients.'
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: serverId
          in: path
          required: true
          schema:
            type: string
          description: 'Should be the numeric server_id returned by the Server List API call, above. However, it can also be the short host name. I.e., if server with host rs999 has a server_id of 197890 then you can use either 197890 or 999 as the server_id.'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
                - mail_queue_processing_paused
                - mail_queue_warmup_on
                - mail_queue_warmup_rate_hr
              properties:
                mail_queue_processing_paused:
                  type: integer
                  description: 'Values 1 or 0.  When 1, processing of additional messages (the ones indicated in the mail_queue_unprocessed parameter is suspended.  This does not impact messages that have been processed and are merely trying to be delivered.'
                mail_queue_warmup_on:
                  type: integer
                  description: 'Values 1 or 0.  When 1, automatic progression of the email processing rate limit is enabled based on sending volume.  When 0, the mail_queue_warmup_rate_hr not automatically change.'
                mail_queue_warmup_rate_hr:
                  type: integer
                  description: 'Integer value -1 or 20+.  This is the maximum number of messages that will be processed for delivery per hour for IP Warmup reasons.  This value is divided into parts which determine the actual per-5-minute processing rate.   A value of -1 indicates that the processing rate is not limited.'
      responses:
        '200':
          description: 'Simple success response.'
  '/account/{accountId}/server/{serverId}/sending_queues':
    delete:
      operationId: serverEmptyEmailQueues
      tags:
        - Servers
      description: 'This command allows you to remove all email messages that are queued and trying to be delivered to recipients.  These are the mail_queue_trying messages returned by the server status call.  Messages that have not yet been processed are not deleted. '
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: serverId
          in: path
          required: true
          schema:
            type: string
          description: 'Should be the numeric server_id returned by the Server List API call, above. However, it can also be the short host name. I.e., if server with host rs999 has a server_id of 197890 then you can use either 197890 or 999 as the server_id.'
      responses:
        '200':
          description: 'Simple success response.'
  '/account/{accountId}/server/{serverId}/sending_queues/all':
    delete:
      operationId: serverEmptyAllEmailQueues
      tags:
        - Servers
      description: 'This command allows you to remove all email messages that are queued.  These are the mail_queue_trying and mail_queue_unprocessed messages returned by the server status call.  Messages that have not yet been processed will be deleted by this call. '
      parameters:
        - name: accountId
          in: path
          required: true
          schema:
            type: string
        - name: serverId
          in: path
          required: true
          schema:
            type: string
          description: 'Should be the numeric server_id returned by the Server List API call, above. However, it can also be the short host name. I.e., if server with host rs999 has a server_id of 197890 then you can use either 197890 or 999 as the server_id.'
      responses:
        '200':
          description: 'Simple success response.'
tags:
  - name: Authentication
  - name: Users
  - name: UserReports
  - name: Email
  - name: EmailSending
  - name: WebAide
    description: WebAide requests include all those related to API-enabled WebAides. 

      Note that in order to issue API commands that access a particular kind of WebAide (e.g. Calendars), your API Interface must he enabled to access that type of WebAide in the API Interface access control area. E.g. your API Interface could be configured so it can only access Calendars and not Tasks or any of the others. Similarly, it could have only Read access to specific types of WebAides.
  - name: Domains
  - name: EmailAliases
  - name: SecureForm
    description: 'Customers with SecureForm services can use these functions to manage their forms and to access form data posted and saved in a database by the SecureForm system.'
  - name: SecureSend
    description: |-
      Customers with Private Labeling and SecureLine may choose to setup NameSpace(s) to associate with their Private Labeled themes. These NameSpaces segregate the SecureSend users of these themes from the SecureSend users of other themes and of other LuxSci customers. These functions allow you to manage the users in a particular SecureSend NameSpace in your account.
    
      You need your 'namespace id' number to use these functions. This can be found in the 'SecureSend User NameSpaces' page accessible in your Private Labeling configuration area. These API functions only permit you to manage users in NameSpaces in your account.
  - name: Reports
  - name: Servers
    description: 'For customers with one or more dedicated servers, there are a number of API commands that are useful for querying the state of these servers.'
  - name: Marketing
components:
  securitySchemes:
    LuxSciSecureAccount:
      type: apiKey
      description: >
        Custom "LuxSci Secure" authentication used for account-scope API Integrations, including user-level calls made using such integrations.
        The value of the "Signature" cookie must contain the custom signed value documented in the API guide.
      in: cookie
      name: Signature
    LuxSciSecureUser:
      type: apiKey
      description: >
        Custom "LuxSci Secure" authentication used for for user-scope API Integrations.
        The value of the "Signature" cookie must contain the custom signed value documented in the API guide.
      in: cookie
      name: Signature
    OAuth2Account:
      type: oauth2
      flows:
        clientCredentials:
          tokenUrl: https://rest.luxsci.com/perl/api/v2/oauth
          scopes:
            read: Read access
            write: Write access
      description: >
        OAuth 2.0 Client Credential Flow (CCF) used for account-scope API Integrations, including user-level calls made using such integrations.  
        The OAUth Client ID and Client Secret are the API Integration "Public Token" and "Secret Key", respectively.

        Note, the tokenUrl references rest.luxsci.com, the default API domain.  Some customers, particularly those with dedicated API servers or who are deployed
        specific regions, may require a different host name.  See your API Integration settings for the host name to use.
    OAuth2Uer:
      type: oauth2
      flows:
        password:
          tokenUrl: https://rest.luxsci.com/perl/api/v2/oauth
          scopes:
            read: Read access
            write: Write access
      description: >
        OAuth 2.0 Client Credential Flow used for user-scope API Integrations.  Te username and password for the user in question
        must be included in this Resource Owner Password Credentials (ROPC) request body.
        The OAUth Client ID and Client Secret are the API Integration "Public Token" and "Secret Key", respectively.

        Note, the tokenUrl references rest.luxsci.com, the default API domain.  Some customers, particularly those with dedicated API servers or who are deployed
        specific regions, may require a different host name.  See your API Integration settings for the host name to use.
    ApiKeyAccount:
      type: apiKey
      description: >
        Standard "API Key" authentication used for account-scope API Integrations, including user-level calls made using such integrations.
        The value of the "X-API-Key" HTTP header must be the value "TOKEN:SECRET" (without the quotes).
        TOKEN and SECRET are the API Integration "Public Token" and "Secret Key", respectively.  

        If TOKEN was "abc" and SECRET was "123, then the HTTP Header would simply be: "X-API-Key: abc:123".
      in: header
      name: X-API-Key
    ApiKeyUser:
      type: apiKey
      description: >
        Standard "API Key" authentication used for for user-scope API Integrations.
        The value of the "X-API-Key" HTTP header must be the value "TOKEN:SECRET:USERNAME:BASE64(PASSWORD)" (without the quotes).
        TOKEN and SECRET are the API Integration "Public Token" and "Secret Key", respectively.
        USERNAME is the login username (in lower case) of the user in questions. BASE64(PASSWORD) is the password for this user
        encoded in Base64

        If TOKEN was "abc", SECRET was "123, the USERNAME is 'user@domain.com' and that user's password is 'password!:123' (of course it's not!), 
        then the HTTP Header would simply be: "X-API-Key: abc:123:user@domain.com:cGFzc3dvcmQhOjEyMw==".
      in: header
      name: X-API-Key
    BasicAccount:
      type: http
      scheme: basic
      description: >
        Standard HTTP "Basic" authentication used for account-scope API Integrations, including user-level calls made using such integrations.
        The value of the "Authorization" HTTP header must be the value "Basic BASE64(TOKEN:SERET)" (without the quotes).
        TOKEN and SECRET are the API Integration "Public Token" and "Secret Key", respectively, and the combination is Base64-encoded.

        If TOKEN was "abc" and SECRET was "123, then the HTTP Header would simply be: "Authorization: Basic YWJjOjEyMw==".
    BasicUser:
      type: http
      scheme: basic
      description: >
        Non-standard HTTP "Basic" authentication used for for user-scope API Integrations.
        The value of the "Authorization" HTTP header must be the value "Basic BASE64(TOKEN:SECRET:USERNAME:PASSWORD)" (without the quotes).
        TOKEN and SECRET are the API Integration "Public Token" and "Secret Key", respectively.
        USERNAME is the login username (in lower case) of the user in questions. PASSWORD is the password for this user. The combination are encoded
        in Base64.  Note that if you enter "TOKEN:SECRET" as the "Username" and "USERNAME:PASSWORD" as the "Password" in an API client tool using this 
        authentcation mechanism, then it should work correctly, as the client will concatenate those into "TOKEN:SECRET:USERNAME:PASSWORD" and then encode.

        If TOKEN was "abc", SECRET was "123, the USERNAME is 'user@domain.com' and that user's password is 'password!:123' (of course it's not! and yes, this does work with passwords that contain a colon.), 
        then the HTTP Header would simply be: "Authorization: Basic YWJjOjEyMzp1c2VyQGRvbWFpbi5jb206cGFzc3dvcmQhOjEyMw==".
  schemas:
    SM3CSVResponse:
      type: object
      properties:
        first:
          type: integer
          description: 'The index of the first row that was returned. E.g. this should match the “first_row” parameter specified in the request.'
        header:
          type: array
          items:
            type: string
          description: 'Array that includes the column headings for all of the matches returned.'
        matches_returned:
          type: integer
          description: 'The number of matching rows returned in the “rows” array.'
        matches_total:
          type: integer
          description: 'The number of rows matching your request. Note that this can be larger than the number of rows returned.'
        rows:
          type: array
          description: 'Array of data for all matches returned. This array contains one element for each returned match. Each element is itself an array. Each field in the match arrays corresponds to the respective field in the “header” array. E.g. if the 1st element in the “header” array is “user_id”, then the 1st element in a match data array will be the integer user ID number, etc.'
          items:
            type: array
            items:
              anyOf:
                - type: integer
                - type: string
        job_id:
           type: integer
           description: 'For asynchronous report requests only, this is the ID of the background job generated.'
        filename:
           type: string
           description: 'For asynchronous report requests only, this is the name of the file that will be uploaded.'
        max_jobs:
           type: integer
           description: 'For asynchronous report requests only, this is the maximum number of asynchronous jobs that can be running concurrently for the customer account.'
        current_jobs:
           type: integer
           description: 'For asynchronous report requests only, this is the current number of running asynchronous jobs for the customer account.  This number will always be at least 1, as it includes the new job requested by this API call itself.'  
    SM3_List_Base:
      type: object
      properties:
        list_id:
          type: integer
          description: 'List ID.'
        name:
          type: string 
          description: 'List Name'
        from_name:
          type: string 
          description: 'From name for messages sent using this list'
        from_email:
          type: string 
          description: 'From email for messages sent using this list'
        reply_email:
          type: string 
          description: 'Reply-To email for messages sent using this list'
        user_id:
          type: integer 
          description: 'ID of the user who owns this list'
        list_group_id:
          type: integer 
          description: 'ID of the group in which this list resides'
        total_subscribers:
          type: integer 
          description: 'Number of subscribers in the list'
        created:
          type: string
          description: 'DATETIME When the list was created, in GMT. Format "YYYY-MM-DD HH:MM:SS".'
        updated:
          type: string
          description: 'DATETIME When the list was updated, in GMT. Format "YYYY-MM-DD HH:MM:SS".'
    SM3_List:
      allOf:
        - $ref: '#/components/schemas/SM3_List_Base'
        - type: object
          properties:
            fields:
              type: string
              description: 'Comma separated string of field code names.
                          The field name response is reserved, so do not use that!
                          This can be undefined/null if there are none.'
    SM3_List_Body:
      type: object
      required:
        - name
        - from_name
        - from_email
        - reply_email
      properties:
        name:
          type: string
          description: 'List Name'
        from_name:
          type: string
          description: 'From name for messages sent using this list'
        from_email:
          type: string
          description: 'From email for messages sent using this list'
        reply_email:
          type: string
          description: 'Reply-To email for messages sent using this list'
        list_group_id:
          type: integer 
          description: 'ID of the group in which this list resides. A missing value or a value of 0 means Unassigned.' 
        fields:
          type: string
          description: 'Assign additional fields to this list. The field name “response” is reserved, so don’t use that!
                  
          Add the custom fields assigned to a contact list. The format is a comma-delimited list of field code names. I.e., “income_level,gender”.  These field names must already be defined in the user interface.
                  
          The format for custom fields is always in all lower case and you should replace spaces with underscore characters.'
    SM3_Contact_PUT_Body:
      type: object
      required:
        - email
      properties:
        email:
          type: string
          description: 'Contact E-mail address'
        is_active:
          type: integer
          description: '0 = inactive, 1 = active'
          default: 1
        format:
          type: string
          description: 'E-mail format.  html|text|both'
          default: 'html'
        xxxx:
          type: string
          description: 'xxxx represents any custom field name [using the code_word] associated with the containing list.  For example, things like last_name, first_name, etc. The field “response” is reserved. For any date-based custom fields, the format needs to be "ISO 8601" which is: YYYY-MM-DD.'
      additionalProperties:
          type: string
          description: 'Custom Fields'
          example: 'first_name,last_name'
    SM3_Contact_POST_Body:
      type: object
      required:
        - email
        - list_id
      properties:
        email:
          type: string
          description: 'Contact E-mail address'
        list_id:
          type: integer 
          description: 'List ID this contact belongs to'
        is_active:
          type: integer
          description: '0 = inactive, 1 = active'
          default: 1
        format:
          type: string
          description: 'E-mail format.  html|text|both'
          default: 'html'
        xxxx:
          type: string
          description: 'xxxx represents any custom field name [using the code_word] associated with the containing list.  For example, things like last_name, first_name, etc. The field “response” is reserved. For any date-based custom fields, the format needs to be "ISO 8601" which is: YYYY-MM-DD.'
      additionalProperties:
          type: string
          description: 'Custom Fields'
          example: 'first_name,last_name'
    SM3_Campaign_POST_Body:
      type: object
      required:
        - title
        - template_id
        - send_at
      properties:
        title:
          type: string
          description: 'Title of this campaign.'
        type:
          type: string
          description: "Contact source type for the Campaign.  Must be 'list' or 'segment'.  If omitted, a value of 'list' is assumed."
        list_ids:
          type: string
          description: "Comma separated list of List ID's to include in this campaign.  Must be provided when 'type' is 'list'."
        segment_ids:
          type: string
          description: "Comma separated list of Segment ID's to include in this campaign. Must be provided when 'type' is 'segment'."
        template_id:
          type: integer
          description: 'Template ID to use for this campaign.'
        hourly_rate_limit:
          type: integer
          description: 'Maximum number of messages to send per hour. 0 means no limit.'
          default: 0
        queue_priority:
          type: integer
          description: 'Queue priority from 0 to 9.  9 is highest priority. 4 is the default priority.'
          default: 0
        deduplicate:
          type: integer
          description: 'For multiple Lists o Segments with overlapping e-mail addresses, only send one copy to each unique email address. Defaults to 0.'
          default: 0
        send_at:
          type: string
          description: 'DATETIME for when this campaign should begin sending.'
    SM3_Campaign_PUT_Body:
      type: object
      required:
        - title
        - template_id
        - send_at
      properties:
        title:
          type: string
          description: 'Title of this campaign'
        type:
          type: string
          description: "Contact source type for the Campaign.  Must be 'list' or 'segment' or 'trigger'.  If omitted, a value of 'list' is assumed."
        list_ids:
          type: string
          description: "Comma separated list of List ID's to include in this campaign.  Must be provided when 'type' is 'list'."
        segment_ids:
          type: string
          description: "Comma separated list of Segment ID's to include in this campaign. Must be provided when 'type' is 'segment'."
        template_id:
          type: integer
          description: 'Template ID to use for this campaign.'
        hourly_rate_limit:
          type: integer
          description: 'Maximum number of messages to send per hour. 0 means no limit.'
          default: 0
        queue_priority:
          type: integer
          description: 'Queue priority from 0 to 9.  9 is highest priority. 4 is the default.'
          default: 0
        deduplicate:
          type: integer
          description: 'For multiple lists with overlapping e-mail addresses, only send one copy. Defaults to 0.'
          default: 0
        send_at:
          type: string
          description: 'DATETIME for when this campaign should begin sending. This is ignored for Trigger Campaigns.'
    SM3_Contact:
      type: object
      required:
        - email
        - list_id
      properties:
        contact_id:
          type: integer
          description: 'Contact ID.'
        email:
          type: string 
          description: 'Contact E-mail address'
        domain:
          type: string 
          description: 'Domain of E-mail address'
        is_active:
          type: integer 
          description: '0 = inactive, 1 = active'
        format:
          type: string 
          description: 'E-mail format.  html|text|both'
        list_id:
          type: integer 
          description: 'List ID this contact belongs to'
        user_id:
          type: integer 
          description: 'ID of the user who owns this list'
        added_via:
          type: string 
          description: 'manual|import|webform|api'
        created:
          type: string
          description: 'DATETIME When the list was created, in GMT. Format "YYYY-MM-DD HH:MM:SS".'
        updated:
          type: string
          description: 'DATETIME When the list was updated, in GMT. Format "YYYY-MM-DD HH:MM:SS".'   
        xxxx:
          type: string
          description: 'xxxx represents any custom field name [using the code_word] associated with the containing list.  For example, things like last_name, first_name, etc. The field “response” is reserved. For any date-based custom fields, the format needs to be "ISO 8601" which is: YYYY-MM-DD.'
      additionalProperties:
          type: string
          description: 'Custom Fields'   
    SM3_Campaign:
      type: object
      required:
        - campaign_id
      properties:
        api_id:         
          type: string
          description: 'The Id of the api being used.'
        campaign_id:
          type: integer
          description: 'Unique ID for the Campaign.'
        created:         
          type: string
          description: 'When the camppaign was created.'
        deduplicate:    
          type: integer
          description: 'If true, avoid sending multiple messages to the same contact.'
        hourly_rate_limit:
          type: integer
          description: 'Maximum number of emails to send per hour.'
        last_send_block_size:
          type: integer
          description: 'How many contacts were sent in the last batch.'
        last_send_date:                
          type: string                    
          description: 'Datetime of the last sent message.'
        type:       
          type: string
          description: 'The contact source type code for this Campaign.  E.g., list or segment.'
        list_ids:       
          type: string
          description: 'Comma separated list of List IDs attached to this campaign.'
        segment_ids:       
          type: string
          description: 'Comma separated list of Segment IDs attached to this campaign.'
        modified:        
          type: string
          description: 'When the campaign was last modified.'
        n_clicked_total:
          type: integer
          description: 'Total Number of opened messages recieving a click.'
        n_clicked_unique:
          type: integer
          description: 'Number of unique opened messages recieving a click.'
        n_delivered:      
          type: integer
          description: 'Number of messages that have been successfully delivered.'
        n_hard_bounce:       
          type: integer
          description: 'Number of messages that experienced a hard bounce.'
        n_lost:                        
          type: integer                   
          description: 'Number of messages that have been lost.'
        n_opened_total: 
          type: integer
          description: 'Total Number of messages that have been opened.'
        n_opened_unique: 
          type: integer
          description: 'Number of unique messages that have been opened.'
        n_queued:       
          type: integer
          description: 'Number of messages that have been queued for delivery.'
        n_sent:          
          type: integer
          description: 'Number of messages that have been sent.'
        n_soft_bounce:    
          type: integer
          description: 'Number of messages that experienced a soft bounce.'
        n_spam:              
          type: integer
          description: 'Number of messages marked as spam.'
        n_staged:                
          type: integer
          description: 'Number of messages that have been staged for delivery.'
        n_suppressed:
          type: integer
          description: 'Number of email addresses that have been suppressed.'
        queue_priority:
          type: integer
          description: 'Priority relative to other concurrent campaigns.'
        retries:
          type: integer
          description: 'Total number of retries attempted on this campaign.'
        retry_after_date:
          type: string
          description: 'Datetime when the next retry will be attempted.'
        seconds_to_last_fail:
          type: integer
          description: 'Seconds from start to the last time a message delivery failed.'
        seconds_to_last_success:       
          type: integer                   
          description: 'Seconds from start to the last successful delivery.'
        seconds_to_send:
          type: integer
          description: 'Seconds to send all messages.'
        seconds_to_stage:
          type: integer
          description: 'Seconds to stage all messages.'
        send_at:  
          type: string
          description: 'Datetime when campaign starts.'
        send_started_at:
          type: string
          description: 'Datetime when campaign actually started.'
        stats_last_updated:  
          type: string
          description: 'Datetime when statistics were last updated.'
        status:                        
          type: string                    
          description: 'Current campaign status.  ["scheduled","paused","staging","sending","queued","complete","running","failed"]'
        status_detail:  
          type: string
          description: 'Current campaign status detail.'
        status_prepause: 
          type: string
          description: 'Status of the call before it was paused.'
        template_id:    
          type: integer
          description: 'Unique ID for template assigned to this campaign.'
        title:           
          type: string
          description: 'Human readable title of the campaign.'
        trigger_id:   
          type: string
          description: 'Trigger id if applicable'
        user_id:                     
          type: integer                    
          description: 'User Id of user who created this campaign.'
        underlying_data_updated:
          type: string
          description: 'Datetime when underlying data was last updated.'
    ContentLibraryMeta:
      type: object
      properties:
        mime-type:
          type: string
          description: 'This will always be "application/directory" for directories.  For files it is the approproate mime-type for that file.'
        name:
          type: string
          description: 'The end name of the file or directory.  E.g., for directory "/files/media/", this will be "media".  For the top-level directory, the name will be "root".  For "/files/media/image.jpg" it will be "image.jpg".'
        path:
          type: string
          description: 'The full path of the object. E.g., "/files/media/" for a directory or "/files/media/image.jpg" for a file.'
        last-modified:
          type: integer
          description: 'Time this item was last modified.  This is given in UNIX epoch seconds times 1000 (epoch milliseconds).'
        size:
          type: integer
          description: 'For directories, this is always 0.  For files, this is file size in bytes.'
        permissions:
          type: string
          description: 'This will be "rw" as the Content Library API does not interact with shared files and directories.'
        item-count:
          type: integer
          description: 'The number of items directly in this directory: files + subdirectories.  This does not include the counts of items in subdirectories.'
        thumbnail:
          type: string
          description: 'For images, this is a public URL to a thumbnail version of this image.'
        public-url:
          type: string
          description: 'For files, this is the public URL by which the file can be downloaded.'
    Message:
      type: object
      description: 'If you are sending a single message through this API call, you can include the message data object as the value of the “message” parameter.'
      required:
        - body
        - subject
      properties:
        attachments:
          type: array
          description: |-
            Optional. If included, this is an array of JSON objects, one for each uploaded file. See the General API Usage Guide for how to upload files with your request. The individual JSON objects will have the following keywords and values
            - name - Required. The exact filename of the uploaded file
            - hash - Required. The SHA256 hex-encoded hash of the content of this file.
            - method - Optional. For calendar (i.e., iCal) attachments you can specify a "method" parameter that will be added to the Content-Type email attachment header.  The value can be any of "REQUEST", "REPLY", or "CANCEL". 
          items:
            type: object
        bcc:
          type: array
          description: 'Optional. Array of email addresses for the recipients in the “Bcc” of the message.'
          items:
            type: string
        body:
          type: string
          description: |-
            Required. The body content of this message. This can be either a block of plain text (\n or \r\n – UNIX or Windows style linefeeds are recommended) or a block of HTML content.
          
            For best results, HTML content should NOT be a completed HTML Document, but what you would put inside <body> … </body> tags. If you need to include a complete, arbitrary HTML document, we recommend uploading that as an attached file.

            See the “body_type” parameter.
        body_text:
          type: string
          description: |-
            Optional. Only used when body_type=”html”.
          
            If supplied, this plain text content will be used as the “alternative” message content for the HTML message body provided in “body”.
            
            I.e., for people with HTML email content viewing disabled in their email or WebMail interfaces, this plain text version of your content will be displayed instead.
            
            If omitted, a plain text alternate version of your HTML message content will not be included in your message.
        body_type:
          type: string
          description: Optional. If included, this must be “text” or “html”. If omitted, it takes on the value “text”. The body_type parameter indicates what content is being passed in the “body” field.
        cc:
          type: array
          description: 'Optional. Array of email addresses for the recipients in the “Cc” of the message.'
          items:
            type: string
        from_address:
          description: |-
            Optional. Email address to use as the “From address” for this message. If omitted, the sending user’s login email address will be used.
          
            Note that it is against the terms of service to use an address here that does not belong to you or for which you do not otherwise have permission to send from.
          type: string
        from_name:
          type: string
          description: |-
            Optional. The plain text name of the sender. If omitted, the sending user’s “contact” name (from his/her profile) will be used. If that is empty, then the “from_address” will be used.
            
            The from name can be a maximum of 100 characters long.
        headers:
          type: array
          description: |-
            Optional. If included, the value must be an array specifying data for up to 10 custom headers that will be added to the outbound email message. This is usually used in combination with the custom header tracking and reporting features of LuxSci outbound emailing. E.g., you can set headers here that will be tracked (if you have enabled tracking of them in your outbound email settings in the LuxSci web site), and which can be used for reporting.
            
            Each element of the headers array must itself be an array of two elements. The 1st element is the custom header name; the 2nd element is the custom header value. Some of the basic validation restrictions include:
            - You cannot override standard email headers (like To, Subject, Date, etc.) using custom headers. 
            - Header names cannot contain spaces, tabs, linefeeds, or colons
            - Header values cannot contain tabs or linefeeds and must be non-empty.
            - Each added header line must be less than 997 characters in length
            - The total length of add added header lines must be less than 5000 characters in length.'
          items:
            type: array
            items:
              type: string
        priority:
          type: integer
          description: |-
            Optional. Valid values are integers from 0 to 9.  This setting sets the relative queue priority of the message in the system.  Higher-priority messages can be processed and delivered before lower priority messages that may already have been sent and queued for processing and delivery.  This setting is useful when sending large numbers of messages of differing priorities at roughly the same time.  0 is the lowest priority. 9 is the highest prority. 4 is the default priority.  Note that the default priority can be changed on a per-API-configuration basis in the API configuration user interface. 
        receipt:
          type: integer
          description: |-
            Optional. If set to “1”, a read receipt will be requested.
          
            For SecureLine Escrow, these read receipts will always be sent back on the 1st time the message is viewed by each recipient … the recipient has no say in the matter and no indication of if this is happening.
        reply_address:
          type: string
          description: 'Optional. Email address to use as the “Reply-To address” for this message. If omitted, the from address will be used. Note that it is against the terms of service to use an address here that does not belong to you or for which you do not otherwise have permission to send from.'
        secline_a_ [email]:
          type: string
          description: 'Optional. For email messages sent via SecureLine Escrow where Question/Answer pairs are being used for authentication, this answer will be used for the recipient whose email address is “[email]”. This overrides any other answer that may have otherwise been used.'
        secline_keep_ [email]:
          description: 'Optional. (Days) For ALL email messages sent via SecureLine Escrow and SecureText, this this will be used as the integer number of days before the message accessible for recipient [email] expires from access. Note that you can have different expirations for different recipients of the same message. Once the message has expired for all recipients, the encrypted message data itself is deleted from the system.'
          type: integer
        secline_q_ [email]:
          type: string
          description: 'Optional. For email messages sent via SecureLine Escrow where Question/Answer pairs are being used for authentication, this question will be used for the recipient whose email address is “[email]”. E.g., use “secline_q_ bob@domain.com” as the key for the question for recipient “bob@domain.com”. This overrides any other question that may have otherwise been used. If you set this question value to just an asterisk, “*”, then SecureSend portal login will be used for recipient authentication instead of an explicit question and answer. It does not matter what you specify for “secline_a_...” in this case.'
        subject:
          type: string
          description: 'Required. Subject of this message. This can be a maximum of 1000 characters long. Leading and training spaces are automatically trimmed from this subject.'
        template:
          type: string
          description: 'Optional. If provided, this must be the “Template ID” or template “Code Word” corresponding to an “SMTP or API Email Template” in the sender’s account. This template will be used to set the subject and body of the message (overriding any other subject and body data sent in your API call). Note, any attachments that you include in the API call will still be attached to the templated email message. Note that the templates “flags” may affect how the message isencrypted and delivered.'
        template_data:
          type: object
          description: 'If you specify a “template” which has dynamic place holders, you can specify the keywords and respective values to substitute into the template in this field. The value of the “template_data” field is an associated array (object) with the fields/keywords being the template place holder keywords and the values of those keywords beingthe values to be substituted.'
        template_data_raw:
          type: integer
          description: 'Optional. If passed with a value of “1” then the contents of template_data will be substituted into the template place holders “as is” exactly as passed. This is appropriate for passing content marked up with HTML and inserting that into and HTML-formatted email. The default, “0”, assumes the template_data is plain text content. In this context, the data will be appropriately quoted when being substituted into HTML-formatted email. E.g., special HTML characters like “<” will be converted into HTML entitles like “&lt;” and web links will be converted into clickable links.'
        template_format:
          type: string
          description: 'Optional. If passed, the value must be "html" or "text".  If the template referred by the template parameter has both text and html content, then this parameter is used to select one of those content formats to include in the message, rather than both.'
        to:
          type: array
          description: 'Optional. Array of email addresses for the recipients in the “To” of the message.'
          items:
            type: string
        unsubscribe:
          type: integer
          description: 'Optional. Set to a true value (i.e., 1) to enable use of Unsubscribe Links with this email message.'
    Template:
      type: object
      required:
        - title
        - subject
        - format
      properties:
        code_word:
          type: string
          description: 'Textual unique template reference. Can contain only letters, numbers, and underscore characters. Cannot be a number. Must be unique across your templates. Optional.'
        title:
          type: string
          description: 'Internal title for this template.'
        subject:
          type: string
          description: 'Required. Email message subject to be used. This field can contain dynamic place holders.'
        editor_type:
          type: string
          description: 'Which editor is assigned for editing this template. Options: advanced, visual, source, legacy.' 
        body_html:
          type: string
          description: 'Email body content for HTML viewing. Required for formats of “html” and “both”. This field can contain dynamic place holders.'
        body_text:
          type: string
          description: 'Email body content for plain text viewing. Required for formats of “text” and “both”. This field can contain dynamic place holders.'
        is_private:
          type: integer
          description: 'When set to 1, the template is private and will not be shared with other users.  When set to 0, the default, the template may be shared.'
        preheader:
          type: string
          description: 'Preheader (message preview) plain text content for messages that use format=html.  The maximum length for this value is 128 characters.  All HTML tags will be automatically removed from this content.'
        format:
          type: string
          description: 'Required. What body formats to include when sending? One of these values must be supplied: (html|text|both).'
        sl_opt_in:
          type: boolean
          description: 'Definitely use email encryption for this message (for users who are not required to use it anyway).'
        sl_opt_out:
          type: boolean
          description: 'Opt OUT of encryption as this message will NOT include PHI, PII, or sensitive data. Can not be true when sl_opt_in is true or when sl_no_tls is true.'
        sl_no_tls:
          type: boolean
          description: 'Do not use TLS Only as an email encryption method. Use something STRONGER such as Escrow, PGP, or S/MIME.'
        template_group_id:
          type: integer
          description: 'Unique ID of the Template Group this Template is in.  A value of zero means Unassigned.'
    ContentTag:
      type: object
      required:
        - title
        - format
        - code_word
      properties:
        code_word:
          type: string
          description: 'Textual unique content tag reference. Can contain only letters, numbers, and underscore characters. Cannot be a number. Must be unique across content tags in your account. Required.'
        title:
          type: string
          description: 'Internal title for this template.'
        body_html:
          type: string
          description: 'HTML content. Required for formats of “html” and “both”. This field can contain dynamic placeholders.'
        body_text:
          type: string
          description: 'Text content. Required for formats of “text” and “both”. This field can contain dynamic placeholders.'
        is_private:
          type: integer
          description: 'When set to 1, the template is private and will not be shared with other users.  When set to 0, the default, the template may be shared.'
        format:
          type: string
          description: 'Required. What content formats to support? One of these values must be supplied: (html|text|both).'
      example: {"code_word":"tag2","body_text":"Test message body.","format":"both","body_html":"<p>Test message body</p>","title":"Example template"}
    Suppression:
      type: object
      properties:
        emails:
          type: string
          description: 'A comma-delimited list of email addresses to suppress.  You can include between 1 and 1000 addresses in this parameter..'
        expires:
          type: integer
          description: 'A positive integer.  If included, the suppressions created will expire after this many days.  If omitted, the suppressions will not expire.'    
    WebAide:
      type: object
      properties:
        title: 
          type: string
          description: 'Plain text title of the WebAide'
        webaide_id: 
          type: integer
          description: 'Numerical unique WebAide Id.'
        modified: 
          type: string
          description: 'Last modified date for the WebAide (e.g. last edit, add, or delete). This is in the format “YYYY-MM-DD HH:MM:SS” in GMT.'
        desc: 
          type: string
          nullable: true
          description: 'Plain text description of the WebAide that can be optionally provided by the creator / admin of the WebAide.'
        permissions: 
          type: string
          description: 'Comma-delimited list of permissions that the user has on this WebAide. The possible values are taken from the webaide_permission list.'
        type: 
          type: string
          description: 'webaide_type'
        subscribed:
          type: integer
          description: 'If the user is subscribed to this WebAide (1) or not (0)'
        tosync: 
          type: integer
          enum: [0,1]
          description: 'If the WebAide is tagged for synchronization via MobileSync (1) or not (0) favorite True (1) if this WebAide is tagged as the user’s “Favorite”, false (0) otherwise. There can only be 1 Favorite … but there do not have to be any. '
        favorite:
          type: integer
          enum: [0,1]
          description: 'True (1) if this WebAide is tagged as the user’s “Favorite”, false (0) otherwise. There can only be 1 Favorite … but there do not have to be any'
        mine: 
          type: integer
          enum: [0,1]
          description: 'True (1) if the WebAide is owned by the user; False (0) if it is owned by someone else.'
        changes: 
          type: string
          description: |-
            Present only if you passed the optional “changes” query string parameter. If present, this is an object that contains the following keys:
            * entries – Total number of entries in this WebAide
            * adds – Number of entries added on or after the date/time provided
            * changes – Number of entries that existed before the date/time provided that were modified on or after the date/time provided
            * deletes – Number of entries that were deleted on or after the date/time provided
    ReportResponse:
      type: object
      properties:
        first:
          type: integer
          description: 'The index of the first row that was returned. E.g. this should match the “first_row” parameter specified in the request.'
        header:
          type: array
          items:
            type: string
          description: 'Array that includes the column headings for all of the matches returned.'
        matches_returned:
          type: integer
          description: 'The number of matching rows returned in the “rows” array.'
        matches_total:
          type: integer
          description: 'The number of rows matching your request. Note that this can be larger than the number of rows returned.'
        rows:
          type: array
          description: 'Array of data for all matches returned. This array contains one element for each returned match. Each element is itself an array. Each field in the match arrays corresponds to the respective field in the “header” array. E.g. if the 1st element in the “header” array is “user_id”, then the 1st element in a match data array will be the integer user ID number, etc.'
          items:
            type: array
            items:
              oneOf:
                - type: string
                - type: integer
        job_id:
           type: integer
           description: 'For asynchronous report requests only, this is the ID of the background job generated.'
        filename:
           type: string
           description: 'For asynchronous report requests only, this is the name of the file that will be uploaded.'
        max_jobs:
           type: integer
           description: 'For asynchronous report requests only, this is the maximum number of asynchronous jobs that can be running concurrently for the customer account.'
        current_jobs:
           type: integer
           description: 'For asynchronous report requests only, this is the current number of running asynchronous jobs for the customer account.  This number will always be at least 1, as it includes the new job requested by this API call itself.'
    DomainReport:
      type: object
      properties:
        accept_mail:
          type: string
          description: |-
            Optional: False (“0”). True values (e.g. “1”) will result in the domain being able to accept new emails (once validated by updating MX or A records).
          
            Note that if “is_enabled” is false, then the domain will not accept email, even if this setting is true.
          
            This setting will not be changed if you omit this keyword from your request.
        catchall_action:
          type: string
          description: |-
            Can be one of:
            - “email” – to forward email messages
            - “delete” – to delete email message
            - “bounce” – to bounce back email messages with a custom message.
            
            This field is required if catchall_on is true and ignored otherwise.
          enum: ["email","delete","bounce"]
        catchall_data:
          type: string
          description: |-
            This contains data for your “catchall_action”:
            - “email” – Is a comma-delimited list of email addresses to forward email to. This list will be validted.
            - “bounce” – is a short plain text message (50 characters or less) to explain why the bounce is happening.
            - “delete” – “catchall_data” ignored.
            
            This field is required if catchall_on is true and catchall_action is not “delete”, and ignored otherwise.
          enum: ["email","bounce","delete"]
        catchall_on:
          type: string
          description: |-
            Optional: False (e.g. “0”). True (e.g. “1”). If enabled, then the domain-wide email catchall alias will be turned on. We do not recommend that these be used in general ... as they are magnets for inbound spam.
          
            If enabled, then the other catchall action parameters are required.
            
            Domain catchall settings will not be changed if you omit this keyword from your request.
        is_enabled:
          description: |-
            Optional: False (“0”). True values (e.g. “1”) will result in the domain globally enabled for use (e.g. email, users, etc.). This is the big “domain on/off” switch.
          
            This setting will not be changed if you omit this keyword from your request.
          type: string
    DkimReport:
      type: object
      properties:
        domain:
          type: string
          description: 'Domain name the definition applies to.'
        created:
          type: string
          description: 'DATETIME Date and time the definition was created (added to this system). Format: “YYYY-MM-DD HH:MM:SS” in GMT'
        selector:
          type: string
          description: 'DKIM selector'
        dns:
          type: string
          description: 'Main DNS text record to add to implement the DKIM. Other required DNS TXT records do not depend on configured DKIM details.'
    Alias:
      type: object
      properties:
        action: 
          type: string
          description: 'What to do with email to this alias. This must be one of “email”, “bounce”, or “delete”.'
          enum: ["email","bounce","delete"]
        bounce: 
          type: string
          description: 'For aliases whose action is “bounce”, this is the bounce message.'
        created: 
          type: string
          description: 'DATETIME. When the email alias was created. Format: “YYYY-MM-DD HH:MM:SS” in GMT. Some types of aliases may not have a creation time recorded (as may aliases created before creation times started to be tracked). These will returna created value of “0000-00-00 00:00:00”.'
        dest: 
          type: string
          description: 'Email List. For aliases whose action is “email”, this is the comma-delimited list of destination email addresses'
        distribution_list_group: 
          type: string
          description: 'For aliases whose type is “distribution”, this is the name of the WebAide Group.'
        domain: 
          type: string
          description: 'Domain name (e.g. for alias “john@sample.com”, this would be “sample.com”)'
        msync_users: 
          type: integer
          description: 'Number of users in the domain with licenses for MobileSync.'
        secureline_users: 
          type: integer
          description: 'Number of users in the domain with licenses for SecureLine.'
        status: 
          type: string
          description: 'This will be “enabled” for aliases that are “on” and “disabled” for ones that exist but which are “off”.'
          enum: ["enabled","disabled"]
        Type: 
          type: string
          description: |-
            The source or kind of alias. This would be one of:
            - Catchall – domain catchall
            - Forward – a user’s email forwarding rule
            - Alias – a regular email alias
            - distribution – A WebAide Group distribution list'
          enum: ["Catchall", "Forward", "Alias", "distribution"]
        user: 
          type: string
          description: 'String User part of alias address (e.g. for alias “john@sample. com”, this would be “john”). For catchall aliases, this is empty or null.'
        users: 
          type: integer
          description: 'Number of users in this domain'
    SecureForm:
      type: object
      properties:
        action: 
          type: string
          description: |-
            Set. What will be done with posted data? This is a comma-delimited list of actions:
            - archive – Save to a WebAide
            - email_data – Send via email
            - email_notice – Send a notification email
            - ftp – Save to an SFTP site
            - mysql – Save to a hosted database
            - schat – Send to SecureChat'
        archive_content: 
          type: string
          description: |-
            Set What will be saved to a WebAide? This is a comma-delimited list of data types (posted files are always saved):
            - 2col – Two-column HTML view of keywords and values
            - csv – CSV file
            - html – Custom re-filled HTML template
            - pdf – Custom re-filled PDF template
            - text – Plain text view of keywords and values
            - xfdf – Posted FDF file from a PDF form
            - xml – XML version of keyword and value data
            - xpdf – Posted full PDF from a PDF form'
        db_host: 
          type: string
          description: 'Text For configurations saving to a database, this is the hostname of the database'
        db_name: 
          type: string
          description: 'Text For configurations saving to a database, this is the name of the database'
        db_table: 
          type: string
          description: 'Text For configurations saving to a database, this is the base table name for the table(s) that will conatin the post data'
        email_content: 
          type: string
          description: |-
            Set What will be sent via email? This is a comma-delimited list of data types (posted files are always sent):
            - 2col – Two-column HTML view of keywords and values
            - csv – CSV file
            - html – Custom re-filled HTML template
            - pdf – Custom re-filled PDF template
            - text – Plain text view of keywords and values
            - xfdf – Posted FDF file from a PDF form
            - xml – XML version of keyword and value data
            - xpdf – Posted full PDF from a PDF form'
        ftp_content: 
          type: string
          description: |-
            Set What will be uploaded to SFTP? This is a comma-delimited list of data types (posted files are always uploaded):
            - 2col – Two-column HTML view of keywords and values
            - csv – CSV file
            - html – Custom re-filled HTML template
            - pdf – Custom re-filled PDF template
            - text – Plain text view of keywords and values
            - xfdf – Posted FDF file from a PDF form
            - xml – XML version of keyword and value data
            - xpdf – Posted full PDF from a PDF form'
        id: 
          type: integer
          description: 'Integer, SecureForm configuration unique ID. This is used in API function calls that operate on a specific SecureForm configuration.'
        last_post:
          type: string
          description: 'DATETIME. Date and time of the last post to this SecureForm configuration. Same format as “modified”. This will be undefined if there has not yet been any posts to this SecureForm configuration.'
        modified:
          type: string
          description: 'DATETIME. Date and time this configuration was last modified in GMT. Format (YYYY-MM-DD HH:MM:SS)'
        mysql_encrypt: 
          type: integer
          description: |-
            Integer.
            - 0 – Data saved to a database will not be encrypted at rest
            - 1 – Data saved to a database will be encrypted at rest notes Text Your internal plain text notes for this SecureForm configuration.'
          enum: [0,1]
        secure: 
          type: integer
          description: |-
            Integer.
            - 0 – Configuration does not have “secure” connections and options required.
            - 1 – Configuration has “secure” connections and options required.'
          enum: [0,1]
        status: 
          type: integer
          description: |-
            Integer.
            - 0 – Configuration disabled
            - 1 – Configuration active'
          enum: [0,1]
        title: 
          type: string
          description: 'Text Title of this SecureForm configuration'
        type: 
          type: string
          description: |-
            Enum Source of the form data is:
            - web – A web site form
            - pdf – A PDF form'
          enum: ["web","pdf"]
    SecureFormDbRow:
      type: object
      properties:
        __encrypt__:
          type: integer
          description: 'Integer Value of 1 if the row is encrypted at rest in the database; 0 if not.'
        __files__:
          type: array
          items:
            type: object
            properties:
              file_id:
                type: string
              size:
                type: number
              name:
                type: string
          description: |-
            Array An array of file information that can be used to manipulate the files associated with this post/row. Each item in this array is an object representing one of the associated files. The keywords in these objects are:
            - file_id – Unique (integer) ID for this file
            - size – Size in bytes of this file
            - name – Filename for this file'
        __index__:
          type: integer
          description: 'Integer Unique index for this form post / database row.'
        __ip_address__:
          type: string
          description: 'IP Address of the computer used by the end user who submitted this form post.'
        __n_files__:
          type: integer
          description: 'The number of files associated with this post/row that are currently saved in the database.'
        __posted__:
          type: string
          description: 'DATETIME Date and time the data was saved to this database table in GMT (format “YYYY-MM-DD HH:MM:SS”)'
        __referrer__:
          type: string
          description: 'HTTP Referer passed by the end user’s web client.'
    Server:
      type: object
      properties:
        server_id: 
          type: string
          description: 'Unique server ID number.'
        host: 
          type: string
          description: 'Short name for your server. E.g., “rs999”.'
        hostname: 
          type: string
          description: 'Fully qualified name for your server. E.g., “rs999.luxsci.com”.'
        cpu_cores: 
          type: integer
          description: 'Number of CPU Cores.'
        ram_gb: 
          type: integer
          description: 'Number of GB of Physical Ram.'
        premium_sla: 
          type: string
          description: 'Boolean. If true (1), this server is flagged as obeying the Premium SLA.'
        load_balanced: 
          type: string
          description: 'Boolean. If true (1), this server is flagged as being part of a hardware load balanced group of servers.'
        public_ip: 
          type: string
          description: 'The main public IP address for this server.                      '
        server_type_code: 
          type: string
          description: |-
            This is a code of the format A-B.extra that uniquely identifies the kind of server that this is. A = CPU Cores; B = GB Ram; extra is used for AWS servers to indetify their flavor. X is one of:
            - o - Oracle Cloud Infrastructure
            - a AWS Public Cloud
            - p Physical Server
            - g General / other.'
    Contact:
      type: object
      properties:
        list_id:
          type: integer
          description: 'Contact list id the contact is in'
        user_id:
          type: integer 
          description: 'ID of the user owning this contact.'
        id:
          type: integer 
          description: 'The unique contact ID.'
        email:
          type: string 
          description: 'Contact email address'
        is_active:
          type: integer 
          description: |-
            Status of the contact
          
            0 = Mark as inactive (will not receive emails)  
            1 = Mark as active'
          enum: [0,1]
        is_verified:
          type: integer
        is_confirmed:
          type: integer 
          description: |-
            Confirmation status of the contact
          
            0 = Make this contact unconfirmed  
            1 = Make this contact confirmed'
          enum: [0,1]
        is_unsubscribed:
          type: integer 
          description: |-
            Subscription status of the contact
          
            0 = Mark as subscribed  
            1 = Mark as unsubscribed'
          enum: [0,1]
        is_spammed:
          type: integer
          description: |-
            If this contact has produced a spam complaint
          
            0 = Mark as not spammed  
            1 = Mark as spammed'
          enum: [0,1]
        format:
          type: string 
          description: 'Preferred email format: text or html'
        updated_at:
          type: string
          description: 'DATETIME. Last update to this contact in GMT. Format "YYYYMM-DD HH:MM:SS".'
        created_at:
          type: string
          description: 'DATETIME Creation of this contact In GMT. Format "YYYYMM-DD HH:MM:SS".'
    UpdateContactRequestBody:
      type: object
      properties:
        email:
          type: string
          description: 'Change email address of the contact'
        format:
          type: string
          description: |
            Which format this contact should receive the email
          
            HTML = Will receive HTML version of the email  
            TEXT = WIll receive simple text version'
          enum: ["HTML", "TEXT"]
          default: "HTML"
        is_confirmed:
          type: integer
          description: |-
            Confirmation status of the contact
          
            0 = Add this contact as unconfirmed  
            1 = Add this contact as confirmed'
          default: 1
        is_active:
          type: integer
          description: |-
            Status of the contact
          
            0 = Mark as inactive (will not receive emails)  
            1 = Mark as active'
          default: 1
        bounced:
          description: |-
            Bounced status of the contact
          
            0 = Add as not bounced  
            1 = Add as soft bounced  
            2 = Add as hard bounced'
          type: integer
          default: 0
        is_unsubscribed:
          description: |-
            Subscription status of the contact
          
            0 = Mark as subscribed  
            1 = Mark as unsubscribed'
          type: integer
          default: 0
        is_spam:
          description: |-
            If this contact has produced a spam complaint
          
            0 = Mark as spam  
            1 = Don't mark as spam"
          type: integer
          default: 0
        additional_field:
          description: |-
            Add or update details to additional fields.
            
            *Note that you cannot currently update only custom fields in 1 API call – at least one “normal” field must also be included.*
            
            For any date-based fields custom fields, the format needs to be "ISO 8601" which is: YYYY-MM-DD.'
          type: string
    Campaign:
      type: object
      properties:
        id:
          type: integer
          description: 'Unique ID of this campaign'
        user_id:
          type: integer 
          description: 'User ID of the person owning this campaign'
        group_id:
          type: integer
          description: 'Group ID of the group in which this campaign lives.'
        name:
          type: string
          description: 'Name your campaign'
        subject:
          type: string
          description: 'Email subject of this campaign'
        content_html:
          type: string
          description: 'HTML content for the campaign'
        content_text:
          type: string
          description: 'TEXT version of the campaign'
        created_at: 
          type: string
          description: 'DATETIME. When this campaign was created, in GMT'
        updated_at:
          type: string
          description: 'DATETIME. When this campaign was last updated, in GMT'
    StringOrNumber:
      oneOf:
        - type: string
        - type: number
      nullable: true
  parameters:
    campaign_status:
      name: status
      description: 'Campaign Status Enum.'
      in: query
      schema:
        type: string
        enum: ["scheduled","paused","staging","sending","queued","complete","running","failed"]
    use_created_or_modified_date:
      name: use_date
      description: 'This report uses the created date by default for all date-related filtering and sorting.  Set this parameter to "modified" to instead used the modified date. Any other value passed in this parameter will cause the "created" date to be used.'
      in: query
      schema:
        type: string
        enum: ["created","modified"]
        default: "created" 
    after_date:
      name: after_date
      description: 'DATETIME. Return only matches dated after this date time. Format “YYYY-MM-DD HH:MM:SS” in GMT'
      in: query
      schema:
        type: string
    before_date:
      name: before_date
      description: 'DATETIME. Return only matches dated before this date time.'
      in: query
      schema:
        type: string
    destination:
        name: destination
        description: 'For reporting requests.  Specifying a destination makes the report "asynchronous."  This means that a background job will be created to run the report and upload the final CSV file to the requested destination.  The API request to start the report will return immediately with a background "job number" and the filename that will be uploaded.  The supported value of "destination" is currently only "sftp" for a Secure FTP upload over SSH (as opposed to ftps, which would be a Secure FTP upload over SSL).  When "destination" is specified, additional destination parameters are also required.  Note that for SFTP uploads, there is a 15-minute upload timeout -- uploads that take longer (e.g., due to slow SFTP servers) will be aborted.  WARNING: Multiple concurrent large asynchronous report requests will impact your database performance: reports will take longer to generate and your LuxSci services will experience degraded/slower performance.'
        in: query
        schema:
            type: string
    destination_directory:
        name: destination_directory
        description: 'For asynchronous reporting requests.  This optional parameter will be the subdirectory to change to on the SFTP server before uploading the report CSV file.  Technically speaking, this will be the argument provided to the SFTP "chdir" command.'
        in: query
        schema:
            type: string
    destination_hostname:
        name: destination_hostname
        description: 'For asynchronous reporting requests.  This will be the hostname of the SFTP server to which the report CSV file should be uploaded.'
        in: query
        schema:
           type: string  
    destination_password:
        name: destination_password
        description: 'For asynchronous reporting requests.  This will be the password to be used for the login to the SFTP server to which the report CSV file should be uploaded.'
        in: query
        schema:
           type: string  
    destination_username:
        name: destination_username
        description: 'For asynchronous reporting requests.  This will be the username to be used for the login to the SFTP server to which the report CSV file should be uploaded.'
        in: query
        schema:
           type: string  
    first_row:
      name: first_row
      description: '(Default value 0). All of the matches are sorted and numbered starting from 0. E.g. if you have 100,000 matches, these are rows 0 through 99,999. If you specify a first_row, then the returned matches will be those rows starting from that row. E.g. without a specification (or if you specify 0), you might get rows 0 through 49,999. In your next request you might specify first_row=50000 to get rows 50000 to 99,999.'
      in: query
      schema:
        type: integer
        default: 0
        minimum: 0
    from_date:
      name: from_date
      description: 'DATETIME. Return only matches dated on or after this date time.'
      in: query
      schema:
        type: string
    matches:
      name: matches
      description: '(Default value 50000). You can set matches to any value from 0 to 50000. This sets the maximum number of matches that will be returned in response to your request. Note that if the response size starts to exceed 50MB, then the response can still include fewer than your “matches” number, to keep the response size reasonable. If you specify “0” here, then no matches will be returned; however, you will still get the information on the number of matches that there were.  For asynchronous reports (ones where a destination is specified), the matches parameter is not limited to 50000, but it still defaults to 50000 if not specified. If you expect a larger number of rows, then you must explicitly approve the maximum size of the result set by setting matches appropriately.  This helps prevent accidental queries that produce very larger result sets.'
      in: query
      schema:
        type: integer
        minimum: 0
        default: 50000
    through_date:
      name: through_date
      in: query
      description: 'DATETIME. Return only matches dated before or on this date time.'
      schema:
        type: string
    filter1:
      name: filter1
      description: 'Control when a summary report returns values (for use with automated reports). See https://luxsci.com/rest-api/reporting.html#filters'
      in: query
      schema:
        type: string
    filter2:
      name: filter2
      description: 'Control when a summary report returns values (for use with automated reports). See https://luxsci.com/rest-api/reporting.html#filters'
      in: query
      schema:
        type: string
    filter3:
      name: filter3
      description: 'Control when a summary report returns values (for use with automated reports). See https://luxsci.com/rest-api/reporting.html#filters'
      in: query
      schema:
        type: string   
    header1:
      name: header1
      description: 'Case-insensitive name of the custom email header field to match against in the “header 1” column. I.e., if you were matching against “X-My-Header” and saving this in header 1, you would enter “X-My-Header” as the value here.<br><br>NOTE: Data is only stored in the customer header capturing fields/columns if you have explicitly enabled this feature in the “Account Administration > Email” area of the LuxSci user interface.'
      in: query
      schema:
        type: string
    header1_operator:
      name: header1_operator
      in: query
      description: 'If this is present and one of the following 4 values, then the query will only return messages that included “header1” when “header1” was being tracked, and which also satisfy the follow the criteria:<ul>
      <li>is --- The value of the email header named “header1” in the send email must have been exactly the same as header1_value</li>
      <li>not – The value of the email header named “header1” in the send email must not be exactly the same as header1_value</li>
      <li>like – The value of the email header named “header1” in the send email must contain (case insensitive) the value in header1_value</li>
      <li>notlike – The value of the email header named “header1” in the send email must not contain (case insensitive) the value in header1_value</li></ul>I.e., if you configured your account to capture the value of the header “X-My-Header” and saving this in “header column 1” and an email was sent with the header “X-My-Header: gh6577hh-abc”. This would have been stored in the database. You could then find this message by passing to this API function:<ul><li>header1 = “X-My-Header”</li><li>header1_operator = “is”</li><li>header1_value = “gh6577hh-abc”</li></ul>Or by passing:<ul><li>header1 = “X-My-Header”,/li><li>header1_operator = “like”</li><li>header1_value = “abc”</li>'
      schema:
        type: string
        enum: ["is","not","like","notlike"]
    header1_value:
      name: header1_value
      description: 'Text used with “header1_operator” for matching the value of the email header specified in the “header1” parameter in the original sent message.'
      in: query
      schema:
        type: string
    header2:
      name: header2
      description: 'Like “header1” but applies to searching the header 2 column.'
      in: query
      schema:
        type: string
    header2_operator:
      name: header2_operator
      description: 'Like “header1_operator” but applies to searching the header 2 column.'
      in: query
      schema:
        type: string
    header2_value:
      name: header2_value
      description: 'Like “header1_value” but applies to searching the header 2 column.'
      in: query
      schema:
        type: string
    header3:
      name: header3
      description: 'Like “header1” but applies to searching the header 3 column.'
      in: query
      schema:
        type: string
    header3_operator:
      name: header3_operator
      description: 'Like “header1_operator” but applies to searching the header 3 column.'
      in: query
      schema:
        type: string
    header3_value:
      name: header3_value
      description: 'Like “header1_value” but applies to searching the header 2 column.'
      in: query
      schema:
        type: string
    tracked_headers:
      name: tracked_headers
      description: 'If true and this report is for messages sent vis SMTP, then the results will include the six additional fields (header1, header2, header3, header1_value, header2_value, header3_value) which are used to track custom email message header data.'
      in: query
      schema:
        type: string
    secureform_after_date:
      name: after_date
      in: query
      description: 'DATETIME. All rows added after thes pecified date time (in GMT, format “YYYY-MM-DD HH:MM:SS”).'
      schema:
        type: string
    secureform_after_index:
      name: after_index
      description: 'All rows whose index is greater than the specified value'
      in: query
      schema:
        type: integer
    secureform_before_date:
      name: before_date
      description: 'DATETIME. All rows added before the specified date time'
      in: query
      schema:
        type: string
    secureform_before_index:
      name: before_index
      description: 'All rows whose index is less than the specified value'
      in: query
      schema:
        type: integer
    secureform_from_date:
      name: from_date
      description: 'DATETIME. All rows added on or after the specified date time'
      in: query
      schema:
        type: string
    secureform_from_index:
      name: from_index
      description: 'All rows whose index is greater than or equal to the specified value.'
      in: query
      schema:
        type: integer
    secureform_through_date:
      name: through_date
      description: 'DATETIME. All rows added on or before the specified date time'
      in: query
      schema:
        type: string
    secureform_through_index:
      name: through_index
      description: 'All rows whose index is less than or equal to the specified value.'
      in: query
      schema:
        type: integer
    email:
      name: email
      description: 'Filter results by matching any Contact email address containing the given string.'
      in: query
      schema:
        type: string
    domain:
      name: domain
      description: 'Filter results by matching any Contact email address in a domain name containing the given string.'
      in: query
      schema:
        type: string
    detail:
      name: detail
      description: 'Boolean.  If 1, include the values of all Contact Custom Fields in the report. Default is 0.'
      in: query
      schema:
        type: string
  requestBodies:
    SM3_List:
      description: A JSON object containing List properties.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SM3_List_Body'
          examples:
            list:
              summary: JSON payload to create a new list with 1 custom field
              value: {"reply_email":"support+reply@luxsci.com","name":"TEST_LIST_1591809030","from_email":"support@secured-message.com","from_name":"LUXAPITEST","fields":["my_custom_field_name"]}
    SM3_POST_Contact:
      description: A JSON object containing Contact properties.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SM3_Contact_POST_Body'
          example: {"email":"support@luxsci.com","customer_id_custom_field":999,"list_id":"28"}
    SM3_PUT_Contact:
      description: A JSON object containing Contact properties.
      required: true
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SM3_Contact_PUT_Body'
          example: {"email":"support@luxsci.com","customer_id_custom_field":999,"list_id":"28"}
    SM3_Contacts:
      description: An array of JSON objects containing Contact properties.
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - contacts
            properties:
              contacts:
                type: array
                items:
                  $ref: '#/components/schemas/SM3_Contact_POST_Body'
              accept_required_is_missing:
                type: integer
                description: 'If true, accept contacts that are missing values for required fields.  Normally these would not pass validation.'
              accept_invalid_as_missing:
                type: integer
                description: 'If true (and accept_required_is_missing is true), accept contacts with invalid content for custom fields.  The invalid field is treated as missing for the purposes of the import.'
          examples:
            bulk_add:
              summary: Example of adding 2 contacts
              value: [{"email":"support@luxsci.com","customer_id_custom_field":999,"list_id":"28"},
                      {"email":"sales@luxsci.com","customer_id_custom_field":998,"list_id":"28"}]
