conversationsReplies
Retrieve a thread of messages posted to a conversation
Details
- Method:
GET - Path:
/conversations.replies - Operation ID:
conversations_replies
Parameters
{
"token": {
"description": "Authentication token. Requires scope: `conversations:history`",
"required": false,
"location": "query",
"type": "string"
},
"channel": {
"description": "Conversation ID to fetch thread from.",
"required": false,
"location": "query",
"type": "string"
},
"ts": {
"description": "Unique identifier of a thread's parent message. `ts` must be the timestamp of an existing message with 0 or more replies. If there are no replies then just the single message referenced by `ts` will return - it is just an ordinary, unthreaded message.",
"required": false,
"location": "query",
"type": "string"
},
"latest": {
"description": "End of time range of messages to include in results.",
"required": false,
"location": "query",
"type": "string"
},
"oldest": {
"description": "Start of time range of messages to include in results.",
"required": false,
"location": "query",
"type": "string"
},
"inclusive": {
"description": "Include messages with latest or oldest timestamp in results only when either timestamp is specified.",
"required": false,
"location": "query",
"type": "string"
},
"limit": {
"description": "The maximum number of items to return. Fewer than the requested number of items may be returned, even if the end of the users list hasn't been reached.",
"required": false,
"location": "query",
"type": "string"
},
"cursor": {
"description": "Paginate through collections of data by setting the `cursor` parameter to a `next_cursor` attribute returned by a previous request's `response_metadata`. Default value fetches the first \"page\" of the collection. See [pagination](/docs/pagination) for more detail.",
"required": false,
"location": "query",
"type": "string"
}
}Response Schema
{
"additionalProperties": false,
"description": "Schema for successful response from conversations.replies method",
"properties": {
"has_more": {
"type": "boolean"
},
"messages": {
"items": {
"items": [
{
"additionalProperties": false,
"properties": {
"last_read": {
"pattern": "^\\d{10}\\.\\d{6}$",
"title": "Timestamp in format 0123456789.012345",
"type": "string"
},
"latest_reply": {
"pattern": "^\\d{10}\\.\\d{6}$",
"title": "Timestamp in format 0123456789.012345",
"type": "string"
},
"reply_count": {
"type": "integer"
},
"reply_users": {
"items": {
"pattern": "^[UW][A-Z0-9]{2,}$",
"title": "User ID",
"type": "string"
},
"type": "array",
"uniqueItems": true
},
"reply_users_count": {
"type": "integer"
},
"source_team": {
"pattern": "^[T][A-Z0-9]{2,}$",
"title": "Team ID",
"type": "string"
},
"subscribed": {
"type": "boolean"
},
"team": {
"pattern": "^[T][A-Z0-9]{2,}$",
"title": "Team ID",
"type": "string"
},
"text": {
"type": "string"
},
"thread_ts": {
"pattern": "^\\d{10}\\.\\d{6}$",
"title": "Timestamp in format 0123456789.012345",
"type": "string"
},
"ts": {
"pattern": "^\\d{10}\\.\\d{6}$",
"title": "Timestamp in format 0123456789.012345",
"type": "string"
},
"type": {
"type": "string"
},
"unread_count": {
"type": "integer"
},
"user": {
"pattern": "^[UW][A-Z0-9]{2,}$",
"title": "User ID",
"type": "string"
},
"user_profile": {
"additionalProperties": false,
"properties": {
"avatar_hash": {
"type": "string"
},
"display_name": {
"type": "string"
},
"display_name_normalized": {
"type": "string"
},
"first_name": {
"type": [
"string",
"null"
]
},
"image_72": {
"format": "uri",
"type": "string"
},
"is_restricted": {
"type": "boolean"
},
"is_ultra_restricted": {
"type": "boolean"
},
"name": {
"type": "string"
},
"real_name": {
"type": "string"
},
"real_name_normalized": {
"type": "string"
},
"team": {
"pattern": "^[TE][A-Z0-9]{8,}$",
"title": "Team or Enterprise ID",
"type": "string"
}
},
"required": [
"avatar_hash",
"image_72",
"first_name",
"real_name",
"display_name",
"team",
"name",
"is_restricted",
"is_ultra_restricted"
],
"type": "object"
},
"user_team": {
"pattern": "^[T][A-Z0-9]{2,}$",
"title": "Team ID",
"type": "string"
}
},
"required": [
"type",
"user",
"text",
"thread_ts",
"reply_count",
"subscribed",
"ts"
],
"type": "object"
},
{
"additionalProperties": false,
"properties": {
"is_starred": {
"type": "boolean"
},
"parent_user_id": {
"pattern": "^[UW][A-Z0-9]{2,}$",
"title": "User ID",
"type": "string"
},
"source_team": {
"pattern": "^[T][A-Z0-9]{2,}$",
"title": "Team ID",
"type": "string"
},
"team": {
"pattern": "^[T][A-Z0-9]{2,}$",
"title": "Team ID",
"type": "string"
},
"text": {
"type": "string"
},
"thread_ts": {
"pattern": "^\\d{10}\\.\\d{6}$",
"title": "Timestamp in format 0123456789.012345",
"type": "string"
},
"ts": {
"pattern": "^\\d{10}\\.\\d{6}$",
"title": "Timestamp in format 0123456789.012345",
"type": "string"
},
"type": {
"type": "string"
},
"user": {
"pattern": "^[UW][A-Z0-9]{2,}$",
"title": "User ID",
"type": "string"
},
"user_profile": {
"additionalProperties": false,
"properties": {
"avatar_hash": {
"type": "string"
},
"display_name": {
"type": "string"
},
"display_name_normalized": {
"type": "string"
},
"first_name": {
"type": [
"string",
"null"
]
},
"image_72": {
"format": "uri",
"type": "string"
},
"is_restricted": {
"type": "boolean"
},
"is_ultra_restricted": {
"type": "boolean"
},
"name": {
"type": "string"
},
"real_name": {
"type": "string"
},
"real_name_normalized": {
"type": "string"
},
"team": {
"pattern": "^[TE][A-Z0-9]{8,}$",
"title": "Team or Enterprise ID",
"type": "string"
}
},
"required": [
"avatar_hash",
"image_72",
"first_name",
"real_name",
"display_name",
"team",
"name",
"is_restricted",
"is_ultra_restricted"
],
"type": "object"
},
"user_team": {
"pattern": "^[T][A-Z0-9]{2,}$",
"title": "Team ID",
"type": "string"
}
},
"required": [
"type",
"user",
"text",
"thread_ts",
"parent_user_id",
"ts"
],
"type": "object"
}
]
},
"type": "array"
},
"ok": {
"enum": [
true
],
"title": "default success response",
"type": "boolean"
}
},
"required": [
"ok",
"messages"
],
"title": "conversations.replies success schema",
"type": "object"
}Usage
from ocp_agent import OCPAgent
agent = OCPAgent()
await agent.register_api('slack')
# Call this tool
result = await agent.call_tool('conversationsReplies', {
# Add required parameters here
})