Middesk subpackage_companies API

The subpackage_companies API from Middesk — 1 operation(s) for subpackage_companies.

OpenAPI Specification

middesk-subpackage-companies-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Middesk subpackage_actions subpackage_companies API
  version: 1.0.0
servers:
- url: https://api.middesk.com
  description: Default
tags:
- name: subpackage_companies
paths:
  /v1/partner/companies:
    post:
      operationId: create-company
      summary: Create a company
      tags:
      - subpackage_companies
      parameters:
      - name: Authorization
        in: header
        description: Bearer authentication
        required: true
        schema:
          type: string
      responses:
        '201':
          description: company created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:AgentCompany'
        '409':
          description: company already exists
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/type_:AgentCompany'
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                legal_name:
                  type: string
                  description: Legal name of the company
                ein:
                  type: string
                  description: Employer Identification Number
                external_id:
                  type: string
                  description: External identifier
                dba_name:
                  type: string
                  description: Doing business as name
                contact_email:
                  type: string
                  format: email
                contact_name:
                  type: string
                contact_phone_number:
                  type: string
                entity_type:
                  type: string
                formation_state:
                  type: string
                formation_date:
                  type: string
                  format: date
                addresses:
                  type: array
                  items:
                    $ref: '#/components/schemas/type_companies:CreateCompanyRequestAddressesItem'
              required:
              - legal_name
components:
  schemas:
    type_:AgentCompany:
      type: object
      properties:
        object:
          type: string
        id:
          type: string
          format: uuid
        legal_name:
          type: string
          description: Legal name of the company
        dba_name:
          type: string
          nullable: true
          description: Doing business as name
        external_id:
          type: string
          nullable: true
          description: External identifier for the company
        account_id:
          type: string
          format: uuid
          description: Account ID the company belongs to
        parent_account:
          $ref: '#/components/schemas/type_:AgentCompanyParentAccount'
      required:
      - object
      - id
      - legal_name
      - account_id
      title: AgentCompany
    type_companies:CreateCompanyRequestAddressesItem:
      type: object
      properties:
        address_line1:
          type: string
        address_line2:
          type: string
        city:
          type: string
        state:
          type: string
        postal_code:
          type: string
        address_type:
          type: string
      title: CreateCompanyRequestAddressesItem
    type_:AgentCompanyParentAccount:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        slug:
          type: string
      title: AgentCompanyParentAccount
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer