# Delete member identifier

`DELETE /api/members/{memberId}/identifier/{identifierId}`

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

HTML version: [Delete member identifier](https://support.gladstonesoftware.cloud/reference/members/delete-member-identifier)

## Overview

Removes one identifier from a member. An *identifier* is the physical or virtual credential a member presents at a barrier, kiosk or reader — an access card, keyfob, smartband or similar. A member has at most one **primary** identifier and any number of **additional** identifiers.

You address the identifier by its value, not by a separate record id, and the endpoint works out which kind it is:

- If the value matches the member's **primary** identifier, the primary identifier is cleared to an empty string. The member record itself survives; it simply no longer has a primary card.
- If the value matches one of the member's **additional** identifiers, that identifier is deleted outright.
- If it matches neither, you get `404`.

Deleting an identifier frees its value for reuse — creating an identifier fails with `409` when the value is already assigned to someone else, so this is the endpoint you call to release it first.

A successful call returns `204 No Content` with no body.

## Endpoint

`DELETE {base_url}/api/members/{memberId}/identifier/{identifierId}`

`{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 |
|------|------|----------|-------------|
| `memberId` | integer (int32) | Yes | The member the identifier belongs to. Must be greater than `0`; `0` (the non-member placeholder) and `-999` (a purged member) are rejected with `400`. When you call with a member-scoped token, this must be the member the token was issued for, or the request is rejected with `403`. |
| `identifierId` | string | Yes | The identifier **value** itself — the card number, keyfob code or smartband code as it is held against the member — not a record id. The value is matched against both the member's primary identifier and their additional identifiers, and the match is not case-sensitive. The identifier must belong to `memberId`: an identifier that exists but is assigned to a different member gives `404`, not a cross-member delete. |

## Sample request

```bash title="cURL"
curl -X DELETE '{base_url}/api/members/{memberId}/identifier/{identifierId}' \
  -H 'Authorization: Bearer {accessToken}' \
  -H 'X-Use-SSO: true'
```

## Errors

| Status | Meaning | When |
|--------|---------|------|
| `400` | Bad request | `memberId` is `0` or negative. The body is the plain-text message `{memberId} is an invalid member ID`. `0` means "non-member" and `-999` means "purged member"; neither can own an identifier. |
| `403` | Forbidden | The token identifies a specific member and `memberId` is not that member. The body is `The given member ID of {memberId} does not belong to the logged in member`. This endpoint does not extend the check to linked members, so a primary member cannot delete a linked member's identifier. |
| `404` | Not found | No identifier with that value exists against this member, as either their primary or an additional identifier. The body is `Identifier "{identifierId}" for MemberId {memberId} does not exist`. You also get this — rather than a `404` naming the member — when `memberId` itself does not exist. |
| `500` | Internal server error | An unexpected server-side failure while reading or saving the identifier. The response has no body and gives no further detail. |
