swagger: "2.0"
schemes:
  - https
host: api.callcontrol.com
info:
  contact:
    email: info@kedlin.com
    name: Call Control
    url: https://www.callcontrol.com/documentation
  description: API for blocking phone calls with Call Control. Data is from crowdsourced community blacklist from 12+ million users and government agencies (FTC, FCC, IRS) Try with api_key 'demo', hit explore above, and then try phone numbers 18008472911,13157244022,17275567300,18008276655,12061231234.
  title: Call Control API
  version: 2015-11-01
  x-apisguru-categories:
    - telecom
  x-logo:
    backgroundColor: "#FFFFFF"
    url: https://twitter.com/CallControlLLC/profile_image?size=original
  x-origin:
    - format: swagger
      url: https://www.callcontrol.com/js/swagger/swagger.json
      version: "2.0"
  x-providerName: callcontrol.com
securityDefinitions:
  apiKey:
    description: API Key Authentication
    in: header
    name: apiKey
    type: apiKey
paths:
  "/api/2015-11-01/Complaints/{phoneNumber}":
    get:
      consumes: []
      deprecated: false
      description: "This is the main funciton to get data out of the call control reporting system<br />\r

        \            Try with api_key 'demo' and phone numbers 18008472911, 13157244022, 17275567300, 18008276655, and 12061231234 (last one not spam)"
      operationId: Complaints_Complaints
      parameters:
        - description: phone number to search
          in: path
          name: phoneNumber
          required: true
          type: string
      produces:
        - application/json
        - text/json
      responses:
        "200":
          description: OK
          schema:
            $ref: "#/definitions/Complaints"
      summary: "Complaints: Free service (with registration), providing community and government complaint lookup by phone number for up to 2,000 queries per month.  Details include number complaint rates from (FTC, FCC, IRS, Indiana Attorney  General) and key entity tag extractions from complaints."
      tags:
        - Complaints
  "/api/2015-11-01/Enterprise/GetUser/{phoneNumber}":
    get:
      consumes: []
      deprecated: false
      description: ""
      operationId: EnterpriseApi_GetUser
      parameters:
        - in: path
          name: phoneNumber
          required: true
          type: string
      produces:
        - application/json
        - text/json
      responses:
        "200":
          description: User Object
          schema:
            $ref: "#/definitions/CallControlUser"
        "400":
          description: Bad request (invalid phone number)
      summary: "Enterprise  GET: GetUser\r

        Returns the current information from the user;  try 12066194123 as demo"
      tags:
        - EnterpriseApi
  "/api/2015-11-01/Enterprise/ShouldBlock/{phoneNumber}/{userPhoneNumber}":
    get:
      consumes: []
      deprecated: false
      description: "This returns information required to perform basic call blocking behaviors\r

        \            Try with api_key 'demo' and phone numbers 18008472911, 13157244022, 17275567300, 18008276655, and 12061231234 (last one not spam)"
      operationId: EnterpriseApi_ShouldBlock
      parameters:
        - description: phone number to search
          in: path
          name: phoneNumber
          required: true
          type: string
        - description: (OPTIONAL) phone number of user to look up block rules
          in: path
          name: userPhoneNumber
          required: true
          type: string
      produces:
        - application/json
        - text/json
      responses:
        "200":
          description: true(block) false (no block)
          schema:
            enum:
              - allow
              - voiceMail
              - block
            type: string
        "400":
          description: Bad request (invalid phone number)
      summary: "Enterprise  GET: ShouldBlock\r

        Simple Enteprise which returns a call block proceed decision."
      tags:
        - EnterpriseApi
  /api/2015-11-01/Enterprise/UpsertUser:
    post:
      consumes:
        - application/json
        - text/json
      deprecated: false
      operationId: EnterpriseApi_UpsertUser
      parameters:
        - description: "[FromBody] User \r

            \            <remarks>This returns information required to perform basic call blocking behaviors.  The demo key will return ok, but will not save the data.<br /></remarks>"
          in: body
          name: user
          required: true
          schema:
            $ref: "#/definitions/CallControlUser"
      produces:
        - application/json
        - text/json
      responses:
        "200":
          description: Ok
          schema:
            type: object
        "400":
          description: Bad request (eg. invalid phone nubmer)
      summary: "UpsertUser: insert or update all properties from a user\r

        PhoneNumber\r

        WhiteList (list of phone numbers to whitelist)\r

        BlackList (list of phone numbers to blacklist)\r

        QuietHourList (list of quiet hour objects)\r

        UseCommunityBlacklist (enable / disable community blacklist) default true\r

        BreakThroughQhWithMultipleCalls (break through quiet hours with two calls in 3 minutes)\r

        WhiteListBreaksQh (break through quiet hours for whitelist)"
      tags:
        - EnterpriseApi
  /api/2015-11-01/Report:
    post:
      consumes:
        - application/json
        - text/json
      deprecated: false
      description: "This returns information required to perform basic call blocking behaviors<br />\r

        \            Try with api_key 'demo' and phone numbers 18008472911, 13157244022, 17275567300, 18008276655, and 12061231234 (last one not spam)"
      operationId: Reputation_Report
      parameters:
        - description: "[FromBody] Call Report\r

            \            PhoneNumber, \r

            \            Caller name(optional), \r

            \            Call category(optional), \r

            \            Comment or tags(free text) (optional), \r

            \            Unwanted call  - yes/no(optional),"
          in: body
          name: callReport
          required: true
          schema:
            $ref: "#/definitions/CallReport"
      produces:
        - application/json
        - text/json
      responses:
        "400":
          description: Bad request (eg. invalid phone nubmer)
      summary: "Report: report spam calls received to better tune our algorithms based upon spam calls you receive"
      tags:
        - Reputation
  "/api/2015-11-01/Reputation/{phoneNumber}":
    get:
      consumes: []
      deprecated: false
      description: "This returns information required to perform basic call blocking behaviors<br />\r

        \            Try with api_key 'demo' and phone numbers 18008472911, 13157244022, 17275567300, 18008276655, and 12061231234 (last one not spam)"
      operationId: Reputation_Reputation
      parameters:
        - description: phone number to search
          in: path
          name: phoneNumber
          required: true
          type: string
      produces:
        - application/json
        - text/json
      responses:
        "200":
          description: Reputation information
          schema:
            $ref: "#/definitions/Reputation"
        "400":
          description: Bad request (invalid phone number)
      summary: "Reputation:\r

        Premium service which returns a reputation informaiton of a phone number via API."
      tags:
        - Reputation
definitions:
  CallControlUser:
    properties:
      Age:
        format: int32
        type: integer
      BlackList:
        items:
          type: string
        type: array
      BlockBehavior:
        enum:
          - allow
          - voiceMail
          - block
        type: string
      BreakThroughQhWithMultipleCalls:
        type: boolean
      Email:
        type: string
      FirstName:
        type: string
      Gender:
        type: string
      LastName:
        type: string
      MiddleName:
        type: string
      PhoneNumbeRegion:
        type: string
      PhoneNumber:
        type: string
      QuietHourList:
        items:
          $ref: "#/definitions/QuietHour"
        type: array
      Salutation:
        type: string
      Suffix:
        type: string
      UseCommunityBlacklist:
        type: boolean
      WhiteList:
        items:
          type: string
        type: array
      WhiteListBreaksQh:
        type: boolean
    type: object
  CallReport:
    description: "Call Report\r

      PhoneNumber, \r

      Caller name(optional), \r

      Call category(optional), \r

      Comment or tags(free text) (optional), \r

      Unwanted call  - yes/no(optional),"
    properties:
      CallTime:
        format: date-time
        type: string
      CallerType:
        enum:
          - Unknown
          - Telemarketing
          - Collection_Agency
          - Political
          - Surveyor
          - Prank_Call
          - Fund_Raiser
          - Other_Commercial
          - Scam
          - VOIP
          - Business
          - Reminder_Notification_Call
          - Junk_Fax
          - Fax_Machine
          - Spam_Text
          - RoboCall
          - NotSpam
          - Callback
        type: string
      Comment:
        type: string
      IpAddress:
        type: string
      Latitude:
        format: double
        type: number
      Longitude:
        format: double
        type: number
      PhoneNumber:
        type: string
      ReportedCallerId:
        type: string
      ReportedCallerName:
        type: string
      Reporter:
        type: string
      UnwantedCall:
        type: boolean
    type: object
  Complaints:
    description: "Free service (with registration) which serves Government Do Not Call data via API \r

      Search via phone number returns available data, reported name, total complaints"
    properties:
      ComplaintsByEntity:
        additionalProperties:
          format: int32
          type: integer
        type: object
      LastComplaintDate:
        format: date-time
        type: string
      ReportedCallerName:
        description: Reported Caller Name
        maxLength: 255
        minLength: 0
        type: string
      Tags:
        items:
          type: string
        type: array
      TotalNumberOfComplaints:
        format: int32
        type: integer
    type: object
  QuietHour:
    properties:
      DayOfWeekList:
        items:
          enum:
            - Sunday
            - Monday
            - Tuesday
            - Wednesday
            - Thursday
            - Friday
            - Saturday
          type: string
        type: array
      DurationMin:
        format: int32
        type: integer
      StartHourLocal:
        format: int32
        type: integer
      StartMinLocal:
        format: int32
        type: integer
      TimeZoneName:
        type: string
    type: object
  Reputation:
    properties:
      CallType:
        readOnly: true
        type: string
      Confidence:
        format: int32
        type: integer
      IsSpam:
        type: boolean
      LastComplaintDate:
        format: date-time
        type: string
      ReportedCallerName:
        type: string
      Tags:
        items:
          type: string
        type: array
    type: object
