---
title: "Update a donor"
description: "Update a donor."
canonical: https://www.charitips.com/docs/api-reference/update-donor
---

# Update a donor

`PATCH /v1/donors/{donorId}`

Update a donor.

**Authentication**: Bearer access token.

## Parameters

- `donorId` (string, required)

## Body

- `street` (string): Address line 1
- `city` (string): City
- `country` (string): Country alpha 2 ISO code
- `zip` (string): Zip code
- `firstName` (string): Donor's first name
- `lastName` (string): Donor's last name
- `email` (string, email address): Donor's email.
- `companyName` (string): Donor's company name.
- `phone` (string): Donor's phone number.
- `birthdate` (string (date))
- `pictureUrl` (string, URL): Donor's phone number.
- `title` (string): Donor's job title.
- `personalEmail` (string, email address): Donor's personal email.
- `persona` (string): Persona of the donor. One of `CSR`, `MARKETING`, `HR`, `SALES`, `COMMUNICATION`, `PRODUCT`, `SMB`, `OTHER`.
- `externalId` (string): Optional id to link this donor to an entity on your side.
- `uniqueExternalId` (string): Similar to externalId but should be unique across all donors. Can be used to prevent duplicate donors
- `hasAcceptedTerms` (boolean): Whether the donor has accepted the terms and conditions

## Response 200

- `donorId` (string, required)
- `scopeType` (DonorScopeType, required) One of `CAMPAIGN`, `ACCOUNT`.
- `platformAccessStatus` (DonorPlatformAccessStatus, required) One of `ENABLED`, `DISABLED`, `RESTRICTED`.
- `firstName` (string, required)
- `lastName` (string, required)
- `email` (string)
- `companyName` (string)
- `phone` (string)
- `extraInfo` (string)
- `birthdate` (string (date-time))
- `street` (string)
- `streetAddition` (string)
- `city` (string)
- `country` (string)
- `zip` (string)
- `externalId` (string)
- `uniqueExternalId` (string)
- `slackId` (string)
- `pictureUrl` (string)
- `title` (string)
- `personalEmail` (string)
- `persona` (Persona) One of `CSR`, `MARKETING`, `HR`, `SALES`, `COMMUNICATION`, `PRODUCT`, `SMB`, `OTHER`.
- `language` (Language) One of `fr`, `en`.
- `hasAcceptedTerms` (boolean, required)
- `accountId` (string, required)
- `campaignId` (string)
- `individualAccountId` (string)
- `createdAt` (string (date-time), required)
- `updatedAt` (string (date-time), required)

## Errors

- 400 `Invalid fields: <join(', ')>`: A donor platform token can only change the donor's own profile: firstName, lastName, phone, pictureUrl, birthdate, personalEmail, title, persona, hasAcceptedTerms, street, zip, city and country. Remove the fields listed in the message. See https://www.charitips.com/docs/api-reference/update-donor.md.
- 400 `A field is missing, has the wrong type, or is not part of the request schema.`: `message` lists every problem. Unknown fields are rejected, not ignored: remove them rather than sending extra data. See https://www.charitips.com/docs/api-reference/errors.md.
- 401 `Unauthorized`: The access token is missing, expired or invalid. Create a new one with your client id and secret, send it as `Authorization: Bearer <accessToken>`, then retry once. Sandbox tokens only work on api.sandbox.charitips.com. See https://www.charitips.com/docs/get-started/authentication.md.
- 403 `Account closed`: The account behind these credentials is closed: no token is issued and every call is refused, reads included. Contact Charitips to reopen it. See https://www.charitips.com/docs/api-reference/troubleshooting.md#calls-answer-403-account-not-active-account-not-validated-or-account-closed.
- 409 `Unique constraint failed on uniqueExternalId`: Another donor of your account already uses this uniqueExternalId. Pick another id, or leave the field out of the update. See https://www.charitips.com/docs/api-reference/list-donors.md.

## Example

```bash
curl -X PATCH https://api.sandbox.charitips.com/v1/donors/<donorId> \
  -H "Authorization: Bearer $CHARITIPS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "street": "<street>",
    "city": "<city>"
  }'
```

```javascript
const response = await fetch('https://api.sandbox.charitips.com/v1/donors/<donorId>', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.CHARITIPS_TOKEN}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "street": "<street>",
    "city": "<city>"
  }),
});
if (!response.ok) throw new Error(`${response.status} ${await response.text()}`);
const data = await response.json();
```

```python
import os, requests

response = requests.patch(
    "https://api.sandbox.charitips.com/v1/donors/<donorId>",
    headers={"Authorization": f"Bearer {os.environ['CHARITIPS_TOKEN']}"},
    json={
      "street": "<street>",
      "city": "<city>"
    },
)
response.raise_for_status()
data = response.json()
```

## Response example (200, placeholder values)

```json
{
  "donorId": "<donorId>",
  "scopeType": "CAMPAIGN",
  "platformAccessStatus": "ENABLED",
  "firstName": "<firstName>",
  "lastName": "<lastName>",
  "email": "<email>",
  "companyName": "<companyName>",
  "phone": "<phone>"
}
```
