CorebanqCorebanq Developer Docs
Personasv1Personal Identity

Update persona

Partial update. TWO THINGS THIS ROUTE CANNOT DO. (1) IT CANNOT DEACTIVATE A PERSONA, AND IT CANNOT CLEAR A FIELD. The update is issued as Updates(struct), and GORM skips every zero-valued member of a struct — so active: false is indistinguishable from active omitted, and "first_name": "" leaves the stored name alone. Only non-zero values are written. date_of_birth and date_of_death are pointers and are copied only when present, which is the same rule stated differently. (2) IT DOES NOT VALIDATE. validateCreatePersonaInput runs on POST only, so this route will happily write a name over the length limit, a future date of birth, or an age under 18 — all of which the create refuses. The 200 body is the struct read before the update with the written columns assigned back into it: GORM points its update at the model it was handed and assigns each column it sets, so the fields the request changed do come back with their new values. It is NOT a fresh read, so anything the database produced on its own — a trigger, a default, a computed column — is not reflected.

PUT
/v1/personas/{persona_id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

persona_id*string

Persona id. A value that does not parse is 400 personas_m.invalid_persona_id.

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Body of both PUT routes. Sent as Updates(struct), so GORM SKIPS EVERY ZERO VALUE: active: false cannot deactivate, and an empty string cannot clear a name or a nationality. The address members are dropped here too, and their house-number keys are actual_house and reg_house, not actual_house_number and reg_house_number. No validator runs on either PUT.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PUT "https://example.com/v1/personas/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{    "first_name": "string",    "last_name": "string",    "date_of_birth": "2019-08-24"  }'
{
  "first_name": "string",
  "last_name": "string",
  "date_of_birth": "2019-08-24",
  "date_of_death": "2019-08-24",
  "nationality": "string",
  "hash_id": "string",
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "active": true,
  "metadata": {},
  "created_at": "2019-08-24T14:15:22Z",
  "created_by": "ee824cad-d7a6-4f48-87dc-e8461a9201c4",
  "modified_at": "2019-08-24T14:15:22Z",
  "modified_by": "e8d4374d-93a1-4e98-a6c6-fdcf00c5059f"
}
{
  "status": 400,
  "message": "Invalid persona ID",
  "code": "personas_m.invalid_persona_id",
  "class": "validation"
}
{
  "status": 401,
  "message": "Unauthorized",
  "code": "common.unauthorized",
  "class": "business"
}
{
  "status": 403,
  "message": "No access to the record",
  "code": "common.rbac_no_rec_access",
  "class": "business"
}
{
  "status": 404,
  "message": "Record not found",
  "code": "common.record_not_found",
  "class": "business"
}
{
  "status": 429,
  "message": "Rate limit exceeded",
  "code": "rate_limits_m.exceeded",
  "class": "temporary",
  "retryable": true
}
{
  "status": 500,
  "message": "Internal server error",
  "code": "common.server_error",
  "class": "business"
}

{
  "overall_status": "unhealthy",
  "message": "Service is shutting down",
  "timestamp": "2026-08-27T15:04:05Z"
}