Create Content
Creates new content for use in discussions.
This request is used to reply to already-posted content or to initiate a discussion. If authorized, the authenticated user will be used as the content author.
Content will be created and pushed asynchronously to the channel. When the content is successfully pushed to the channel, the Content.Exported event will be reported.
The account context of this request is determined by the RC Account Id associated with the access token provided in the Authorization header.
Replying to customer content is usually possible unless the channel or conversation is read only. Composing content, on the contrary, depends on the channel itself.
-
The channel may not support it (and be purely reactive like Instagram, Messenger, etc.).
-
Some channels (usually public accounts like Twitter or Facebook pages) allow for the publishing of content without targeting specific individuals.
-
Some channels (usually non-public media) require specific targeting (phone number for SMS, email address for email, customer_id, etc.) to be able to create content. This is channel-specific and detailed under the generic parameters.
Request body
Example request
{
"authorIdentityId": "541014e17aa58d8ccf000023",
"body": "Body of the content",
"inReplyToContentId": "123414e17asdd8ccf000023",
"sourceId": "fff415437asdd8ccf000023",
"attachmentIds": [
"541014e17aa58d8ccf000023",
"541014e17aa58d8ccf000023"
],
"title": "An email title",
"to": [
"+33634231224"
],
"cc": [
"user@example.com"
],
"bcc": [
"user@example.com"
],
"templateName": "customer_order_shipment_template",
"templateLanguage": "fr",
"components": [
{
"Message1": [
{
"param11": {
"type": "Name",
"text": "John"
}
},
{
"param12": {
"type": "Message",
"text": "Product rocks!"
}
}
]
},
{
"Message2": [
{
"param21": {
"type": "Agent Name",
"text": "Alice"
}
},
{
"param22": {
"type": "Message",
"text": "Thank you"
}
}
]
}
],
"contextData": {
"test1": "value1",
"test2": "value2"
}
}Response
Successful response.
Example response
{
"attachments": [
{
"contentType": "image/jpeg",
"creationTime": "2023-02-04T12:43:07Z",
"filename": "0.jpeg",
"id": "54085e5b7aa58d8b5d00006c",
"size": 217571,
"lastModifiedTime": "2023-02-04T12:43:07Z",
"uri": "https://example.digital.ringcentral.com/files/attachments/54085e5b7aa58d8b5d00006c"
}
],
"authorIdentityId": "541014e17aa58d8ccf000023",
"body": "Body of the content",
"categoryIds": [
"541014e17aa58d8ccf000023",
"541014e17aa58d8ccf002023"
],
"contextData": {
"test1": "value1",
"test2": "value2"
},
"creationTime": "2023-02-04T12:43:07Z",
"creatorId": "2683222036",
"foreignCategories": [
"foreign_category_id"
],
"id": "541014e17aa58d8ccf000023",
"inReplyToAuthorIdentityId": "541014e17asdd8ccf000023",
"inReplyToContentId": "123414e17asdd8ccf000023",
"interventionId": "123415437asdd8ccf000023",
"language": "En",
"published": true,
"rating": 4,
"sourceId": "fff415437asdd8ccf000023",
"synchronizationStatus": "success",
"title": "An email title",
"type": "Email",
"lastModifiedTime": "2023-02-04T12:43:07Z"
}