{"method":"GET","path":"https://api.revcent.com/v2/ai_threads/{ai_thread_id}","summary":"Get An AI Thread","description":"Retrieve the details of a specific AI Thread. View markdown documentation at https://revcent.com/documentation/markdown/mcp/operation/OverviewAIThread.md for an in-depth overview of this operation.","operationId":"GetAIThread","parameters":[{"in":"path","name":"ai_thread_id","description":"The AI Thread ID.","required":true,"schema":{"type":"string","title":"AI Thread ID","description":"A 20 character AI Thread ID.","minLength":20,"maxLength":20}}],"requestBody":{"content":{"application/x-www-form-urlencoded":{"encoding":{},"schema":{"additionalProperties":false,"properties":{},"type":"object"}}},"required":false},"responses":{"200":{"content":{"application/json":{"schema":{"allOf":[{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"The API call response code, 1 = Success","type":"integer","enum":[1]}},"title":"APICallResponseInfo","type":"object","additionalProperties":false},{"type":"object","additionalProperties":false,"properties":{"created_date_unix":{"description":"The unix timestamp of when the item was created.","type":"integer","format":"unix-time"},"id":{"type":"string","title":"AI Thread ID","description":"A 20 character AI Thread ID.","minLength":20,"maxLength":20},"status":{"type":"string","description":"The current AI Thread status.","enum":["Running","Complete","Timer","Cancelled","Error"]},"messages":{"items":{"additionalProperties":false,"properties":{"role":{"type":"string","description":"The role associated with the message.","enum":["user","assistant","system"]},"content":{"type":"string","description":"The content of the message."},"tool_call_id":{"type":"string","description":"If the message is associated with a tool call submission, the tool call ID being submitted."},"tool_calls":{"items":{"additionalProperties":false,"properties":{"id":{"type":"string","description":"The tool call ID."},"type":{"type":"string","description":"The tool call type.","enum":["function"]},"function_name":{"type":"string","description":"If the tool call type is function, the function name the AI is calling."},"function_args":{"type":"string","description":"If the tool call type is function, the function arguments the AI is sending"}},"type":"object"},"type":"array","description":"If the message is associated with tool call requests, an array of tool calls requested by the AI."},"previous_ai_thread":{"additionalProperties":false,"properties":{"id":{"type":"string","title":"AI Thread ID","description":"A 20 character AI Thread ID.","minLength":20,"maxLength":20},"created_date_unix":{"description":"The unix timestamp when the original message was created from the previous AI Thread.","type":"integer","format":"unix-time"}},"type":"object","description":"If the message is from a previous AI Thread, the thread ID and original date of the message. I.e. a handoff from a different AI Assistant with messages included."},"created_date_unix":{"description":"The unix timestamp when the message was created.","type":"integer","format":"unix-time"},"third_party_name":{"type":"string","description":"The name of the AI third party that processed the AI message."},"third_party_model":{"type":"string","description":"The AI third party model that processed the AI message."}},"type":"object"},"type":"array","description":"Message associated with the AI Thread. Only provided when retrieving a specific AI Thread using an AI Thread ID."},"message_count":{"description":"The total number of messages within the AI Thread.","type":"integer"},"total_tokens":{"description":"The total number of tokens the AI Thread consumed","type":"integer"},"total_time_ms":{"description":"The total amount of time in milliseconds that it took RevCent to process the AI thread.","type":"integer"},"previous_ai_thread":{"additionalProperties":false,"properties":{"id":{"type":"string","title":"AI Thread ID","description":"A 20 character AI Thread ID.","minLength":20,"maxLength":20},"ai_assistant":{"additionalProperties":false,"properties":{"id":{"type":"string","title":"AI Assistant ID","description":"A 20 character AI Assistant ID.","minLength":20,"maxLength":20},"name":{"type":"string","description":"The previous AI Threads' associated AI Assistant name."}},"type":"object","description":"The AI Assistant associated with the previous AI Thread."}},"type":"object","description":"The previous AI Thread, if the current AI Thread was the result of an AI Assistant being triggered with a previous AI Thread ID provided. I.e. a handoff using a different AI Assistant."},"trigger":{"additionalProperties":false,"properties":{"source":{"type":"string","description":"The source that triggered the AI threads' creation.","enum":["api","web_app","account_event"]},"notation":{"type":"string","description":"If the source is 'account_event', the account event notation indicating the event that triggered the thread."},"api_call":{"additionalProperties":false,"properties":{"id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_account":{"type":"object","additionalProperties":false,"description":"The API account associated with the API call.","properties":{"id":{"type":"string","description":"A 20 character API account ID.","minLength":20,"maxLength":20},"name":{"description":"The API account name.","type":"string"}}},"ai_assistant":{"type":"object","additionalProperties":false,"description":"If an AI Assistant made the API call that triggered the AI thread.","properties":{"id":{"type":"string","title":"AI Assistant ID","description":"A 20 character AI Assistant ID.","minLength":20,"maxLength":20},"name":{"type":"string","description":"The AI Assistant name."}}}},"type":"object","description":"If the source is 'api', the API call that triggered the thread."},"web_user":{"description":"If the source is 'web_app', the web user that triggered the thread","type":"object","additionalProperties":false,"properties":{"id":{"description":"The web user ID.","type":"string"},"username":{"description":"The web username.","type":"string"},"first_name":{"description":"The web first name.","type":"string"},"last_name":{"description":"The web last name","type":"string"}}}},"type":"object","description":"Information on what triggered the AI Thread and thus it's creation."},"ai_assistant":{"additionalProperties":false,"properties":{"id":{"type":"string","title":"AI Assistant ID","description":"A 20 character AI Assistant ID.","minLength":20,"maxLength":20},"name":{"type":"string","description":"The AI Threads' associated AI Assistant name."}},"type":"object","description":"The AI Assistant associated with the AI Thread."},"third_party_integration":{"title":"Third Party Integration","type":"object","additionalProperties":false,"description":"The third party AI integration related to the item.","properties":{"id":{"type":"string","description":"A 20 character user third party integration ID.","minLength":20,"maxLength":20},"name":{"title":"User Integration Name","type":"string","description":"The user named third party integration."},"third_party":{"type":"object","description":"Site third party integration, related to the user third party integration.","additionalProperties":false,"properties":{"id":{"type":"string","description":"A 20 character system third party integration ID.","minLength":20,"maxLength":20},"name":{"title":"Site Third Party Integration Name","type":"string","description":"The RevCent named site third party integration."}}}}},"time_delay_expires":{"description":"The time the AI Thread will be run if the AI Thread status value is 'Timer'. An AI Thread can be delayed for a specified period of time, thus status 'Timer' indicates the AI Thread is hibernating.","type":"integer","format":"unix-time"},"updated_date_unix":{"description":"The unix timestamp of when the item was last updated.","type":"integer","format":"unix-time"}}}]}}},"description":"Successful response."},"default":{"content":{"application/json":{"schema":{"description":"","properties":{"api_call_id":{"type":"string","description":"A 20 character API call ID.","minLength":20,"maxLength":20},"api_call_unix":{"description":"Unix timestamp of when the API call was initiated.","type":"integer","format":"unix-time"},"code":{"description":"This value indicates that there is an error. Will always be 0.","type":"integer","enum":[0]},"error_code":{"description":"The specific error code.","type":"string"},"message":{"description":"A human readable description of the error.","type":"string"},"result":{"description":"A description of the API call result.","type":"string"}},"title":"APIStandardErrors","type":"object","additionalProperties":false}}},"description":"Error response."}}}