---
search:
  tags:
    - Patients
    - PUT
seo:
  description: >-
    Updates basic information of an existing patient. Reference for the PUT
    /patients/{patient_id} endpoint in the Almendra API.
sidebar:
  label: Update a patient
  badge: PUT
title: Update a patient
type: openapi-operation
---
Updates basic information of an existing patient.

Requires the `patients:write` permission.

`PUT /patients/{patient_id}`

**Request body** (`application/json`)

- `firstName` (string) — Patient first name
- `lastName` (string) — Patient last name
- `email` (string<email>) — Patient email
- `phone` (string) — Patient phone number
- `nationality` (string) — Patient nationality
- `address` (string) — Patient address
- `birthdate` (string<date-time>) — Patient birthdate in ISO 8601 format
- `idNumber` (string) — Patient ID number (e.g., SSN, passport)
- `occupation` (string) — Patient occupation
- `sex` (string) — Patient sex

Request body example:

```json
{
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phone": "+1234567890",
  "nationality": "American",
  "address": "123 Main St, City, State 12345",
  "birthdate": "1990-01-15T00:00:00.000Z",
  "idNumber": "123456789",
  "occupation": "Software Engineer",
  "sex": "M"
}
```

**Responses**

- `200` — Patient updated successfully
- `400` — Bad request - Invalid input
- `401` — Unauthorized - Invalid API key
- `403` — The account behind the API key has no active paid plan, or the key lacks the permission this operation needs
- `404` — Patient not found
- `415` — Unsupported Media Type - send the body as JSON with Content-Type: application/json
- `429` — Rate limit exceeded (600 requests per 60 seconds); retry after \`Retry-After\` seconds
- `500` — Unexpected server error

Response example, 200:

```json
{
  "_id": "507f1f77bcf86cd799439011",
  "firstName": "John",
  "lastName": "Doe",
  "email": "john.doe@example.com",
  "phone": "+1234567890",
  "nationality": "American",
  "address": [
    {
      "value": "123 Main St, City, State 12345",
      "timestamp": "2024-01-15T00:00:00.000Z"
    }
  ],
  "birthdate": "1990-01-15T00:00:00.000Z",
  "idNumber": "123456789",
  "occupation": "Software Engineer",
  "sex": "male",
  "expert": "507f1f77bcf86cd799439012",
  "createdAt": "2024-01-15T00:00:00.000Z",
  "updatedAt": "2024-01-15T00:00:00.000Z"
}
```
