Schematic companies API

The companies API from Schematic — 29 operation(s) for companies.

Documentation

Specifications

SDKs

Schemas & Data

Other Resources

OpenAPI Specification

schematic-companies-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Schematic accesstokens companies API
  version: '0.1'
  description: Schematic API
  x-rules-engine-schema-version: v97288f60
servers:
- url: https://api.schematichq.com
security:
- ApiKeyAuth: []
tags:
- name: companies
paths:
  /companies:
    get:
      operationId: listCompanies
      summary: List companies
      tags:
      - companies
      parameters:
      - name: credit_type_ids
        in: query
        description: Filter companies by one or more credit type IDs (each ID starts with bcrd_)
        schema:
          type: array
          description: Filter companies by one or more credit type IDs (each ID starts with bcrd_)
          items:
            type: string
          maxItems: 100
      - name: has_scheduled_downgrade
        in: query
        description: Filter companies that have a pending scheduled downgrade
        schema:
          type: boolean
          description: Filter companies that have a pending scheduled downgrade
      - name: ids
        in: query
        description: Filter companies by multiple company IDs (starts with comp_)
        schema:
          type: array
          description: Filter companies by multiple company IDs (starts with comp_)
          items:
            type: string
          maxItems: 100
      - name: monetized_subscriptions
        in: query
        description: Filter companies that have monetized subscriptions
        schema:
          type: boolean
          description: Filter companies that have monetized subscriptions
      - name: plan_id
        in: query
        description: Filter companies by plan ID (starts with plan_)
        schema:
          type: string
          description: Filter companies by plan ID (starts with plan_)
      - name: plan_ids
        in: query
        description: Filter companies by one or more plan IDs (each ID starts with plan_)
        schema:
          type: array
          description: Filter companies by one or more plan IDs (each ID starts with plan_)
          items:
            type: string
          maxItems: 100
      - name: plan_version_id
        in: query
        description: Filter companies by plan version ID (starts with plvr_)
        schema:
          type: string
          description: Filter companies by plan version ID (starts with plvr_)
      - name: q
        in: query
        description: Search for companies by name, keys or string traits
        schema:
          type: string
          description: Search for companies by name, keys or string traits
          maxLength: 512
      - name: sort_order_column
        in: query
        description: Column to sort by (e.g. name, created_at, last_seen_at)
        schema:
          type: string
          description: Column to sort by (e.g. name, created_at, last_seen_at)
          maxLength: 255
      - name: sort_order_direction
        in: query
        description: Direction to sort by (asc or desc)
        schema:
          allOf:
          - $ref: '#/components/schemas/SortDirection'
          description: Direction to sort by (asc or desc)
      - name: subscription_statuses
        in: query
        description: Filter companies by one or more subscription statuses
        schema:
          type: array
          description: Filter companies by one or more subscription statuses
          items:
            $ref: '#/components/schemas/SubscriptionStatus'
          maxItems: 100
      - name: subscription_types
        in: query
        description: Filter companies by one or more subscription types
        schema:
          type: array
          description: Filter companies by one or more subscription types
          items:
            $ref: '#/components/schemas/SubscriptionType'
          maxItems: 100
      - name: with_entitlement_for
        in: query
        description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID
        schema:
          type: string
          description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID
      - name: without_feature_override_for
        in: query
        description: Filter out companies that already have a company override for the specified feature ID
        schema:
          type: string
          description: Filter out companies that already have a company override for the specified feature ID
      - name: without_plan
        in: query
        description: Filter out companies that have a plan
        schema:
          type: boolean
          description: Filter out companies that have a plan
      - name: without_subscription
        in: query
        description: Filter out companies that have a subscription
        schema:
          type: boolean
          description: Filter out companies that have a subscription
      - name: with_subscription
        in: query
        description: Filter companies that have a subscription
        schema:
          type: boolean
          description: Filter companies that have a subscription
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CompanyDetailResponseData'
                    title: ListCompaniesResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      credit_type_ids:
                        type: array
                        description: Filter companies by one or more credit type IDs (each ID starts with bcrd_)
                        items:
                          type: string
                        maxItems: 100
                      has_scheduled_downgrade:
                        type: boolean
                        description: Filter companies that have a pending scheduled downgrade
                      ids:
                        type: array
                        description: Filter companies by multiple company IDs (starts with comp_)
                        items:
                          type: string
                        maxItems: 100
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      monetized_subscriptions:
                        type: boolean
                        description: Filter companies that have monetized subscriptions
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      plan_id:
                        type: string
                        description: Filter companies by plan ID (starts with plan_)
                      plan_ids:
                        type: array
                        description: Filter companies by one or more plan IDs (each ID starts with plan_)
                        items:
                          type: string
                        maxItems: 100
                      plan_version_id:
                        type: string
                        description: Filter companies by plan version ID (starts with plvr_)
                      q:
                        type: string
                        description: Search for companies by name, keys or string traits
                        maxLength: 512
                      sort_order_column:
                        type: string
                        description: Column to sort by (e.g. name, created_at, last_seen_at)
                        maxLength: 255
                      sort_order_direction:
                        allOf:
                        - $ref: '#/components/schemas/SortDirection'
                        description: Direction to sort by (asc or desc)
                      subscription_statuses:
                        type: array
                        description: Filter companies by one or more subscription statuses
                        items:
                          $ref: '#/components/schemas/SubscriptionStatus'
                        maxItems: 100
                      subscription_types:
                        type: array
                        description: Filter companies by one or more subscription types
                        items:
                          $ref: '#/components/schemas/SubscriptionType'
                        maxItems: 100
                      with_entitlement_for:
                        type: string
                        description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID
                      with_subscription:
                        type: boolean
                        description: Filter companies that have a subscription
                      without_feature_override_for:
                        type: string
                        description: Filter out companies that already have a company override for the specified feature ID
                      without_plan:
                        type: boolean
                        description: Filter out companies that have a plan
                      without_subscription:
                        type: boolean
                        description: Filter out companies that have a subscription
                    title: ListCompaniesParams
                required:
                - data
                - params
                title: ListCompaniesResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    post:
      operationId: upsertCompany
      summary: Upsert company
      tags:
      - companies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertCompanyRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: UpsertCompanyParams
                required:
                - data
                - params
                title: UpsertCompanyResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /companies/{company_id}:
    get:
      operationId: getCompany
      summary: Get company
      tags:
      - companies
      parameters:
      - name: company_id
        in: path
        description: company_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetCompanyParams
                required:
                - data
                - params
                title: GetCompanyResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    delete:
      operationId: deleteCompany
      summary: Delete company
      tags:
      - companies
      parameters:
      - name: company_id
        in: path
        description: company_id
        required: true
        schema:
          type: string
      - name: cancel_subscription
        in: query
        schema:
          type: boolean
      - name: prorate
        in: query
        schema:
          type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/DeleteResponse'
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      cancel_subscription:
                        type: boolean
                      prorate:
                        type: boolean
                    title: DeleteCompanyParams
                required:
                - data
                - params
                title: DeleteCompanyResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /companies/count:
    get:
      operationId: countCompanies
      summary: Count companies
      tags:
      - companies
      parameters:
      - name: credit_type_ids
        in: query
        description: Filter companies by one or more credit type IDs (each ID starts with bcrd_)
        schema:
          type: array
          description: Filter companies by one or more credit type IDs (each ID starts with bcrd_)
          items:
            type: string
          maxItems: 100
      - name: has_scheduled_downgrade
        in: query
        description: Filter companies that have a pending scheduled downgrade
        schema:
          type: boolean
          description: Filter companies that have a pending scheduled downgrade
      - name: ids
        in: query
        description: Filter companies by multiple company IDs (starts with comp_)
        schema:
          type: array
          description: Filter companies by multiple company IDs (starts with comp_)
          items:
            type: string
          maxItems: 100
      - name: monetized_subscriptions
        in: query
        description: Filter companies that have monetized subscriptions
        schema:
          type: boolean
          description: Filter companies that have monetized subscriptions
      - name: plan_id
        in: query
        description: Filter companies by plan ID (starts with plan_)
        schema:
          type: string
          description: Filter companies by plan ID (starts with plan_)
      - name: plan_ids
        in: query
        description: Filter companies by one or more plan IDs (each ID starts with plan_)
        schema:
          type: array
          description: Filter companies by one or more plan IDs (each ID starts with plan_)
          items:
            type: string
          maxItems: 100
      - name: plan_version_id
        in: query
        description: Filter companies by plan version ID (starts with plvr_)
        schema:
          type: string
          description: Filter companies by plan version ID (starts with plvr_)
      - name: q
        in: query
        description: Search for companies by name, keys or string traits
        schema:
          type: string
          description: Search for companies by name, keys or string traits
          maxLength: 512
      - name: sort_order_column
        in: query
        description: Column to sort by (e.g. name, created_at, last_seen_at)
        schema:
          type: string
          description: Column to sort by (e.g. name, created_at, last_seen_at)
          maxLength: 255
      - name: sort_order_direction
        in: query
        description: Direction to sort by (asc or desc)
        schema:
          allOf:
          - $ref: '#/components/schemas/SortDirection'
          description: Direction to sort by (asc or desc)
      - name: subscription_statuses
        in: query
        description: Filter companies by one or more subscription statuses
        schema:
          type: array
          description: Filter companies by one or more subscription statuses
          items:
            $ref: '#/components/schemas/SubscriptionStatus'
          maxItems: 100
      - name: subscription_types
        in: query
        description: Filter companies by one or more subscription types
        schema:
          type: array
          description: Filter companies by one or more subscription types
          items:
            $ref: '#/components/schemas/SubscriptionType'
          maxItems: 100
      - name: with_entitlement_for
        in: query
        description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID
        schema:
          type: string
          description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID
      - name: without_feature_override_for
        in: query
        description: Filter out companies that already have a company override for the specified feature ID
        schema:
          type: string
          description: Filter out companies that already have a company override for the specified feature ID
      - name: without_plan
        in: query
        description: Filter out companies that have a plan
        schema:
          type: boolean
          description: Filter out companies that have a plan
      - name: without_subscription
        in: query
        description: Filter out companies that have a subscription
        schema:
          type: boolean
          description: Filter out companies that have a subscription
      - name: with_subscription
        in: query
        description: Filter companies that have a subscription
        schema:
          type: boolean
          description: Filter companies that have a subscription
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CountResponse'
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      credit_type_ids:
                        type: array
                        description: Filter companies by one or more credit type IDs (each ID starts with bcrd_)
                        items:
                          type: string
                        maxItems: 100
                      has_scheduled_downgrade:
                        type: boolean
                        description: Filter companies that have a pending scheduled downgrade
                      ids:
                        type: array
                        description: Filter companies by multiple company IDs (starts with comp_)
                        items:
                          type: string
                        maxItems: 100
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      monetized_subscriptions:
                        type: boolean
                        description: Filter companies that have monetized subscriptions
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      plan_id:
                        type: string
                        description: Filter companies by plan ID (starts with plan_)
                      plan_ids:
                        type: array
                        description: Filter companies by one or more plan IDs (each ID starts with plan_)
                        items:
                          type: string
                        maxItems: 100
                      plan_version_id:
                        type: string
                        description: Filter companies by plan version ID (starts with plvr_)
                      q:
                        type: string
                        description: Search for companies by name, keys or string traits
                        maxLength: 512
                      sort_order_column:
                        type: string
                        description: Column to sort by (e.g. name, created_at, last_seen_at)
                        maxLength: 255
                      sort_order_direction:
                        allOf:
                        - $ref: '#/components/schemas/SortDirection'
                        description: Direction to sort by (asc or desc)
                      subscription_statuses:
                        type: array
                        description: Filter companies by one or more subscription statuses
                        items:
                          $ref: '#/components/schemas/SubscriptionStatus'
                        maxItems: 100
                      subscription_types:
                        type: array
                        description: Filter companies by one or more subscription types
                        items:
                          $ref: '#/components/schemas/SubscriptionType'
                        maxItems: 100
                      with_entitlement_for:
                        type: string
                        description: Filter companies that have an entitlement (plan entitlement or company override) for the specified feature ID
                      with_subscription:
                        type: boolean
                        description: Filter companies that have a subscription
                      without_feature_override_for:
                        type: string
                        description: Filter out companies that already have a company override for the specified feature ID
                      without_plan:
                        type: boolean
                        description: Filter out companies that have a plan
                      without_subscription:
                        type: boolean
                        description: Filter out companies that have a subscription
                    title: CountCompaniesParams
                required:
                - data
                - params
                title: CountCompaniesResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /companies/create:
    post:
      operationId: createCompany
      summary: Create company
      tags:
      - companies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpsertCompanyRequestBody'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: CreateCompanyParams
                required:
                - data
                - params
                title: CreateCompanyResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /companies/delete:
    post:
      operationId: deleteCompanyByKeys
      summary: Delete company by keys
      tags:
      - companies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KeysRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: DeleteCompanyByKeysParams
                required:
                - data
                - params
                title: DeleteCompanyByKeysResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /companies/lookup:
    get:
      operationId: lookupCompany
      summary: Lookup company
      tags:
      - companies
      parameters:
      - name: keys
        in: query
        description: Key/value pairs
        required: true
        schema:
          additionalProperties:
            type: string
          type: object
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      keys:
                        additionalProperties:
                          type: string
                        type: object
                    title: LookupCompanyParams
                required:
                - data
                - params
                title: LookupCompanyResponse
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /company-memberships:
    get:
      operationId: listCompanyMemberships
      summary: List company memberships
      tags:
      - companies
      parameters:
      - name: company_id
        in: query
        schema:
          type: string
      - name: user_id
        in: query
        schema:
          type: string
      - name: limit
        in: query
        description: Page limit (default 100)
        schema:
          type: integer
          description: Page limit (default 100)
          format: int64
          example: '100'
      - name: offset
        in: query
        description: Page offset (default 0)
        schema:
          type: integer
          description: Page offset (default 0)
          format: int64
          example: '0'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/CompanyMembershipDetailResponseData'
                    title: ListCompanyMembershipsResponseData
                    maxItems: 250
                  params:
                    type: object
                    description: Input parameters
                    properties:
                      company_id:
                        type: string
                      limit:
                        type: integer
                        description: Page limit (default 100)
                        format: int64
                        example: '100'
                      offset:
                        type: integer
                        description: Page offset (default 0)
                        format: int64
                        example: '0'
                      user_id:
                        type: string
                    title: ListCompanyMembershipsParams
                required:
                - data
                - params
                title: ListCompanyMembershipsResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
    post:
      operationId: getOrCreateCompanyMembership
      summary: Get or create company membership
      tags:
      - companies
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetOrCreateCompanyMembershipRequestBody'
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/CompanyMembershipDetailResponseData'
                  params:
                    type: object
                    description: Input parameters
                    title: GetOrCreateCompanyMembershipParams
                required:
                - data
                - params
                title: GetOrCreateCompanyMembershipResponse
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '500':
          $ref: '#/components/responses/ServerError'
  /company-memberships/{company_membership_id}:
    delete:
      operationId: deleteCompanyMembership
      summary: Delete company membership
      tags:
      - companies
      parameters:
      - name: company_membership_id
        in: path
        description: company_membership_id
        required: true
        schema:
          type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
        

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