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

# Create Counterparty

> Register a new counterparty for corporate operations



## OpenAPI

````yaml POST /corporate/counterparty
openapi: 3.0.1
info:
  title: Açoriana - FX as a Service
  description: >-
    A sample API that uses a plant store as an example to demonstrate features
    in the OpenAPI specification
  version: beta
servers:
  - url: https://fxaas-dev.acorianacorretora.com.br
security: []
paths:
  /corporate/counterparty:
    post:
      tags:
        - Corporate
      summary: Create a new corporate counterparty
      description: Register a new counterparty for corporate operations
      parameters:
        - $ref: '#/components/parameters/Authorization'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateCounterpartyRequest'
            example:
              name: NewGate Corporation
              counterparty_address:
                address: 123 Example Street
                country: US
                city: Anytown
                state: CA
                zip_code: '90210'
              bank_account:
                bank_name: First National Bank
                swift_code: FNBAUS33XXX
                bank_country: US
                account_number: '1234567890'
                iban: US45999999999999
                aba_routing_number: '121000248'
              intermediary_bank:
                bank_name: International Transfer Bank
                swift_code: INTLUS44XXX
                bank_country: US
      responses:
        '201':
          description: Counterparty created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CounterpartyResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing authentication token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  parameters:
    Authorization:
      name: Authorization
      in: header
      required: true
      schema:
        type: string
        example: Bearer Token
      description: Authorization header
  schemas:
    CreateCounterpartyRequest:
      type: object
      properties:
        name:
          type: string
          description: Name of the counterparty
        counterparty_address:
          $ref: '#/components/schemas/Address'
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        intermediary_bank:
          allOf:
            - $ref: '#/components/schemas/Bank'
          nullable: true
        external_id:
          type: string
          nullable: true
          description: External identifier for the counterparty
      required:
        - name
        - counterparty_address
        - bank_account
    CounterpartyResponse:
      type: object
      properties:
        id:
          type: string
          description: Unique identifier of the counterparty
        name:
          type: string
          description: Name of the counterparty
        counterparty_address:
          $ref: '#/components/schemas/Address'
        bank_account:
          $ref: '#/components/schemas/BankAccount'
        intermediary_bank:
          allOf:
            - $ref: '#/components/schemas/Bank'
          nullable: true
        external_id:
          type: string
          nullable: true
          description: External identifier for the counterparty
      required:
        - id
        - name
        - counterparty_address
        - bank_account
    Error:
      required:
        - message
      type: object
      properties:
        message:
          description: message of the error
          type: string
    Address:
      type: object
      properties:
        address:
          type: string
          description: Street address
        country:
          type: string
          description: Country name
        city:
          type: string
          description: City name
        state:
          type: string
          description: State or province
        zip_code:
          type: string
          description: Postal or ZIP code
      required:
        - address
        - country
        - city
        - zip_code
    BankAccount:
      type: object
      properties:
        bank_name:
          type: string
          description: Name of the bank
        swift_code:
          type: string
          description: SWIFT/BIC code of the bank
        bank_country:
          type: string
          description: Country where the bank is located
        account_number:
          type: string
          description: Bank account number
        iban:
          type: string
          description: International Bank Account Number
        aba_routing_number:
          type: string
          description: ABA/routing number for US banks
      required:
        - bank_name
        - swift_code
        - bank_country
        - account_number
    Bank:
      type: object
      properties:
        bank_name:
          type: string
          description: Name of the bank
        swift_code:
          type: string
          description: SWIFT/BIC code of the bank
        bank_country:
          type: string
          description: Country where the bank is located
      required:
        - bank_name
        - swift_code
        - bank_country

````