Update Object's Stream

Prev Next
Patch
/objects/{OBJECT_ID}/stream

This API enables developers to change streams (channels) of an object (conversation).

Available routes:


Same-Channel Routing (Conversations remain within the same channel type):

  • SMS (Texting) → SMS
  • Email → Email
  • Chat → Chat

    Cross-Channel Routing (Conversations transfer to different channel types):

  • SMS (Texting) → Email / Chat
  • Email → SMS / Chat
  • Chat → SMS / Email
  • Any channel → Theme


    - For the General subchannel ID, enter “0” in the substreamId field.
  • 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
    OBJECT_ID
    Required

    Conversation Id number

    Body parameters

    Enter the streamId of the target channel (where the conversation is routed to)

    Update stream
    {
      "data": {
        "streamId": "12345"
      }
    }
    Update stream and sub-stream
    {
      "data": {
        "streamId": "12345",
        "subStreamId": "67890"
      }
    }
    Reset substream
    {
      "data": {
        "streamId": "12345",
        "subStreamId": "0"
      }
    }
    Expand All
    object
    data
    object
    streamId
    string

    Enter the streamId of the target channel

    Example3172
    subStreamId
    string

    Enter the substreamId (subchannel) of the target channel (optional).
    For routing conversation to the main channel set the subStreamId to “0”

    Example812
    Responses
    200

    Operation successful or no change needed

    success
    {
      "status": 200,
      "description": "Operation successful",
      "response_time": "2025-04-15T07:23:18.479Z",
      "data": {
        "streamId": 15524,
        "subStreamId": 2341,
        "updatedTime": "2025-04-15T07:23:18:479"
      }
    }
    no-change
    {
      "status": 200,
      "description": "Stream and sub-stream values unchanged",
      "response_time": "2025-04-15T07:17:54.661Z",
      "data": ""
    }
    Expand All
    OneOf
    object
    object
    status
    integer
    Example200
    description
    string
    ExampleStream and sub-stream values unchanged
    response_time
    string (date-time)
    Example2025-04-15T07:17:54.661Z
    data
    string
    Example
    object
    object
    status
    integer
    Example200
    description
    string
    ExampleOperation successful
    response_time
    string (date-time)
    Example2025-04-15T07:23:18.479Z
    data
    object
    streamId
    integer (int64)

    The updated stream ID

    subStreamId
    integer (int64)

    The updated sub-stream ID

    updatedTime
    string (date-time)

    Timestamp of the update operation

    Example2025-04-15T07:23:18:479
    400

    Bad Request - The server could not process the request due to missing or invalid information.

    Invalid parameters
    {
      "status": 400,
      "description": "Invalid parameters",
      "response_time": "2025-04-15T07:04:20.657Z",
      "data": ""
    }
    Missing streamId
    {
      "status": 400,
      "description": "Invalid parameters - missing mandatory field - streamId",
      "response_time": "2025-04-15T07:04:20.657Z",
      "data": ""
    }
    Object not found
    {
      "status": 400,
      "description": "Object not found",
      "response_time": "2025-04-15T07:00:52.168Z",
      "data": ""
    }
    invalid stream
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z",
      "data": {
        "errors": [
          {
            "code": "INVALID_STREAM",
            "message": "The specified stream ID does not exist"
          }
        ]
      }
    }
    Invalid stream transfer
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z",
      "data": {
        "errors": [
          {
            "code": "INVALID_STREAM_TRANSFER",
            "message": "Transfers to 'WHATSAPP' are blocked"
          }
        ]
      }
    }
    Invalid stream type transfer
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z",
      "data": {
        "errors": [
          {
            "code": "INVALID_STREAM_TYPE_TRANSFER",
            "message": {
              "content": "Objects can only be transferred between allowed channel types. Allowed transfer",
              "allowed_transfers": {
                "SMS": [
                  "MAILBOX_CONNECTOR",
                  "CHAT"
                ],
                "MAILBOX_CONNECTOR": [
                  "SMS",
                  "CHAT"
                ],
                "CHAT": [
                  "SMS",
                  "MAILBOX_CONNECTOR"
                ]
              }
            }
          }
        ]
      }
    }
    Invalid theme transfer
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z",
      "data": {
        "errors": [
          {
            "code": "INVALID_THEME_TRANSFER",
            "message": "This theme channel can only be transferred to its original channel type"
          }
        ]
      }
    }
    Missing Email
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z",
      "data": {
        "errors": [
          {
            "code": "MISSING_EMAIL_ADDRESS",
            "message": "Email address is required for EMAIL channel"
          }
        ]
      }
    }
    Missing phone
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z",
      "data": {
        "errors": [
          {
            "code": "MISSING_PHONE_NUMBER",
            "message": "Phone number is required for SMS channel"
          }
        ]
      }
    }
    Invalid sub-stream
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:29:29.722Z",
      "data": {
        "errors": [
          {
            "code": "INVALID_SUBSTREAM",
            "message": "The specified subStreamId does not belong to the provided streamId"
          }
        ]
      }
    }
    Inactive sub-stream
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z",
      "data": {
        "errors": [
          {
            "code": "INACTIVE_SUBSTREAM",
            "message": "The specified subStreamId is inactive and cannot be assigned"
          }
        ]
      }
    }
    Update object's stream failed
    {
      "status": 400,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z",
      "data": ""
    }
    Expand All
    OneOf
    object
    object
    status
    integer
    Example400
    description
    string
    response_time
    string (date-time)
    data
    string | null
    object
    object
    status
    integer
    Example400
    description
    string
    response_time
    string (date-time)
    data
    object
    errors
    Array of object
    object
    code
    string
    message
    OneOf
    string
    string
    object
    object
    401

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

    object
    status
    integer
    Example401
    description
    string
    ExampleUnauthorized access
    response_time
    string (date-time)
    404

    Not Found - The requested resource is not found

    object
    status
    integer
    Example404
    description
    string
    ExampleNot found
    response_time
    string (date-time)
    429

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

    object
    status
    integer
    Example429
    description
    string
    ExampleToo Many Requests
    response_time
    string (date-time)
    500

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

    {
      "status": 500,
      "description": "Operation failed",
      "response_time": "2025-04-15T07:24:52.956Z"
    }
    object
    status
    integer
    Example500
    description
    string
    ExampleOperation failed
    response_time
    string (date-time)