# Update emergency contact record

`PUT /api/members/emergency-contacts/{id}`

- **Products:** Operator (`FOH`), Consumer (`CONSUMER`) (any one of these products, not all)
- **Features:** Online Joining (`ONLINEJOIN`), Front of House Generic Access (`FOHGENERIC`) (any one of these features, not all)

HTML version: [Update emergency contact record](https://support.gladstonesoftware.cloud/reference/members/update-emergency-contact-record)

## Overview

Replaces the details of one emergency contact record — the person a centre rings if something happens to the member while they are on site.

The record is addressed by its own id, not by member id. Take that id from [Get member emergency contacts](get-member-emergency-contacts.md); it is assigned when the contact is created with [Create emergency contact for member](create-emergency-contact-for-member.md). The member the contact belongs to cannot be changed here, and this endpoint does not check the contact against the member in your access token — the id alone determines what is written, so validate it on your side before calling.

**This is a full replacement of the record's three fields, not a partial update.** All three are written unconditionally, so omitting `relationship` erases the stored relationship rather than leaving it in place. Send every field on every call.

## Endpoint

`PUT {base_url}/api/members/emergency-contacts/{id}`

`{base_url}` is the environment URL issued to your integration. See [Authenticating with Gladstone APIs](../../guides/authenticating-with-gladstone-apis.md).

## Path parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `id` | integer (int32) | Yes | The id of the emergency contact record to overwrite, as returned by [Get member emergency contacts](get-member-emergency-contacts.md). This is the contact record's id, not the member's id. |

## Request body

| Field | Type | Required | Description |
|-------|------|----------|-------------|
| `contactName` | string | Yes | The name of the person to contact in an emergency. Maximum 50 characters. Rejected if missing or empty: `A contact name is required in this request`. |
| `contactNumber` | string | Yes | The telephone number to ring. Maximum 50 characters. Free text — no format, country-code or digits-only check is applied, so send it in whatever form your centre staff need to read. Rejected if missing or empty: `A contact number is required in this request`. |
| `relationship` | string | No | How the contact is related to the member, in free text — for example `Mother` or `Partner`. Maximum 25 characters. Not validated against a list. **Omitting it or sending `null` clears the stored relationship**, because the field is written unconditionally; resend the existing value if you are not changing it. |

## Sample request

```bash title="cURL"
curl -X PUT '{base_url}/api/members/emergency-contacts/{id}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true' \
  -H 'Content-Type: application/json' \
  -d '{
  "contactName": "string",
  "contactNumber": "string",
  "relationship": "string"
}'
```

## Errors

A successful call returns `204 No Content`.

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | `contactName` or `contactNumber` is missing, or a field is over its length limit — `The contact name cannot be more than 50 characters`, `The contact numbe cannot be more than 50 characters` (the typo is in the platform), `The relationship cannot be more than 25 characters`. Returned as a model-state object rather than a plain string. |
| `404` | Not found | No emergency contact exists with that id: `Emergency contact {id} does not exist` |
| `500` | Internal server error | The change could not be saved, or another unexpected server-side failure occurred. No detail is returned in the body. |
