> ## Documentation Index
> Fetch the complete documentation index at: https://developer.oplog.one/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a B2B company.

> Persisted as a Customer keyed by its external company number; the company number is
unique per tenant (duplicates are rejected).



## OpenAPI

````yaml /api-reference/openapi.json post /openapi/v1/Company
openapi: 3.0.1
info:
  title: OmniServices Web API
  version: v1
servers:
  - url: https://api.oplog.one
    description: Production Server
  - url: https://api.staging.oplog.one
    description: Staging Server
security:
  - Authorization: []
paths:
  /openapi/v1/Company:
    post:
      tags:
        - Company
      summary: Create a B2B company.
      description: "Persisted as a Customer keyed by its external company number; the company number is\r\nunique per tenant (duplicates are rejected)."
      parameters:
        - name: X-Tenant-Id
          in: header
          description: If you want to emulate, please enter TenantId.
          schema:
            type: string
      requestBody:
        content:
          application/json-patch+json:
            schema:
              $ref: '#/components/schemas/CompanyRequestDTO'
          application/json:
            schema:
              $ref: '#/components/schemas/CompanyRequestDTO'
          text/json:
            schema:
              $ref: '#/components/schemas/CompanyRequestDTO'
          application/*+json:
            schema:
              $ref: '#/components/schemas/CompanyRequestDTO'
      responses:
        '200':
          description: Success
components:
  schemas:
    CompanyRequestDTO:
      type: object
      properties:
        companyNo:
          type: string
          description: >-
            External company reference number from the calling system (e.g.
            Flormar).
        companyName:
          type: string
          description: Company name; split on the first space into first/last name.
        email:
          type: string
        phone:
          type: string
      additionalProperties: false
      description: "B2B company creation contract. A company is persisted as a Customer identified by its\r\nexternal company number (OmniServices.WebApi.Areas.OpenAPI.DTOs.Companies.CompanyRequestDTO.CompanyNo → Customer.ExternalCustomerId)."
  securitySchemes:
    Authorization:
      type: apiKey
      in: header
      name: Authorization

````