> For the complete documentation index, see [llms.txt](https://selenium-4.gitbook.io/nexus-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://selenium-4.gitbook.io/nexus-docs/documentation/corporate-trust-services/operations/main-1.md).

# Release Captive Account

## Release Captive Account

> Releases a previously created captive/escrow arrangement, e.g. upon reaching maturity or manual release.

```json
{"openapi":"3.0.3","info":{"title":"NEXUS Banking Services API","version":"1.0.0"},"tags":[{"name":"corporate-trust-services"}],"servers":[{"url":"https://sandbox.nexus.selenium.ao","description":"Sandbox"},{"url":"https://api-mock.selenium.ao","description":"Mock"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Bearer Token (OAuth2 / OIDC or JWT) passed in the `Authorization` header."}},"schemas":{"CurrentAccountNumberRef":{"type":"object","description":"Identification of a current account number.","properties":{"accountIdentificationType":{"type":"string","description":"Type of account identification."},"accountIdentification":{"type":"object","properties":{"identifierValue":{"type":"object","properties":{"value":{"type":"string","description":"Account number."}}}}}}},"CustomerAgreementReference":{"type":"object","description":"Reference to the customer agreement (contract).","properties":{"agreementIdentification":{"type":"object","properties":{"identifierValue":{"type":"object","properties":{"value":{"type":"string","description":"Identifier of the agreement."}}}}},"agreementType":{"type":"string","description":"Type of agreement."}}},"FinancialAccountingTransaction":{"type":"object","description":"Financial accounting transaction amount and currency.","properties":{"financialAccountingTransactionAmountAndCurrency":{"type":"object","properties":{"amount":{"$ref":"#/components/schemas/MonetaryAmountValueWrapped"}}}}},"MonetaryAmountValueWrapped":{"type":"object","description":"Amount pattern where the numeric value is nested one level deeper, under `amountValue.value`.","properties":{"amountValue":{"type":"object","properties":{"value":{"type":"number","format":"double","description":"Monetary value."}}},"amountCurrency":{"type":"object","properties":{"currencyCode":{"type":"string","description":"ISO 4217 currency code."}}}}},"Preconditions":{"type":"object","description":"Validity period preconditions for an arrangement.","properties":{"conditionValidityPeriod":{"type":"object","properties":{"fromDateTime":{"type":"object","properties":{"dateTimeContent":{"type":"string","format":"date-time","description":"Start of the validity period."}}},"toDateTime":{"type":"object","properties":{"dateTimeContent":{"type":"string","format":"date-time","description":"End of the validity period."}}},"dateTimeType":{"type":"string","description":"Type of the validity period."}}}}},"PartyAuthorization":{"type":"object","description":"Authorization granted by a party for an operation.","properties":{"authorizationParty":{"type":"object","description":"Party granting the authorization.","properties":{"partyIdentification":{"type":"object","properties":{"identifierValue":{"type":"object","properties":{"value":{"type":"string","description":"Identifier of the authorizing party (customer)."}}}}},"partyName":{"type":"string","description":"Name of the authorizing party."}}},"authorizationType":{"type":"string","description":"Type of authorization."},"authorizationStatus":{"type":"string","description":"Status of the authorization."},"authorizationDateTime":{"type":"object","properties":{"dateTimeContent":{"type":"string","format":"date-time","description":"Date/time the authorization was given."}}},"authorizationChannel":{"type":"string","description":"Channel through which the authorization was given."}}},"ErrorEnvelope":{"type":"object","properties":{"error":{"$ref":"#/components/schemas/Error"}}},"Error":{"type":"object","required":["status","reason","message","path"],"properties":{"status":{"type":"integer","description":"HTTP status code of the error."},"reason":{"type":"string","description":"High-level error category code."},"message":{"type":"string","description":"Human-readable description of the problem."},"path":{"type":"string","description":"HTTP method and endpoint path that originated the error."},"errordetail":{"type":"array","description":"Detailed error list. May be absent for generic errors (e.g. 500).","items":{"$ref":"#/components/schemas/ErrorDetail"}}}},"ErrorDetail":{"type":"object","properties":{"code":{"type":"string","description":"Domain-specific error code."},"reason":{"type":"string","description":"Textual identifier of the specific cause."},"message":{"type":"string","description":"Detailed message, with concrete values where applicable."}}}},"responses":{"BadRequest":{"description":"The request payload is invalid — inconsistent dates, an amount ≤ 0, an invalid currency, or missing required fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Unauthorized":{"description":"Missing, expired or invalid Bearer Token.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Forbidden":{"description":"Authenticated, but missing the scope required for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"NotFound":{"description":"The requested resource could not be found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"Conflict":{"description":"The resource already exists, or is in a terminal/incompatible state for this operation.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"InternalServerError":{"description":"Unexpected internal error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}}},"paths":{"/corporate-trust/{corporateTrustServicesFacilityId}/escrow-arrangement/{escrowArrangementId}/execute":{"post":{"summary":"Release Captive Account","description":"Releases a previously created captive/escrow arrangement, e.g. upon reaching maturity or manual release.","tags":["corporate-trust-services"],"operationId":"releaseCaptiveAccount","parameters":[{"name":"corporateTrustServicesFacilityId","in":"path","required":true,"description":"Identifier of the Corporate Trust Services facility (captive account).","schema":{"type":"string"}},{"name":"escrowArrangementId","in":"path","required":true,"description":"Identifier of the escrow/captive arrangement to release.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["escrowReference","escrowType","currentAccountNumber","financialAccountingTransaction","preconditions","partyAuthorization","captiveReleaseDetails"],"properties":{"corporateTrustServicesFacilityReference":{"type":"object","description":"Reference to the Corporate Trust Services facility (captive account) type.","properties":{"financialFacility":{"type":"string","description":"Type of financial facility."}}},"escrowReference":{"type":"string","description":"Reference of the captive/escrow arrangement to release."},"escrowType":{"type":"string","description":"Type of the release operation."},"currentAccountNumber":{"allOf":[{"$ref":"#/components/schemas/CurrentAccountNumberRef"}],"description":"Number of the current account."},"accountType":{"type":"string","description":"Type of the current account."},"accountStatus":{"type":"string","description":"Status of the current account."},"accountCurrency":{"type":"object","description":"Currency of the account.","properties":{"currencyCode":{"type":"string","description":"ISO 4217 currency code."}}},"customerAgreementReference":{"allOf":[{"$ref":"#/components/schemas/CustomerAgreementReference"}],"description":"Reference to the customer agreement associated with the captive account."},"financialAccountingTransaction":{"allOf":[{"$ref":"#/components/schemas/FinancialAccountingTransaction"},{"type":"object","description":"Adds transaction direction/type fields for a release.","properties":{"financialAccountingTransactionAmountAndCurrency":{"type":"object","properties":{"amount":{"$ref":"#/components/schemas/MonetaryAmountValueWrapped"},"transactionDirection":{"type":"string","description":"Direction of the transaction."},"transactionType":{"type":"string","description":"Type of the transaction."}}}}}],"description":"Financial accounting transaction that releases the funds from the captive account."},"preconditions":{"allOf":[{"$ref":"#/components/schemas/Preconditions"},{"type":"object","properties":{"conditionStatus":{"type":"string","description":"Status of the release condition."}}}],"description":"Conditions that must be met for the release."},"partyAuthorization":{"allOf":[{"$ref":"#/components/schemas/PartyAuthorization"}],"description":"Authorization details for the release operation."},"captiveReleaseDetails":{"type":"object","description":"Details of the release.","properties":{"releaseReason":{"type":"string","description":"Reason for the release. `MaturityReached`, `ManualRelease`, `ContractEnd`."},"releaseDateTime":{"type":"string","format":"date-time","description":"Date/time of the release."},"releaseStatus":{"type":"string","description":"Status of the release."},"releaseAuthorisedBy":{"type":"object","description":"Identifier of who authorized the release."},"releaseChannel":{"type":"string","description":"Channel through which the release was requested."}}}}}}}},"responses":{"200":{"description":"Captive account released successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"escrowReference":{"type":"string","description":"Reference of the released escrow/captive arrangement."},"releaseStatus":{"type":"string","description":"Status of the release."},"releaseDate":{"type":"string","format":"date","description":"Date the release was completed."}}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFound"},"409":{"$ref":"#/components/responses/Conflict"},"500":{"$ref":"#/components/responses/InternalServerError"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://selenium-4.gitbook.io/nexus-docs/documentation/corporate-trust-services/operations/main-1.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
