Transcoding

Endpoint for transcoding generic message format to channel-specific one.

Transcode a message

Transcodes the message from the Conversation API format to the channel-specific formats for the requested channels. No message is sent to the contact.

SecurityBasic or oAuth2
Request
path Parameters
project_id
required
string

The unique ID of the project. You can find this on the Sinch Dashboard.

Request Body schema: application/json
required

The message to be transcoded, and the app and channels for which the message is to be transcoded.

app_id
required
string

The ID of the app used to transcode the message.

required
Card (object) or Carousel (object) or Choice (object) or Location (object) or Media (object) or Template Message (object) or Text (object) or List (object) or Contact Info (object) (AppMessage)

Message originating from an app

channels
required
Array of strings (Channel Identifier)

The list of channels for which the message shall be transcoded to.

Items Enum: "WHATSAPP" "RCS" "SMS" "MESSENGER" "VIBER" "VIBERBM" "MMS" "INSTAGRAM" "TELEGRAM" "KAKAOTALK" "KAKAOTALKCHAT" "LINE" "WECHAT" "APPLEBC"
from
string

Optional.

to
string

Optional.

Responses
200

A successful response.

Response Schema: application/json
object

The transcoded message for the different channels. The keys in the map correspond to channel names, as defined by the type ConversationChannel.

property name*
additional property
string
400

Malformed request. See common error responses for more information.

401

Incorrect credentials. See common error responses for more information.

403

Correct credentials but you don't have access to the requested resource. See common error responses for more information.

500

Correct credentials but you don't have access to the requested resource. See common error responses for more information.

501

Something went wrong on our end, try again with exponential back-off. See common error responses for more information.

post/v1/projects/{project_id}/messages:transcode
Request samples
application/json
{
  • "app_id": "string",
  • "app_message": { },
  • "channels": [
    • "WHATSAPP"
    ]
}
Response samples
application/json
{
  • "transcoded_message": {
    • "property1": "string",
    • "property2": "string"
    }
}