openapi: 3.1.0
info:
  title: CrankWheel reseller RESTful API
  version: 1.0.0
  description: >-
    CrankWheel's RESTful API for resellers and other partners that need a tight
    integration between their platform and CrankWheel, is available for those
    customers of CrankWheel whose accounts have been upgraded to reseller
    status.


    An account with this status can have zero or more sub-accounts, each of
    which is called a "client" and which is effectively an independent company
    account.


    An API key generated for an owner or administrator on the reseller account
    is valid for use with the reseller API.


    Using a reseller API key, you may also impersonate any of your client
    accounts by building a special impersonation key. Let's say the ID of your
    client is 12345, and that your reseller key is ABCDEFG. If you build a
    string like "resellerimpersonate-12345-ABCDEFG" then you may now use this
    string as an API key to impersonate as an administrator of client company
    12345. The authentication system will verify that your key is a reseller
    key, and that the requested company is a sub-company (a "client") under your
    reseller account.


    For {{server-url}} in the following APIs, you should in all cases use
    https://meeting.is unless otherwise instructed by your technical point of
    contact at CrankWheel.
servers:
  - url: '{{server-url}}'
paths:
  /ss/rsapi/clients:
    get:
      summary: Get clients list
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: Get clients list
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 14:53:50 GMT
            Transfer-Encoding:
              schema:
                type: string
              example: chunked
            Connection:
              schema:
                type: string
              example: keep-alive
            Vary:
              schema:
                type: string
              example: Accept-Encoding
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: 8urraia0i677f6j885uqdtnqjk9so7ba
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
            Content-Encoding:
              schema:
                type: string
              example: gzip
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    current_plan:
                      type: string
                    sname:
                      type: string
                    smsname:
                      type: 'null'
                    settings:
                      type: object
                      properties:
                        window:
                          type: boolean
                        tab:
                          type: boolean
                        stay_in_lobby:
                          type: boolean
                        sms_template:
                          type: 'null'
                        screen:
                          type: boolean
                        provisioning_url:
                          type: string
                        provisioning_provider:
                          type: string
                        provisioning_displayname:
                          type: string
                        phone_conf_provider:
                          type: string
                        phone_conf_manual:
                          type: boolean
                        phone_conf_main_number:
                          type: 'null'
                        phone_conf_extra_numbers:
                          type: 'null'
                        lobby_url:
                          type: 'null'
                        id:
                          type: string
                        enable_remote_control:
                          type: boolean
                        email_invite_subject:
                          type: 'null'
                        email_invite_body:
                          type: 'null'
                        dod_field_order_template:
                          type: 'null'
                        content_filter_regex:
                          type: string
                        content_filter_pattern:
                          type: 'null'
                        auto_accept_in_lobby:
                          type: boolean
                        audit_log:
                          type: boolean
                        allow_edit_picture:
                          type: boolean
                        allow_edit_name:
                          type: boolean
                        allow_edit_headline:
                          type: boolean
                        allow_changing_lobby_settings:
                          type: boolean
                    session_limit:
                      type: integer
                    remove_cw_branding:
                      type: boolean
                    post_session_url:
                      type: 'null'
                    logo:
                      type: string
                      format: uri
                    lname:
                      type: string
                    license_count:
                      type: 'null'
                    integrations_enabled:
                      type: boolean
                    id:
                      type: integer
                    host:
                      type: string
                    hl:
                      type: string
                    hard_limit_starts:
                      type: 'null'
                    geo:
                      type: string
                    first_exceeded_soft_limit:
                      type: 'null'
                    demo_id:
                      type: string
                    api_access_enabled:
                      type: boolean
              example:
                - current_plan: unset_or_custom
                  sname: companyone
                  smsname: null
                  settings:
                    window: true
                    tab: true
                    stay_in_lobby: false
                    sms_template: null
                    screen: true
                    provisioning_url: ''
                    provisioning_provider: default
                    provisioning_displayname: ''
                    phone_conf_provider: ''
                    phone_conf_manual: false
                    phone_conf_main_number: null
                    phone_conf_extra_numbers: null
                    lobby_url: null
                    id: 0067dc5e-3d09-484a-8929-2b7a8df04b01
                    enable_remote_control: false
                    email_invite_subject: null
                    email_invite_body: null
                    dod_field_order_template: null
                    content_filter_regex: ''
                    content_filter_pattern: null
                    auto_accept_in_lobby: false
                    audit_log: false
                    allow_edit_picture: true
                    allow_edit_name: true
                    allow_edit_headline: true
                    allow_changing_lobby_settings: true
                  session_limit: 25
                  remove_cw_branding: true
                  post_session_url: null
                  logo: >-
                    https://s3-eu-west-1.amazonaws.com/cw.company.logos/companyone.1539902728975359524.png
                  lname: Company One
                  license_count: null
                  integrations_enabled: false
                  id: 44109
                  host: meeting.is
                  hl: en
                  hard_limit_starts: null
                  geo: eu1
                  first_exceeded_soft_limit: null
                  demo_id: Fy-U_BBJ
                  api_access_enabled: true
                - current_plan: plan_1
                  sname: companytwo
                  smsname: null
                  settings:
                    window: true
                    tab: true
                    stay_in_lobby: false
                    sms_template: null
                    screen: true
                    provisioning_url: http://companytwo.com/
                    provisioning_provider: reseller
                    provisioning_displayname: Company Two Reseller
                    phone_conf_provider: ''
                    phone_conf_manual: false
                    phone_conf_main_number: null
                    phone_conf_extra_numbers: null
                    lobby_url: null
                    id: 832eb7f8-7ee8-42e9-a15f-6e51f8d051db
                    enable_remote_control: false
                    email_invite_subject: null
                    email_invite_body: null
                    dod_field_order_template: null
                    content_filter_regex: ''
                    content_filter_pattern: null
                    auto_accept_in_lobby: false
                    audit_log: false
                    allow_edit_picture: true
                    allow_edit_name: true
                    allow_edit_headline: true
                    allow_changing_lobby_settings: true
                  session_limit: 10
                  remove_cw_branding: true
                  post_session_url: https://www.companytwo.com/
                  logo: >-
                    https://s3-eu-west-1.amazonaws.com/cw.company.logos/3351995.1536163883867281235.png
                  lname: Company Two
                  license_count: 10
                  integrations_enabled: true
                  id: 27084
                  host: meeting.is
                  hl: en
                  hard_limit_starts: null
                  geo: eu1
                  first_exceeded_soft_limit: null
                  demo_id: 1cUt2RTd
                  api_access_enabled: true
      tags:
        - Clients management
      description: >-
        Retrieves a list of all clients (sub-companies) of the reseller for
        which you provide an API token (read-only token is OK).


        For each client, the list has an object with the following attributes,
        each of which can take the value null if unset:


        **id**: The unique, immutable, read-only ID of the client account, for
        use in other APIs.


        **sname**: The short name of the company. Used to construct links for
        that company, e.g. if **sname** is "acme" then a URL for that company
        could be meeting.is/acme


        **lname**: Human readable name on the account, used in various places in
        the CrankWheel user interface, including viewer-facing.


        **smsname**: A name used when sending SMS text messages on behalf of the
        account, shown in countries where the relevant sender name feature is
        available.


        **host**: The host name to use when building URLs. Can currently be
        either "meeting.is" (default) or "syna.is".


        **hl**: The human language (RFC 1766) that the user interface for
        viewers should be shown in. Available languages are 'en', 'de', 'fi',
        'fr', 'is', 'it', 'ja', 'nl', 'no' and 'pl'.


        **geo**: The geographical location of the primary server cluster for
        this account. Should be chosen to be as close to agents of the client
        company as possible. Available values are 'eu1' (default, Ireland),
        'eu2' (Frankfurt), 'us1' (Ohio) and 'ap1' (Singapore).


        **logo**: A URL to the client company's logo, or nil if unset.


        **post_session_url**: The URL viewers should be redirected to after
        completing a screen share with agents of the client company, or nil if
        unset in which case a default CrankWheel-provided page is used.


        **remove_cw_branding**: False or nil by default, which indicates
        "powered by CrankWheel" branding is shown. True to remove this type of
        branding from all viewer-facing interfaces.


        **session_limit**: A read-only attribute indicating the maximum number
        of meetings per month the account is allowed. A meeting is either an
        Instant Demos request that results in a phone call (and possibly a
        screen share), or a stand-alone screen share. Stand-alone screenshares
        are counted towards the limit when at least one viewer is connected for
        at least 40 seconds. May be 99999999 for unlimited. A screen share
        resulting from an Instant Demos request is not also counted as a
        standalone screen share.


        **license_count**: Another read-only attribute, this one indicating how
        many users may be created on the account. May be null or 99999999 for
        unlimited.


        **current_plan**: The API name of the currently set plan for the client,
        or "unset_or_custom" if a plan has not been set. This is a read-only
        field in the clients list, but may be set using the Set Plan for Client
        API. When it gets set it implicitly sets **session_limit** and
        **license_count** to match the chosen plan.


        **api_access_enabled**: True by default, can be set to false if you do
        not wish the client to have access to CrankWheel's programmatic API.


        **integrations_enabled**: False or nil by default. Set to true to allow
        the client company to use CrankWheel's Salesforce integration.


        **demo_id**: If nil, the client company has not enabled Instant Demos.
        If not nil, this is the demo ID for the account, which is the only
        non-static part of the Instant Demos JavaScript snippet.


        **first_exceeded_soft_limit** and **hard_limit_starts**: These must both
        be set at once, or both be unset to null at once. They are UTC+0
        timestamps in the format "YYYY-MM-DD HH:mm:SS.0Z", for example
        "2019-03-03 15:08:10.0Z". **first_exceeded_soft_limit** must precede
        **hard_limit_starts**. If the current time is between
        **first_exceeded_soft_limit** and **hard_limit_starts**, then CrankWheel
        will indicate to agents of the client that their company account is on a
        probationary period, they have unlimited usage but it will switch to a
        hard limit on **hard_limit_starts** unless they upgrade. If the current
        time is after **hard_limit_starts**, screen sharing sessions in excess
        of **session_limit** in the trailing 28-day period will be disallowed
        and a web page will pop up instead explaining that the company has
        exceeded its limits and needs to upgrade if it still wishes to screen
        share.


        Within the **settings** collection are more fine-grained settings. This
        collection contains a **settings.id** that must be set to the same value
        if you want to use the Update Client API to modify settings, but you can
        leave out any other setting parameters that you do not wish to modify.


        **settings.id**: The unique ID of the settings object, which must be
        used when updating the object.


        **settings.provisioning_provider**: Can be "default" or "reseller". If
        it is "reseller", you can use the reseller single sign-on API.


        **settings.provisioning_displayname**: This is nil when the provider is
        default, otherwise should be set. It is used used as a descriptive name
        for the reseller account where users should go to log in, as well as
        add/remove users.


        **settings.provisioning_url**: This is nil when the provider is default,
        otherwise should be set. It is used to link back to where users should
        go to log in or add and remove users.


        **settings.(window|tab|screen)**: These are true by default. For any of
        them, if set to false, that sharing mode will be disallowed for agents
        on this account.


        **settings.allow_edit_(picture|name|headline)**: Default true. If set to
        false, agents themselves cannot edit their picture/name/headline through
        the options page.


        **settings.allow_changing_lobby_settings**: Default true. If false,
        administrators on the account cannot change the **sname** parameter on
        the account.


        **settings.enable_remote_control**: Default false. Set to true to enable
        the Remote Control functionality on this account.


        **settings.audit_log**: Default false. Set to true to enable the Audit
        Log functionality on this account.


        **settings.content_filter_pattern**: A match pattern, as described
        [here](https://developer.chrome.com/extensions/match_patterns), to limit
        screen sharing on this account to a defined set of websites/pages that
        CrankWheel should allow agents to screen share on this account when
        sharing a tab. Any URLs not matching one of these patterns will be
        disallowed from screen sharing when sharing a browser tab. When set,
        this indirectly sets **settings.content_filter_regex** which should
        never be directly set.


        **settings.sms_template**: Normally unset. This allows you to set a
        template for SMS text messages other than the default. The template must
        include {{link}} as a placeholder that will be replaced with the
        dynamically-created link to join the agent's session.


        **settings.email_invite_subject** and **settings.email_invite_body**:
        Normally unset. This allows you to modify the email template used to
        invite viewers to a session. In either the email subject or body, you
        may use {{userName}} and {{screenSharingLink}} as placeholders that will
        be replaced with the agent's configured name and a link to view their
        screen share, respectively. You must use {{screenSharingLink}} at least
        once in the body.


        **settings.dod_field_order_template**: Default nil. Set to a
        comma-separated list of Instant Demos field names to have those fields
        always appear in that order and before other fields when presenting an
        Instant Demos prospect.


        **settings.phone_conf_manual**: Default false. If set to true, the
        fields **phone_conf_provider**, **phone_conf_main_number** and
        **phone_conf_extra_numbers** may be set to specify details of the phone
        conferencing provider that is being manually configured on the account.


        **settings.lobby_url**: Default unset. Custom lobby URL for company to
        use if redirect is set up from URL to meeting.is/company. This lets a
        client company set up a custom domain name or web page that redirects to
        the CrankWheel lobby or hosts it in an iframe, and this setting makes
        the custom domain name or web page URL show up in presenters' user
        interfaces.


        **settings.stay_in_lobby** and **settings.auto_accept_in_lobby**: These
        should not be changed from false. They are deprecated fields and will be
        removed in a later version.
    post:
      summary: Create client
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '201':
          description: Create client
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:32:56 GMT
            Content-Length:
              schema:
                type: integer
              example: 1132
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: 871ddpel8svvjef971astctg67et3gk2
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  current_plan:
                    type: string
                  sname:
                    type: string
                  smsname:
                    type: 'null'
                  settings:
                    type: object
                    properties:
                      window:
                        type: boolean
                      tab:
                        type: boolean
                      stay_in_lobby:
                        type: boolean
                      sms_template:
                        type: string
                      screen:
                        type: boolean
                      provisioning_url:
                        type: string
                        format: uri
                      provisioning_provider:
                        type: string
                      provisioning_displayname:
                        type: string
                      phone_conf_provider:
                        type: string
                      phone_conf_manual:
                        type: boolean
                      phone_conf_main_number:
                        type: string
                      phone_conf_extra_numbers:
                        type: string
                      lobby_url:
                        type: string
                      id:
                        type: string
                      enable_remote_control:
                        type: boolean
                      email_invite_subject:
                        type: string
                      email_invite_body:
                        type: string
                      dod_field_order_template:
                        type: string
                      black_list_regex:
                        type: string
                      black_list_pattern:
                        type: string
                      auto_accept_in_lobby:
                        type: boolean
                      audit_log:
                        type: boolean
                      allow_edit_picture:
                        type: boolean
                      allow_edit_name:
                        type: boolean
                      allow_edit_headline:
                        type: boolean
                      allow_changing_lobby_settings:
                        type: boolean
                  session_limit:
                    type: 'null'
                  remove_cw_branding:
                    type: boolean
                  post_session_url:
                    type: 'null'
                  logo:
                    type: 'null'
                  lname:
                    type: string
                  license_count:
                    type: 'null'
                  integrations_enabled:
                    type: boolean
                  id:
                    type: integer
                  host:
                    type: string
                  hl:
                    type: string
                  hard_limit_starts:
                    type: 'null'
                  geo:
                    type: string
                  first_exceeded_soft_limit:
                    type: 'null'
                  demo_id:
                    type: 'null'
                  api_access_enabled:
                    type: boolean
              example:
                current_plan: unset_or_custom
                sname: shortname78
                smsname: null
                settings:
                  window: true
                  tab: true
                  stay_in_lobby: false
                  sms_template: ''
                  screen: true
                  provisioning_url: https://longname.com/login
                  provisioning_provider: reseller
                  provisioning_displayname: Long Name Sales Console
                  phone_conf_provider: ''
                  phone_conf_manual: false
                  phone_conf_main_number: ''
                  phone_conf_extra_numbers: ''
                  lobby_url: ''
                  id: 6b3ddac7-af41-4a60-913c-1960068d3513
                  enable_remote_control: false
                  email_invite_subject: ''
                  email_invite_body: ''
                  dod_field_order_template: ''
                  black_list_regex: ''
                  black_list_pattern: ''
                  auto_accept_in_lobby: false
                  audit_log: false
                  allow_edit_picture: true
                  allow_edit_name: true
                  allow_edit_headline: true
                  allow_changing_lobby_settings: true
                session_limit: null
                remove_cw_branding: false
                post_session_url: null
                logo: null
                lname: Long Name for Company
                license_count: null
                integrations_enabled: false
                id: 40171
                host: meeting.is
                hl: en
                hard_limit_starts: null
                geo: eu1
                first_exceeded_soft_limit: null
                demo_id: null
                api_access_enabled: true
        '400':
          description: Create client, sname too long
          headers:
            server:
              schema:
                type: string
              example: Cowboy
            date:
              schema:
                type: string
              example: Fri, 14 Jun 2019 15:35:33 GMT
            content-length:
              schema:
                type: integer
              example: 58
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: mpb0nljl1v41k4akvhqcq5155g2qjm19
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: object
                    properties:
                      sname:
                        type: array
                        items:
                          type: string
              example:
                errors:
                  sname:
                    - should be at most 32 character(s)
        '409':
          description: >-
            Create client (sname already taken, by a company that is a client of
            this reseller)
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Mon, 15 Mar 2021 15:09:20 GMT
            Content-Length:
              schema:
                type: integer
              example: 59
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: u1v9qcpt3urojdhgpkeaq84u3if16pqc
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: integer
                  errors:
                    type: object
                    properties:
                      sname:
                        type: array
                        items:
                          type: string
              example:
                id: 112533
                errors:
                  sname:
                    - has already been taken
      tags:
        - Clients management
      description: >
        This creates a client under your reseller account.


        You may send any or all of the fields documented under the Get Clients
        List API, unless they are read-only or an ID field.


        Note the following constraints on fields:


        *sname*: Must be 7 to 32 characters long, lower-case alphanumeric.


        *smsname*: Must be 11 characters or shorter, alphanumeric including at
        least one character a-z or A-Z.
  /ss/rsapi/clients/{id}:
    get:
      summary: Show client by ID
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: Show client by ID
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:31:18 GMT
            Transfer-Encoding:
              schema:
                type: string
              example: chunked
            Connection:
              schema:
                type: string
              example: keep-alive
            Vary:
              schema:
                type: string
              example: Accept-Encoding
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: 5qknmcr77n45fr07fko9upg4s4fr9pa5
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
            Content-Encoding:
              schema:
                type: string
              example: gzip
          content:
            application/json:
              schema:
                type: object
                properties:
                  current_plan:
                    type: string
                  sname:
                    type: string
                  smsname:
                    type: 'null'
                  settings:
                    type: object
                    properties:
                      window:
                        type: boolean
                      tab:
                        type: boolean
                      stay_in_lobby:
                        type: boolean
                      sms_template:
                        type: 'null'
                      screen:
                        type: boolean
                      provisioning_url:
                        type: string
                        format: uri
                      provisioning_provider:
                        type: string
                      provisioning_displayname:
                        type: string
                      phone_conf_provider:
                        type: string
                      phone_conf_manual:
                        type: boolean
                      phone_conf_main_number:
                        type: 'null'
                      phone_conf_extra_numbers:
                        type: 'null'
                      lobby_url:
                        type: 'null'
                      id:
                        type: string
                      enable_remote_control:
                        type: boolean
                      email_invite_subject:
                        type: 'null'
                      email_invite_body:
                        type: 'null'
                      dod_field_order_template:
                        type: 'null'
                      black_list_regex:
                        type: string
                      black_list_pattern:
                        type: 'null'
                      auto_accept_in_lobby:
                        type: boolean
                      audit_log:
                        type: boolean
                      allow_edit_picture:
                        type: boolean
                      allow_edit_name:
                        type: boolean
                      allow_edit_headline:
                        type: boolean
                      allow_changing_lobby_settings:
                        type: boolean
                  session_limit:
                    type: integer
                  remove_cw_branding:
                    type: boolean
                  post_session_url:
                    type: string
                    format: uri
                  logo:
                    type: string
                    format: uri
                  lname:
                    type: string
                  license_count:
                    type: integer
                  integrations_enabled:
                    type: boolean
                  id:
                    type: integer
                  host:
                    type: string
                  hl:
                    type: string
                  hard_limit_starts:
                    type: 'null'
                  geo:
                    type: string
                  first_exceeded_soft_limit:
                    type: 'null'
                  demo_id:
                    type: string
                  api_access_enabled:
                    type: boolean
              example:
                current_plan: plan_1
                sname: companyone
                smsname: null
                settings:
                  window: true
                  tab: true
                  stay_in_lobby: false
                  sms_template: null
                  screen: true
                  provisioning_url: http://companyone.com/
                  provisioning_provider: reseller
                  provisioning_displayname: Company One Reseller
                  phone_conf_provider: ''
                  phone_conf_manual: false
                  phone_conf_main_number: null
                  phone_conf_extra_numbers: null
                  lobby_url: null
                  id: 832eb7f8-7ff8-42e9-a15f-6e51f8d051db
                  enable_remote_control: false
                  email_invite_subject: null
                  email_invite_body: null
                  dod_field_order_template: null
                  black_list_regex: ''
                  black_list_pattern: null
                  auto_accept_in_lobby: false
                  audit_log: false
                  allow_edit_picture: true
                  allow_edit_name: true
                  allow_edit_headline: true
                  allow_changing_lobby_settings: true
                session_limit: 10
                remove_cw_branding: true
                post_session_url: https://www.companyone.com/
                logo: >-
                  https://s3-eu-west-1.amazonaws.com/cw.company.logos/335199.1536163883867281235.png
                lname: Company One
                license_count: 10
                integrations_enabled: true
                id: 27084
                host: meeting.is
                hl: en
                hard_limit_starts: null
                geo: eu1
                first_exceeded_soft_limit: null
                demo_id: 1cUt2ESd
                api_access_enabled: true
      tags:
        - Clients management
      description: >-
        This shows a particular client. For details on the fields you will
        receive for the client, see the Get Clients List API.
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        example: 40171
    patch:
      summary: Update client
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '204':
          description: Update client
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:33:53 GMT
            Content-Length:
              schema:
                type: integer
              example: 1130
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: d0enknn2gtcv9km2rub0l2qnrrk0t5j9
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  current_plan:
                    type: string
                  sname:
                    type: string
                  smsname:
                    type: 'null'
                  settings:
                    type: object
                    properties:
                      window:
                        type: boolean
                      tab:
                        type: boolean
                      stay_in_lobby:
                        type: boolean
                      sms_template:
                        type: string
                      screen:
                        type: boolean
                      provisioning_url:
                        type: string
                        format: uri
                      provisioning_provider:
                        type: string
                      provisioning_displayname:
                        type: string
                      phone_conf_provider:
                        type: string
                      phone_conf_manual:
                        type: boolean
                      phone_conf_main_number:
                        type: string
                      phone_conf_extra_numbers:
                        type: string
                      lobby_url:
                        type: string
                      id:
                        type: string
                      enable_remote_control:
                        type: boolean
                      email_invite_subject:
                        type: string
                      email_invite_body:
                        type: string
                      dod_field_order_template:
                        type: string
                      black_list_regex:
                        type: string
                      black_list_pattern:
                        type: string
                      auto_accept_in_lobby:
                        type: boolean
                      audit_log:
                        type: boolean
                      allow_edit_picture:
                        type: boolean
                      allow_edit_name:
                        type: boolean
                      allow_edit_headline:
                        type: boolean
                      allow_changing_lobby_settings:
                        type: boolean
                  session_limit:
                    type: integer
                  remove_cw_branding:
                    type: boolean
                  post_session_url:
                    type: 'null'
                  logo:
                    type: 'null'
                  lname:
                    type: string
                  license_count:
                    type: 'null'
                  integrations_enabled:
                    type: boolean
                  id:
                    type: integer
                  host:
                    type: string
                  hl:
                    type: string
                  hard_limit_starts:
                    type: 'null'
                  geo:
                    type: string
                  first_exceeded_soft_limit:
                    type: 'null'
                  demo_id:
                    type: 'null'
                  api_access_enabled:
                    type: boolean
              example:
                current_plan: unset_or_custom
                sname: shortname78
                smsname: null
                settings:
                  window: true
                  tab: true
                  stay_in_lobby: false
                  sms_template: ''
                  screen: true
                  provisioning_url: https://longname.com/login
                  provisioning_provider: reseller
                  provisioning_displayname: Long Name Sales Console
                  phone_conf_provider: ''
                  phone_conf_manual: false
                  phone_conf_main_number: ''
                  phone_conf_extra_numbers: ''
                  lobby_url: ''
                  id: 6b3ddac7-af41-4a60-913c-1960068d3513
                  enable_remote_control: false
                  email_invite_subject: ''
                  email_invite_body: ''
                  dod_field_order_template: ''
                  black_list_regex: ''
                  black_list_pattern: ''
                  auto_accept_in_lobby: false
                  audit_log: false
                  allow_edit_picture: true
                  allow_edit_name: true
                  allow_edit_headline: true
                  allow_changing_lobby_settings: true
                session_limit: 25
                remove_cw_branding: false
                post_session_url: null
                logo: null
                lname: Long Name for Company
                license_count: null
                integrations_enabled: false
                id: 40171
                host: meeting.is
                hl: en
                hard_limit_starts: null
                geo: us1
                first_exceeded_soft_limit: null
                demo_id: null
                api_access_enabled: true
      tags:
        - Clients management
      description: >-
        Update a client, by ID.


        You may include any or all of the parameters documented for the Get
        Clients List API, including settings.


        Note that if you include "settings" you must include the "id" sub-field
        of settings with the same value that it previously was (you will see
        this value when you create the client or list or show clients).
    delete:
      summary: Delete client
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '204':
          description: Delete client
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:34:37 GMT
            Content-Length:
              schema:
                type: integer
              example: 22
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: 5v20rgpsr83i0iso86eitf4f6selhbb7
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: string
              example: Deleted successfully
      tags:
        - Clients management
      description: Deletes a client, by its ID.
  /ss/rsapi/clients/{id}/plan/{plan_api_name}:
    post:
      summary: Set plan for client
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '204':
          description: Set plan for client
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:34:55 GMT
            Content-Length:
              schema:
                type: integer
              example: 9
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: q9k1sh2ab435k0gqhfnar8ihi1itk1br
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: string
              example: Success
      tags:
        - Clients management
      description: >-
        Sets the plan for a client. The plan set must be the API name of one of
        the available plans for the current reseller - see the Get Available
        Plans API.
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        example: 27084
      - name: plan_api_name
        in: path
        required: true
        schema:
          type: string
        example: plan_api_key_1
  /ss/rsapi/clients/{id}/usage:
    get:
      summary: Get client usage
      parameters:
        - name: start
          in: query
          description: Default is 28x24h before current time
          schema:
            type: string
          example: '2019-01-01T10:04:43.548148Z'
        - name: end
          in: query
          description: Default is current time
          schema:
            type: string
          example: '2019-02-20T10:04:43.548148Z'
        - name: min_seconds
          in: query
          description: Default is 40
          schema:
            type: integer
          example: 60
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: Get client usage
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:36:15 GMT
            Content-Length:
              schema:
                type: integer
              example: 130
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: tjddbji20vo0cj2er7okos857ikotun1
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  start:
                    type: string
                    format: date-time
                  num_sessions:
                    type: integer
                  min_seconds:
                    type: integer
                  end:
                    type: string
                    format: date-time
                  company_id:
                    type: string
                    format: utc-millisec
              example:
                start: '2019-01-01T10:04:43.548148Z'
                num_sessions: 110
                min_seconds: 60
                end: '2019-02-20T10:04:43.548148Z'
                company_id: '27084'
      tags:
        - Clients management
      description: >-
        Counts the number of sessions (meetings) done by the given client in the
        specified period. A meeting is defined as either of:
           1. An outbound screen sharing session that lasts at least X seconds (default 40) with at least one viewer connected; or
           2. An Instant Demo request where a phone call to the prospect is successfully made, and where a screen share may also happen (the screen share is not double counted).

        Start and end must either both be set or neither of them be set. All
        parameters except id are optional.
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        example: 41003
  /ss/rsapi/clients/{id}/billing:
    get:
      summary: Get client billing details
      parameters:
        - name: start
          in: query
          description: Start of period
          schema:
            type: string
          example: '2019-02-01T00:00:00Z'
        - name: end
          in: query
          description: End of period
          schema:
            type: string
          example: '2019-02-28T23:59:59Z'
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: Get client billing details
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:37:03 GMT
            Content-Length:
              schema:
                type: integer
              example: 867
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: regt1jtc5tho2eabq8apadcn9f5rfk67
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_period_seconds:
                    type: integer
                  starting:
                    type: string
                    format: date-time
                  sname:
                    type: string
                  plans_pro_rata:
                    type: object
                    properties:
                      plan_2:
                        type: object
                        properties:
                          units:
                            type: number
                          human_name:
                            type: string
                      unset_or_custom:
                        type: object
                        properties:
                          units:
                            type: number
                          human_name:
                            type: string
                  periods:
                    type: array
                    items:
                      type: object
                      properties:
                        set_by:
                          type: string
                        set_at:
                          type: string
                          format: date-time
                        pro_rata:
                          type: number
                        human_name:
                          type: string
                        effective_to:
                          type: string
                          format: style
                        effective_seconds:
                          type: integer
                        effective_from:
                          type: string
                          format: date-time
                        api_name:
                          type: string
                  lname:
                    type: string
                  ending:
                    type: string
                    format: date-time
                  company_id:
                    type: integer
              example:
                total_period_seconds: 2419199
                starting: '2019-02-01T00:00:00Z'
                sname: companyone
                plans_pro_rata:
                  plan_2:
                    units: 0.02059690004832178
                    human_name: Example Plan 2
                  unset_or_custom:
                    units: 0.979402686591719
                    human_name: Unset or custom plan
                periods:
                  - set_by: nobody
                    set_at: '2019-02-01T00:00:00Z'
                    pro_rata: 0.979402686591719
                    human_name: Unset or custom plan
                    effective_to: '2019-02-28T10:09:30.701107'
                    effective_seconds: 2369370
                    effective_from: '2019-02-01T00:00:00Z'
                    api_name: unset_or_custom
                  - set_by: exampleadmin@example.com
                    set_at: '2019-02-28T10:09:30.701107'
                    pro_rata: 0.02059690004832178
                    human_name: Example Plan 2
                    effective_to: '2019-02-28T23:59:59Z'
                    effective_seconds: 49828
                    effective_from: '2019-02-28T10:09:30.701107'
                    api_name: plan_2
                lname: Company One
                ending: '2019-02-28T23:59:59Z'
                company_id: 27084
      tags:
        - Clients management
      description: >-
        Retrieves billing details for a particular client, from a start
        timestamp to an end timestamp. These are typically good to set to the
        first and last second of a given month, but can be done for any period.


        The object returned contains the following properties:


        **total_period_seconds**: Total number of seconds in the requested
        period.


        **starting**: The start timestamp.


        **ending**: The end timestamp.


        **company_id**: The ID of the client company this was requested for.


        **sname**: Identical to the **sname** (short name, for building URLs)
        parameter for the client company this was requested for.


        **lname**: Identical to the **lname** (human readable name, for user
        interfaces) parameter for the client company this was requested for.


        In addition there is a collection, **plans_pro_rata**. It has a key for
        each plan that was in effect during the period, where the key's value is
        the API name of the plan. The object under each key has the following
        properties:


        **units**: How many units of the requested period this plan was in
        effect for, in total (plans may have been changed back and forth but
        will be summed here).


        **human_name**: The human-readable name of the plan.


        Finally, there is a list under the key **periods** ordered from oldest
        to newest sub-period, where each list item is an object that indicates a
        sub-period within the requested period during which a particular plan
        was in effect. Each object in the list has these properties:


        **api_name**: The API name of the plan that was set.


        **human_name**: The human-readable name of the plan that was set.


        **set_by**: Either "nobody" (in the case of an unset or custom plan), or
        the email address of the administrator who set (or whose API key was
        used to set) the plan on this client company.


        **set_at**: A timestamp (UTC+0) indicating when this plan was set on the
        client.


        **effective_from**: A timestamp indicating which time within the
        requested period this plan was effective from. This will either be equal
        to **set_at** or be the start of the period, whichever is later.


        **effective_to**: A timestamp indicating which time within the requested
        period this plan was effective to. This will either indicate the start
        of a new period, or it will be equal to the end of the period, whichever
        is earlier.


        **pro_rata**: How many units this period lasted (where 1.0 would
        indicate it lasted from the requested start timestamp to the requested
        end timestamp). This is equal to **effective_seconds** divided by
        **total_period_seconds**.
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: integer
        example: 41003
  /ss/rsapi/grant_token/{email}:
    post:
      summary: Grant token
      parameters:
        - name: multi_login
          in: query
          schema:
            type: boolean
          example: true
        - name: dest_url
          in: query
          schema:
            type: string
          example: /ss#crankwheelmagicshowui:mainandclose
        - name: clientid
          in: query
          schema:
            type: integer
          example: 36727
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: Grant token
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:47:51 GMT
            Content-Length:
              schema:
                type: integer
              example: 156
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: ic55on8datofnvqrjnnd4l8aisjlt12r
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  login_url:
                    type: string
                    format: uri
              example:
                login_url: >-
                  https://meeting.is/ss/auth/rlogin/exampleuser@exampleclient.com:82E2B7B7F52CCAB349BA588D95B263FA00BE80867A9D656D053167674D6F03C2
      tags:
        - Single sign-on
      description: >-
        Given an email address, returns a URL that you can send the user to in
        order to log them in.


        The URL is valid for 2 minutes.


        The email address must be a user under one of the reseller's client
        companies, and that company's **settings.provisioning_provider** must be
        set to "reseller".


        If you specify the optional **clientid** parameter, then if the email
        address you provided does not exist as a user account at all, then it
        will be created as a normal user account under the company identified by
        **clientid**.


        If you specify the optional **dest_url** parameter, the user will end up
        on that page as SSO completes. This may either be a URI relative to the
        CrankWheel servers (e.g. ´/ss/account/status´ to take them to their
        account status rather than the dashboard homepage) or it can be a full
        URL, any standard web page.


        If you specify the optional **multi_login** parameter and set it to
        **true** (NB: this cannot be done in conjunction with using the
        **clientid** parameter), the system will look up all sub-accounts where
        the given email address has access, either as-is or prefixed (see
        details documented at "List login-options for email address" API below).
        If there is exactly one such address, log-in will proceed as usual. If
        there is more than one, the user will be shown a list of clients
        (sub-accounts) they have access to and prompted to choose which one they
        want to login to.


        There are three ways to use the SSO URL that you receive back from this
        API. Any way you use it, it will log the requested user in to
        CrankWheel, but the behavior beside that is one of these:


        1. Use it unmodified. This will navigate the user to the CrankWheel
        dashboard, as well as causing the CrankWheel pop-up to be shown (if
        installed).

        2. Use it with ?mode=dashboard_only appended. This will only navigate
        the user to the CrankWheel dashboard.

        3. Use it with ?mode=popup_only appended, and make it open in a new
        window or tab. If CrankWheel is installed, the pop-up will be shown, and
        the tab or window you opened will be almost instantly automatically
        closed by CrankWheel. If CrankWheel is not installed, the tab or window
        you opened will show the CrankWheel dashboard, which includes a "Launch
        CrankWheel" button, which upon use will guide the user through
        installation of the CrankWheel extension when needed.
    parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
        example: ''
  /ss/rsapi/grant_token/{email}/list_clients:
    get:
      summary: List log-in options for email address in clients
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: List log-in options for email address in clients
          headers:
            Server:
              schema:
                type: string
              example: nginx/1.17.10
            Date:
              schema:
                type: string
              example: Mon, 11 May 2020 13:20:35 GMT
            Content-Length:
              schema:
                type: integer
              example: 313
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: ga4s3htk4qa502e286mqoojhet3tb9il
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    sname:
                      type: string
                    role:
                      type: string
                    lname:
                      type: string
                    email:
                      type: string
                      format: email
                    client_id:
                      type: integer
              example:
                - sname: ssouno
                  role: user
                  lname: SSO uno
                  email: 81387-cw-joi@crankwheel.com
                  client_id: 81387
                - sname: ssoduo
                  role: user
                  lname: SSO duo
                  email: joi@crankwheel.com
                  client_id: 81388
                - sname: ssoduo
                  role: user
                  lname: SSO duo
                  email: 81388-cw-joi@crankwheel.com
                  client_id: 81388
      tags:
        - Single sign-on
      description: >-
        Given an email address, returns a list of potentially more-specific
        email addresses you can use for the "Grant token" API with details on
        the clients they will grant access to, and the type of access they will
        grant.


        This API is designed to facilitate log-in by a single email address to
        various different clients. Along with a feature we call account email
        flexibility, it lets a single email log in as different accounts under
        the same reseller parent.


        Account email flexibility is as follows: When you add users to a client,
        you may either add their email address verbatim as a user, or you may
        prefix it in a specific way, which is illustrated here by example for a
        user with email `example@emaildomain.com` logging into the client with
        account ID `12345`: `12345-cw-example@emaildomain.com`. In fact you may
        use any unique string in front of the `-cw-` token but we recommend
        using the account ID. CrankWheel will in most user interfaces ignore or
        not show everything up to and including the `-cw-` token, including when
        it needs to send the user emails (e.g. Instant Demo notifications).


        Calling this API will give you a list of all user accounts in any client
        of your reseller, that either match the email address you submit
        exactly, or are prefixed as shown above. It will list only user accounts
        that already exist within clients of your reseller. If none match, you
        will receive an empty list as a response. If one or more match, you will
        receive a list in response, where each item is a map with the following
        keys:
           1. `email`: The fully-specific email address you can use to log this user in via SSO (Grant token API)
           2. `client_id`: The ID of the client they would be logged into if you SSO using this email address
           3. `sname`: The short name of the client they would log into
           4. `lname`: The long (human-readable) name of the client they would log into
           5. `role`: The role ('user', 'admin', 'owner') they would log in as
    parameters:
      - name: email
        in: path
        required: true
        schema:
          type: string
        example: joi@crankwheel.com
  /ss/rsapi/reseller/billing:
    get:
      summary: Get billing overview
      parameters:
        - name: start
          in: query
          description: Default is 28x24h before current time
          schema:
            type: string
          example: '2019-02-01T00:00:00.0Z'
        - name: end
          in: query
          description: Default is current time
          schema:
            type: string
          example: '2019-02-28T23:59:59.999999Z'
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: Get billing overview
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 15:54:34 GMT
            Content-Length:
              schema:
                type: integer
              example: 1661
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: m43hv9fmij48lsh7b2rlqcklf49sut6j
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: object
                properties:
                  total_pro_rata:
                    type: object
                    properties:
                      plan_2:
                        type: object
                        properties:
                          units:
                            type: number
                          human_name:
                            type: string
                      unset_or_custom:
                        type: object
                        properties:
                          units:
                            type: number
                          human_name:
                            type: string
                  starting:
                    type: string
                    format: date-time
                  per_company:
                    type: array
                    items:
                      type: object
                      properties:
                        total_period_seconds:
                          type: integer
                        starting:
                          type: string
                          format: date-time
                        sname:
                          type: string
                        plans_pro_rata:
                          type: object
                          properties:
                            unset_or_custom:
                              type: object
                              properties:
                                units:
                                  type: integer
                                human_name:
                                  type: string
                        periods:
                          type: array
                          items:
                            type: object
                            properties:
                              set_by:
                                type: string
                              set_at:
                                type: string
                                format: date-time
                              pro_rata:
                                type: integer
                              human_name:
                                type: string
                              effective_to:
                                type: string
                                format: date-time
                              effective_seconds:
                                type: integer
                              effective_from:
                                type: string
                                format: date-time
                              api_name:
                                type: string
                        lname:
                          type: string
                        ending:
                          type: string
                          format: date-time
                        company_id:
                          type: integer
                  ending:
                    type: string
                    format: date-time
              example:
                total_pro_rata:
                  plan_2:
                    units: 0.020597313408281005
                    human_name: Example Plan 2
                  unset_or_custom:
                    units: 1.979402686591719
                    human_name: Unset or custom plan
                starting: '2019-02-01T00:00:00.0Z'
                per_company:
                  - total_period_seconds: 2419199
                    starting: '2019-02-01T00:00:00.0Z'
                    sname: companytwo
                    plans_pro_rata:
                      unset_or_custom:
                        units: 1
                        human_name: Unset or custom plan
                    periods:
                      - set_by: nobody
                        set_at: '2019-02-01T00:00:00.0Z'
                        pro_rata: 1
                        human_name: Unset or custom plan
                        effective_to: '2019-02-28T23:59:59.999999Z'
                        effective_seconds: 2419199
                        effective_from: '2019-02-01T00:00:00.0Z'
                        api_name: unset_or_custom
                    lname: Company Two
                    ending: '2019-02-28T23:59:59.999999Z'
                    company_id: 28619
                  - total_period_seconds: 2419199
                    starting: '2019-02-01T00:00:00.0Z'
                    sname: companyone
                    plans_pro_rata:
                      plan_2:
                        units: 0.020597313408281005
                        human_name: Example Plan 2
                      unset_or_custom:
                        units: 0.979402686591719
                        human_name: Unset or custom plan
                    periods:
                      - set_by: nobody
                        set_at: '2019-02-01T00:00:00.0Z'
                        pro_rata: 0.979402686591719
                        human_name: Unset or custom plan
                        effective_to: '2019-02-28T10:09:30.701107'
                        effective_seconds: 2369370
                        effective_from: '2019-02-01T00:00:00.0Z'
                        api_name: unset_or_custom
                      - set_by: null
                        set_at: '2019-02-28T10:09:30.701107'
                        pro_rata: 0.020597313408281005
                        human_name: Example Plan 2
                        effective_to: '2019-02-28T23:59:59.999999Z'
                        effective_seconds: 49829
                        effective_from: '2019-02-28T10:09:30.701107'
                        api_name: plan_2
                    lname: Company One
                    ending: '2019-02-28T23:59:59.999999Z'
                    company_id: 27084
                ending: '2019-02-28T23:59:59.999999Z'
      tags:
        - Reseller management
      description: >-
        Retrieves a billing overview for all client companies of this reseller.


        You can use this for any period you like. If you use it for a whole
        month you will directly get the pro-rata units owed for each plan type.


        The returned object has **starting** and **ending** fields at the top
        level that simply reflect the parameters passed in.


        It also has a **per_company** field containing a list of details per
        client company. Each of the objects in this list are the same as what is
        returned by the Get Client Usage API, so refer to documentation there
        for the different field names.


        Lastly, there is a **total_pro_rata** object containing one key per plan
        that was in effect for at least one company (API names of plans). Within
        each such object are the fields **human_name** which is the
        human-readable name of the API, and **units** which counts the units of
        time (where each unit is the period between **starting** and **ending**)
        for which each plan was in effect. The sum of all units in the
        **total_pro_rata** collection will be equal to the count of companies
        managed by the reseller.
  /ss/rsapi/clients_usage:
    get:
      summary: Get usage history for all clients
      parameters:
        - name: from
          in: query
          schema:
            type: string
          example: '2020-01-01T00:00:00Z'
        - name: to
          in: query
          schema:
            type: string
          example: '2020-07-19T23:59:59Z'
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: Get usage history for all clients
          headers:
            Server:
              schema:
                type: string
              example: nginx/1.17.10
            Date:
              schema:
                type: string
              example: Sun, 19 Jul 2020 16:06:10 GMT
            Content-Length:
              schema:
                type: integer
              example: 26111
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: njhjq4hvq30n73ha99r6r6novb8jt7rt
          content:
            application/json:
              schema:
                type: object
                properties:
                  stats:
                    type: object
                    properties:
                      user_stats:
                        type: array
                        items:
                          type: object
                          properties:
                            user1@example.com:
                              type: object
                              properties:
                                total_sec:
                                  type: integer
                                total_count:
                                  type: integer
                                sname:
                                  type: string
                                  format: utc-millisec
                                lname:
                                  type: string
                      total_sec:
                        type: integer
                      total_count:
                        type: integer
                  sessions:
                    type: array
                    items:
                      type: object
                      properties:
                        viewer_info:
                          type: object
                          properties:
                            max_viewer_count:
                              type: integer
                        start_date:
                          type: string
                          format: date-time
                        sname:
                          type: string
                        lname:
                          type: string
                        end_date:
                          type: string
                          format: date-time
                        email:
                          type: string
                          format: email
                        duration:
                          type: integer
              example:
                stats:
                  user_stats:
                    - user1@example.com:
                        total_sec: 17
                        total_count: 1
                        sname: '137742285'
                        lname: CrankWheel individual
                    - user2@example.com:
                        total_sec: 2203
                        total_count: 17
                        sname: exampleco5
                        lname: CrankWheel free-for-individuals Plan
                    - user3@example.com:
                        total_sec: 88
                        total_count: 1
                        sname: adwordsexampleco
                        lname: AdWords salesperson example
                    - user4@example.com:
                        total_sec: 51
                        total_count: 3
                        sname: exampleco8
                        lname: Test Company
                    - user5@example.com:
                        total_sec: 9721
                        total_count: 80
                        sname: exampleco8
                        lname: Test Company
                    - user6@example.com:
                        total_sec: 382
                        total_count: 9
                        sname: exampleco
                        lname: Example Co
                    - user7@example.com:
                        total_sec: 121
                        total_count: 3
                        sname: exampleco
                        lname: Example Co
                  total_sec: 12583
                  total_count: 114
                sessions:
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T09:56:02.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-04-23T09:56:07.000000Z'
                    email: user6@example.com
                    duration: 5
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T14:28:45.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-23T14:28:52.000000Z'
                    email: user5@example.com
                    duration: 7
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T14:29:04.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-23T14:29:13.000000Z'
                    email: user5@example.com
                    duration: 9
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T14:29:20.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-23T14:29:25.000000Z'
                    email: user5@example.com
                    duration: 5
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T14:35:37.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-23T14:35:49.000000Z'
                    email: user5@example.com
                    duration: 12
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T14:39:55.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-23T14:40:02.000000Z'
                    email: user5@example.com
                    duration: 7
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T14:40:33.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-23T14:40:45.000000Z'
                    email: user5@example.com
                    duration: 12
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T16:34:52.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-23T16:35:01.000000Z'
                    email: user5@example.com
                    duration: 9
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-23T16:38:08.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-23T16:44:17.000000Z'
                    email: user5@example.com
                    duration: 369
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-04-24T16:42:10.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-04-24T16:48:12.000000Z'
                    email: user5@example.com
                    duration: 362
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-01T12:00:58.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-01T12:01:34.000000Z'
                    email: user5@example.com
                    duration: 36
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-01T12:01:56.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-01T12:02:02.000000Z'
                    email: user5@example.com
                    duration: 6
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-01T12:05:37.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-01T12:05:41.000000Z'
                    email: user5@example.com
                    duration: 4
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-01T12:06:43.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-01T12:06:49.000000Z'
                    email: user5@example.com
                    duration: 6
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-01T12:07:52.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-01T12:08:02.000000Z'
                    email: user5@example.com
                    duration: 10
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-01T12:08:52.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-01T12:08:57.000000Z'
                    email: user5@example.com
                    duration: 5
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-01T12:09:54.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-01T12:10:02.000000Z'
                    email: user5@example.com
                    duration: 8
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-03T09:28:54.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-03T09:28:58.000000Z'
                    email: user6@example.com
                    duration: 4
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-14T13:13:36.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-14T13:13:40.000000Z'
                    email: user4@example.com
                    duration: 4
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-14T13:15:19.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-14T13:15:39.000000Z'
                    email: user4@example.com
                    duration: 20
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-14T13:17:43.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-14T13:18:10.000000Z'
                    email: user4@example.com
                    duration: 27
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-14T13:21:22.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-14T13:21:31.000000Z'
                    email: user5@example.com
                    duration: 9
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-14T13:33:23.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-14T13:33:30.000000Z'
                    email: user5@example.com
                    duration: 7
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-14T13:38:26.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-14T13:38:32.000000Z'
                    email: user5@example.com
                    duration: 6
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T15:28:47.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T15:29:19.000000Z'
                    email: user2@example.com
                    duration: 32
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T15:29:35.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T15:29:37.000000Z'
                    email: user2@example.com
                    duration: 2
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T15:29:54.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T15:29:57.000000Z'
                    email: user2@example.com
                    duration: 3
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T15:30:20.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T15:30:27.000000Z'
                    email: user2@example.com
                    duration: 7
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T15:54:57.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T15:55:08.000000Z'
                    email: user2@example.com
                    duration: 11
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-15T16:10:31.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T16:10:31.000000Z'
                    email: user2@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T16:13:09.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T16:14:07.000000Z'
                    email: user2@example.com
                    duration: 58
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T16:14:20.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T16:14:23.000000Z'
                    email: user2@example.com
                    duration: 3
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T16:14:38.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T16:14:44.000000Z'
                    email: user2@example.com
                    duration: 6
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T16:15:23.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T16:15:26.000000Z'
                    email: user2@example.com
                    duration: 3
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-15T16:30:31.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T16:30:31.000000Z'
                    email: user2@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-15T16:30:50.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-15T16:31:38.000000Z'
                    email: user2@example.com
                    duration: 48
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-16T13:20:00.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-16T13:20:56.000000Z'
                    email: user7@example.com
                    duration: 56
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-17T09:01:08.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-17T09:01:11.000000Z'
                    email: user6@example.com
                    duration: 3
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-19T10:29:14.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-19T10:29:14.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-19T10:29:36.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-19T10:29:38.000000Z'
                    email: user5@example.com
                    duration: 2
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-19T18:57:00.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-19T18:57:05.000000Z'
                    email: user6@example.com
                    duration: 5
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-21T15:43:48.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-21T15:43:51.000000Z'
                    email: user7@example.com
                    duration: 3
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-21T15:49:43.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-21T15:49:43.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-21T16:03:13.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-21T16:03:13.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-21T16:20:15.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-21T16:20:15.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 3
                    start_date: '2020-05-23T08:15:32.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-23T08:20:04.000000Z'
                    email: user5@example.com
                    duration: 272
                  - viewer_info:
                      max_viewer_count: 24
                    start_date: '2020-05-24T12:27:37.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T12:50:38.000000Z'
                    email: user5@example.com
                    duration: 1381
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-24T12:52:26.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T12:52:26.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-24T13:07:31.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T13:07:31.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 5
                    start_date: '2020-05-24T13:23:32.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T13:40:27.000000Z'
                    email: user5@example.com
                    duration: 1015
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-24T13:40:38.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T13:40:45.000000Z'
                    email: user5@example.com
                    duration: 7
                  - viewer_info:
                      max_viewer_count: 30
                    start_date: '2020-05-24T14:24:04.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:26:35.000000Z'
                    email: user5@example.com
                    duration: 151
                  - viewer_info:
                      max_viewer_count: 8
                    start_date: '2020-05-24T14:27:05.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:27:36.000000Z'
                    email: user5@example.com
                    duration: 31
                  - viewer_info:
                      max_viewer_count: 3
                    start_date: '2020-05-24T14:27:51.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:28:40.000000Z'
                    email: user5@example.com
                    duration: 49
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-24T14:28:51.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:28:51.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-24T14:29:35.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:30:02.000000Z'
                    email: user5@example.com
                    duration: 27
                  - viewer_info:
                      max_viewer_count: 3
                    start_date: '2020-05-24T14:30:54.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:31:48.000000Z'
                    email: user5@example.com
                    duration: 54
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-24T14:31:58.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:32:11.000000Z'
                    email: user5@example.com
                    duration: 13
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-24T14:32:19.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:33:15.000000Z'
                    email: user5@example.com
                    duration: 56
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-24T14:33:25.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T14:33:45.000000Z'
                    email: user5@example.com
                    duration: 20
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-24T14:35:15.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-24T15:40:27.000000Z'
                    email: user5@example.com
                    duration: 3912
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-25T14:05:21.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-25T14:05:36.000000Z'
                    email: user5@example.com
                    duration: 15
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-25T14:08:53.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-25T14:09:05.000000Z'
                    email: user5@example.com
                    duration: 12
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-25T14:12:30.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-25T14:12:57.000000Z'
                    email: user5@example.com
                    duration: 27
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-25T14:13:20.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-25T14:18:10.000000Z'
                    email: user5@example.com
                    duration: 290
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-26T14:52:27.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-26T14:53:09.000000Z'
                    email: user5@example.com
                    duration: 42
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-26T14:53:18.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-26T14:53:18.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-26T14:53:44.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-26T14:53:47.000000Z'
                    email: user5@example.com
                    duration: 3
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-26T14:53:55.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-26T14:54:26.000000Z'
                    email: user5@example.com
                    duration: 31
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-26T14:53:58.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-26T14:53:58.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-26T14:57:19.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-26T14:57:56.000000Z'
                    email: user5@example.com
                    duration: 37
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-26T15:35:38.000000Z'
                    sname: adwordsexampleco
                    lname: AdWords salesperson example
                    end_date: '2020-05-26T15:37:06.000000Z'
                    email: user3@example.com
                    duration: 88
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-26T16:22:46.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-26T16:23:02.000000Z'
                    email: user5@example.com
                    duration: 16
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-26T16:24:31.000000Z'
                    sname: '137742285'
                    lname: CrankWheel individual
                    end_date: '2020-05-26T16:24:48.000000Z'
                    email: user1@example.com
                    duration: 17
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-26T16:59:00.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-26T17:00:02.000000Z'
                    email: user7@example.com
                    duration: 62
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-28T08:33:42.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-28T08:33:54.000000Z'
                    email: user5@example.com
                    duration: 12
                  - viewer_info:
                      max_viewer_count: 14
                    start_date: '2020-05-28T17:23:53.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-28T17:31:30.000000Z'
                    email: user2@example.com
                    duration: 457
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-28T17:31:55.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-28T17:31:55.000000Z'
                    email: user2@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 4
                    start_date: '2020-05-29T08:04:33.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-29T08:05:09.000000Z'
                    email: user5@example.com
                    duration: 36
                  - viewer_info:
                      max_viewer_count: 4
                    start_date: '2020-05-29T08:05:29.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-29T08:06:24.000000Z'
                    email: user5@example.com
                    duration: 55
                  - viewer_info:
                      max_viewer_count: 4
                    start_date: '2020-05-29T08:09:23.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-29T08:09:42.000000Z'
                    email: user5@example.com
                    duration: 19
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-29T15:04:09.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-29T15:04:09.000000Z'
                    email: user5@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:31:45.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:32:08.000000Z'
                    email: user5@example.com
                    duration: 23
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:32:16.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:32:21.000000Z'
                    email: user5@example.com
                    duration: 5
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:32:28.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:32:43.000000Z'
                    email: user5@example.com
                    duration: 15
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:35:02.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:35:09.000000Z'
                    email: user5@example.com
                    duration: 7
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:38:23.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:38:26.000000Z'
                    email: user5@example.com
                    duration: 3
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:46:09.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:46:14.000000Z'
                    email: user5@example.com
                    duration: 5
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:48:31.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:48:37.000000Z'
                    email: user5@example.com
                    duration: 6
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:51:16.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:51:23.000000Z'
                    email: user5@example.com
                    duration: 7
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T13:51:59.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:52:05.000000Z'
                    email: user5@example.com
                    duration: 6
                  - viewer_info:
                      max_viewer_count: 5
                    start_date: '2020-05-30T13:57:47.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T13:58:35.000000Z'
                    email: user5@example.com
                    duration: 48
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T14:06:20.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-30T14:06:51.000000Z'
                    email: user5@example.com
                    duration: 31
                  - viewer_info:
                      max_viewer_count: 2
                    start_date: '2020-05-30T14:34:17.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-30T14:53:05.000000Z'
                    email: user2@example.com
                    duration: 1128
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T14:53:38.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-30T14:55:29.000000Z'
                    email: user2@example.com
                    duration: 111
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T15:02:50.000000Z'
                    sname: exampleco5
                    lname: CrankWheel free-for-individuals Plan
                    end_date: '2020-05-30T15:08:24.000000Z'
                    email: user2@example.com
                    duration: 334
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T19:54:51.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-30T19:55:03.000000Z'
                    email: user6@example.com
                    duration: 12
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-30T19:55:24.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-30T19:55:33.000000Z'
                    email: user6@example.com
                    duration: 9
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-30T19:57:23.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-30T19:57:23.000000Z'
                    email: user6@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 0
                    start_date: '2020-05-30T19:58:27.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-30T19:58:27.000000Z'
                    email: user6@example.com
                    duration: 0
                  - viewer_info:
                      max_viewer_count: 301
                    start_date: '2020-05-30T19:59:06.000000Z'
                    sname: exampleco
                    lname: Example Co
                    end_date: '2020-05-30T20:04:50.000000Z'
                    email: user6@example.com
                    duration: 344
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-31T19:08:58.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-31T19:09:12.000000Z'
                    email: user5@example.com
                    duration: 14
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-31T19:09:22.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-31T19:10:36.000000Z'
                    email: user5@example.com
                    duration: 74
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-31T19:10:44.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-31T19:10:49.000000Z'
                    email: user5@example.com
                    duration: 5
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-05-31T19:11:16.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-05-31T19:11:25.000000Z'
                    email: user5@example.com
                    duration: 9
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-06-02T15:31:09.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T15:33:10.000000Z'
                    email: user5@example.com
                    duration: 121
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-06-02T15:33:31.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T15:34:19.000000Z'
                    email: user5@example.com
                    duration: 48
                  - viewer_info:
                      max_viewer_count: 4
                    start_date: '2020-06-02T15:35:04.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T15:35:25.000000Z'
                    email: user5@example.com
                    duration: 21
                  - viewer_info:
                      max_viewer_count: 3
                    start_date: '2020-06-02T15:35:43.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T15:38:03.000000Z'
                    email: user5@example.com
                    duration: 140
                  - viewer_info:
                      max_viewer_count: 3
                    start_date: '2020-06-02T18:34:36.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T18:34:58.000000Z'
                    email: user5@example.com
                    duration: 22
                  - viewer_info:
                      max_viewer_count: 7
                    start_date: '2020-06-02T18:35:20.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T18:36:59.000000Z'
                    email: user5@example.com
                    duration: 99
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-06-02T18:38:15.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T18:46:48.000000Z'
                    email: user5@example.com
                    duration: 513
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-06-02T18:45:17.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T18:45:39.000000Z'
                    email: user5@example.com
                    duration: 22
                  - viewer_info:
                      max_viewer_count: 1
                    start_date: '2020-06-02T18:46:58.000000Z'
                    sname: exampleco8
                    lname: Test Company
                    end_date: '2020-06-02T18:47:01.000000Z'
                    email: user5@example.com
                    duration: 3
      tags:
        - Reseller management
      description: >-
        Retrieves screen sharing usage history for all clients of this reseller.
        It includes both stand-alone screen shares as well as screen shares that
        may have resulted from an Instant Demos request.


        Note the to= and from= query parameters which are timestamps. If they
        are not given, the last 28 days of history will be retrieved.


        For authentication, set your own API key in your environment or paste it
        instead of {{crankwheel-reseller-api-key}} in the value for the
        Authorization header under the Headers tab.
  /ss/rsapi/reseller/plans:
    get:
      summary: Get available plans
      parameters:
        - name: Authorization
          in: header
          schema:
            type: string
          example: Basic {{crankwheel-reseller-api-key}}
      responses:
        '200':
          description: Get available plans
          headers:
            Server:
              schema:
                type: string
              example: nginx
            Date:
              schema:
                type: string
              example: Sun, 03 Mar 2019 16:00:11 GMT
            Content-Length:
              schema:
                type: integer
              example: 193
            Connection:
              schema:
                type: string
              example: keep-alive
            cache-control:
              schema:
                type: string
              example: max-age=0, private, must-revalidate
            x-request-id:
              schema:
                type: string
              example: 8voseobe4ebel1bks0j61c8fcdh60dob
            Strict-Transport-Security:
              schema:
                type: string
              example: max-age=15768000; includeSubDomains
          content:
            application/json:
              schema:
                type: array
                items:
                  type: object
                  properties:
                    session_limit:
                      type: integer
                    license_count:
                      type: integer
                    human_name:
                      type: string
                    api_name:
                      type: string
              example:
                - session_limit: 10
                  license_count: 10
                  human_name: Example Plan 1
                  api_name: plan_1
                - session_limit: 200
                  license_count: 200
                  human_name: Example Plan 2
                  api_name: plan_2
      tags:
        - Reseller management
      description: >-
        Provides details on the plans available for the current reseller. To
        have more plans added, contact
        [support@crankwheel.com](mailto:support@crankwheel.com).


        Returns a list of objects where each object has the following
        properties:


        **api_name**: The API handle to use for this plan.


        **human_name**: The human-readable name for the plan.


        **session_limit**: The maximum number of interactions that a client
        under this plan may use.


        **license_count**: The maximum number of named seats (licenses) that a
        client under this plan may use.
