Webhooks

A webhook is an internet address that we will notify about project updates. For example when a project's translation is complete, you will get a "translated" action; same for "proofread" and "completed" statuses. The URL specified must be able to process the information a webhook sends, make use of it, and return a successful response to the MotaWord webhook request.

MotaWord API provides webhooks currently for 3 actions:

  • Project translated
  • Project proofread
  • Project completed

To start receiving webhook callbacks, specify callback_url when you are creating a project. See Create a project.

MotaWord will send the URL you specify calls with this payload:

{
  "type": "project",
  "action": "translated",
  "project": {
    "id": 1,
    "source_language": "string",
    "target_languages": [
      "string"
    ],
    "word_count": 123,
    "price": {
      "amount": 1.00,
      "currency": "usd"
    },
    "status": "string",
    "delivery_at": "2015-04-04",
    "valid_until": "2015-04-04",
    "callback_url": "string",
    "custom": {},
    "created_at": "2015-04-04",
    "links": {
      "self": {
        "href": "https://api.motaword.com/v0/projects/1"
      },
      "documents": {
        "href": "https://api.motaword.com/v0/projects/1/documents"
      },
      "styleguides": {
        "href": "https://api.motaword.com/v0/projects/1/styleguides"
      },
      "glossaries": {
        "href": "https://api.motaword.com/v0/projects/1/glossaries"
      }
    }
  }
}
KeyPossible valuesDescription
typeprojectThe object type which this webhook is sending an update about. Currently only project value will be sent.
actiontranslated, proofread, completedThis is the action that the webhook is notifying you about. When a project is translated, proofread or completed, you will receive calls for each separately.
projectProject object. See Get a project for details.

📘

Triggering a webhook manually

Easy! We have an endpoint for that. See Trigger a Webhook for details.