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

# Create Counterparty

> Create a new counterparty



## OpenAPI

````yaml api-reference/banking-api/openapi.json POST /banking/counterparties
openapi: 3.0.0
info:
  title: Banking API
  version: 1.0.0
servers:
  - url: https://api.sandbox.trio.com.br
    variables: {}
  - url: https://api.qa.trio.com.br
    variables: {}
  - url: https://api.trio.com.br
    variables: {}
security: []
tags: []
paths:
  /banking/counterparties:
    post:
      tags:
        - counterparties
      summary: Find or create Counterparty
      description: Find or create a counterparty
      operationId: TrioFoundationWeb.Banking.CounterpartyController.create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Create_counterparty_params'
        description: The create counterparty attributes
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Counterparty_response'
          description: Counterparty
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/401'
          description: Unauthorized
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/500'
          description: Internal server error
      callbacks: {}
components:
  schemas:
    '401':
      example:
        error:
          error_code: UNAUTHORIZED
          error_message: Invalid credentials
      properties:
        error:
          properties:
            error_code:
              description: Error code
              type: string
            error_message:
              description: Error message
              type: string
          type: object
      title: '401'
      type: object
    '500':
      example:
        error:
          error_code: INTEGRATION_ERROR
          error_message: An unexpected issue occurred
      properties:
        error:
          properties:
            error_code:
              description: Error code
              type: string
            error_message:
              description: Error message
              type: string
          type: object
      title: '500'
      type: object
    Create_counterparty_params:
      description: Body params create counterparty
      example:
        name: Random
        tax_number: '12345678910'
      properties:
        name:
          description: Name of the counterparty
          type: string
        tax_number:
          description: Tax number of the counterparty
          type: string
      required:
        - tax_number
        - name
      title: Create counterparty params
      type: object
    Counterparty_response:
      description: Body response of the counterparty
      example:
        data:
          id: 018df099-093e-cfd1-4500-4c9392eb5d8a
          inserted_at: '2026-07-02T19:00:14.821966Z'
          name: participant_1
          tax_number: '12345678910'
          updated_at: '2026-07-02T19:00:14.821974Z'
      properties:
        data:
          $ref: '#/components/schemas/Counterparty_data_params'
      title: Counterparty response
      type: object
    Counterparty_data_params:
      description: Body params counterparty data
      example:
        id: 018df099-093e-cfd1-4500-4c9392eb5d8a
        inserted_at: '2026-07-02T19:00:14.821966Z'
        name: participant_1
        tax_number: '05964110000197'
        updated_at: '2026-07-02T19:00:14.821974Z'
      properties:
        id:
          description: ID
          format: uuid
          type: string
        inserted_at:
          description: inserted at
          format: date-time
          type: string
        name:
          description: Name of the participant
          type: string
        tax_number:
          description: Tax number of the counterparty
          type: string
        updated_at:
          description: updated at
          format: date-time
          type: string
      title: Counterparty data params
      type: object

````