openapi: 3.0.2
components:
  securitySchemes:
    JWTAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >
        A JWT token is required to access this API. A JWT can be obtained by
        providing a correct username and password in the Authorization API, then
        entering the token in the available field.
info:
  contact:
    url: https://www.semify.com
    name: API Support
    email: developers@semify.com
  version: 2.0.0
  license:
    url: https://www.apache.org/licenses/LICENSE-2.0.html
    name: Apache 2.0
  title: Semify Enterprise REST APIs
  description: >
    This is the documentation for the Semify Endpoints based on the OpenAPI 3.0
    specification. You can find out more about Swagger at
    [http://swagger.io](http://swagger.io).
servers:
  - url: https://uat.services.semify.com
    description: Sandbox
  - url: https://services.semify.com
    description: Production Server
paths:
  /api/v1/accounts:
    post:
      summary: Create a new account
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: Creates a new account. This endpoint requires JWT authentication.
      operationId: accounts_create
      requestBody:
        description: Account object creation.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_name
                - phone
                - email
                - first_name
                - last_name
                - address_1
                - address_2
                - city
                - state
                - postal
                - website_url
              properties:
                account_name:
                  type: integer
                  format: int64
                  example: 12345
                phone:
                  type: string
                  example: '3361231234'
                email:
                  type: string
                  example: business@business.com
                first_name:
                  type: string
                  example: First
                last_name:
                  type: string
                  example: last
                address_1:
                  type: string
                  example: 2307 West Cone Blvd.
                address_2:
                  type: string
                  example: Suite 200
                city:
                  type: string
                  example: Greensboro
                state:
                  type: string
                  example: NC
                postal:
                  type: string
                  example: '27410'
                website_url:
                  type: string
                  example: https://www.semify.com
                external_account_identifier:
                  type: object
                  properties:
                    field_name:
                      type: string
                      example: Great Plains ID
                    field_value:
                      type: string
                      example: TestAccount5555
            example:
              account_name: 12345
              phone: '3361231234'
              email: business@business.com
              first_name: First
              last_name: Last
              address_1: 2307 West Cone Blvd.
              address_2: Suite 200
              city: Greensboro
              state: NC
              postal: '27410'
              website_url: https://www.semify.com
              external_account_identifier:
                field_name: Great Plains ID
                field_value: TestAccount5555
      responses:
        '200':
          description: Account was successfully created.
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    account_id: 123456
                    campaign_id: 987654
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Account successfully created
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        example: 123456
                      campaign_id:
                        type: integer
                        example: 987654
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    items:
                      type: string
                      example: Array object of error messages
                    type: array
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    items:
                      type: string
                      example: Array object of error messages
                    type: array
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    items:
                      type: string
                      example: Array object of error messages
                    type: array
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    items:
                      type: string
                      example: Array object of error messages
                    type: array
      externalDocs:
        url: ''
        description: ''
        x-resourceId: fe95dd9bc2c364412427feafb0fe4745
    put:
      summary: Update an existing account
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: A secured route for updating accounts.
      operationId: accounts_update_v1
      requestBody:
        description: >
          Account object update. The only required field is account_id. All
          excluded fields will not be changed from what is already stored.
          Passing empty strings will cause empty strings to be written into the
          database.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                account_id:
                  type: integer
                  example: 12345
                account_name:
                  description: Please enter an account name.
                  type: string
                  example: Semify
                phone:
                  type: string
                  example: '3361231234'
                email:
                  type: string
                  example: business@business.com
                first_name:
                  type: string
                  example: First
                last_name:
                  type: string
                  example: Last
                address_1:
                  type: string
                  example: 2307 West Cone Blvd.
                address_2:
                  type: string
                  example: Suite 200
                city:
                  type: string
                  example: Greensboro
                state:
                  type: string
                  example: NC
                postal:
                  type: string
                  example: '27410'
                external_account_identifier:
                  description: >-
                    Please enter a field_name and field_value combination for
                    external_account_identifier.
                  type: object
                  example:
                    field_name: Great Plains ID
                    field_value: TestAccount5555
      responses:
        '200':
          description: Successful account update
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Account successfully updated
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        format: int64
                        example: 123456
                      campaign_id:
                        type: integer
                        format: int64,
                        example: 54321
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    items:
                      type: string
                      example: Array object of error messages
                    type: array
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    items:
                      type: string
                      example: Array object of error messages
                    type: array
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    items:
                      type: string
                      example: Array object of error messages
                    type: array
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    example: {}
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    items:
                      type: string
                      example: Array object of error messages
                    type: array
      externalDocs:
        url: ''
        description: ''
    get:
      summary: Retrieve all accounts
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: >-
        The accounts GET endpoint retrieves all account information linked to a
        reseller
      operationId: accounts_get_all_records
      responses:
        '200':
          description: Accounts successfully retrieved.
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    - zip: '27455'
                      campaign_id: 7654321
                      active: 1
                      account_id: 1234567
                      state: NC
                      last_name: Williams
                      email: joe@electricalservices.com
                      first_name: Joe
                      account_name: Joes Electrical Services
                      external_account_identifier:
                        field_value: SG12345
                        field_name: external_account_identifier
                      city: Greensboro
                      phone_number: '3365001111'
                      address_1: 202 West Cone Blvd
                      address_2: Suite 210
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Account Retreival Success
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        zip:
                          type: string
                          example: '21620'
                        campaign_id:
                          type: integer
                          example: 7654321
                        active:
                          enum:
                            - 0
                            - 1
                          type: integer
                          example: 1
                        account_id:
                          type: integer
                          example: 1234567
                        state:
                          type: string
                          example: NC
                        last_name:
                          type: string
                          example: Williams
                        email:
                          type: string
                          format: email
                          example: joe@electricalservices.com
                        first_name:
                          type: string
                          example: Joe
                        account_name:
                          type: string
                          example: Joes Electrical Services
                        external_account_identifier:
                          type: object
                          properties:
                            field_value:
                              type: string
                              example: SG12345
                            field_name:
                              type: string
                              example: external_account_identifier
                        city:
                          type: string
                          example: Greensboro
                        phone_number:
                          type: string
                          example: '3365001111'
                        address_1:
                          type: string
                          example: 202 West Cone Blvd
                        address_2:
                          type: string
                          example: Suite 210
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Authorized
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid authorization.
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
      externalDocs:
        url: ''
        description: ''
  /api/v1/accounts/{account_id}:
    get:
      summary: Retreive account details by an id
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: A secured route for getting/retrieving account information
      operationId: accounts_get
      parameters:
        - required: false
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account.
      responses:
        '200':
          description: Successful retreival of account information
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    properties:
                      account_name:
                        type: string
                        example: Business Name
                      phone:
                        type: string
                        example: '3361231234'
                      email:
                        type: string
                        example: business@business.com
                      first_name:
                        type: string
                        example: First
                      last_name:
                        type: string
                        example: Last
                      address_1:
                        type: string
                        example: 2307 West Cone Blvd.
                      address_2:
                        type: string
                        example: Suite 200
                      city:
                        type: string
                        example: Greensboro
                      state:
                        type: string
                        example: NC
                      zip:
                        type: string
                        example: '27410'
                      website_url:
                        type: string
                        example: https://thebuisnessdomainname.com
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
                type: object
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '422':
          description: Unprocessable Entity (account ownership check failed)
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
      externalDocs:
        url: ''
        description: ''
        x-resourceId: fe95dd9bc2c364412427feafb0fe4745
  /api/v2/accounts:
    post:
      summary: Create a new account v2
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: A secured route for creating accounts
      operationId: accounts_create_v2
      requestBody:
        description: Account object creation.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_name
                - phone
                - email
                - first_name
                - last_name
                - address_1
                - address_2
                - city
                - state
                - postal
                - country_code
                - website_url
                - external_account_identifier
              properties:
                account_id:
                  type: integer
                  example: 12345
                account_name:
                  type: string
                  example: Semif
                phone:
                  type: string
                  example: '3361231234'
                email:
                  type: string
                  example: business@business.com
                first_name:
                  type: string
                  example: First
                last_name:
                  type: string
                  example: last
                address_1:
                  type: string
                  example: 2307 West Cone Blvd.
                address_2:
                  type: string
                  example: Suite 200
                city:
                  type: string
                  example: Greensboro
                state:
                  type: string
                  example: NC
                postal:
                  type: string
                  example: '27410'
                country_code:
                  type: string
                  example: US
                website_url:
                  type: string
                  example: https://www.semify.com
                external_account_identifier:
                  type: string
                  example: TestAccount5555
                external_account_manager:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Fnu Lnu
                    email:
                      type: string
                      example: fnulnu@yourdomain.com
                external_campaign_manager:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Fnu Lnu
                    email:
                      type: string
                      example: fnulnu@yourdomain.com
                attributes:
                  type: array
                  items:
                    type: object
                    properties:
                      field_name:
                        type: string
                        example: Approval Required
                      field_value:
                        type: string
                        example: Full
            example:
              account_name: Semify
              phone: '3361231234'
              email: business@business.com
              first_name: First
              last_name: Last
              address_1: 2307 West Cone Blvd.
              address_2: Suite 200
              city: Greensboro
              state: NC
              postal: '27410'
              country_code: US
              website_url: https://www.semify.com
              external_account_identifier: TestAccount5555
              external_account_manager:
                name: Fnu Lnu
                email: fnulnu@yourdomain.com
              external_campaign_manager:
                name: Fnu Lnu
                email: fnulnu@yourdomain.com
              attributes:
                - field_name: Approval Type
                  field_value: Full
                - field_name: Another Field
                  field_value: Partial
      responses:
        '200':
          description: Successful account creation
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    account_id: '123456'
                    campaign_id: '987654'
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Account successfully created
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: string
                        example: '123456'
                      campaign_id:
                        type: string
                        example: '987654'
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '422':
          description: Unprocessable Entity (account ownership check failed)
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
      externalDocs:
        url: ''
        description: ''
        x-resourceId: fe95dd9bc2c364412427feafb0fe4745
    put:
      summary: Update an existing account v2
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: A secured route for updating accounts
      operationId: accounts_update_v2
      requestBody:
        description: >
          Account object update. The only required field is account_id. All
          excluded fields will not be changed from what is already stored.
          Passing empty strings will cause empty strings to be written into the
          database.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - account_id
              properties:
                account_id:
                  type: integer
                  example: 12345
                account_name:
                  type: string
                  example: Semif
                phone:
                  type: string
                  example: '3361231234'
                email:
                  type: string
                  example: business@business.com
                first_name:
                  type: string
                  example: First
                last_name:
                  type: string
                  example: last
                address_1:
                  type: string
                  example: 2307 West Cone Blvd.
                address_2:
                  type: string
                  example: Suite 200
                city:
                  type: string
                  example: Greensboro
                state:
                  type: string
                  example: NC
                postal:
                  type: string
                  example: '27410'
                external_account_identifier:
                  type: string
                  example: TestAccount5555
                external_account_manager:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Fnu Lnu
                    email:
                      type: string
                      example: fnulnu@yourdomain.com
                external_campaign_manager:
                  type: object
                  properties:
                    name:
                      type: string
                      example: Fnu Lnu
                    email:
                      type: string
                      example: fnulnu@yourdomain.com
                attributes:
                  type: array
                  items:
                    type: object
                    properties:
                      field_name:
                        type: string
                        example: Approval Required
                      field_value:
                        type: string
                        example: Full
            example:
              account_id: 12345
              account_name: Semify
              phone: '3361231234'
              email: business@business.com
              first_name: First
              last_name: Last
              address_1: 2307 West Cone Blvd.
              address_2: Suite 200
              city: Greensboro
              state: NC
              postal: '27410'
              external_account_identifier: TestAccount5555
              external_account_manager:
                name: Fnu Lnu
                email: fnulnu@yourdomain.com
              external_campaign_manager:
                name: Fnu Lnu
                email: fnulnu@yourdomain.com
              attributes:
                - field_name: Approval Type
                  field_value: Full
                - field_name: Another Field
                  field_value: Partial
      responses:
        '200':
          description: Successful account update
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Account successfully updated.
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        format: int64
                        example: 1234567
                      campaign_id:
                        type: integer
                        format: int64
                        example: 654321
                      status:
                        type: string
                        example: Success
                      task_id:
                        type: string
                        example: '1234565'
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: ''
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    example: ''
                    type: string
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '422':
          description: Unprocessable Entity (account ownership check failed)
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
      externalDocs:
        url: ''
        description: ''
    get:
      summary: Retreive all accounts v2
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: >-
        The accounts GET endpoint retrieves all account information linked to a
        reseller.
      operationId: accounts_v2_get_all_records
      responses:
        '200':
          description: Accounts successfully retrieved.
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                  - error
                  - pagination
                  - messages
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        attributes:
                          type: array
                          items:
                            type: object
                            properties:
                              field_value:
                                type: string
                                example: Field1_Value_Sample
                              field_name:
                                type: string
                                example: Field1Name_Sample
                        status:
                          type: string
                          enum:
                            - active
                            - deactivated
                          example: active
                        account_id:
                          type: integer
                          example: 1234567
                        campaign_id:
                          type: integer
                          example: 7654321
                        phone:
                          type: string
                          example: 1-888-266-6432
                        postal:
                          type: string
                          example: '14607'
                        state:
                          type: string
                          example: NY
                        last_name:
                          type: string
                          example: Williams
                        email:
                          type: string
                          example: info@semify.com
                        first_name:
                          type: string
                          example: Joe
                        account_name:
                          type: string
                          example: Semify
                        external_account_manager:
                          type: object
                          properties:
                            email:
                              type: string
                              example: email@domain.com
                            name:
                              type: string
                              example: Account Manager
                        external_campaign_manager:
                          type: object
                          properties:
                            email:
                              type: string
                              example: emailcampaign@domain.com
                            name:
                              type: string
                              example: Campaign Manager
                        city:
                          type: string
                          example: Rochester
                        country:
                          type: string
                          example: USA
                        address_1:
                          type: string
                          example: 123 Elm Street
                        address_2:
                          type: string
                          example: Suite B
                        website_url:
                          type: string
                          format: url
                          example: https://www.semify.com
                  error:
                    type: boolean
                    example: false
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '422':
          description: Unprocessable Entity (account ownership check failed)
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
  /api/v2/accounts/{account_id}:
    get:
      summary: Retreive account details by an id v2
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: A secured route for getting/retrieving account information
      operationId: accounts_get_v2
      parameters:
        - required: false
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account.
      responses:
        '200':
          description: Successful retreival of account information
          content:
            application/json:
              schema:
                properties:
                  data:
                    type: object
                    properties:
                      attributes:
                        type: array
                        items:
                          type: object
                          properties:
                            field_value:
                              type: string
                              example: Field1_Value_Sample
                            field_name:
                              type: string
                              example: Field1Name_Sample
                      status:
                        type: string
                        enum:
                          - active
                          - deactivated
                        example: active
                      account_id:
                        type: integer
                        example: 1234567
                      campaign_id:
                        type: integer
                        example: 7654321
                      phone:
                        type: string
                        example: 1-888-266-6432
                      postal:
                        type: string
                        example: '14607'
                      state:
                        type: string
                        example: NY
                      last_name:
                        type: string
                        example: Williams
                      email:
                        type: string
                        example: info@semify.com
                      first_name:
                        type: string
                        example: Joe
                      account_name:
                        type: string
                        example: Semify
                      external_account_manager:
                        type: object
                        properties:
                          email:
                            type: string
                            example: email@domain.com
                          name:
                            type: string
                            example: Account Manager
                      external_campaign_manager:
                        type: object
                        properties:
                          email:
                            type: string
                            example: emailcampaign@domain.com
                          name:
                            type: string
                            example: Campaign Manager
                      city:
                        type: string
                        example: Rochester
                      country:
                        type: string
                        example: USA
                      address_1:
                        type: string
                        example: 123 Elm Street
                      address_2:
                        type: string
                        example: Suite B
                      website_url:
                        type: string
                        format: url
                        example: https://www.semify.com
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
        '422':
          description: Unprocessable Entity (account ownership check failed)
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Account created successfully.
      externalDocs:
        url: ''
        description: ''
        x-resourceId: fe95dd9bc2c364412427feafb0fe4745
  /api/v1/accounts/iam/credentials:
    post:
      summary: Creating account/campaign level iam credentials
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: A secured route for creating account/campaign level iam credentials
      operationId: accounts_iam_credentials_create
      requestBody:
        description: Account object creation.
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - reseller_account_id
                - account_id
                - campaign_id
                - credentials_types_id
                - password
                - username
                - note
              properties:
                reseller_account_id:
                  type: integer
                  format: int64
                  example: 12345
                account_id:
                  type: integer
                  format: int64
                  example: 23456
                campaign_id:
                  type: integer
                  format: int64
                  example: 54321
                credentials_types_id:
                  type: integer
                  format: int64
                  example: 2
                password:
                  type: string
                  example: passwordvalue
                username:
                  type: string
                  example: usernamevalue
                note:
                  type: string
                  example: https://www.semify.com
              example:
                reseller_account_id: 12345
                account_id: 23456
                campaign_id: 54321
                credentials_types_id: 2
                password: passwordvalue
                username: usernamevalue
                note: https://www.semify.com
      responses:
        '200':
          description: Successful account campaign iam credentials creation
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    iam_credentials_id: 1
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Successful account campaign iam credentials creation
                properties:
                  data:
                    type: object
                    properties:
                      iam_credentials_id:
                        type: integer
                        format: int64
                        example: 1
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method Not Allowed.
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Content
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Unprocessable Content
      externalDocs:
        url: ''
        description: ''
        x-resourceId: fe95dd9bc2c364412427feafb0fe4745
  /api/v1/accounts/status:
    put:
      summary: Deactivate or reactivate an account
      tags:
        - accounts
      security:
        - JWTAuth: []
      description: >-
        This endpoint reactivates or deactivates the account, and builds a
        reinstatement task for all campaigns that are associated with the
        account_id provided in the request object.
      operationId: accounts_status_update
      requestBody:
        description: Needed fields reactivate all campaigns with an account.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                account_id:
                  description: Please enter an account id.
                  type: integer
                  example: 12345
                status:
                  description: Please enter a status.
                  type: string
                  example: reactivate/deactivate
      responses:
        '200':
          description: Successful status change
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    account_id: 12345
                    campaign_id: 54321
                    status: activated
                    task_id: 8989888
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        format: int64,
                        example: 1234567
                      campaign_id:
                        type: integer
                        format: int64
                        example: 654321
                      status:
                        type: string
                        example: Active
                      task_id:
                        type: integer
                        example: 9876262
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing Parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: ''
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    example: ''
                    type: string
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method Not Allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/keywords:
    post:
      summary: Create new keywords
      tags:
        - keywords
      security:
        - JWTAuth: []
      description: >-
        The keyword post will create new keywords and attach those to your
        account/campaign. This supports multiple keywords in an array of object
        format. There is validation to ensure that all required fields are met
      operationId: keywords_create
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                account_id:
                  type: integer
                  format: int64
                  example: 1234567
                campaign_id:
                  type: integer
                  format: int64
                  example: 7654321
                keywords:
                  type: array
                  items:
                    type: object
                    properties:
                      keyword:
                        type: string
                        example: best hot sauce
                      keyword_type:
                        type: string
                        enum:
                          - target
                          - interest
                        example: interest
                    required:
                      - keyword
                      - keyword_type
              required:
                - account_id
                - campaign_id
                - keywords
      responses:
        '200':
          description: Successful keyword creation
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    account_id: 7654321
                    campaign_id: 1234546
                    keyword: Keyword
                    keyword_type: target
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        format: int64
                        example: 123454567
                      campaign_id:
                        type: integer
                        format: int64
                        example: 7654321
                      keyword:
                        type: string
                        example: Keyword that was entered
                      keyword_type:
                        type: string
                        example: target
                        enum:
                          - target
                          - interest
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing Parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Authorized
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method Not Allowed
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Unprocessable Entity
      externalDocs:
        url: ''
        description: ''
    put:
      summary: Update keywords
      tags:
        - keywords
      security:
        - JWTAuth: []
      description: The keyword update will allow for a type and status change
      operationId: keywords_update
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                keywords:
                  type: array
                  items:
                    type: object
                    properties:
                      status:
                        type: string
                        enum:
                          - activate
                          - deactivate
                        example: deactivate
                      keyword_type:
                        type: string
                        enum:
                          - interest
                          - target
                        example: interest
                      rank_id:
                        type: integer
                        example: 1
                    required:
                      - status
                      - keyword_type
                      - rank_id
              required:
                - keywords
            example:
              keywords:
                - status: deactivate
                  keyword_type: interest
                  rank_id: 1
                - status: activate
                  keyword_type: target
                  rank_id: 2
      responses:
        '200':
          description: Successful update of keywords
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        rank_id:
                          type: integer
                          example: 22
                        status_code:
                          type: integer
                          enum:
                            - 200
                            - 400
                            - 422
                            - 404
                          example: 200
                        status_message:
                          type: string
                          enum:
                            - success
                            - failed
                            - delete failed - ownership
                            - not found
                          example: success
                      required:
                        - rank_id
                        - status_code
                        - status_message
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing Parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Authorized
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method Not Allowed
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Unprocessable Entity
      externalDocs:
        url: ''
        description: ''
    get:
      summary: Get all keywords
      tags:
        - keywords
      security:
        - JWTAuth: []
      description: >-
        The keyword GET endpoint retrieves all keywords linked to a reseller,
        encompassing all campaigns that contain these keywords.
      operationId: keywords_get_all_records
      responses:
        '200':
          description: Successful keyword retrieval
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    - rank_google_organic: 6
                      campaign_id: 23
                      status: 1
                      rank_google_map: 999
                      account_id: 7
                      rank_id: 22
                      keyword: dc modern furniture
                      type: interest
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Successful keyword retrieval
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        rank_google_organic:
                          type: integer
                          format: int64
                          example: 2
                        rank_google_map:
                          type: integer
                          format: int64
                          example: 1
                        campaign_id:
                          type: integer
                          format: int64
                          example: 7654321
                        account_id:
                          type: integer
                          format: int64
                          example: 1234557
                        rank_id:
                          type: integer
                          format: int64
                          example: 21
                        status:
                          type: integer
                          format: int64
                          enum:
                            - 0
                            - 1
                          example: 1
                        keyword:
                          type: string
                          example: Keyword
                        type:
                          type: string
                          enum:
                            - target
                            - interest
                          example: target
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing Parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Authorized
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method Not Allowed
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Unprocessable Entity
      externalDocs:
        url: ''
        description: ''
  /api/v1/keywords/budget/estimate:
    post:
      summary: Generate keyword budget estimate
      description: >
        Creates a comprehensive budget estimate for organic keywords based on
        SEMRush data analysis.


        The API will:

        1. Retrieve organic keyword data

        2. Calculate budget estimates with trend analysis

        3. Provide recommendations and value scores

        4. Cache results for 24 hours to optimize costs


        **Cache Behavior:**

        - Results are cached for 24 hours based on request parameters

        - Cached responses include `cached: true` flag

        - Fresh API calls include `cached: false` flag
      operationId: create_keyword_budget_estimate
      tags:
        - keywords
      security:
        - JWTAuth: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - url
              properties:
                url:
                  type: string
                  format: uri
                  description: Client business domain URL to analyze
                  example: https://example.com
                categories:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 255
                  description: Business categories for keyword filtering
                  example:
                    - +|Ph|Co|seo
                    - technology
                    - software
                seeds:
                  type: array
                  items:
                    type: string
                    minLength: 1
                    maxLength: 255
                  description: Seed keywords to guide the analysis
                  example:
                    - seo tools
                    - keyword research
                    - digital marketing
                market:
                  type: string
                  description: Country/locale code for market analysis
                  example: us
                  default: us
                language:
                  type: string
                  description: Language code for analysis
                  example: en
                  default: en
                max_keywords:
                  type: integer
                  minimum: 1
                  maximum: 1000
                  description: Maximum number of keywords to return
                  example: 50
                  default: 50
            examples:
              basic_request:
                summary: Basic request with URL only
                value:
                  url: https://example.com
              advanced_request:
                summary: Advanced request with all parameters
                value:
                  url: https://example.com
                  categories:
                    - technology
                    - software
                  seeds:
                    - seo tools
                    - keyword research
                  market: us
                  language: en
                  max_keywords: 100
      responses:
        '200':
          description: Budget estimate generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      url:
                        type: string
                        format: uri
                        description: Analyzed domain URL
                        example: https://example.com
                      market:
                        type: string
                        description: Market used for analysis
                        example: us
                      language:
                        type: string
                        description: Language used for analysis
                        example: en
                      total_keywords:
                        type: integer
                        description: Total number of keywords found
                        example: 25
                      keywords:
                        type: array
                        items:
                          type: object
                          properties:
                            keyword:
                              type: string
                              description: The keyword phrase
                              example: seo tools
                            position:
                              type: string
                              description: Current search engine position
                              example: '5'
                            previous_position:
                              type: string
                              description: Previous position
                              example: '7'
                            position_difference:
                              type: string
                              description: Position change
                              example: '2'
                            monthly_searches:
                              type: string
                              description: Monthly search volume
                              example: '1200'
                            cpc:
                              type: string
                              description: Cost per click
                              example: '2.50'
                            url:
                              type: string
                              description: Landing page URL
                              example: https://example.com/seo-tools
                            traffic:
                              type: string
                              description: Estimated monthly traffic
                              example: '45.20'
                            traffic_cost:
                              type: string
                              description: Estimated traffic cost
                              example: '113.00'
                            competition:
                              type: string
                              description: Competition level (0-1)
                              example: '0.45'
                            number_of_results:
                              type: string
                              description: Number of search results
                              example: '12500000'
                            monthly_trends:
                              type: array
                              items:
                                type: string
                              description: 12-month trend data
                              example:
                                - '0.29'
                                - '0.23'
                                - '0.23'
                                - '0.44'
                                - '0.36'
                                - '0.36'
                                - '0.36'
                                - '0.54'
                                - '0.66'
                                - '0.81'
                                - '1.00'
                                - '0.66'
                            current_trend:
                              type: number
                              description: Most recent trend value
                              example: 0.66
                            trend_summary:
                              type: object
                              properties:
                                direction:
                                  type: string
                                  enum:
                                    - accelerating
                                    - decelerating
                                    - stable
                                  description: Trend direction
                                  example: accelerating
                                strength:
                                  type: string
                                  enum:
                                    - Very High
                                    - High
                                    - Moderate
                                    - Low
                                    - Very Low
                                  description: Trend strength
                                  example: High
                                category:
                                  type: string
                                  enum:
                                    - exploding
                                    - rising
                                    - growing
                                    - stable
                                    - declining
                                    - falling
                                    - crashing
                                  description: Trend category
                                  example: rising
                                description:
                                  type: string
                                  description: Human-readable trend description
                                  example: Strong upward trend - good opportunity
                                average_trend:
                                  type: number
                                  description: Average trend value
                                  example: 0.57
                                trend_strength:
                                  type: number
                                  description: Trend strength value
                                  example: 0.77
                                peak_month:
                                  type: number
                                  description: Peak trend value
                                  example: 1
                                lowest_month:
                                  type: number
                                  description: Lowest trend value
                                  example: 0.23
                            budget_estimate:
                              type: object
                              properties:
                                monthly_budget:
                                  type: string
                                  description: Recommended monthly budget
                                  example: '25.00'
                                quarterly_budget:
                                  type: string
                                  description: Recommended quarterly budget
                                  example: '75.00'
                                yearly_budget:
                                  type: string
                                  description: Recommended yearly budget
                                  example: '300.00'
                                cost_per_acquisition:
                                  type: string
                                  description: Cost per acquisition
                                  example: '0.02'
                                value_score:
                                  type: integer
                                  minimum: 1
                                  maximum: 5
                                  description: Value score (1-5)
                                  example: 3
                                value_description:
                                  type: string
                                  enum:
                                    - Low Value
                                    - Budget-Friendly
                                    - Moderate Value
                                    - High Value
                                    - Premium Value
                                  description: Value description
                                  example: Moderate Value
                                recommendation:
                                  type: string
                                  description: Budget recommendation
                                  example: >-
                                    Good opportunity - trending upward with
                                    reasonable budget
                      estimated_budget:
                        type: object
                        properties:
                          total_keywords:
                            type: integer
                            description: Total keywords analyzed
                            example: 25
                          total_monthly_searches:
                            type: string
                            description: Total monthly search volume
                            example: '18000'
                          average_cpc:
                            type: string
                            description: Average cost per click
                            example: '10.54'
                          total_traffic_cost:
                            type: string
                            description: Total estimated traffic cost
                            example: '79.09'
                          average_competition:
                            type: string
                            description: Average competition level
                            example: '0.049'
                          estimated_monthly_budget:
                            type: string
                            description: Estimated monthly budget
                            example: '27.68'
                          estimated_quarterly_budget:
                            type: string
                            description: Estimated quarterly budget
                            example: '83.04'
                          estimated_yearly_budget:
                            type: string
                            description: Estimated yearly budget
                            example: '332.18'
                      cached:
                        type: boolean
                        description: Whether data was served from cache
                        example: false
                      cache_timestamp:
                        type: string
                        format: date-time
                        description: Cache timestamp
                        example: '2024-01-15T14:30:25Z'
                      debug_info:
                        type: object
                        description: Debug information for empty results
                        properties:
                          reason:
                            type: string
                            example: No keywords found for this domain
                          possible_causes:
                            type: array
                            items:
                              type: string
                            example:
                              - >-
                                Domain is too new or has insufficient organic
                                traffic
                          api_parameters:
                            type: object
                            properties:
                              market:
                                type: string
                                example: us
                              language:
                                type: string
                                example: en
                              max_keywords:
                                type: integer
                                example: 50
                  message:
                    type: string
                    description: Response message
                    example: Budget estimate generated successfully.
                  error_code:
                    type: string
                    description: Error code (empty for success)
                    example: ''
                  status_code:
                    type: integer
                    description: HTTP status code
                    example: 200
              examples:
                successful_response:
                  summary: Successful budget estimate
                  value:
                    data:
                      url: https://example.com
                      market: us
                      language: en
                      total_keywords: 25
                      keywords:
                        - keyword: seo tools
                          position: '5'
                          monthly_searches: '1200'
                          cpc: '2.50'
                          traffic: '45.20'
                          traffic_cost: '113.00'
                          competition: '0.45'
                          budget_estimate:
                            monthly_budget: '25.00'
                            quarterly_budget: '75.00'
                            yearly_budget: '300.00'
                            value_score: 3
                            value_description: Moderate Value
                            recommendation: >-
                              Good opportunity - trending upward with reasonable
                              budget
                      estimated_budget:
                        total_keywords: 25
                        total_monthly_searches: '18000'
                        average_cpc: '10.54'
                        estimated_monthly_budget: '27.68'
                        estimated_quarterly_budget: '83.04'
                        estimated_yearly_budget: '332.18'
                      cached: false
                      cache_timestamp: '2024-01-15T14:30:25Z'
                    message: Budget estimate generated successfully.
                    error_code: ''
                    status_code: 200
                cached_response:
                  summary: Cached response
                  value:
                    data:
                      url: https://example.com
                      total_keywords: 25
                      keywords: []
                      cached: true
                      cache_timestamp: '2024-01-15T16:45:10Z'
                    message: Budget estimate retrieved from cache.
                    error_code: ''
                    status_code: 200
                empty_results:
                  summary: No keywords found
                  value:
                    data:
                      url: https://newdomain.com
                      total_keywords: 0
                      keywords: []
                      cached: false
                      debug_info:
                        reason: No keywords found for this domain
                        possible_causes:
                          - >-
                            Domain is too new or has insufficient organic
                            traffic
                          - >-
                            Domain is not indexed in the database for this
                            market
                          - Domain has no organic search visibility
                          - Try different market/language parameters
                    message: >-
                      No keywords found for this domain. This may be due to
                      insufficient organic traffic or domain not being indexed
                      in our datasets.
                    error_code: ''
                    status_code: 200
        '400':
          description: Bad Request - Validation errors
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: Empty data object
                  message:
                    type: array
                    items:
                      type: string
                    description: Validation error messages
                    example:
                      - Please enter a client business domain URL.
                  error_code:
                    type: string
                    description: Error code
                    example: validation-error
                  status_code:
                    type: integer
                    description: HTTP status code
                    example: 400
        '401':
          description: Unauthorized - Invalid or missing JWT token
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: Empty data object
                  message:
                    type: string
                    description: Error message
                    example: Authentication required
                  error_code:
                    type: string
                    description: Error code
                    example: auth-required
                  status_code:
                    type: integer
                    description: HTTP status code
                    example: 401
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    description: Empty data object
                  message:
                    type: string
                    description: Error message
                    example: >-
                      An error occurred while generating the budget estimate:
                      SEMRush API timeout
                  error_code:
                    type: string
                    description: Error code
                    example: keywords-budget-estimate:2
                  status_code:
                    type: integer
                    description: HTTP status code
                    example: 500
  /api/v1/campaigns:
    get:
      summary: Get all campaigns
      tags:
        - campaigns
      security:
        - JWTAuth: []
      description: >-
        The campaign GET endpoint retrieves all campaigns linked to a reseller,
        the payload will also return the account id for each campaign
      operationId: campaigns_get_all_records
      responses:
        '200':
          description: Campaigns successfully retrieved.
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    - campaign_start_date: '2024-07-06T19:09:14Z'
                      ppc_monthly_budget_invoice_status: 0
                      campaign_id: 1234567
                      account_id: 9654321
                      campaign_stage_id: 5
                      campaign_end_date: '2029-07-06T19:09:14Z'
                      ppc_monthly_budget: 0
                      discount: 0
                      decline_gmb: 0
                      campaign_name: semify.com
                      decline_reviews: 0
                      campaign_stage_name: Closed/Won
                      decline_blog: 0
                      status: 1
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Campaigns successfully retrieved.
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        campaign_start_date:
                          type: string
                          format: date-time
                          example: '2024-07-06T19:09:14Z'
                        ppc_monthly_budget_invoice_status:
                          type: integer
                          format: int64
                          example: 1
                        campaign_id:
                          type: integer
                          format: int64
                          example: 7654321
                        account_id:
                          type: integer
                          format: int64
                          example: 1234557
                        campaign_stage_id:
                          type: integer
                          format: int64
                          enum:
                            - 1
                            - 2
                            - 3
                            - 4
                            - 5
                          example: 5
                        campaign_end_date:
                          type: string
                          format: date-time
                          example: '2024-07-06T19:09:14Z'
                        ppc_monthly_budget:
                          type: number
                          format: float
                          example: 0
                        discount:
                          type: integer
                          format: int64
                          example: 0
                        decline_gmb:
                          type: integer
                          format: int64
                          enum:
                            - 0
                            - 1
                          example: 0
                        campaign_name:
                          type: string
                          example: campaign name
                        decline_reviews:
                          type: integer
                          format: int64
                          enum:
                            - 0
                            - 1
                          example: 1
                        campaign_stage_name:
                          type: string
                          enum:
                            - Cold
                            - Warm
                            - Proposal
                            - Neg/Review
                            - Closed/Won
                          example: Closed/Won
                        decline_blog:
                          type: integer
                          format: int64
                          example: 1
                          enum:
                            - 0
                            - 1
                        status:
                          type: integer
                          format: int64
                          enum:
                            - 0
                            - 1
                          example: 1
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing Parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Authorized
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Unprocessable Entity
      externalDocs:
        url: ''
        description: ''
  /api/v2/campaigns/notes:
    get:
      summary: Get campaign notes
      tags:
        - campaigns
      security:
        - JWTAuth: []
      description: Retrieve campaign notes for a specific campaign
      operationId: campaign_notes_index
      parameters:
        - name: campaign_id
          in: query
          description: The ID of the campaign
          required: true
          schema:
            type: integer
            format: int32
      responses:
        '200':
          description: Campaign notes retrieved successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Flag to indicate an error.
                    type: boolean
                    example: false
                  messages:
                    description: An array of messages related to the request.
                    type: array
                    items:
                      type: string
                  pagination:
                    description: Pagination information.
                    type: object
                  data:
                    description: The campaign notes data
                    type: object
                    properties:
                      campaign_id:
                        description: The ID of the campaign
                        type: integer
                        format: int32
                        example: 654321
                      writer_instructions:
                        description: Instructions for the writer
                        type: string
                        example: instructions for the writer
                      additional_instructions:
                        description: Additional instructions for the writer
                        type: string
                        example: additiona instructions for the writer
                      created_at:
                        description: Timestamp when the notes were created
                        type: string
                        format: date-time
                        example: '2024-03-15T10:30:00Z'
                      updated_at:
                        description: Timestamp when the notes were last updated
                        type: string
                        format: date-time
                        example: '2024-03-15T10:30:00Z'
              example:
                error: false
                messages:
                  - Campaign notes retrieved successfully
                pagination: {}
                data:
                  campaign_id: 12345
                  writer_instructions: Focus on local SEO and content marketing
                  additional_instructions: >-
                    Include industry-specific keywords and maintain a
                    professional tone
                  created_at: '2024-03-15T10:30:00Z'
                  updated_at: '2024-03-15T10:30:00Z'
        '400':
          description: Bad Request - Invalid or missing parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    example: true
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                  data:
                    type: object
              example:
                error: true
                messages:
                  - Please enter a campaign_id
                pagination: {}
                data: {}
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    example: true
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                  data:
                    type: object
              example:
                error: true
                messages:
                  - Invalid authentication credentials
                pagination: {}
                data: {}
    put:
      summary: Update campaign notes
      tags:
        - campaigns
      security:
        - JWTAuth: []
      description: Update campaign notes for a specific campaign
      operationId: campaign_notes_update
      requestBody:
        description: Fields needed to update campaign notes
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - campaign_id
                - writer_instructions
                - additional_instructions
              properties:
                campaign_id:
                  description: The ID of the campaign
                  type: integer
                  format: int32
                  example: 6543211
                writer_instructions:
                  description: Instructions for the writer
                  type: string
                  example: instructions for the writer
                additional_instructions:
                  description: Additional instructions for the writer
                  type: string
                  example: additional instructions for the writer
            example:
              campaign_id: 12345
              writer_instructions: Focus on local SEO and content marketing
              additional_instructions: >-
                Include industry-specific keywords and maintain a professional
                tone
      responses:
        '200':
          description: Campaign notes updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    description: Flag to indicate an error.
                    type: boolean
                    example: false
                  messages:
                    description: An array of messages related to the request.
                    type: array
                    items:
                      type: string
                  pagination:
                    description: Pagination information.
                    type: object
                  data:
                    description: The campaign notes data
                    type: object
                    properties:
                      campaign_id:
                        description: The ID of the campaign
                        type: integer
                        format: int32
                        example: 7654321
                      writer_instructions:
                        description: Instructions for the writer
                        type: string
                        example: instructions for the writer
                      additional_instructions:
                        description: Additional instructions for the writer
                        type: string
                        example: additional instructions for the writer
                      created_at:
                        description: Timestamp when the notes were created
                        type: string
                        format: date-time
                        example: '2024-03-15T10:30:00Z'
                      updated_at:
                        description: Timestamp when the notes were last updated
                        type: string
                        format: date-time
                        example: '2024-03-15T10:30:00Z'
              example:
                error: false
                messages:
                  - Campaign notes updated successfully
                pagination: {}
                data:
                  campaign_id: 12345
                  writer_instructions: Focus on local SEO and content marketing
                  additional_instructions: >-
                    Include industry-specific keywords and maintain a
                    professional tone
                  created_at: '2024-03-15T10:30:00Z'
                  updated_at: '2024-03-15T10:30:00Z'
        '400':
          description: Bad Request - Invalid or missing parameters
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    example: true
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                  data:
                    type: object
              example:
                error: true
                messages:
                  - Please enter a campaign_id
                  - Please enter writer instructions
                  - Please enter additional instructions
                pagination: {}
                data: {}
        '401':
          description: Unauthorized - Invalid or missing authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    example: true
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                  data:
                    type: object
              example:
                error: true
                messages:
                  - Invalid authentication credentials
                pagination: {}
                data: {}
        '404':
          description: Not Found - Campaign notes not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: boolean
                    example: true
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                  data:
                    type: object
              example:
                error: true
                messages:
                  - Campaign notes not found
                pagination: {}
                data: {}
  /api/v1/keywords/{rank_id}:
    get:
      summary: Get keywords
      tags:
        - keywords
      security:
        - JWTAuth: []
      description: >-
        This GET request allows you to retrieve a specific object by providing
        the `rank_id` as a path parameter. This unique identifier ensures that
        only one object is returned. If you want to retrieve all keywords
        associated with your reseller account, simply omit the `rank_id`
        parameter
      operationId: keywords_get_single_record
      parameters:
        - name: rank_id
          in: path
          required: true
          description: The rank ID of the keyword
          schema:
            type: integer
            example: 22
      responses:
        '200':
          description: Successful keyword retrieval
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    rank_google_organic: 6
                    campaign_id: 23
                    status: 1
                    rank_google_map: 999
                    account_id: 7
                    rank_id: 22
                    keyword: dc modern furniture
                    type: interest
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                    properties:
                      rank_google_organic:
                        type: integer
                        format: int64
                        example: 2
                      rank_google_map:
                        type: integer
                        format: int64
                        example: 1
                      campaign_id:
                        type: integer
                        format: int64
                        example: 7654321
                      account_id:
                        type: integer
                        format: int64
                        example: 1234557
                      rank_id:
                        type: integer
                        format: int64
                        example: 21
                      status:
                        type: integer
                        format: int64
                        enum:
                          - 0
                          - 1
                        example: 1
                      keyword:
                        type: string
                        example: Keyword
                      type:
                        type: string
                        enum:
                          - target
                          - interest
                        example: target
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Authorized
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Unprocessable Entity
      externalDocs:
        url: ''
        description: ''
  /api/v1/google/gbp/accounts:
    post:
      summary: Create for GBP account provisioning or claims
      tags:
        - google gbp accounts
      security:
        - JWTAuth: []
      description: This endpoint allows for GBP account provisioning or claims
      operationId: google_gbp_accounts_create
      requestBody:
        description: Needed fields to perform gbp account provisioning
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                ticket_id:
                  description: Please enter a ticket id.
                  type: integer
                  example: 12345
                gpid:
                  description: Please enter an external account identifier
                  type: string
                  example: TI XXXXX179
                nob:
                  description: Please enter a name of the business
                  type: string
                  example: Best Plumbing Services
                address:
                  description: Please enter the address of the business
                  type: string
                  example: 2308 West Cone Blvd, Suite 201, Greensboro, NC 27408
                website_url:
                  description: Please enter the website url
                  type: string
                  example: https://www.businessname.com
                access_confirmed:
                  description: Please enter a name of the business
                  type: boolean
                  example: true
      responses:
        '200':
          description: Successful google gbp account ticket creation
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    campaign_id: 471549
                    task_field_id: 830
                    task_id: 36147273
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Google GBP account task successfully created.
                properties:
                  data:
                    type: object
                    properties:
                      task_id:
                        type: integer
                        format: int64
                        example: 36147273
                      campaign_id:
                        type: integer
                        format: int64
                        example: 471549
                      task_field_id:
                        type: integer
                        format: int64
                        example: 830
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful google gbp account ticket creation
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/authentication/login:
    post:
      summary: Authenticate a user
      tags:
        - authentication
      description: Authenticate a user
      operationId: authentication_user
      requestBody:
        description: Required object to authenticate a user
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - username
                - password
              properties:
                username:
                  type: string
                  example: username
                password:
                  type: string
                  example: password
            examples:
              authentication:
                summary: An example of a request object to authenticate a user
                description: An example of a request object to authenticate a user.
                value:
                  username: username
                  password: password
      responses:
        '200':
          description: Successful authentication
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Bearer token created and it expires in 120 minutes
                  data:
                    type: string
                    example: eyJ0eXAiOiJKV1QiLC...
                  error:
                    type: boolean
                    example: false
                  token_exp:
                    type: string
                    example: April, 22 2025 16:28:55
                required:
                  - message
                  - data
                  - error
                  - token_exp
              example:
                message: Bearer token created and it expires in 120 minutes
                data: eyJ0eXAiOiJKV1QiLC...
                error: false
                token_exp: April, 22 2025 16:28:55
                properties:
                  data:
                    type: object
                    properties:
                      data:
                        type: string
                        example: >-
                          eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJyb2xlIjoiIiwic3ViIjoxLCJzY29wZSI6IlNPRlRXQVJFX0FETUlOSVNUUkFUT1IiLCJpc3MiOiJodHRwOi8vMTI3LjAuMC4xOjYwNjI1LyIsImV4cCI6IjE3MjA3OTMyOTciLCJpYXQiOiIxNzIwNzg2MDk3IiwianRpIjoiRkExOUNEQzA4RTRCOUI0OUM1RkYwNEJDNzJFMDFGOTQ0MzkwOUMzNjc1NkY2OTg4ODBGRTEwNzBDRjFDRkU0RSJ9.rwOCpFURBClULIs5xWH4ZlI6pjGa6UV0FMJzNtM-wSSgqFaIEQHBnF36-5hrgYStaIbGj-fXaGAXxurQ6x1rjK
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: ''
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    example: ''
                    type: string
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing Parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: ''
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    example: ''
                    type: string
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: ''
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    example: ''
                    type: string
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/reports/keywords/accounts/{account_id}/campaigns/{campaign_id}:
    get:
      summary: Get keyword reports
      tags:
        - reports
      security:
        - JWTAuth: []
      description: A secured route for getting keyword reports
      operationId: reports_keywords_get
      parameters:
        - required: true
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account
        - required: true
          in: path
          name: campaign_id
          schema:
            type: integer
          description: Campaign ID of the requested account
      responses:
        '200':
          description: Successful retrieval of keyword report data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        rank_google_organic:
                          type: integer
                          example: 5
                        rank_id:
                          type: integer
                          example: 13654
                        rank_google_map:
                          type: integer
                          example: 2
                        search_total:
                          type: integer
                          example: 564
                        histogram:
                          type: array
                          items:
                            type: object
                            properties:
                              date:
                                type: string
                                format: date-time
                                example: '2024-04-10T04:04:00'
                              rank_google_organic:
                                type: integer
                                example: 5
                              rank_google_map:
                                type: integer
                                example: 2
                        keyword:
                          type: string
                          example: best hot sauce
                        type:
                          type: string
                          example: target
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  error:
                    type: boolean
                    example: false
                example:
                  data:
                    - rank_google_organic: 5
                      rank_google_map: 1
                      rank_id: 12344
                      search_total: 50
                      histogram:
                        - date: '2024-04-10T04:04:00'
                          rank_google_organic: 13
                        - date: '2024-04-16T04:04:00'
                          rank_google_map: 1
                      keyword: home improvements maryland
                      type: target
                  messages: []
                  pagination:
                    maxRows: 0
                    totalPages: 1
                    offset: 0
                    page: 1
                    totalRecords: 0
                  error: false
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: Not found
                    example:
                      - Object cannot be located.
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/reports/google/analytics/traffic/accounts/{account_id}/campaigns/{campaign_id}/date_from/{date_from}/date_to/{date_to}:
    get:
      summary: Get google analytics traffic reports
      tags:
        - reports
      security:
        - JWTAuth: []
      description: A secured route for getting google analytics traffic reports
      operationId: reports_google_analytics_traffic_get
      parameters:
        - required: true
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account
        - required: true
          in: path
          name: campaign_id
          schema:
            type: integer
          description: Campaign ID of the requested account
        - required: false
          in: path
          name: date_from
          schema:
            type: string
          description: date from optional parameter
        - required: false
          in: path
          name: date_to
          schema:
            type: string
          description: date to optional parameter
      responses:
        '200':
          description: Successful retrieval of google analytics traffic reports
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        date:
                          type: string
                          example: '2023-11-01 00:00:00'
                        organic:
                          type: integer
                          example: 5
                        non_organic:
                          type: integer
                          example: 2
                        total:
                          type: integer
                          example: 56
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 20
                  error:
                    type: boolean
                    example: false
                example:
                  data:
                    - date: '2023-11-01 00:00:00'
                      organic: 86
                      non_organic: 211
                      total: 297
                  messages: []
                  pagination:
                    maxRows: 0
                    totalPages: 1
                    offset: 0
                    page: 1
                    totalRecords: 0
                  error: false
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: Missing parameter
                    example:
                      - Account created successfully.
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Not found
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/reports/workflows/accounts/{account_id}/campaigns/{campaign_id}/date_from/{date_from}/date_to/{date_to}:
    get:
      summary: Get workflow reports
      tags:
        - reports
      security:
        - JWTAuth: []
      description: A secured route for getting workflow reports
      operationId: reports_workflows_get
      parameters:
        - required: true
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account
        - required: true
          in: path
          name: campaign_id
          schema:
            type: integer
          description: Campaign ID of the requested account
        - required: false
          in: path
          name: date_from
          schema:
            type: string
          description: date from optional parameter
        - required: false
          in: path
          name: date_to
          schema:
            type: string
          description: date to optional parameter
      responses:
        '200':
          description: Successful retrieval of workflows reports
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        built_date:
                          type: string
                          example: '2023-11-01 00:00:00'
                        due_date:
                          type: string
                          example: '2023-11-01 00:00:00'
                        completion_date:
                          type: string
                          example: '2023-11-01 00:00:00'
                        task_id:
                          type: integer
                          example: 1254645
                        task_name:
                          type: string
                          example: Task Name
                        status:
                          type: string
                          example: Completed
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  error:
                    type: boolean
                    example: false
                example:
                  data:
                    - built_date: '2019-07-23 00:00:00'
                      due_date: '2019-07-24 00:00:00'
                      completion_date: '2019-07-23 00:00:00'
                      task_id: 11571961
                      task_name: Article - Published
                      status: Completed
                  messages: []
                  pagination:
                    maxRows: 0
                    totalPages: 1
                    offset: 0
                    page: 1
                    totalRecords: 0
                  error: false
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Not found
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/reports/backlinks/accounts/{account_id}/campaigns/{campaign_id}:
    get:
      summary: Get backlink reports
      tags:
        - reports
      security:
        - JWTAuth: []
      description: A secured route for getting backlinks datapoints reports
      operationId: reports_backlinks_get
      parameters:
        - required: true
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account
        - required: true
          in: path
          name: campaign_id
          schema:
            type: integer
          description: Campaign ID of the requested account
      responses:
        '200':
          description: Successful retrieval of backlinks reports
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      domain_rating:
                        type: integer
                        example: 77
                      backlink_quantity:
                        type: integer
                        example: 250
                      referring_domain_quantity:
                        type: integer
                        example: 300
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  error:
                    type: boolean
                    example: false
                example:
                  data:
                    domain_rating: 77
                    backlink_quantity: 250
                    referring_domain_quantity: 300
                  messages: []
                  pagination:
                    maxRows: 0
                    totalPages: 1
                    offset: 0
                    page: 1
                    totalRecords: 0
                  error: false
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Not found
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/reports/backlinks/lost/accounts/{account_id}/campaigns/{campaign_id}/date_from/{date_from}/date_to/{date_to}:
    get:
      summary: Get lost backlink reports
      tags:
        - reports
      security:
        - JWTAuth: []
      description: >-
        This secured endpoint allows users to retrieve reports on lost
        backlinks. The `date_from` and `date_to` parameters are optional. If
        these parameters are not provided in the request, the report will
        automatically cover a default period of the last 60 days from the
        current date
      operationId: reports_backlinks_lost_get
      parameters:
        - required: true
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account
        - required: true
          in: path
          name: campaign_id
          schema:
            type: integer
          description: Campaign ID of the requested account
        - required: false
          in: path
          name: date_from
          schema:
            type: string
          description: date from optional parameter
        - required: false
          in: path
          name: date_to
          schema:
            type: string
          description: date to optional parameter
      responses:
        '200':
          description: Successful retrieval of lost backlinks data
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        url_from:
                          type: string
                          example: https://www.semify.com
                        url_to:
                          type: string
                          example: https://www.semify.com
                        date_last_seen:
                          type: string
                          example: '2019-07-23 00:00:00'
                        anchor_text:
                          type: string
                          example: https://www.semify.com
                  messages:
                    type: array
                    items:
                      type: string
                  error:
                    type: boolean
                    example: false
                example:
                  data:
                    - url_from: https://www.semify.com
                      url_to: https://www.semify.com
                      date_last_seen: '2024-12-01'
                      anchor_text: https://www.semify.com
                  messages: []
                  pagination:
                    maxRows: 0
                    totalPages: 1
                    offset: 0
                    page: 1
                    totalRecords: 0
                  error: false
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Not found
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/reports/backlinks/referring/accounts/{account_id}/campaigns/{campaign_id}/date_from/{date_from}/date_to/{date_to}:
    get:
      summary: Get referring backlinks
      tags:
        - reports
      security:
        - JWTAuth: []
      description: A secured route for getting referring backlinks by date and count
      operationId: reports_backlinks_referring_get
      parameters:
        - required: true
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account
        - required: true
          in: path
          name: campaign_id
          schema:
            type: integer
          description: Campaign ID of the requested account
        - required: false
          in: path
          name: date_from
          schema:
            type: integer
          description: Optional - date from filter against the date_checked param
        - required: false
          in: path
          name: date_to
          schema:
            type: integer
          description: Optional - date to filter against the date_checked
      responses:
        '200':
          description: A secured route for getting referring backlinks by date and count
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        date_checked:
                          type: string
                          example: '2019-07-23 00:00:00'
                        quantity:
                          type: integer
                          example: 5
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  error:
                    type: boolean
                    example: false
                example:
                  data:
                    - date_checked: '2024-11-30'
                      quantity: 55
                  messages: []
                  pagination:
                    maxRows: 0
                    totalPages: 1
                    offset: 0
                    page: 1
                    totalRecords: 0
                  error: false
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Not found
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/reports/backlinks/provisioned/accounts/{account_id}/campaigns/{campaign_id}/date_from/{date_from}/date_to/{date_to}:
    get:
      summary: Get backlinks provisioned by semify
      tags:
        - reports
      security:
        - JWTAuth: []
      description: >-
        A secured route for data points pertaining to backlinks provisioned by
        Semify
      operationId: reports_backlinks_provisioned_get
      parameters:
        - required: true
          in: path
          name: account_id
          schema:
            type: integer
          description: Account ID of the requested account
        - required: true
          in: path
          name: campaign_id
          schema:
            type: integer
          description: Campaign ID of the requested account
        - required: false
          in: path
          name: date_from
          schema:
            type: integer
          description: Optional - date from filter applied against the completed date
        - required: false
          in: path
          name: date_to
          schema:
            type: integer
          description: Optional - date to filter applied against the completed date
      responses:
        '200':
          description: >-
            A secured route for data points pertaining to backlinks provisioned
            by Semify
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        original_due_date:
                          type: string
                          example: '2019-07-23 00:00:00'
                        completed_date:
                          type: string
                          example: '2019-07-23 00:00:00'
                        type:
                          type: string
                          example: Article
                        url:
                          type: string
                          example: https://www.semify.com
                        domain_rating:
                          type: integer
                          example: 22
                        task_id:
                          type: integer
                          example: 4564556
                  messages:
                    type: array
                    items:
                      type: string
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  error:
                    type: boolean
                    example: false
                example:
                  data:
                    - original_due_date: '2024-11-30'
                      completed_date: '2024-11-30'
                      type: Article
                      url: https://www.semify.com
                      domain_rating: 75
                      task_id: 45623
                  messages: []
                  pagination:
                    maxRows: 0
                    totalPages: 1
                    offset: 0
                    page: 1
                    totalRecords: 0
                  error: false
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '404':
          description: Not found
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Not Found
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Not found
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 0
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
      externalDocs:
        url: ''
        description: ''
  /api/v1/products/plans/campaigns:
    post:
      summary: Create and attach a service / product plan
      tags:
        - products
      security:
        - JWTAuth: []
      description: This endpoint attaches a product plan to an account.
      operationId: products_plans_campaigns
      requestBody:
        description: Needed fields to attach a product plan to an account.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                account_id:
                  description: Please enter an account id.
                  type: integer
                  example: 12345
                campaign_id:
                  description: Please enter a campaign id.
                  type: integer
                  example: 54321
                service_plan_id:
                  description: Please enter a service plan id.
                  type: integer
                  example: 2100
      responses:
        '200':
          description: 200 OK
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data:
                    account_id: 12345
                    campaign_id: 54321
                    service_plan_id: 2100
                  error: false
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 1
                  messages:
                    - Successful plan attachment
                properties:
                  data:
                    type: object
                    properties:
                      account_id:
                        type: integer
                        format: int64
                        example: 1234567
                      campaign_id:
                        type: integer
                        format: int64
                        example: 9876543
                      service_plan_id:
                        type: integer
                        format: int64
                        example: 45623
                  error:
                    example: false
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Successful
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    example: {}
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
        '422':
          description: Unprocessable Entity (account ownership check failed)
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Unprocessable Entity
      externalDocs:
        url: ''
        description: ''
  /api/v1/products/plans/campaigns/{campaign_id}/accounts/{account_id}:
    get:
      summary: Get service plans for campaign and account
      description: Returns available service plans for a given campaign and account.
      tags:
        - products
      security:
        - JWTAuth: []
      parameters:
        - name: campaign_id
          in: path
          description: Numeric ID of the campaign to retrieve service plans for.
          required: true
          schema:
            type: integer
            example: 26939
        - name: account_id
          in: path
          description: Numeric ID of the account to retrieve service plans for.
          required: true
          schema:
            type: integer
            example: 1
      responses:
        '200':
          description: List of available service plans.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        service_plan_id:
                          type: integer
                          example: 5
                        service_plan_name:
                          type: string
                          example: SEO Starter (v1)
                  messages:
                    type: array
                    items:
                      type: string
                    example:
                      - Service plan retreival success
                  pagination:
                    type: object
                    properties:
                      maxRows:
                        type: integer
                        example: 0
                      totalPages:
                        type: integer
                        example: 1
                      offset:
                        type: integer
                        example: 0
                      page:
                        type: integer
                        example: 1
                      totalRecords:
                        type: integer
                        example: 3
                  error:
                    type: boolean
                    example: false
              example:
                data:
                  - service_plan_id: 5
                    service_plan_name: SEO Starter (v1)
                  - service_plan_id: 8000
                    service_plan_name: Premium Writer
                messages:
                  - Service plan retreival success
                pagination:
                  maxRows: 0
                  totalPages: 1
                  offset: 0
                  page: 1
                  totalRecords: 3
                error: false
        '400':
          description: Missing parameter
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Missing parameter
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Missing parameter
        '401':
          description: Invalid Authorization
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Invalid Authorization
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Invalid Authorization
        '405':
          description: Method not allowed
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Method Not Allowed
                properties:
                  data:
                    example: {}
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Method not allowed
        '422':
          description: Unprocessable Entity (account ownership check failed)
          content:
            application/json:
              schema:
                required:
                  - data
                  - error
                  - pagination
                  - messages
                example:
                  data: {}
                  error: true
                  pagination:
                    totalPages: 1
                    maxRows: 0
                    offset: 0
                    page: 1
                    totalRecords: 0
                  messages:
                    - Unprocessable Entity
                properties:
                  data:
                    type: object
                  error:
                    example: true
                    type: boolean
                  pagination:
                    type: object
                    properties:
                      totalPages:
                        type: integer
                        format: int64
                        example: 1
                      maxRows:
                        type: integer
                        format: int64
                        example: 0
                      offset:
                        type: integer
                        format: int64
                        example: 0
                      page:
                        type: integer
                        format: int64
                        example: 1
                      totalRecords:
                        type: integer
                        format: int64
                        example: 1
                  messages:
                    type: array
                    items:
                      type: string
                      example: A user-readable error or status message.
                    example:
                      - Unprocessable Entity
tags:
  - name: accounts
    description: Operations related to accounts.
  - name: keywords
    description: Operations related to keywords.
  - name: reports
    description: Reporting endpoints.
  - name: products
    description: Product management endpoints.
  - name: authentication
    description: Authentication/authorization endpoints.
  - name: campaigns
    description: Campaigns and related operations.
  - name: google gbp accounts
    description: Google GBP account endpoints.
externalDocs:
  url: https://blog.readme.io/an-example-filled-guide-to-swagger-3-2/
  description: Find more info here
