modl.gg

Upload Migration File

Upload a migration JSON file for asynchronous processing.

POST /v1/minecraft/migration/upload

Upload a migration JSON file containing player and punishment data from another moderation system. The file is processed asynchronously after upload. Use the Migration Progress endpoint to track processing status.

Authentication

Requires the X-API-Key header with your server's API key.

X-API-Key: your-api-key-here

Request

Headers

HeaderTypeRequiredDescription
X-API-KeystringYesYour server's API key.
Content-TypestringYesMust be multipart/form-data.

Form Data

FieldTypeRequiredDescription
migrationFilefileYesThe migration JSON file to upload.
POST /v1/minecraft/migration/upload
Content-Type: multipart/form-data; boundary=----FormBoundary

------FormBoundary
Content-Disposition: form-data; name="migrationFile"; filename="migration.json"
Content-Type: application/json

{ ... migration data ... }
------FormBoundary--

Response

200 OK

{
  "success": true,
  "message": "Migration file uploaded successfully. Processing will begin shortly.",
  "fileSize": 12345
}

Error Responses

Status CodeDescription
400Invalid file. The uploaded file is not valid JSON or has an incorrect format.
401Missing or invalid API key.
413File too large. The uploaded file exceeds the maximum allowed size.
429Rate limit exceeded.
500Internal server error.

On this page