> ## Documentation Index
> Fetch the complete documentation index at: https://help.commbox.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Stream Objects

> This API returns information about all Objects (conversations) in the requested Stream (channel).

### Required query params:
Use query params to limit the request. Without limiting the request, the call will fail. See below common options.

**a) Time range** - For all Objects within a range of time:
 - **unixStartTime** – Unix Time Stamp format for start time
 - **unixEndTime** – Unix Time Stamp format for end time
 - Max: 100 objects – for larger data additional calls are required

**b) Specific user** - For all Objects of a specific user:
 - **identityStreamProviderId** – found in the "identities" section of the Get Users API (streamProviderId field)
 - **identityStreamProviderType** – found in the "identities" section of the Get Users API (StreamProviderType field)

**c) Specific user (alternative method)** - For all Objects of a specific user:
 - **userIdentityId** – the Id of the identity as it appears in the Get Users API (not to be confused with the "userId" field)

**d) Last WhatsApp message (WA channel ID in Path)**:
 - **streamProviderId** – enter the international format of customer's phone number
 - **streamProviderType** – enter 5
 - **status** – enter 1,8 to filter the result by object status (1 - New and 8 - Pending, representing active, unassigned, or in-progress conversations)
 - To ensure only the most recent relevant record is returned set **pageNumber** to 0, **pageSize** to 1, and **sort** to `desc`

Use the optional parameters to limit and organize the output.

**Note:** Object's children and activity logs are False by default.

## OpenAPI

````json GET /streams/{STREAM_ID}/objects
{
  "openapi": "3.0.3",
  "info": {
    "title": "CommBox API",
    "x-logo": {
      "url": "https://www.commbox.io/logo/commbox_logo_large.png"
    },
    "version": "2.07",
    "termsOfService": "https://www.commbox.io/end-user-license-agreement-eula/",
    "contact": {
      "name": "commbox",
      "url": "https://www.commbox.io",
      "email": "contactus@commbox.io"
    }
  },
  "servers": [
    {
      "url": "https://api.commbox.io/",
      "description": "Production server"
    }
  ],
  "paths": {
    "/streams/{STREAM_ID}/objects": {
      "get": {
        "tags": [
          "Streams"
        ],
        "summary": "Get Stream Objects",
        "description": "This API returns information about all Objects (conversations) in the requested Stream (channel).\n\n### Required query params:\nUse query params to limit the request. Without limiting the request, the call will fail. See below common options.\n\n**a) Time range** - For all Objects within a range of time:\n - **unixStartTime** – Unix Time Stamp format for start time\n - **unixEndTime** – Unix Time Stamp format for end time\n - Max: 100 objects – for larger data additional calls are required\n\n**b) Specific user** - For all Objects of a specific user:\n - **identityStreamProviderId** – found in the \"identities\" section of the Get Users API (streamProviderId field)\n - **identityStreamProviderType** – found in the \"identities\" section of the Get Users API (StreamProviderType field)\n\n**c) Specific user (alternative method)** - For all Objects of a specific user:\n - **userIdentityId** – the Id of the identity as it appears in the Get Users API (not to be confused with the \"userId\" field)\n\n**d) Last WhatsApp message (WA channel ID in Path)**:\n - **streamProviderId** – enter the international format of customer's phone number\n - **streamProviderType** – enter 5\n - **status** – enter 1,8 to filter the result by object status (1 - New and 8 - Pending, representing active, unassigned, or in-progress conversations)\n - To ensure only the most recent relevant record is returned set **pageNumber** to 0, **pageSize** to 1, and **sort** to `desc`\n\nUse the optional parameters to limit and organize the output.\n\n**Note:** Object's children and activity logs are False by default.",
        "operationId": "Get_Stream_Objects",
        "parameters": [
          {
            "name": "STREAM_ID",
            "in": "path",
            "description": "A CommBox generated number for the channel",
            "required": true,
            "schema": {
              "type": "integer"
            }
          },
          {
            "$ref": "#/components/parameters/userIdentityId"
          },
          {
            "$ref": "#/components/parameters/identityStreamProviderId"
          },
          {
            "$ref": "#/components/parameters/identityStreamProviderType"
          },
          {
            "$ref": "#/components/parameters/unixStartTime"
          },
          {
            "$ref": "#/components/parameters/unixEndTime"
          },
          {
            "$ref": "#/components/parameters/subStream"
          },
          {
            "$ref": "#/components/parameters/sort"
          },
          {
            "$ref": "#/components/parameters/order"
          },
          {
            "$ref": "#/components/parameters/includeChilds"
          },
          {
            "$ref": "#/components/parameters/includeActivityLog"
          },
          {
            "$ref": "#/components/parameters/timeFilter"
          },
          {
            "$ref": "#/components/parameters/pageNumber"
          },
          {
            "$ref": "#/components/parameters/pageSize"
          },
          {
            "$ref": "#/components/parameters/status"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 200
                    },
                    "description": {
                      "type": "string",
                      "example": "Operation successful"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time",
                      "example": "2024-08-26T07:51:52.2581942Z"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "oneOf": [
                          {
                            "type": "object",
                            "properties": {
                              "objectId": {
                                "type": "integer",
                                "example": 62824402
                              },
                              "streamId": {
                                "type": "integer",
                                "example": 345
                              },
                              "substreamId": {
                                "type": "integer",
                                "example": 0
                              },
                              "streamProviderId": {
                                "type": "string",
                                "example": "6523da845b1a435cbfb039a3bff043d350cent@bumpyard.com"
                              },
                              "streamProviderType": {
                                "type": "integer",
                                "example": 4
                              },
                              "user_identity": {
                                "type": "integer",
                                "example": 37389853
                              },
                              "firstName": {
                                "type": "string",
                                "nullable": true,
                                "example": "null"
                              },
                              "lastName": {
                                "type": "string",
                                "nullable": true,
                                "example": "null"
                              },
                              "userStreamProviderId": {
                                "type": "string",
                                "example": "johndoe@gmail.com"
                              },
                              "userStreamProviderType": {
                                "type": "string",
                                "example": "4"
                              },
                              "content": {
                                "type": "string",
                                "description": "JSON string containing metadata",
                                "example": "{\"{\\\"cc\\\": [{\\\"name\\\": \\\"\\\", \\\"address\\\": \\\"\\\"}], \\\"to\\\": [{\\\"name\\\": \\\"BumpYard\\\", \\\"address\\\": \\\"contact@bumpyardpro.com\\\"}, {\\\"name\\\": \\\"johndoe@gmail.com\\\", \\\"address\\\": \\\"johndoe@gmail.com\\\"}], \\\"bcc\\\": [{\\\"name\\\": \\\"\\\", \\\"address\\\": \\\"\\\"}], \\\"SAP_C4C\\\": {\\\"accept_conversation\\\": true}, \\\"subject\\\": \\\"Re: checking up on you\\\", \\\"is_email\\\": false, \\\"is_public\\\": true, \\\"languages\\\": [{\\\"Item1\\\": \\\"en\\\", \\\"headers_references\\\": \\\"010201921a02fe6c-4c1286f2-dce4-41f3-9921-38d29d1311e4-000000@eu-west-1.amazonses.com\\\", \\\"originalSubStreamId\\\": 0, \\\"sequence_start_time\\\": \\\"2024-09-17 07:43:59\\\", \\\"has_only_manager_childs\\\": false, \\\"first_client_response_time\\\": \\\"2024-09-17T07:43:59.2320185Z\\\", \\\"first_message_sending_failure\\\": true, \\\"headers_references_addition_count\\\": 2}\"}  "
                              },
                              "message": {
                                "type": "string",
                                "example": ">Hi!&nbsp;<br><br>How are you today?"
                              },
                              "createdTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-09-17T07:51:52.2581942Z"
                              },
                              "updatedTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-09-17T07:51:52.2581942Z"
                              },
                              "closedTime": {
                                "type": "string",
                                "format": "date-time",
                                "nullable": true,
                                "example": "null"
                              },
                              "firstResponseTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-09-17T07:51:52.2581942Z"
                              },
                              "lastResponseTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-09-17T07:51:52.2581942Z"
                              },
                              "priorityTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-08-06T07:51:52.2581942Z"
                              },
                              "status": {
                                "type": "string",
                                "example": "1,8"
                              },
                              "assignedManagerId": {
                                "type": "integer",
                                "example": 0
                              },
                              "lastAssignedManagerId": {
                                "type": "integer",
                                "example": 27184982
                              },
                              "type": {
                                "type": "integer",
                                "example": 5
                              },
                              "numTags": {
                                "type": "integer",
                                "example": 1
                              },
                              "user": {
                                "$ref": "#/components/schemas/User"
                              },
                              "isManager": {
                                "type": "boolean",
                                "description": "true = agent , false = customer",
                                "example": false
                              },
                              "childs": {
                                "type": "array",
                                "items": {
                                  "type": "object",
                                  "properties": {
                                    "id": {
                                      "type": "integer",
                                      "example": 460525246
                                    },
                                    "objectId": {
                                      "type": "integer",
                                      "example": 62824402
                                    },
                                    "content": {
                                      "type": "string",
                                      "example": "{\"subject\":\"RE: checking up on you\",\"attachments\":null,\"to\":[{\"name\":\"samadams@gmail.com\",\"address\":\"samadams@gmail.com\"}]}"
                                    },
                                    "message": {
                                      "type": "string",
                                      "example": "<div style=\"direction: ltr\">Hi!&nbsp;<br>Trying to check up on you<br><br><br></div><div><div dir=\"ltr\"><strong>From: </strong>Contact [contact@bumpyardpro.com]</div><div dir=\"ltr\"><strong>Sent: </strong>9/17/2024, 10:33:28 AM</div><div dir=\"ltr\"><strong>To:</strong> samadams@gmail.com</div><div dir=\"ltr\"><strong>Subject: </strong>checking up on you</div><span><span><br></span></span><div dir=\"ltr\">Hi!&nbsp;<br><br>How are you today?</div></div>"
                                    },
                                    "createdTime": {
                                      "type": "string",
                                      "format": "date-time",
                                      "example": "2024-08-17T07:51:52.2581942Z"
                                    },
                                    "streamProviderId": {
                                      "type": "string",
                                      "example": "17325641121"
                                    },
                                    "streamProviderType": {
                                      "type": "integer",
                                      "example": 5
                                    },
                                    "streamProviderEmail": {
                                      "type": "string",
                                      "example": "eddiesmith@gmail.com"
                                    },
                                    "firstName": {
                                      "type": "string",
                                      "example": "Eddie"
                                    },
                                    "lastName": {
                                      "type": "string",
                                      "example": "Smith"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          {
                            "type": "object",
                            "properties": {
                              "id": {
                                "type": "integer",
                                "example": 234
                              },
                              "streamid": {
                                "type": "integer",
                                "example": 1
                              },
                              "substreamid": {
                                "type": "integer",
                                "example": 1
                              },
                              "type": {
                                "type": "integer",
                                "example": 0
                              },
                              "status": {
                                "type": "integer",
                                "example": 1
                              },
                              "createdTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-08-06T07:51:52.2581942Z"
                              },
                              "updatedTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-08-06T07:51:52.2581942Z"
                              },
                              "lastResponseTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-08-06T07:51:52.2581942Z"
                              },
                              "priorityTime": {
                                "type": "string",
                                "format": "date-time",
                                "example": "2024-08-06T07:51:52.2581942Z"
                              },
                              "streamProviderId": {
                                "type": "string",
                                "example": "eddiesmith@gmail.com"
                              },
                              "streamProviderType": {
                                "type": "integer",
                                "example": 4
                              },
                              "message": {
                                "type": "string",
                                "example": "New status from facebook, Hello world!"
                              },
                              "content": {
                                "type": "string",
                                "example": "{\"num_likes\":5,\"user_likes\":false,\"num_shares\":2}"
                              },
                              "numChilds": {
                                "type": "integer",
                                "example": 2
                              },
                              "numTags": {
                                "type": "integer",
                                "example": 0
                              },
                              "user": {
                                "type": "object",
                                "properties": {
                                  "id": {
                                    "type": "integer",
                                    "example": 123
                                  },
                                  "identity": {
                                    "type": "object",
                                    "properties": {
                                      "id": {
                                        "type": "integer",
                                        "example": 7861234
                                      },
                                      "streamProviderId": {
                                        "type": "string",
                                        "example": "eddiesmith@gmail.com"
                                      },
                                      "streamProviderType": {
                                        "type": "integer",
                                        "example": 4
                                      },
                                      "streamProviderEmail": {
                                        "type": "string",
                                        "example": "eddie@gmail.com"
                                      },
                                      "firstName": {
                                        "type": "string",
                                        "example": "Eddie"
                                      },
                                      "lastName": {
                                        "type": "string",
                                        "example": "Smith"
                                      }
                                    }
                                  }
                                }
                              }
                            }
                          }
                        ]
                      }
                    }
                  }
                },
                "examples": {
                  "successResponse": {
                    "summary": "Successful response with stream objects",
                    "value": {
                      "status": 200,
                      "description": "Operation successful",
                      "response_time": "2024-08-26T07:51:52.2581942Z",
                      "data": [
                        {
                          "objectId": 62824402,
                          "streamId": 345,
                          "substreamId": 0,
                          "streamProviderId": "6523da845b1a435cbfb039a3bff043d350cent@bumpyard.com",
                          "streamProviderType": 4,
                          "user_identity": 37389853,
                          "firstName": null,
                          "lastName": null,
                          "userStreamProviderId": "johndoe@gmail.com",
                          "userStreamProviderType": "4",
                          "content": "{\"cc\": [{\"name\": \"\", \"address\": \"\"}], \"to\": [{\"name\": \"BumpYard\", \"address\": \"contact@bumpyardpro.com\"}, {\"name\": \"johndoe@gmail.com\", \"address\": \"johndoe@gmail.com\"}], \"bcc\": [{\"name\": \"\", \"address\": \"\"}], \"SAP_C4C\": {\"accept_conversation\": true}, \"subject\": \"Re: checking up on you\", \"is_email\": false, \"is_public\": true}",
                          "message": ">Hi!&nbsp;<br><br>How are you today?",
                          "createdTime": "2024-09-17T07:51:52.2581942Z",
                          "updatedTime": "2024-09-17T07:51:52.2581942Z",
                          "closedTime": null,
                          "firstResponseTime": "2024-09-17T07:51:52.2581942Z",
                          "lastResponseTime": "2024-09-17T07:51:52.2581942Z",
                          "priorityTime": "2024-08-06T07:51:52.2581942Z",
                          "status": "1,8",
                          "assignedManagerId": 0,
                          "lastAssignedManagerId": 27184982,
                          "type": 5,
                          "numTags": 1,
                          "isManager": false,
                          "childs": [
                            {
                              "id": 460525246,
                              "objectId": 62824402,
                              "content": "{\"subject\":\"RE: checking up on you\",\"attachments\":null,\"to\":[{\"name\":\"samadams@gmail.com\",\"address\":\"samadams@gmail.com\"}]}",
                              "message": "<div style=\"direction: ltr\">Hi!&nbsp;<br>Trying to check up on you<br><br><br></div><div><div dir=\"ltr\"><strong>From: </strong>Contact [contact@bumpyardpro.com]</div><div dir=\"ltr\"><strong>Sent: </strong>9/17/2024, 10:33:28 AM</div><div dir=\"ltr\"><strong>To:</strong> samadams@gmail.com</div><div dir=\"ltr\"><strong>Subject: </strong>checking up on you</div><span><span><br></span></span><div dir=\"ltr\">Hi!&nbsp;<br><br>How are you today?</div></div>",
                              "createdTime": "2024-08-17T07:51:52.2581942Z",
                              "streamProviderId": "17325641121",
                              "streamProviderType": 5,
                              "streamProviderEmail": "eddiesmith@gmail.com",
                              "firstName": "Eddie",
                              "lastName": "Smith"
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Bad Request - The request could not be understood by the server. Incoming parameters might not be valid",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 400
                    },
                    "description": {
                      "type": "string",
                      "example": "Bad Request"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized - The supplied credentials, if any, are not sufficient to access the resource",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 401
                    },
                    "description": {
                      "type": "string",
                      "example": "Unauthorized access"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "Not Found - The requested resource is not found",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 404
                    },
                    "description": {
                      "type": "string",
                      "example": "Not found"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "429": {
            "description": "Too Many Requests - Too many requests have been made in a short period of time (Throttling)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 429
                    },
                    "description": {
                      "type": "string",
                      "example": "Too Many Requests"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error - The server could not return the representation due to an internal server error",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "integer",
                      "example": 500
                    },
                    "description": {
                      "type": "string",
                      "example": "Operation failed"
                    },
                    "response_time": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "example": {
                  "status": 500,
                  "description": "Operation failed",
                  "response_time": "2025-04-15T07:24:52.956691Z"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "parameters": {
      "userIdentityId": {
        "name": "userIdentityId",
        "in": "query",
        "description": "A CommBox generated number for the user. Returns objects created by this user",
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "identityStreamProviderId": {
        "name": "identityStreamProviderId",
        "in": "query",
        "description": "To returns objects created by a user, enter the StreamProviderId found at the identity section. Must supply identityStreamProviderType as well.",
        "schema": {
          "type": "string"
        }
      },
      "identityStreamProviderType": {
        "name": "identityStreamProviderType",
        "in": "query",
        "description": "See Enum. To returns objects created by a user, enter the StreamProviderType found at the identity section. Must supply  identityStreamProviderId as well.",
        "schema": {
          "type": "string",
          "format": "short"
        }
      },
      "unixStartTime": {
        "name": "unixStartTime",
        "in": "query",
        "description": "Unix time stamp (UTC) of starting date and time of query. <br> Must be sent with unixEndTime",
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "unixEndTime": {
        "name": "unixEndTime",
        "in": "query",
        "description": "Unix time stamp (UTC) of ending date and time of query. <br>Must be sent with unixStartTime",
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "subStream": {
        "name": "subStream",
        "in": "query",
        "description": "The subchannel Id (Optional, default 0)",
        "schema": {
          "type": "integer",
          "format": "int64"
        }
      },
      "sort": {
        "name": "sort",
        "in": "query",
        "description": "Sort of return objects (optional, default desc). Possible values: desc, asc",
        "schema": {
          "type": "string"
        }
      },
      "order": {
        "name": "order",
        "in": "query",
        "description": "Order of return objects (optional, default createdtime). Possible values: createdtime, closedtime, prioritytime, updatedtime",
        "schema": {
          "type": "string"
        }
      },
      "includeChilds": {
        "name": "includeChilds",
        "in": "query",
        "description": "Return objects with their childs (optional, default false)",
        "schema": {
          "type": "boolean"
        }
      },
      "includeActivityLog": {
        "name": "includeActivityLog",
        "in": "query",
        "description": "Return objects with their activity log (optional, default false)",
        "schema": {
          "type": "boolean"
        }
      },
      "timeFilter": {
        "name": "timeFilter",
        "in": "query",
        "description": "Determines which object datetime field affects unixStartTime & unixEndTime (optional, relevant only for ElasticSearch)",
        "schema": {
          "type": "string"
        }
      },
      "pageNumber": {
        "name": "pageNumber",
        "in": "query",
        "description": "Used for paging results (optional)",
        "schema": {
          "type": "integer"
        }
      },
      "pageSize": {
        "name": "pageSize",
        "in": "query",
        "description": "Used for paging results (optional, default 100)",
        "schema": {
          "type": "integer"
        }
      },
      "status": {
        "name": "status",
        "in": "query",
        "description": "ObjectStatusType - see Enums for code.<br> Returned objects must have selected statuses in a comma separated list<br> (Optional, default all)",
        "schema": {
          "type": "string"
        }
      }
    },
    "schemas": {
      "User": {
        "type": "object",
        "properties": {
          "Id": {
            "type": "integer",
            "format": "int64",
            "description": "User ID. This is a commbox generated number for the customer"
          },
          "UniqueId": {
            "type": "string",
            "format": "50",
            "description": "User’s unique identifier. This can be an email, social security number or any other type of unique string determined by the brand administrators"
          },
          "Phone1": {
            "type": "string",
            "format": "numeric string (20)",
            "description": "User’s phone number (should include country and area code without leading + or 00)"
          },
          "Phone2": {
            "type": "string",
            "format": "numeric string (20)",
            "description": "User’s additional phone number (should include country and area code without leading + or 00)"
          },
          "Email": {
            "type": "string",
            "format": "255",
            "description": "User's Email."
          },
          "FirstName": {
            "type": "string",
            "format": "100",
            "description": "User’s first name"
          },
          "LastName": {
            "type": "string",
            "format": "100",
            "description": "User’s last name"
          },
          "Gender": {
            "type": "string",
            "format": "1",
            "description": "User’s gender (‘M’ for male, ‘F’ for female)"
          },
          "Locale": {
            "type": "object",
            "description": "User’s locale"
          },
          "Birthday": {
            "type": "string",
            "format": "date",
            "description": "User’s birthday"
          },
          "NumIdentities": {
            "type": "integer",
            "description": "Number of active identities that are connected to this user"
          },
          "IsManager": {
            "type": "boolean",
            "description": "Indicates whether this user is a agent or an admin (true) or a customer (false)"
          },
          "Remarks": {
            "type": "string",
            "description": "Free text containing general remarks about the user"
          },
          "Identity": {
            "type": "object",
            "description": "Identity object that is connected to the user"
          }
        }
      }
    }
  }
}
````

