Set Email
Set the email for the customer
HTTP Request
POST/api/shop/customers/me/set_email
Authorization
Authorization
- Required: Yes
- Permission: IsAuthenticated
- Authentication: Token-based (Authorization: Token <your_api_key>)
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
| String | Yes | Email address |
Example Requests
- 🐍 Python
- 🌐 Curl
1import requests
2
3api = requests.Session()
4api.headers.update({'Authorization': 'Token f4e75eab6e0f663a972d145478d6fc4b81762070'})
5response = api.put(
6 'http://www.example.com/api/shop/customers/me/set_email',
7 json={
8 'email': 'alexandra.thompson@techcorp.com',
9 }
10)1curl "http://www.example.com/api/shop/customers/me/set_email" -X PUT -H "Authorization: Token XXXXXXXXXXXXXXXXXXXXXX" -H "Content-Type: application/json" -d '{
2 "email": "alexandra.thompson@techcorp.com",
3}'| Field | Type | Description |
|---|---|---|
| ttl | Integer | The ttl in seconds |
Example Response
{
"ttl": 119
}
Note
- When email is set using this endpoint, the
is email verifiedfield of the user will be set tofalse - Email is not a unique field, instead a
verified emailis unique.