swagger: "2.0"
info:
  description: "This is the api for the 10 Minute Funnels API server."
  version: "1.0.0"
  title: "10 Minute Funnels API"
  contact:
    email: "support@tenminutefunnels.com"
host: "api.funnels.cc"
basePath: "/v1"
tags:
- name: "Sessions"
- name: "Campaigns"
- name: "Users"
- name: "Domains"
- name: "Integrations"
- name: "Pages"
- name: "iFrames"
schemes:
- "https"
- "http"
paths:
  /sessions:
    post:
      tags:
        - "Sessions"
      summary: "Use to request a new token"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      parameters:
      - in: "body"
        name: "body"
        description: "User credentials for logging in to the app"
        required: true
        schema:
          $ref: "#/definitions/Credentials"
      responses:
        "200":
          description: "Valid Token"
          schema:
            items:
              $ref: "#/definitions/TokenResponse"
    delete:
      tags:
        - "Sessions"
      summary: "Use when logging a user out of the api"
      description: "A successful request will invalidate the supplied authentication token.  Any attempt to use the invalidated token after a successful DELETE requerst will result in an error"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: "User was successfully logged out"
  /users:
    get:
      tags:
        - "Users"
      summary: "Get a list of all the users belonging to the white label owner"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    post:
      tags:
        - "Users"
      summary: "Create a new user account"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /users/{id}:
    get:
      tags:
        - "Users"
      summary: "Get details about a specific user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    delete:
      tags:
        - "Users"
      summary: "De-activate a user (prevent them from logging in)"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    patch:
      tags:
        - "Users"
      summary: "Update a user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /campaigns:
    get:
      tags:
        - "Campaigns"
      summary: "Get a list of all the campaigns created by the logged in user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    post:
      tags:
        - "Campaigns"
      summary: "Create a new campaign for the active user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /campaigns/{id}:
    get:
      tags:
        - "Campaigns"
      summary: "Get details about a specific campaign"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    delete:
      tags:
        - "Campaigns"
      summary: "Remove a campaign"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    patch:
      tags:
        - "Campaigns"
      summary: "Update a campaign"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /campaigns/{id}/publish:
    post:
      tags:
        - "Campaigns"
      summary: "Publish an entire campaign"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /campaigns/{id}/clone:
    post:
      tags:
        - "Campaigns"
      summary: "Create a clone of an existing campaign"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /pages:
    get:
      tags:
        - "Pages"
      summary: "Get a list of all the pages that the user has created"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    post:
      tags:
        - "Pages"
      summary: "Create a new page for the user"
      description: "(must be associated with an existing campaign)"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /pages/{id}:
    get:
      tags:
        - "Pages"
      summary: "Get details about a specific page"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    delete:
      tags:
        - "Pages"
      summary: "Remove a page"
      description: "(removes from the associated campaign)"
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    patch:
      tags:
        - "Pages"
      summary: "Update information about a page"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /pages/{id}/publish:
    post:
      tags:
        - "Pages"
      summary: "Publish a page"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /pages/{id}/makeHomePage:
    post:
      tags:
        - "Pages"
      summary: "Make this page the default home page for the campaign"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /pages/{id}/make404Page:
    post:
      tags:
        - "Pages"
      summary: "Make this page the default 404 page for the campaign"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /domains:
    get:
      tags:
        - "Domains"
      summary: "Get a list of all the domain names added by the logged in user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    post:
      tags:
        - "Domains"
      summary: "Create a new domain name for the active user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /domains/{id}:
    get:
      tags:
        - "Domains"
      summary: "Get details about a specific domain name"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    delete:
      tags:
        - "Domains"
      summary: "Remove a domain name from a user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /domains/{id}/createSSL:
    post:
      tags:
        - "Domains"
      summary: "Create an SSL Certificate for this domain name"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /integrations:
    get:
      tags:
        - "Integrations"
      summary: "Get a list of all the users established for the active user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    post:
      tags:
        - "Integrations"
      summary: "Create a new integration for the user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /integrations/{id}:
    get:
      tags:
        - "Integrations"
      summary: "Get details about a specific integration"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    delete:
      tags:
        - "Integrations"
      summary: "Remove an integration profile for a user"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
    patch:
      tags:
        - "Integrations"
      summary: "Update information about an integration"
      description: ""
      consumes:
      - "application/json"
      produces:
      - "application/json"
      responses:
        "200":
          description: ""
  /:token/login:
    get:
      tags:
        - "iFrames"
      summary: "Shows a login screen"
      description: ""
      responses:
        "200":
          description: ""
  /:token/dashboard/campaigns:
    get:
      tags:
        - "iFrames"
      summary: "Shows a list of all user campaigns"
      description: ""
      responses:
        "200":
          description: ""
  /:token/catalog:
    get:
      tags:
        - "iFrames"
      summary: "Shows a list of pre-built campaigns a user can use as their starting point"
      description: ""
      responses:
        "200":
          description: ""
  /:token/campaign/{campaignId}/edit:
    get:
      tags:
        - "iFrames"
      summary: "Shows the campaign builder"
      description: ""
      responses:
        "200":
          description: ""
  /:token/campaign/{campaignId}/{pageId}/builder:
    get:
      tags:
        - "iFrames"
      summary: "Opens a page for editing"
      description: ""
      responses:
        "200":
          description: ""
  /:token/settings/domains:
    get:
      tags:
        - "iFrames"
      summary: "Shows a list of all user domains"
      description: ""
      responses:
        "200":
          description: ""
  /:token/settings/integrations:
    get:
      tags:
        - "iFrames"
      summary: "Shows a list of all user integration profiles"
      description: ""
      responses:
        "200":
          description: ""
definitions:
  Credentials:
    type: "object"
    properties:
      email:
        type: "string"
        example: "testing@emailaddress.com"
      password:
        type: "string"
        example: "password"
  TokenResponse:
    type: "object"
    properties:
      id:
        type: "string"
        example: "ck9xdzvr7001q08593jdygmyr"
      token:
        type: "string"
        example: "NzQzNjNiZjAtMjYwNy0xMWViLTkwNzEtMTFlNWZkNzcyZTVm"