---
title: "Declare self-hosted counterparty"
method: POST
path: "/counterparty/self-hosted"
tags: ["Counterparty"]
---

# Declare self-hosted counterparty

`POST /counterparty/self-hosted`

Creates a DECLARED self-hosted counterparty for the given owner (`userId` or `businessId`) and application.

Wallet ownership for `subType` OWNED is proven separately via `POST /counterparty/self-hosted/verify-wallet`. The signed `message` format and UTC date rules for that flow are documented on `VerifySelfHostedWalletRequest`.

## Request body

- DeclareSelfHostedCounterpartyRequest — Declare a self-hosted counterparty. Provide exactly one owner (userId/businessId) and exactly one identifier (counterpartyAddress/paymentHash/invoice). Wallet ownership is proven separately via POST /counterparty/self-hosted/verify-wallet.
  - `userId` string, uuid — Owner user id. Provide exactly one of userId / businessId.
  - `businessId` string, uuid — Owner business id. Provide exactly one of userId / businessId.
  - `counterpartyAddress` string — On-chain destination address. Provide exactly one of counterpartyAddress / paymentHash / invoice.
  - `paymentHash` string — Lightning payment hash (64-hex on BTC). Provide exactly one of counterpartyAddress / paymentHash / invoice.
  - `invoice` string — bolt11 invoice (decoded server-side to a payment hash). Provide exactly one of counterpartyAddress / paymentHash / invoice.
  - `currency` string, required — Ledger currency ticker (e.g. `SOL`, `POL`, `ETH`). Must be a supported `LedgerCryptoNetworks` key.
  - `network` string, required — Blockchain network for the currency (e.g. `SOL`, `POLYGON`, `ETH`). Must equal the network implied by `currency`.
  - `subType` 'OWNED' | 'THIRD_PARTY', required — OWNED or THIRD_PARTY self-hosted counterparty.
  - `entityType` 'NATURAL' | 'LEGAL'
  - `firstName` string
  - `lastName` string
  - `dateOfBirth` string, date — ISO 8601 date string (YYYY-MM-DD).
  - `placeOfBirth` string
  - `country` string — ISO 3166-1 alpha-2 country code (two uppercase letters).
  - `entityAddress` string
  - `legalName` string
  - `lei` string — Legal Entity Identifier (20-character alphanumeric).

## Response `201`

success

- TRCounterpartyPublic — Public counterparty row returned by VASP declare (`201`) and in the `counterparty` field of wallet verification.
  - `counterpartyId` string, uuid, required
  - `userId` string, uuid
  - `businessId` string, uuid
  - `identityType` 'CONSUMER' | 'BUSINESS', required
  - `counterpartyAddress` string — Set for on-chain counterparties.
  - `paymentHash` string — Set for Lightning (non-invoice) counterparties.
  - `invoice` string — Set when declared with a bolt11 Lightning invoice.
  - `memo` string — Decoded memo from the bolt11 invoice, when present.
  - `network` string, required
  - `type` 'SELF_HOSTED' | 'VASP', required
  - `subType` 'OWNED' | 'THIRD_PARTY' | 'VASP', required
  - `counterpartyData` object — IVMS-oriented payload; shape depends on counterparty `type` / `subType`.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400` — Bad Request. The request was unacceptable, often due to missing a required parameter.
- `401` — Invalid authentication header
- `409` — Address already declared for this user and application
- `422` — Signature or third-party field validation failed
- `500` — Unexpected server error.

---

[API](https://skmtc.net/striga/apis/striga-v1.md) · [All operations](https://skmtc.net/striga/apis/striga-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/striga/striga-v1/versions/63e57aa7df45/schema)
