# Create counterparties

Create a new counterparty

Endpoint: POST /v2/counterparties
Version: 2.0
Security: TokenAuth

## Security:

  - `TokenAuth` (unknown)
    apiKey in header Authorization

## Request fields (application/json):

  - `name` (string, required)
    The counterparty name
    Example: Palisade

  - `description` (string)
    The counterparty description
    Example: A counterparty used by the treasury department

  - `details` (object, required)
    The counterparty details

  - `details.type` (string, required)
    The counterparty type
    Enum: "ORGANIZATION", "INDIVIDUAL", "DAPP"

  - `details.individual` (object)

  - `details.individual.firstName` (string, required)
    The persons first name
    Example: Joe

  - `details.individual.lastName` (string, required)
    The persons last name
    Example: Bloggs

  - `details.individual.address` (object)

  - `details.individual.address.address1` (string, required)
    The first line of the address
    Example: Flat B

  - `details.individual.address.address2` (string)
    The second line of the address
    Example: 10 Mayo Road

  - `details.individual.address.city` (string, required)
    The city of the address
    Example: London

  - `details.individual.address.state` (string, required)
    The state of the address
    Example: Greater London

  - `details.individual.address.postCode` (string, required)
    The postal code of the address
    Example: W1 1AA

  - `details.individual.address.country` (string, required)
    The country of the address
    Example: United Kingdom

  - `details.organization` (object)

  - `details.organization.legalName` (string, required)
    The full legal name of the organization
    Example: Palisade Financial

  - `details.dApp` (object)

## Response 200 fields (application/json):

  - `id` (string, required)
    The counterparty ID
    Example: ce4918bf-a199-4ce2-85a3-d0d296855384

  - `createdBy` (string, required)
    The ID of the user who created this counterparty
    Example: ce4918bf-a199-4ce2-85a3-d0d296855384

  - `createdAt` (string, required)
    The date and time the counterparty was created
    Example: 2022-03-29T10:22:22.420Z

  - `updatedBy` (string, required)
    The ID of the user who updated this counterparty
    Example: ce4918bf-a199-4ce2-85a3-d0d296855384

  - `updatedAt` (string, required)
    The date and time the counterparty was updated
    Example: 2022-03-29T10:22:22.420Z

  - `name` (string, required)
    The counterparty name
    Example: Palisade

  - `description` (string)
    The counterparty description
    Example: A counterparty used by the treasury department

  - `details` (object, required)
    The counterparty details

  - `details.type` (string, required)
    The counterparty type
    Enum: "ORGANIZATION", "INDIVIDUAL", "DAPP"

  - `details.individual` (object)

  - `details.individual.firstName` (string, required)
    The persons first name
    Example: Joe

  - `details.individual.lastName` (string, required)
    The persons last name
    Example: Bloggs

  - `details.individual.address` (object)

  - `details.individual.address.address1` (string, required)
    The first line of the address
    Example: Flat B

  - `details.individual.address.address2` (string)
    The second line of the address
    Example: 10 Mayo Road

  - `details.individual.address.city` (string, required)
    The city of the address
    Example: London

  - `details.individual.address.state` (string, required)
    The state of the address
    Example: Greater London

  - `details.individual.address.postCode` (string, required)
    The postal code of the address
    Example: W1 1AA

  - `details.individual.address.country` (string, required)
    The country of the address
    Example: United Kingdom

  - `details.organization` (object)

  - `details.organization.legalName` (string, required)
    The full legal name of the organization
    Example: Palisade Financial

  - `details.dApp` (object)

  - `addressCount` (integer, required)
    The number of addresses associated with the counterparty
    Example: 5

## Response 400:

  - `400` (unknown)
    Returned when the request is malformed or invalid.

## Response 400 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response 401:

  - `401` (unknown)
    Returned when the request was unauthorized.

## Response 401 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response 403:

  - `403` (unknown)
    Returned when the request was forbidden.

## Response 403 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response 404:

  - `404` (unknown)
    Returned when the resource does not exist.

## Response 404 fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response default:

  - `default` (unknown)
    An unexpected error response.

## Response default fields (application/json):

  - `code` (integer)

  - `message` (string)

  - `details` (array)

  - `details.@type` (string)

## Response 400 examples:

  - `response` (unknown)

## Response 401 examples:

  - `response` (unknown)

## Response 403 examples:

  - `response` (unknown)

## Response 404 examples:

  - `response` (unknown)

