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

# Create a company

> Idempotent on `domain`: if a company with the same domain already exists in the organization, the existing record is returned instead of failing.



## OpenAPI

````yaml /openapi.json post /v1/companies
openapi: 3.0.0
info:
  title: Notealy Public API
  description: >-
    REST API for managing contacts, companies, transactional email and email
    campaigns. Authenticate with a Bearer API token issued from your dashboard
    (Settings → API Tokens).
  version: '1.0'
  contact: {}
servers:
  - url: https://thanos.notealy.com
    description: Production
security: []
tags:
  - name: Me
    description: >-
      Verify the authenticated identity. Call this first to confirm a token is
      alive and discover its scopes.
  - name: People
    description: >-
      Create, read, update and delete people (contacts). Includes tag
      attachment.
  - name: Companies
    description: Create, read, update and delete company records.
  - name: Tags
    description: >-
      List and create tags. Use the ids returned here as `tagIds` in `POST
      /v1/people` to drive automations.
  - name: Email
    description: >-
      Send transactional emails through saved templates, either to a known
      contact or to an arbitrary address.
  - name: Email templates
    description: Discover the email template ids you reference from `Email` endpoints.
  - name: Email campaigns
    description: >-
      List and trigger email campaigns. Requires the email-campaigns plan
      feature.
  - name: Messages
    description: >-
      Send outbound messages across WhatsApp, Instagram and Facebook to a CRM
      contact.
paths:
  /v1/companies:
    post:
      tags:
        - Companies
      summary: Create a company
      description: >-
        Idempotent on `domain`: if a company with the same domain already exists
        in the organization, the existing record is returned instead of failing.
      operationId: companies.create
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCompanyDto'
      responses:
        '200':
          description: The created (or pre-existing matching) company
        '400':
          description: Request validation failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '401':
          description: Missing, invalid, revoked or expired bearer token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '403':
          description: Token lacks the required scope for this endpoint
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
        '429':
          description: Rate limit exceeded (100 requests per minute per token)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HttpErrorResponse'
      security:
        - bearer: []
components:
  schemas:
    CreateCompanyDto:
      type: object
      properties:
        name:
          type: string
        domain:
          type: string
          description: Domain — unique per instance if provided
        description:
          type: string
        industry:
          type: string
        size:
          type: string
        website:
          type: string
        city:
          type: string
        state:
          type: string
        country:
          type: string
        categories:
          type: array
          items:
            type: string
        customFields:
          type: object
          additionalProperties: true
      required:
        - name
    HttpErrorResponse:
      type: object
      properties:
        statusCode:
          type: number
          example: 400
        message:
          oneOf:
            - type: string
            - type: array
              items:
                type: string
          example: Validation failed
        error:
          type: string
          example: Bad Request
      required:
        - statusCode
        - message
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````