Modbot Docs
APIAPI referenceImports

Start an import

POST/api/imports

The body is the file: a JSON array of records, or one record per line. Send it as the body with Content-Type application/json and the source as a query parameter, or as a multipart form with a file part and a source field. At most 64 MB. The import runs in the background; ask GET /api/imports/{id} how it is going. dryRun=true reads and counts without writing anything. dedup=false writes every record even when Modbot already has the event from somewhere else; it does not turn off the check that stops the same file being imported twice, which always runs. seenBy is the source every record is filed under unless the record sets its own: one of AuditLog, SyncDiff, Companion, Discord, Manual or Modbot, and Manual when nothing says otherwise. The format is documented at docs.modbot.co/self-hosting/importing-old-data.

Needs the ImportOldData permission.

AuthorizationBearer <token>

An API key, made on Settings, API keys. Every key starts with mbk_.

In: header

Query Parameters

source?string
seenBy?string
dryRun?boolean
dedup?boolean
fileName?string

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/api/imports"
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "source": "string",  "fileName": null,  "dryRun": true,  "dedup": true,  "seenBy": "AuditLog",  "status": "Queued",  "received": 0,  "imported": 0,  "skipped": 0,  "alreadyKnown": 0,  "rejected": 0,  "rejections": [    {      "line": 0,      "reason": "string"    }  ],  "error": null,  "startedBy": "string",  "createdAt": "2019-08-24T14:15:22Z",  "startedAt": null,  "finishedAt": null}

Modbot is not endorsed by or affiliated with VRChat Inc. or Discord Inc. VRChat is a trademark of VRChat Inc. Discord is a trademark of Discord Inc. SteamVR is a trademark of Valve Corporation. Windows is a trademark of Microsoft Corporation. Docker is a trademark of Docker, Inc. PostgreSQL is a trademark of the PostgreSQL Community Association of Canada. Railway is a trademark of Railway Corp. Other names are trademarks of their respective owners; see Legal. Modbot and its logo are trademarks of the Modbot project. Open source under AGPL-3.0.