v1.0.0
OpenAPI 3.1.0

Update a translation of a broadcast message

US region

Client Libraries

Update a translation of a broadcast message

Update a translation of a specific broadcast action, including the body of messages or HTTP requests.

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

Path Parameters
  • broadcast_id
    Type: integer
    required

    The identifier of a broadcast.

  • action_id
    Type: integer
    required

    The action you want to lookup or act on.

  • 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 action. 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.

      • broadcast_id
        Type: integer

        The identifier for a broadcast.

      • 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.

      • sending_state
        Type: stringenum

        Determines the sending behavior for the action. automatic sends the action automatically when triggered; draft queues drafts when the action is triggered; or off to disable the action.

        values
        • automatic
        • draft
        • off
      • subject
        Type: string

        The subject line for an email action.

Responses
  • application/json
  • 400

    The broadcastID, actionID or triggerID is invalid. Or the language does not exist for this action.

  • 404

    The broadcast, action, and/or trigger do not exist.

  • 429

    Your request is over the 10-per-second limit.

Request Example for put/v1/broadcasts/{broadcast_id}/actions/{action_id}/language/{language}
curl 'https://api.customer.io/v1/broadcasts/1/actions/1/language/{language}' \
  --request PUT \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "broadcast_id": 2,
  "body": "",
  "sending_state": "automatic",
  "from_id": 1,
  "reply_to_id": 38,
  "recipient": "{{customer.email}}",
  "subject": "Did you get that thing I sent you?",
  "preheader_text": "",
  "body_amp": "",
  "headers": [
    [
      {
        "name": "X-Mailgun-Tag",
        "value": "my-cool-tag"
      }
    ]
  ]
}'
{
  "action": {
    "id": 96,
    "broadcast_id": 2,
    "deduplicate_id": "15:1492548073",
    "name": "Opening Message",
    "layout": "string",
    "created": 1552341937,
    "updated": 1552341937,
    "body": "string",
    "type": "email",
    "sending_state": "automatic",
    "language": "fr",
    "from": "sentFrom@example.com",
    "from_id": 1,
    "reply_to": "replyto@example.com",
    "reply_to_id": 38,
    "preprocessor": "premailer",
    "recipient": "{{customer.email}}",
    "subject": "Did you get that thing I sent you?",
    "cc": "string",
    "bcc": "string",
    "fake_bcc": true,
    "preheader_text": "string",
    "body_amp": "string",
    "headers": "[{\"name\":\"X-Mailgun-Tag\",\"value\":\"my-cool-tag\"},{\"name\":\"X-Custom-Header\",\"value\":\"custom-value\"}]"
  }
}