HostingMigrations
Create migration
POST
/api/migrationsCreates a migration from an uploaded CSV file and schedules validation or execution.
Authorization
api_key X-Api-Token<token>
API token used to authenticate requests.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
csv_file_name*string
Original migration CSV file name.
csv_file_content*string
Migration CSV file content.
csv_file_size?integer
Migration CSV file size in bytes.
Format
int32preset*string
Migration preset name.
customer_code?string
Customer code that owns the migration. Admin only.
first_execution_date?string
First execution date/time. Required unless execute_now is true.
Format
date-timesecond_execution_date?string
Optional second execution date/time.
Format
date-timeexecute_now?boolean
Execute the first migration run immediately.
date_filter_preset?string
Date filter preset for migrated mail.
all= include every value.last_month= messages from the last month.last_6_months= messages from the last 6 months.last_year= messages from the last year.custom= custom date range.
Default
allValues all | last_month | last_6_months | last_year | customcustom_from_date?string
Custom lower date bound when date_filter_preset is custom.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/migrations" \ -H "X-Api-Token: YOUR_API_TOKEN" \ -H "Accept: application/json" \ -H "Content-Type: application/json" \ -d '{ "csv_file_name": "string", "csv_file_content": "string", "preset": "string" }'{
"message": "string",
"resource_code": "string"
}{
"message": "Unauthorized",
"errors": []
}{
"message": "Forbidden",
"errors": []
}{
"message": "Not found",
"errors": []
}{
"message": "Validation failed",
"errors": [
{
"field": "name",
"description": "is not valid"
}
]
}