Create Object
  • 09 Jun 2025
  • 3 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

Create Object

  • Dark
    Light
  • PDF

Article summary

Post
/streams/{STREAM_ID}/objects

This API creates a Conversation in a specified channel and returns an Object Id.
Sends the Stream (channel) id with body parameters.

Security
HTTP
Type bearer

API key is needed to authorize requests. You can get your API key via the management console.
A Bearer Token is needed to be set in the Authorization header of every API call.
For additional support you can contact us.

Path parameters
STREAM_ID
Required

Stream ID. This is a commbox generated number

Body parameters

Description of request body parameters

Mail
{
  "data": {
    "Type": 5,
    "StatusId": 1,
    "StreamProviderType": 4,
    "StreamProviderId": "b9910a75a46c492c9cf46a910cdba0012",
    "UserStreamProviderId": "john.doe@gmail.com",
    "UserStreamProviderType": 4,
    "ManagerId": 12345,
    "Content": {
      "subject": "mail subject",
      "to": [
        {
          "address": "john.doe@gmail.com"
        }
      ]
    },
    "Message": "some message",
    "User": {
      "UniqueId": "01234567",
      "LastName": "Doe",
      "FirstName": "John",
      "Phone1": "05055555555",
      "Email": "john.doe@gmail.com",
      "Remarks": "some remark for user"
    }
  }
}
Mail with attachments
{
  "data": {
    "Type": 5,
    "StatusId": 13,
    "StreamProviderType": 4,
    "UserStreamProviderId": "john.doe@gmail.com",
    "UserStreamProviderType": 4,
    "ManagerId": 28361974,
    "Content": {
      "subject": "Email with an attachment",
      "to": [
        {
          "address": "john.doe@gmail.com"
        }
      ],
      "attachments": [
        {
          "path": "https://ebigh.com/wp-content/uploads/2017/12/Basketball-Stars.jpg",
          "name": "basketball.png"
        }
      ]
    },
    "Message": "some message",
    "User": {
      "UniqueId": "01234567",
      "LastName": "Doe",
      "FirstName": "John",
      "Phone1": "1800958458",
      "Email": "john.doe@gmail.com",
      "Remarks": "some remark for user"
    }
  }
}
SMS
{
  "data": {
    "Type": 4,
    "StatusId": 1,
    "StreamProviderType": 5,
    "StreamProviderId": "972544444444",
    "UserStreamProviderId": "972544444444",
    "UserStreamProviderType": 5,
    "ManagerId": 36197,
    "Message": "some message",
    "User": {
      "UniqueId": "01234567",
      "LastName": "Doe",
      "FirstName": "John",
      "Phone1": "180095845823",
      "Email": "john.doe@gmail.com",
      "Remarks": "some remark for user"
    }
  }
}
SMS Multi-recipient
{
  "data": {
    "Type": 4,
    "StatusId": 1,
    "StreamProviderType": 5,
    "UserStreamProviderId": "972544444444",
    "UserStreamProviderType": 5,
    "ManagerId": 36197,
    "sendToClient": true,
    "Content": {
      "to": [
        "972522222222"
      ]
    },
    "Message": "some message",
    "User": {
      "UniqueId": "01234567",
      "LastName": "Doe",
      "FirstName": "John",
      "Phone1": "972544444444",
      "Email": "john.doe@gmail.com",
      "Remarks": "some remark for user"
    }
  }
}
WhatsApp
{
  "data": {
    "Type": 4,
    "StatusId": 1,
    "StreamProviderType": 7,
    "StreamProviderId": "972544444444",
    "UserStreamProviderId": "972544444444",
    "UserStreamProviderType": 5,
    "ManagerId": 36197,
    "Content": {
      "to": [
        "972522222222"
      ],
      "whatsapp_hsm_name": "test_template",
      "whatsapp_localizable_params": [
        "check_1"
      ],
      "whatsapp_language_code": "en"
    },
    "Message": "some message",
    "User": {
      "UniqueId": "01234567",
      "LastName": "Doe",
      "FirstName": "John",
      "Phone1": "972544444444",
      "Email": "john.doe@gmail.com",
      "Remarks": "some remark for user"
    }
  }
}
Chat
{
  "data": {
    "Type": 4,
    "StatusId": 1,
    "StreamProviderType": 0,
    "UserStreamProviderId": "972544444444",
    "UserStreamProviderType": 5,
    "UserIdentity": 100000000419660,
    "ManagerId": 36197,
    "Message": "some message",
    "createChildObject": true,
    "User": {
      "UniqueId": "01234567",
      "LastName": "Doe",
      "FirstName": "John",
      "Phone1": "972544444444",
      "Email": "JohnDoe@gmail.com",
      "Remarks": "some remark for user"
    }
  }
}
Expand All
object
SubStreamId
integer (int64)

The subchannel ID of the conversation

Type
integer (int64)

The type of object used (text, link, photo, etc.)- See Enum for code

StatusId
string

The conversation’s current state (Open, Resolved, etc.) – See Enum for code

StreamProviderType
integer (int64)

Type of the object original stream provider

StreamProviderId
string

A CommBox generated number for the original stream provider

UserStreamProviderId
string

unique identifier of user, usually an email or a phone number, as it appears at the original provider

UserStreamProviderType
integer (int64)

Type of identifier used in of the userStreamProviderId parameter

UserIdentity
integer (int64)

A CommBox generated number for the user.

ManagerId
integer (int64)

The manager (agent) who create the object (optional)

Content
string (JSON string)

String containing extended properties of the object

Message
string

(required) The text of the primary message. Required field

sendToClient
boolean

When true, will send SMS messages without saving them (relevant for SMS streams only)

User
object

The customer (end-user) of the object

object
data
string

send object as JSON

Responses
200

OK

Expand All
object
status
string
Example200
description
string
ExampleOK
response_time
string
Example2024-08-06T07:51:52.2581942Z
data
object
id
integer
Example294159
400

Bad Request - The request could not be understood by the server. Incoming parameters might not be valid

401

Unauthorized - The supplied credentials, if any, are not sufficient to access the resource

404

Not found - The requested resource is not found

429

Too Many Requests - Too many requests have been made in a short period of time (Throttling)

500

Server Error - The server could not return the representation due to an internal server error

501

Not Implemented - The requested operation is not supported


Was this article helpful?