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

# Creates or updates a counterpart entity

> Creates a new or updates an existing one based on the reference



## OpenAPI

````yaml /specs/fuelboss/fuelboss-api.json put /v1/counterpart-entities
openapi: 3.1.1
info:
  title: FuelBoss API
  description: >-
    REST API providing a powerful and easy way to manage your companies
    nominations and operations.
  termsOfService: https://www.ofiniti.com/legal/platform-service-terms
  contact:
    name: Support Team
    email: itops@ofiniti.com
  version: 1.15.1
servers:
  - url: https://api.demo.fuelboss.net
    description: Demo (sandbox for testing and integration development)
  - url: https://api.fuelboss.net
    description: Production
security:
  - bearerAuth: []
tags:
  - name: OAuth
  - name: Nominations
  - name: Entity management
  - name: Operations
  - name: Common
  - name: Webhooks
  - name: Webhook events
paths:
  /v1/counterpart-entities:
    put:
      tags:
        - Entity management
      summary: Creates or updates a counterpart entity
      description: Creates a new or updates an existing one based on the reference
      requestBody:
        content:
          application/json:
            schema:
              $ref: >-
                #/components/schemas/FuelBoss.Api.Contracts.Api.Nomination.UpsertCounterpartEntity.UpsertCounterpartEntityRequest
              description: Request body for creating or updating a counterpart entity.
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FuelBoss.Api.Contracts.Api.Nomination.UpsertCounterpartEntity.UpsertCounterpartEntityResponse
                description: >-
                  Response returned after creating or updating a counterpart
                  entity.
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/FuelBoss.Api.Contracts.Api.Nomination.UpsertCounterpartEntity.UpsertCounterpartEntityResponse
                description: >-
                  Response returned after creating or updating a counterpart
                  entity.
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                  instance:
                    type: string
                    format: uri
                  timestamp:
                    type: string
                    format: date-time
                  trace_id:
                    type: string
                description: >-
                  RFC 9457 Problem Details response - fully compliant with
                  latest standard

                  https://tools.ietf.org/html/rfc9457
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                  instance:
                    type: string
                    format: uri
                  timestamp:
                    type: string
                    format: date-time
                  trace_id:
                    type: string
                description: >-
                  RFC 9457 Problem Details response - fully compliant with
                  latest standard

                  https://tools.ietf.org/html/rfc9457
        '409':
          description: Conflict
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                  instance:
                    type: string
                    format: uri
                  timestamp:
                    type: string
                    format: date-time
                  trace_id:
                    type: string
                description: >-
                  RFC 9457 Problem Details response - fully compliant with
                  latest standard

                  https://tools.ietf.org/html/rfc9457
        '422':
          description: Unprocessable Content
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                    format: uri
                  title:
                    type: string
                  status:
                    type: integer
                  detail:
                    type: string
                  instance:
                    type: string
                    format: uri
                  timestamp:
                    type: string
                    format: date-time
                  trace_id:
                    type: string
                description: >-
                  RFC 9457 Problem Details response - fully compliant with
                  latest standard

                  https://tools.ietf.org/html/rfc9457
components:
  schemas:
    FuelBoss.Api.Contracts.Api.Nomination.UpsertCounterpartEntity.UpsertCounterpartEntityRequest:
      type: object
      properties:
        counterpartCompanyIdentifier:
          type: string
          description: >-
            Identifier of the counterpart company (from [Get
            Companies](/api-reference/common/retrieves-all-companies-available)).
        name:
          type: string
          description: Counterpart entity name.
        reference:
          type: string
          description: Your unique reference for this counterpart entity.
        isActive:
          type:
            - 'null'
            - boolean
          description: >-
            Whether this counterpart entity is active. Inactive counterpart
            entities cannot be referenced from nominations.
        email:
          type:
            - 'null'
            - string
          description: Contact email address for the counterpart entity.
        phoneNumber:
          type:
            - 'null'
            - string
          description: Contact phone number for the counterpart entity.
      additionalProperties: false
      description: Request body for creating or updating a counterpart entity.
    FuelBoss.Api.Contracts.Api.Nomination.UpsertCounterpartEntity.UpsertCounterpartEntityResponse:
      type: object
      properties:
        reference:
          type: string
          description: Your unique reference for the counterpart entity.
        lastChangedAtUtc:
          type: string
          description: Timestamp (UTC) of the last change to the counterpart entity.
          format: date-time
      additionalProperties: false
      description: Response returned after creating or updating a counterpart entity.
  securitySchemes:
    bearerAuth:
      type: http
      description: >-
        Access token obtained from the /oauth/token endpoint using your client
        credentials.
      scheme: bearer
      bearerFormat: JWT

````