Translations

Upload translation files

Upload one or more JSON translation files for a specific workflow. Files name must match the locale, e.g. en_US.json. Supports both "files" and "files[]" field names for backwards compatibility.

post/v2/translations/upload

Request

  • Base URL
    https://api.novu.co
  • Auth
    • API key in header Authorization
    • or API key in header Authorization

Headers

idempotency-keystring

A header for idempotency purposes

Request body multipart/form-data

resourceIdstring required

The resource ID to associate localizations with. Accepts identifier or slug format

resourceType'workflow' | 'layout' required

The resource type to associate localizations with

filesstring[] required

One or more JSON translation files. Filenames must match locale format (e.g., en_US.json, fr_FR.json). Field name can be "files" or "files[]".

Example request

{
  "resourceId": "welcome-email"
}

Response

Upload results

totalFilesnumber required

Total number of files processed

successfulUploadsnumber required

Number of files successfully uploaded

failedUploadsnumber required

Number of files that failed to upload

errorsstring[] required

List of error messages for failed uploads

Example response

{
  "totalFiles": 3,
  "successfulUploads": 2,
  "failedUploads": 1,
  "errors": [
    "Invalid JSON in file: es-ES.json"
  ]
}

Changes

No recorded changes to this operation across all 20 revisions of this API.