Add a new email address to a user account
curl --request POST \
--url https://api.wacht.dev/users/{user_id}/emails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "jsmith@example.com",
"is_primary": false
}'
{
"id": "<string>",
"email": "jsmith@example.com",
"is_primary": true,
"is_verified": true,
"verified_at": "2023-11-07T05:31:56Z"
}
JWT Bearer token authentication using the Authorization header
(i64 formatted as string)
Email added successfully
The response is of type object
.
curl --request POST \
--url https://api.wacht.dev/users/{user_id}/emails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"email": "jsmith@example.com",
"is_primary": false
}'
{
"id": "<string>",
"email": "jsmith@example.com",
"is_primary": true,
"is_verified": true,
"verified_at": "2023-11-07T05:31:56Z"
}