HostingVault
Activate Vault for domain
POST
/api/archive/domains/{domain_code}Enables Vault archiving for a domain and activates archiving for the selected email accounts.
Authorization
api_key X-Api-Token<token>
API token used to authenticate requests.
In: header
Path Parameters
domain_code*string
Domain code: D followed by 9 digits. Example: D123456789.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
email_codes*string[]
Email account codes to enable Vault for.
retention*integer
Retention period in months.
Format
int32default_archive?boolean
Enable Vault by default for new email accounts on the domain.
Default
trueResponse Body
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/archive/domains/string" \ -H "X-Api-Token: YOUR_API_TOKEN" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "email_codes": [ "string" ], "retention": 0 }'Empty
{
"message": "Unauthorized",
"errors": []
}{
"message": "Forbidden",
"errors": []
}{
"message": "Not found",
"errors": []
}{
"message": "Validation failed",
"errors": [
{
"field": "name",
"description": "is not valid"
}
]
}