Preview adding an Agent Mail address
Quotes one more address: free: true when it is included with the
workspace’s Lusor Phones (one each), otherwise $2/mo, prorated today.
Nothing is charged. The quote expires after 10 minutes; confirm it
with POST /v1/emails/addresses.
With username, the name is checked first: taken (by any workspace,
including a deleted address, which is never reissued) is
409 username_taken; reserved or malformed is 422 username_reserved
/ username_invalid. Nothing is quoted then.
Retries: safe without an Idempotency-Key: a preview only quotes, it changes nothing.
curl --request POST \
--url https://api.lusor.ai/v1/emails/addresses/preview \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"username": "alice.smith"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: 'alice.smith'})
};
fetch('https://api.lusor.ai/v1/emails/addresses/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/emails/addresses/preview"
payload = { "username": "alice.smith" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"previewId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"currency": "usd",
"dueToday": 123,
"creditToday": 123,
"totalAtRenewal": 123,
"expiresAt": 123,
"subtotal": 123,
"tax": 123,
"discountToday": 123,
"discountAtRenewal": 123,
"subtotalAtRenewal": 123,
"taxAtRenewal": 123,
"free": true
}
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}Authorizations
Query Parameters
Body
The address's name before the @, case-insensitive (stored
lowercase). 3–30 characters of a-z, 0-9, ., _, -, starting
and ending with a letter or digit, never two of ., _, - in a row.
Unique across all workspaces, deleted addresses included. Reserved
names (e.g. admin, postmaster, support, noreply) are refused.
Omit it for a generated name.
1 - 255"alice.smith"
Was this page helpful?
curl --request POST \
--url https://api.lusor.ai/v1/emails/addresses/preview \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"username": "alice.smith"
}
'const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({username: 'alice.smith'})
};
fetch('https://api.lusor.ai/v1/emails/addresses/preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.lusor.ai/v1/emails/addresses/preview"
payload = { "username": "alice.smith" }
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"data": {
"previewId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"quantity": 123,
"currency": "usd",
"dueToday": 123,
"creditToday": 123,
"totalAtRenewal": 123,
"expiresAt": 123,
"subtotal": 123,
"tax": 123,
"discountToday": 123,
"discountAtRenewal": 123,
"subtotalAtRenewal": 123,
"taxAtRenewal": 123,
"free": true
}
}{
"error": "validation_error",
"details": {}
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}{
"error": "<string>",
"message": "<string>"
}
