Remove an email address
email.addresses_delete
DELETE/api/v1/households/{household_id}/email/addresses/{email_address_id}
- Route
Removes the address and gives it up, so anyone can claim it. If it was the default, the oldest remaining address becomes the default. Fails with address_in_use while a draft is being sent from it.
Parameters#
| Field | Description |
|---|---|
household_idpathstringrequired | The household's ID. |
email_address_idpathstringrequired | The address's ID. |
Response#
204 The address was removed. No body.
Errors#
Every error has the same envelope: error.code, error.message, error.details, error.recovery and error.request_id.
| Status | Code | When |
|---|---|---|
400 | validation_failed | A field is missing, misspelled or out of range. details.fields lists each problem. |
401 | unauthenticated | The request has no valid session. |
404 | not_found | The household doesn't exist, or you aren't a member of it. |
409 | Read error.code | Described above. |
Examples#
These are real. Each was recorded from a sample household, the Okafors, running through the whole API when this site was built.
Remove an email address
The address is given up. If it was the default, the oldest remaining address becomes the default.
Request, curl
curl -X DELETE 'https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/email/addresses/eml_01M6V9CSS8GN4S0XWFK70XY4ZJ' \
-H "Cookie: rigel_session=$RIGEL_SESSION"Request, TypeScript
const response = await fetch("https://rigel.house/api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/email/addresses/eml_01M6V9CSS8GN4S0XWFK70XY4ZJ", {
method: "DELETE",
headers: {
Cookie: `rigel_session=${process.env.RIGEL_SESSION}`,
},
});
const data = await response.json();Request, HTTP
DELETE /api/v1/households/hh_01M6V9CS6GGVFCY7NAS8ZTQV95/email/addresses/eml_01M6V9CSS8GN4S0XWFK70XY4ZJ HTTP/1.1
Host: rigel.house
Cookie: rigel_session=<your session>Response, 204
HTTP/1.1 204 No Content
X-Request-Id: req_01M6V9CSS9HAJCSNE7E210X2YH