---
title: "Asks to change the customer's email address and mails the new one a code to prove it."
---

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

Path: Sherpo customer API › contact

`POST /v1/stores/{store}/contacts/change`

## Authentication

- `bearer`, http, header `Authorization`, scopes: `contact:write`

## Path parameters

- `store` (`changeContact.path.store`; string, required) — A hostname of the store.

## Request body

_Required._

- `kind` (`changeContact.kind`; string, required)
- `value` (`changeContact.value`; string, required)
  - minLength 1; maxLength 254; pattern `^[^\s@]+@[^\s@]+\.[^\s@]+$`

## Example request

```json
{
  "kind": "email",
  "value": "string"
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url 'https://api.sherpo.io/customer/v1/stores/<store>/contacts/change' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "kind": "email",
  "value": "string"
}
'
```

### TypeScript

```typescript
const url = 'https://api.sherpo.io/customer/v1/stores/<store>/contacts/change';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({kind: 'email', value: 'string'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://api.sherpo.io/customer/v1/stores/<store>/contacts/change"

payload = {
    "kind": "email",
    "value": "string"
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

Asks to change the customer's email address and mails the new one a code to prove it.

#### Example

```json
{
  "expires_at": "string"
}
```

- `expires_at` (`changeContact.response.200.expires_at`; string, required)

### default

A problem; see https://api.sherpo.io/customer/docs/errors.

#### Example

```json
{
  "type": "http://example.com",
  "title": "string",
  "status": 0,
  "detail": "string",
  "code": "string",
  "context": {},
  "reached_core": true,
  "core_answer": "string"
}
```

- `type` (`changeContact.response.default.type`; string, required)
  - format `uri`
- `title` (`changeContact.response.default.title`; string, required)
- `status` (`changeContact.response.default.status`; integer, required)
- `detail` (`changeContact.response.default.detail`; string, required)
- `code` (`changeContact.response.default.code`; string, optional)
- `context` (`changeContact.response.default.context`; object, optional)
- `reached_core` (`changeContact.response.default.reached_core`; boolean, optional)
- `core_answer` (`changeContact.response.default.core_answer`; string, optional)


Source: https://docs.sherpo.io/customer-api/reference/change-contact/index.md
