> For the complete documentation index, see [llms.txt](https://docs.ospree.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ospree.io/developers/accounts-directory/openapi/accounts.md).

# Accounts

Originator/beneficiary account records — entities and individuals.

## List Accounts

> This endpoint retrieves a list of all accounts within the directory.

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"tags":[{"name":"Accounts","description":"Originator/beneficiary account records — entities and individuals."}],"servers":[{"url":"https://dev-api.ospree.io","description":"Development"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"ApiFailResponse":{"properties":{"status":{"type":"string","title":"Status","default":"fail"},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["message"],"title":"ApiFailResponse","description":"*summary*: Api fail response model"},"ApiErrorResponse":{"properties":{"status":{"type":"string","title":"Status","default":"error"},"code":{"type":"integer","title":"Code","description":"Duplicates the HTTP status; use `error_code`. Removed in v3."},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["code","message"],"title":"ApiErrorResponse","description":"*summary*: Api error response model"}}},"paths":{"/api/v2/directory/accounts":{"get":{"tags":["Accounts"],"summary":"List Accounts","description":"This endpoint retrieves a list of all accounts within the directory.","operationId":"List_Accounts_api_v2_directory_accounts_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":30,"title":"Size"}},{"name":"sort","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort"}},{"name":"start_range","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Range"}},{"name":"end_range","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Range"}},{"name":"account_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Type"}},{"name":"account_category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Category"}}],"responses":{"200":{"description":"A page of accounts. Page size is 50; the default sort is by creation date.","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"422":{"description":"Unprocessable Entity - Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```

## Create Account

> This endpoint is used to create a new account within the directory module. It can create 'individual' or 'entity' accounts.

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"tags":[{"name":"Accounts","description":"Originator/beneficiary account records — entities and individuals."}],"servers":[{"url":"https://dev-api.ospree.io","description":"Development"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"AccountDetails":{"properties":{"reference_id":{"type":"string","maxLength":50,"minLength":4,"title":"Reference Id","description":"Unique identifier for the account."},"account_type":{"type":"string","title":"Account Type","description":"Type of account, either 'individual' or 'entity'."},"account_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Category","default":"customer"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","description":"Email address associated with the account."},"customer_id":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Customer Id","description":"Customer ID associated with the account."},"individual":{"anyOf":[{"$ref":"#/components/schemas/AccountIndividual"},{"type":"null"}],"description":"The object that contains the fields specific for an individual account"},"entity":{"anyOf":[{"$ref":"#/components/schemas/AccountEntity"},{"type":"null"}],"description":"The object that contains the fields specific for an entity account"},"address":{"anyOf":[{"$ref":"#/components/schemas/Address"},{"type":"null"}],"description":"The object that contains the fields specific for the address of the account"},"national_id":{"anyOf":[{"$ref":"#/components/schemas/NationalId"},{"type":"null"}],"description":"The object that contains the fields specific for the national id of the account"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created"},"last_modified":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Modified"}},"type":"object","required":["reference_id","account_type"],"title":"AccountDetails"},"AccountIndividual":{"properties":{"individual_name":{"anyOf":[{"$ref":"#/components/schemas/IndividualName"},{"type":"null"}],"description":"Object that contains the individual name fields"},"individual_localname":{"anyOf":[{"$ref":"#/components/schemas/IndividualName"},{"type":"null"}],"description":"Object that contains the individual local name fields"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth","description":"Date of birth of the account holder."},"place_of_birth":{"anyOf":[{"type":"string","maxLength":70},{"type":"null"}],"title":"Place Of Birth","description":"Place of birth of the account holder."},"nationality_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Nationality Country","description":"Country code of the nationality of the account holder."},"residence_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Residence Country","description":"Country code of the place of residence of the account holder."}},"type":"object","title":"AccountIndividual"},"IndividualName":{"properties":{"name_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Type","description":"Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified"},"name_first":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name First","description":"First name of the account holder."},"name_middle":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name Middle","description":"Middle name of the account holder."},"name_last":{"type":"string","maxLength":100,"title":"Name Last","description":"Last name of the account holder. Required if account_type is individual."}},"type":"object","required":["name_type","name_last"],"title":"IndividualName"},"AccountEntity":{"properties":{"entity_name":{"anyOf":[{"$ref":"#/components/schemas/EntityName"},{"type":"null"}],"description":"The object that contains the entity name fields."},"entity_localname":{"anyOf":[{"$ref":"#/components/schemas/EntityName"},{"type":"null"}],"description":"The object that contains the entity local name fields."},"registration_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Registration Country","description":"Country code of incorporation for the business."}},"type":"object","title":"AccountEntity"},"EntityName":{"properties":{"name_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name Type","description":"Type of the name. Required if entity_name or entity_localname or individual_name or individual_local_name is specified"},"name_legal":{"type":"string","maxLength":100,"title":"Name Legal","description":"Name of the business. Required if account_type is entity."},"name_business":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Name Business","description":"Legal name of the business."}},"type":"object","required":["name_type","name_legal"],"title":"EntityName"},"Address":{"properties":{"address_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address Type","description":"Required if address object is specified. Type of the address, as an IVMS101 addressType code: HOME (residential), BIZZ (business) or GEOG (unspecified). The code is sent verbatim on every outbound travel-rule payload for this account, so GEOG says only that the type was not stated."},"address_line":{"anyOf":[{"type":"string","maxLength":256},{"type":"null"}],"title":"Address Line","description":"Either providing an address_line or including a combination of address_street_no or address_building_name along with address_street_name is required."},"address_street_no":{"anyOf":[{"type":"string","maxLength":16},{"type":"null"}],"title":"Address Street No","description":"Either providing an address_line or including a combination of address_street_no or address_building_name along with address_street_name is required"},"address_street_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Address Street Name","description":"Either providing an address_line or including a combination of address_street_no or address_building_name along with address_street_name is required."},"address_building_name":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"title":"Address Building Name","description":"Either providing an address_line or including a combination of address_street_no or address_building_name along with address_street_name is required."},"address_floor":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Floor","description":"Floor number in the building."},"address_room":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Room","description":"Room number in the building."},"address_department":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Department","description":"Department within the address."},"address_subdepartment":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Subdepartment","description":"Sub-department within the address."},"address_postbox":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Address Postbox","description":"Post office box number."},"address_city_location":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address City Location","description":"Geographical location of the city."},"address_city":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address City","description":"City of the account holder's address."},"address_region":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address Region","description":"Region or state of the account holder's address."},"address_district":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Address District","description":"District of the account holder's address."},"address_postcode":{"anyOf":[{"type":"string","maxLength":25},{"type":"null"}],"title":"Address Postcode","description":"Postal code of the account holder's address."},"address_country_code":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Address Country Code","description":"Country code of the account holder's address."}},"type":"object","required":["address_type"],"title":"Address"},"NationalId":{"properties":{"national_id_type":{"type":"string","title":"National Id Type","description":"Required when national_id object is specified. Type of national identification."},"national_id":{"type":"string","maxLength":35,"title":"National Id","description":"National identification number."},"issue_country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Issue Country","description":"Country that issued the national identification."},"registration_authority":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Registration Authority","description":"GLEIF Registration Authority code of the register that issued the national identification: `RA` followed by six digits, e.g. `RA000583`. This is the register's code, not the authority's name. Required for entity national IDs other than `LEIX`, and must be omitted for `LEIX`. Case-insensitive; normalised to upper case."}},"type":"object","required":["national_id_type","national_id"],"title":"NationalId"},"ApiFailResponse":{"properties":{"status":{"type":"string","title":"Status","default":"fail"},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["message"],"title":"ApiFailResponse","description":"*summary*: Api fail response model"},"ApiErrorResponse":{"properties":{"status":{"type":"string","title":"Status","default":"error"},"code":{"type":"integer","title":"Code","description":"Duplicates the HTTP status; use `error_code`. Removed in v3."},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["code","message"],"title":"ApiErrorResponse","description":"*summary*: Api error response model"}}},"paths":{"/api/v2/directory/accounts":{"post":{"tags":["Accounts"],"summary":"Create Account","description":"This endpoint is used to create a new account within the directory module. It can create 'individual' or 'entity' accounts.","operationId":"Create_Account_api_v2_directory_accounts_post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AccountDetails"}}}},"responses":{"200":{"description":"The account was created. The body echoes it in the same nested shape.","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"422":{"description":"Unprocessable Entity - Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```

## Search Account

> This endpoint allows users to search for accounts based on a search term and optional filters such as account category and account type.

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"tags":[{"name":"Accounts","description":"Originator/beneficiary account records — entities and individuals."}],"servers":[{"url":"https://dev-api.ospree.io","description":"Development"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"CustomerFilterType":{"type":"string","enum":["customer","non-customer","all"],"title":"CustomerFilterType","description":"Filter options for customer type"},"AccountTypeString":{"type":"string","enum":["individual","entity"],"title":"AccountTypeString"},"ApiFailResponse":{"properties":{"status":{"type":"string","title":"Status","default":"fail"},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["message"],"title":"ApiFailResponse","description":"*summary*: Api fail response model"},"ApiErrorResponse":{"properties":{"status":{"type":"string","title":"Status","default":"error"},"code":{"type":"integer","title":"Code","description":"Duplicates the HTTP status; use `error_code`. Removed in v3."},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["code","message"],"title":"ApiErrorResponse","description":"*summary*: Api error response model"}}},"paths":{"/api/v2/directory/accounts/search":{"get":{"tags":["Accounts"],"summary":"Search Account","description":"This endpoint allows users to search for accounts based on a search term and optional filters such as account category and account type.","operationId":"Search_Account_api_v2_directory_accounts_search_get","parameters":[{"name":"search_term","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Search Term"}},{"name":"account_category","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/CustomerFilterType"},{"type":"null"}],"title":"Account Category"}},{"name":"account_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/AccountTypeString"},{"type":"null"}],"title":"Account Type"}}],"responses":{"200":{"description":"Matching accounts as a BARE ARRAY -- this operation does not use the `{status, data}` envelope the rest of this plane returns.","content":{"application/json":{"schema":{}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"422":{"description":"Unprocessable Entity - Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```

## Retrieve Account

> This endpoint retrieves the details of a specific account identified by {reference\_id}.

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"tags":[{"name":"Accounts","description":"Originator/beneficiary account records — entities and individuals."}],"servers":[{"url":"https://dev-api.ospree.io","description":"Development"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"ApiFailResponse":{"properties":{"status":{"type":"string","title":"Status","default":"fail"},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["message"],"title":"ApiFailResponse","description":"*summary*: Api fail response model"},"ApiErrorResponse":{"properties":{"status":{"type":"string","title":"Status","default":"error"},"code":{"type":"integer","title":"Code","description":"Duplicates the HTTP status; use `error_code`. Removed in v3."},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["code","message"],"title":"ApiErrorResponse","description":"*summary*: Api error response model"}}},"paths":{"/api/v2/directory/accounts/{reference_id}":{"get":{"tags":["Accounts"],"summary":"Retrieve Account","description":"This endpoint retrieves the details of a specific account identified by {reference_id}.","operationId":"Retrieve_Account_api_v2_directory_accounts__reference_id__get","parameters":[{"name":"reference_id","in":"path","required":true,"schema":{"type":"string","description":"Unique identifier for the account, previously external_id.","title":"Reference Id"},"description":"Unique identifier for the account, previously external_id."}],"responses":{"200":{"description":"The account, in the same nested shape the create call takes.","content":{"application/json":{"schema":{}}}},"400":{"description":"No account with this reference_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```

## Remove Account

> This endpoint is used to remove/delete a specific account identified by {reference\_id} from the directory.

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"tags":[{"name":"Accounts","description":"Originator/beneficiary account records — entities and individuals."}],"servers":[{"url":"https://dev-api.ospree.io","description":"Development"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"ApiFailResponse":{"properties":{"status":{"type":"string","title":"Status","default":"fail"},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["message"],"title":"ApiFailResponse","description":"*summary*: Api fail response model"},"ApiErrorResponse":{"properties":{"status":{"type":"string","title":"Status","default":"error"},"code":{"type":"integer","title":"Code","description":"Duplicates the HTTP status; use `error_code`. Removed in v3."},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["code","message"],"title":"ApiErrorResponse","description":"*summary*: Api error response model"}}},"paths":{"/api/v2/directory/accounts/{reference_id}":{"delete":{"tags":["Accounts"],"summary":"Remove Account","description":"This endpoint is used to remove/delete a specific account identified by {reference_id} from the directory.","operationId":"Remove_Account_api_v2_directory_accounts__reference_id__delete","parameters":[{"name":"reference_id","in":"path","required":true,"schema":{"type":"string","description":"Unique identifier for the account, previously external_id.","title":"Reference Id"},"description":"Unique identifier for the account, previously external_id."}],"responses":{"200":{"description":"The account was deleted. This is a hard delete, not a soft one.","content":{"application/json":{"schema":{}}}},"400":{"description":"No account with this reference_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```

## Update Account

> This endpoint is utilized to modify/update the details of a specific account identified by {reference\_id}. All body inputs are optional. Only provided inputs will be updated in the account record, while all others will maintain their current values.

```json
{"openapi":"3.1.0","info":{"title":"Ospree Directory API","version":"2.0.0"},"tags":[{"name":"Accounts","description":"Originator/beneficiary account records — entities and individuals."}],"servers":[{"url":"https://dev-api.ospree.io","description":"Development"}],"security":[{"HTTPBearer":[]}],"components":{"securitySchemes":{"HTTPBearer":{"type":"http","scheme":"bearer"}},"schemas":{"UpdateAccountRequest":{"properties":{"fields":{"items":{"$ref":"#/components/schemas/AccountFieldUpdate"},"type":"array","title":"Fields","description":"An array of the fields to be updated."}},"type":"object","required":["fields"],"title":"UpdateAccountRequest"},"AccountFieldUpdate":{"properties":{"field":{"items":{"type":"string"},"type":"array","minItems":1,"title":"Field","description":"The name of the field to be updated."},"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"string","format":"date"},{"type":"null"}],"title":"Value","description":"The value of the field to be updated to."}},"type":"object","required":["field","value"],"title":"AccountFieldUpdate"},"ApiFailResponse":{"properties":{"status":{"type":"string","title":"Status","default":"fail"},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["message"],"title":"ApiFailResponse","description":"*summary*: Api fail response model"},"ApiErrorResponse":{"properties":{"status":{"type":"string","title":"Status","default":"error"},"code":{"type":"integer","title":"Code","description":"Duplicates the HTTP status; use `error_code`. Removed in v3."},"message":{"type":"string","title":"Message"},"error_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error Code","description":"Stable, machine-readable error code, e.g. `auth.unauthenticated`. Additive-only."},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"}},"type":"object","required":["code","message"],"title":"ApiErrorResponse","description":"*summary*: Api error response model"}}},"paths":{"/api/v2/directory/accounts/{reference_id}":{"patch":{"tags":["Accounts"],"summary":"Update Account","description":"This endpoint is utilized to modify/update the details of a specific account identified by {reference_id}. All body inputs are optional. Only provided inputs will be updated in the account record, while all others will maintain their current values.","operationId":"Update_Account_api_v2_directory_accounts__reference_id__patch","parameters":[{"name":"reference_id","in":"path","required":true,"schema":{"type":"string","description":"Unique identifier for the account, previously external_id.","title":"Reference Id"},"description":"Unique identifier for the account, previously external_id."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateAccountRequest"}}}},"responses":{"200":{"description":"The updated account, re-read after the write.","content":{"application/json":{"schema":{}}}},"400":{"description":"No account with this reference_id","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"402":{"description":"Payment Required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"422":{"description":"Unprocessable Entity - Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiFailResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiErrorResponse"}}}}}}}}}
```
