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

# Create a new counterparty

> Add a new counterparty to the system.



## OpenAPI

````yaml post /v1/counterparties
openapi: 3.0.0
info:
  title: Counterparties API
  version: 1.0.0
servers:
  - url: https://api.nomi.tools
    description: Main API server
security:
  - basicAuth: []
paths:
  /v1/counterparties:
    post:
      tags:
        - Counterparties
      summary: Create a new counterparty
      description: Add a new counterparty to the system.
      operationId: createCounterparty
      parameters:
        - name: Accept
          in: header
          required: true
          schema:
            type: string
            enum:
              - application/json
            default: application/json
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CounterpartyPayload'
      responses:
        '200':
          description: Counterparty created successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: string
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
components:
  schemas:
    CounterpartyPayload:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the counterparty.
        types:
          type: array
          items:
            type: string
            enum:
              - client
              - supplier
              - partner
              - contractor
              - other
          description: Types associated with the counterparty.
        externalId:
          type: string
          nullable: true
          description: External identifier for the counterparty.
        notes:
          type: string
          nullable: true
          description: Additional notes about the counterparty.
  responses:
    Unauthorized:
      description: Unauthorized access
    Forbidden:
      description: Forbidden access
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >
        Use HTTP Basic Authentication.  Provide your email as login and PPT
        token as the password.

````