---
title: "Proves the new email address with the code mailed to it, replacing the customer's old one."
---

> 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/verify`

## Authentication

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

## Path parameters

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

## Request body

_Required._

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

## Example request

```json
{
  "value": "string",
  "code": "string"
}
```

## Code samples

### cURL

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

### TypeScript

```typescript
const url = 'https://api.sherpo.io/customer/v1/stores/<store>/contacts/verify';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({value: 'string', code: '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/verify"

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

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

print(response.text)
```

## Responses

### 200

Proves the new email address with the code mailed to it, replacing the customer's old one.

#### Example

```json
[
  {
    "kind": "string",
    "value": "string",
    "verified_at": "string"
  }
]
```

- `kind` (`verifyContact.response.200.kind`; string, required)
- `value` (`verifyContact.response.200.value`; string, required)
- `verified_at` (`verifyContact.response.200.verified_at`; any of, required)
  - any of: `string`, `null`

### 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` (`verifyContact.response.default.type`; string, required)
  - format `uri`
- `title` (`verifyContact.response.default.title`; string, required)
- `status` (`verifyContact.response.default.status`; integer, required)
- `detail` (`verifyContact.response.default.detail`; string, required)
- `code` (`verifyContact.response.default.code`; string, optional)
- `context` (`verifyContact.response.default.context`; object, optional)
- `reached_core` (`verifyContact.response.default.reached_core`; boolean, optional)
- `core_answer` (`verifyContact.response.default.core_answer`; string, optional)


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