v1.0.0
OpenAPI 3.1.0

Update a translation of a transactional message

US region

Client Libraries

Update a translation of a transactional message

Update the body and other data of a specific language variant for a transactional message. This fully overwrites this specific translation of your existing transactional message.

NOTE: You cannot manage content made with Design Studio with this endpoint. Use the Design Studio APIs instead.

Path Parameters
  • transactional_id
    Type: integer
    required

    The identifier of your transactional message. You'll find this in the UI or URL of your transactional message. For example, if this is the path of a transactional message URL - /transactional/3/templates/139 - the transactional_id is 3.

  • language
    Type: string
    required

    A language tag of a language variant. If you don't provide a language (an empty string), we'll use your default language. If the language variant does not exist, we'll return an error.

Body
application/json
  • body
    Type: string

    The body of the transactional message. You cannot modify the body if you created it with our drag-and-drop editor.

  • body_amp
    Type: string

    AMP-enabled content for your email. If a recipient's email client doesn't support AMP, they receive your body content instead. Make sure you're set up to send AMP first.

  • from_id
    Type: integer

    The identifier of the from address, commonly known as the "sender". Use List sender identities to find valid IDs.

  • headers
    Type: array object[]

    Headers you want to add or update. Names and values must be strings, with no non-ASCII characters or spaces. You can't overwrite reserved headers.

  • preheader_text
    Type: string

    Also known as "preview text", this is the small block of text shown in an email inbox next to or underneath the subject line.

  • recipient
    Type: string

    The recipient address for an action.

  • reply_to_id
    Type: integer | null

    The identifier for the reply_to address, if applicable. Use List sender identities to find valid IDs.

  • subject
    Type: string

    The subject line for an email action.

Responses
  • application/json
  • application/json
Request Example for put/v1/transactional/{transactional_id}/language/{language}
{
  "body": "",
  "body_amp": "",
  "from_id": 1,
  "headers": [
    [
      {
        "name": "X-Mailgun-Tag",
        "value": "my-cool-tag"
      }
    ]
  ],
  "preheader_text": "",
  "recipient": "{{customer.email}}",
  "reply_to_id": 38,
  "subject": "Did you get that thing I sent you?"
}
{
  "content": [
    {
      "bcc": "string",
      "body": "string",
      "body_amp": "string",
      "cc": "string",
      "created": 1552341937,
      "fake_bcc": true,
      "from": "sentFrom@example.com",
      "from_id": 1,
      "headers": "[{\"name\":\"X-Mailgun-Tag\",\"value\":\"my-cool-tag\"},{\"name\":\"X-Custom-Header\",\"value\":\"custom-value\"}]",
      "id": 96,
      "language": "fr",
      "name": "Receipt",
      "preheader_text": "string",
      "preprocessor": "premailer",
      "recipient": "{{customer.email}}",
      "reply_to": "replyto@example.com",
      "reply_to_id": 38,
      "subject": "Did you get that thing I sent you?",
      "type": "email",
      "updated": 1552341937
    }
  ]
}