Keap Companies API

Keap Company API — 22 operations across 11 paths on the Keap REST v2 contract, read from Keap's own published OpenAPI 3.1 document.

OpenAPI Specification

keap-company-api-openapi.yml Raw ↑
openapi: 3.1.0
info:
  title: Keap Company API
  description: Keap Public API Documentation
  termsOfService: https://www.thryv.com/terms-of-use
  contact:
    name: Keap
    url: https://developer.keap.com/get-support
    email: api.keap@thryv.com
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
  version: v2
servers:
- url: https://api.infusionsoft.com/crm
tags:
- name: Company
paths:
  /rest/v2/companies:
    get:
      tags:
      - Company
      summary: List Companies
      description: Retrieves a list of all Companies.<br/><br/>
      operationId: listCompanies
      parameters:
      - name: filter
        in: query
        description: "Filter to apply, allowed fields are:\n- (String) `company_name` - exact match on\
          \ company name (equality only)\n- (String) `name` - company name with support for a wildcard\
          \ at the end (e.g. `smith*`)\n- (String) `email` - exact match on email\n- (String) `city` -\
          \ company city (Contact.City) with support for a prefix wildcard at the end (e.g. `Chan*`)\n\
          - (String) `state` - company state/region (Contact.State) with support for a prefix wildcard\
          \ at the end (e.g. `Ar*`)\n- (String) `since_time` - companies updated on or after this time\n\
          - (String) `until_time` - companies updated on or before this time\n- (Number) `company_id`\
          \ - supports comparison operators: `==`, `>`, `<`, `>=`, `<=`\n\nFor equality filters, use the\
          \ `==` operator in encoded form `%3D%3D`:\n- `filter=company_name%3D%3DCompany`\n- `filter=email%3D%3Dtest@gmail.com`\n\
          - `filter=city%3D%3DChandler`\n- `filter=since_time%3D%3D2025-04-16T20:33:02.321Z`\n- `filter=until_time%3D%3D2025-08-16T20:33:02.321Z`\n\
          \nFor wildcard name/city/state search (prefix only, case-insensitive):\n- `filter=name%3D%3DAcme%2A`\
          \ (starts with \"Acme\")\n- `filter=city%3D%3DChan%2A` (city starts with \"Chan\")\n- `filter=city%3D%3DChandler%3Bstate%3D%3DArizona`\
          \ (combined city + state filter)\n\nFor company_id comparison:\n- `filter=company_id%3E5` (company_id\
          \ > 5)\n- `filter=company_id%3E%3D10` (company_id >= 10)\n\nCustom fields can be filtered by\
          \ their field name (case-insensitive). A standard\nfield above takes precedence over a custom\
          \ field with the same name. The supported\noperators depend on the custom field's type:\n- Text-like\
          \ fields (text, text area, name, email, phone, website, social security\n  number) and single-value\
          \ choice fields with text options (dropdown, radio,\n  state): `==` only, with optional trailing\
          \ wildcard (e.g. `Industry%3D%3DTech%2A`)\n- Yes/No and drilldown fields: `==` only\n- Numeric\
          \ fields (whole number, decimal, currency, percent, year, month, day of\n  week, user): `==`,\
          \ `>`, `<`, `>=`, `<=`\n- Date fields: `==`, `>`, `<`, `>=`, `<=` using full ISO 8601 (same\
          \ as `since_time`/`until_time`)\n- Multi-select fields: `==` matches records that contain the\
          \ given option\nExamples (for a custom field named `Height`):\n- `filter=Height%3D%3DTall`\n\
          - `filter=Height%3E100`\nCustom field filtering on non-indexed fields is supported but may be\
          \ slower.\n"
        required: false
        schema:
          type: string
      - name: page_token
        in: query
        description: Page token
        required: false
        schema:
          type: string
      - name: order_by
        in: query
        description: 'Attribute and direction to order items.

          One of the following fields:

          - `id`

          - `create_time`

          - `name`

          - `email`


          One of the following directions:

          - `asc`

          - `desc`'
        required: false
        schema:
          type: string
      - name: page_size
        in: query
        description: Total number of items to return per page
        required: false
        schema:
          type: integer
          format: int32
          maximum: 1000
          minimum: 0
        example: 0
      - name: fields
        in: query
        description: Comma-delimited list of Company properties to include in the response. (Fields such
          as `notes`, `fax_number`, `address`, `email_address`, `phone_number`, `update_time`, `create_time`
          and `custom_fields` aren't included, by default.)
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCompaniesResponse'
    post:
      tags:
      - Company
      summary: Create a Company
      description: Creates a new Company.`country_code` is required if `region` is specified.
      operationId: createCompany
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCompanyRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
  /rest/v2/companies/{company_id}/tags/{tag_id}:
    post:
      tags:
      - Company
      summary: Add Tag to Company
      description: Applies a Tag to a Company.
      operationId: addTagToCompany
      parameters:
      - name: company_id
        in: path
        required: true
        schema:
          type: string
      - name: tag_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '204':
          description: No Content
    delete:
      tags:
      - Company
      summary: Remove Tag
      description: Remove a Tag from a Company.
      operationId: removeTagFromCompany
      parameters:
      - name: company_id
        in: path
        required: true
        schema:
          type: string
      - name: tag_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '204':
          description: No Content
  /rest/v2/companies/model/customFields:
    post:
      tags:
      - Company
      summary: Create a Company Custom Field
      description: Creates a custom field of the specified type and options to the Company object
      operationId: createCompanyCustomField
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldMetaData'
  /rest/v2/companies/model/customFields/tabs:
    get:
      tags:
      - Company
      summary: List Company Custom Field Tabs
      description: Retrieves a list of custom field tabs for the Company record type.
      operationId: listCompanyCustomFieldTabs
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomFieldTabsResponse'
    post:
      tags:
      - Company
      summary: Create a Company Custom Field Tab
      description: Creates a new custom field tab for the Company record type.
      operationId: createCompanyCustomFieldTab
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldTabRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldTab'
  /rest/v2/companies/model/customFields/groups:
    get:
      tags:
      - Company
      summary: List Company Custom Field Groups
      description: Retrieves a list of custom field groups for the Company record type. Optionally filter
        by tab_id to scope to a specific tab.
      operationId: listCompanyCustomFieldGroups
      parameters:
      - name: tab_id
        in: query
        description: Optional tab id to scope groups to a single tab
        required: false
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ListCustomFieldGroupsResponse'
    post:
      tags:
      - Company
      summary: Create a Company Custom Field Group
      description: Creates a new custom field group for the Company record type. If `tab_id` is omitted,
        the group is added to the default 'Custom Fields' tab.
      operationId: createCompanyCustomFieldGroup
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCustomFieldGroupRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomFieldGroup'
  /rest/v2/companies/{company_id}:
    get:
      tags:
      - Company
      summary: Retrieve a Company
      description: Retrieves a single Company
      operationId: getCompany
      parameters:
      - name: company_id
        in: path
        required: true
        schema:
          type: string
      - name: fields
        in: query
        description: 'Comma-delimited list of Company properties to include in the response. (Available
          fields are: `address`, `custom_fields`, `email_address`, `fax_number`, `phone_number`, `website`,
          `notes`)'
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
    delete:
      tags:
      - Company
      summary: Delete a Company
      description: Deletes the specified Company
      operationId: deleteCompany
      parameters:
      - name: company_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '204':
          description: No Content
    patch:
      tags:
      - Company
      summary: Update a Company
      description: Updates a Company with the values provided in the request
      operationId: updateCompany
      parameters:
      - name: company_id
        in: path
        required: true
        schema:
          type: string
      - name: update_mask
        in: query
        description: An optional list of properties to be updated. If set, only the provided properties
          will be updated and others will be skipped.
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - id
            - company_name
            - address
            - phone_number
            - fax_number
            - email_address
            - notes
            - website
            - custom_fields
            - create_time
            - update_time
            - anniversary_date
            - assistant_name
            - assistant_phone
            - billing_information
            - birth_date
            - contact_type
            - first_name
            - job_title
            - last_name
            - middle_name
            - preferred_name
            - owner_id
            - referral_code
            - spouse_name
            - suffix
            - title
            - account_id
            - created_by
            - groups
            - last_updated_by
          uniqueItems: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCompanyRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Company'
  /rest/v2/companies/model/customFields/{custom_field_id}:
    delete:
      tags:
      - Company
      summary: Delete a Company Custom Field
      description: Deletes a custom field from the company model
      operationId: deleteCompanyCustomField
      parameters:
      - name: custom_field_id
        in: path
        required: true
        schema:
          type: string
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '405':
          description: Method Not Allowed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '204':
          description: No Content
    patch:
      tags:
      - Company
      summary: Update a Company Custom Field
      description: Updates a custom field of the specified type and options to the Company object
      operationId: updateCompanyCustomField
      parameters:
      - name: custom_field_id
        in: path
        required: true
        schema:
          type: string
      - name: update_mask
        in: query
        description: An optional list of properties to be updated. If set, only the provided properties
          will be updated and others will be skipped.
        required: false
        schema:
          type: array
          items:
            type: string
            enum:
            - group_id
            - label
            - options
          uniqueItems: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateCustomFieldMetaDataRequest'
        required: true
      responses:
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '501':
          description: Method Not Implemented
    

# --- truncated at 32 KB (74 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/keap/refs/heads/main/openapi/keap-company-api-openapi.yml