> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xwift.africa/llms.txt
> Use this file to discover all available pages before exploring further.

# Edit card user

> Update a cardholder's phone, address, and identity document.

Updates phone, address, and identity fields for a cardholder that belongs to your partner account. `first_name`, `last_name`, and `email` cannot be changed here.

**user\_id** `string` *required*

Cardholder id returned by [create card user](https://docs.xwift.africa/api-reference/cards/create-user.md).

**phone** `string` *required*

Phone number.

**country** `string` *required*

Country.

**state** `string` *required*

State or region.

**city** `string` *required*

City.

**address** `string` *required*

Street address.

**zip\_code** `string` *required*

Postal code.

**id\_type** `string` *required*

`National_ID`, `Passport`, or `Driving_License`.

**id\_number** `string` *required*

Government ID number. Must not belong to a different cardholder.

The response is a short [card user](https://docs.xwift.africa/guides/cards.md#card-user-object): `user_id`, `email`, and `name`.

### Errors

| Message | When |
| - | - |
| First validator error | A required field is missing or `id_type` is invalid |
| `Card user not found.` | `user_id` is missing for this partner |
| `Card user can't be edited because a card has not been created. Create a card first.` | The cardholder has no issuer profile |
| `The id number has already been taken.` | ID number belongs to another cardholder |
| `An unexpected error occurred. Please try again.` | The update could not be completed |

```bash theme={null}
curl -X POST "{{base_url}}/card/edit-user" \
  -H "x-api-key: YOUR_CONSUMER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "user_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "phone": "254712345678",
    "country": "KE",
    "state": "Nairobi",
    "city": "Nairobi",
    "address": "10 Riverside Drive",
    "zip_code": "00100",
    "id_type": "Passport",
    "id_number": "P987654321"
  }'
```

```json theme={null}
{
  "code": 200,
  "message": "Card user updated.",
  "data": {
    "user_id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
    "email": "ada@example.com",
    "name": "Ada Lovelace"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.