Skip to Content
CloudAPI and integrationsPublic M2M APIPublic M2M API — mail-migrations

Public M2M API — mail-migrations

Review the operation, its input and access requirements. Parameter names and enum values are protocol identifiers and must retain the exact spelling shown. Optional/defaulted input is marked as such; required fields nested beneath an optional object apply when that object is supplied. Only statically recognized literal constraints are shown; additional validation, conditional requirements and provider rules may apply.

Authentication and permissions · Requests, results and recovery

/api/v1/mail-migrations

Exported methods: GET, POST, DELETE

GET

  • Resource scopes: hosting:read
  • Query parameters: id, jobId
  • Explicit response statuses: 404
  • Explicit error codes: not_found
  • Response keys observed across outcomes: data, job, jobs

POST

  • Resource scopes: hosting:write
  • Explicit response statuses: 201, 404, 422
  • Explicit error codes: invalid_request, not_found
  • Response keys observed across outcomes: action, data, job

These tables describe the validated form after the server normalizes the submitted input. Include the shown discriminator explicitly to select an alternative; the server may also accept omitted or aliased fields according to its route-specific normalization.

Provide one of these observed alternatives; additional validation may apply.

Payload alternative 1

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionliteralNoNocreate—
namestringYesNo—min(1), max(120)
kindenumYesNoCLASSIC, ASSISTEDdefault("CLASSIC")
sourceHoststringYesNo——
sourcePortnumberYesNo—int(), min(1), max(65535), default(993)
sourceUserstringYesNo——
sourcePasswordstringYesNo——
sourceSslbooleanYesNo—default(true)
targetMailboxstringYesNo——
accountsarrayYesNo——
accounts[].sourceEmailstringNoNo—email()
accounts[].sourceHoststringNoNo—min(1)
accounts[].sourcePortnumberYesNo—int(), min(1), max(65535), default(993)
accounts[].sourceSecurebooleanYesNo—default(true)
accounts[].destEmailstringNoNo—email()
accounts[].destHoststringYesNo—min(1), default("imap.mail.ovh.net")
accounts[].destPortnumberYesNo—int(), min(1), max(65535), default(993)
accounts[].destSecurebooleanYesNo—default(true)
excludedFoldersarrayYesNo——

Payload alternative 2

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionenumNoNostart, pause, retry, cancel—
jobIdstringNoNo—min(1)

DELETE

  • Resource scopes: hosting:write
  • Query parameters: id, jobId
  • Explicit response statuses: 400, 404
  • Explicit error codes: invalid_request, not_found
  • Response keys observed across outcomes: deleted, jobId

Provide the migration job identifier as jobId or id in query or JSON. This deletes the job record; it does not prove that an external mailbox or migrated messages were removed.

JSON properties observed: id, jobId.

These names are read by the handler; they are not a complete schema or a promise that every property applies to every branch. Check the validation messages and operation result.

/api/v1/mail-migrations/{id}

Exported methods: GET, PATCH, DELETE

GET

  • Resource scopes: domains:read
  • Path parameters: id
  • Explicit response statuses: 404
  • Explicit error codes: not_found
  • Response keys observed across outcomes: data, migration

PATCH

  • Resource scopes: domains:write
  • Path parameters: id
  • Explicit response statuses: 404, 422
  • Explicit error codes: invalid_request, not_found
  • Response keys observed across outcomes: data, migration

Validated request fields

FieldTypeOptional/defaultedNullableAllowed literal valuesObserved literal constraints
actionenumYesNostart, pause, resume, cancel, retry—
namestringYesNo—min(1), max(120)
sourceHoststringYesNo—min(1), max(255)
sourcePortnumberYesNo—int(), min(1), max(65535)
sourceSslbooleanYesNo——
sourceUserstringYesNo—min(1), max(255)

DELETE

  • Resource scopes: domains:write
  • Path parameters: id
  • Explicit response statuses: 404, 409
  • Explicit error codes: conflict, not_found
  • Response keys observed across outcomes: deleted, id

Request input was not extracted for this operation; consult its specific contract before sending. Do not infer that no body is required.