curl --request POST \
--url https://api.apostra.com/api/v2/inbound-email-addresses/{id}/rotate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/inbound-email-addresses/{id}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apostra.com/api/v2/inbound-email-addresses/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": "coke-reports-k7m2qz4xhd9a@in.staging.apostra.com",
"purpose": "reports",
"handler": "session_intake",
"customerId": 4503599627370495,
"advertiserId": 4503599627370495,
"revision": 4503599627370495,
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Rotate inbound email address
Replace an address with a new one that keeps the same prefix, owner and purpose. Mail to the previous address is refused from that moment. Admin-only.
curl --request POST \
--url https://api.apostra.com/api/v2/inbound-email-addresses/{id}/rotate \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.apostra.com/api/v2/inbound-email-addresses/{id}/rotate"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.apostra.com/api/v2/inbound-email-addresses/{id}/rotate', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"address": "coke-reports-k7m2qz4xhd9a@in.staging.apostra.com",
"purpose": "reports",
"handler": "session_intake",
"customerId": 4503599627370495,
"advertiserId": 4503599627370495,
"revision": 4503599627370495,
"status": "active",
"createdAt": "2023-11-07T05:31:56Z",
"revokedAt": "2023-11-07T05:31:56Z"
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}{
"data": null,
"error": {
"code": "<string>",
"message": "<string>",
"field": "<string>",
"details": {}
}
}Authorizations
API key or access token
Path Parameters
Inbound email address ID
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Response
Rotate inbound email address
Stable address ID. It stays the same when the address is rotated.
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$The email address to send to: a readable prefix, an unguessable suffix and the dedicated inbound domain.
^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$"coke-reports-k7m2qz4xhd9a@in.staging.apostra.com"
What the address is for. briefs receives briefs and requests; reports receives reports. The purpose is part of the readable address prefix and selects the handler.
briefs, reports "reports"
Where received mail is delivered. session_intake records each message privately in the account’s shared Session.
session_intake Customer account that owns this address
0 < x <= 9007199254740991The advertiser this address belongs to, or null for an account-wide address
0 < x <= 9007199254740991Increases by one each time the address is rotated
0 < x <= 9007199254740991active addresses receive mail. Mail to a revoked or rotated-away address is refused.
active, revoked When this revision of the address was created
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$When the address stopped receiving, or null while active
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$