docsWebhook

    🔗 Webhook

    Bluente uses webhooks to notify you when the translation status changes to READY or ERROR. You can set up webhooks in the Bluente Dashboard.

    The webhook URL is an account-level setting: one URL per user, used for every translation started by that user (whichever API key or app started it). There is no per-request callback URL; use meta_data to match a notification to your own job.


    Example of Bluente Dashboard

    Example: Bluente Dashboard has webhook settings.


    📨 Delivery

    • Bluente sends an HTTP POST with a JSON body to your URL, with headers Content-Type: application/json and User-Agent: Bluente-Translation-Webhook/1.0.
    • It is sent when the translation finishes (state: "READY") and when the translation step fails (state: "ERROR"). Handle duplicate notifications for the same task_id safely.
    • Respond with any 2xx status. Bluente waits up to 30 seconds for your response. A non-2xx response or a timeout is not retried.
    • Requests are not signed. Treat the payload as a notification only: before you act on it, confirm the task with Get Translation Status using your own API key, then Download the file.
    • Problems found while the file is being processed after upload (for example a corrupt or password-protected file) happen before translation starts and don’t send a webhook. Poll Get Translation Status until the status is SERVICE_PROCESSED before you start the translation. See Error Codes.

    ✅ Request Body

    {
      "engine": 3,
      "filename": "xxxxxxx.pdf",
      "meta_data": {
        "job_id": "...",
        "session_id": "...",
        "region": "ca"
      },
      "page_count": 2,
      "source_language": "en",
      "state": "READY",
      "target_language": "zh",
      "task_id": 1,
      "created_at": "2025-10-08 11:32:59",
      "updated_at": "2025-10-08 11:36:03",
      "user_id": "xxxx"
    }

    📊 Response Fields

    FieldTypeDescription
    engineintEngine ID
    filenamestringFilename
    meta_datajsonThe meta_data object sent to the Translate File API, returned unchanged. null if not set
    page_countintNumber of pages in the uploaded document
    source_languagestringSource language code
    statestringCurrent processing status (see state list below)
    target_languagestringTarget language code
    task_idintTask ID — the id used with Get Translation Status and Download File
    created_atstringCreated timestamp
    updated_atstringLast updated timestamp
    user_idstringID of the user who started the translation

    📌 State Values

    StateDescription
    READYTranslation completed. (At this point, call Download File API)
    ERRORSomething went wrong. Stop checking and show an error message.