{
  "opencollection": "1.0.0",
  "info": {
    "name": "Telnyx Access Tokens Conversations API",
    "version": "2.0.0"
  },
  "request": {
    "auth": {
      "type": "bearer",
      "token": "{{bearerToken}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Conversations",
        "type": "folder"
      },
      "items": [
        {
          "info": {
            "name": "List conversations",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.telnyx.com/v2/ai/conversations",
            "params": [
              {
                "name": "id",
                "value": "",
                "type": "query",
                "description": "Filter by conversation ID (e.g. id=eq.123)"
              },
              {
                "name": "name",
                "value": "",
                "type": "query",
                "description": "Filter by conversation Name (e.g. `name=like.Voice%`)"
              },
              {
                "name": "created_at",
                "value": "",
                "type": "query",
                "description": "Filter by creation datetime (e.g., `created_at=gte.2025-01-01`)"
              },
              {
                "name": "last_message_at",
                "value": "",
                "type": "query",
                "description": "Filter by last message datetime (e.g., `last_message_at=lte.2025-06-01`)"
              },
              {
                "name": "metadata->assistant_id",
                "value": "",
                "type": "query",
                "description": "Filter by assistant ID (e.g., `metadata->assistant_id=eq.assistant-123`)"
              },
              {
                "name": "metadata->call_control_id",
                "value": "",
                "type": "query",
                "description": "Filter by call control ID (e.g., `metadata->call_control_id=eq.v3:123`)"
              },
              {
                "name": "metadata->telnyx_agent_target",
                "value": "",
                "type": "query",
                "description": "Filter by the phone number, SIP URI, or other identifier for the agent (e.g., `metadata->telnyx_agent_target=eq.+13128675309`)"
              },
              {
                "name": "metadata->telnyx_end_user_target",
                "value": "",
                "type": "query",
                "description": "Filter by the phone number, SIP URI, or other identifier for the end user (e.g., `metadata->telnyx_end_user_target=eq.+13128675309`)"
              },
              {
                "name": "metadata->telnyx_conversation_channel",
                "value": "",
                "type": "query",
                "description": "Filter by conversation channel (e.g., `metadata->telnyx_conversation_channel=eq.phone_call`)"
              },
              {
                "name": "limit",
                "value": "",
                "type": "query",
                "description": "Limit the number of returned conversations (e.g., `limit=10`)"
              },
              {
                "name": "order",
                "value": "",
                "type": "query",
                "description": "Order the results by specific fields (e.g., `order=created_at.desc` or `order=last_message_at.asc`)"
              },
              {
                "name": "or",
                "value": "",
                "type": "query",
                "description": "Apply OR conditions using PostgREST syntax (e.g., `or=(created_at.gte.2025-04-01,last_message_at.gte.2025-04-01)`)"
              }
            ]
          },
          "docs": "Retrieve a list of all AI conversations configured by the user. Supports [PostgREST-style query parameters](https://postgrest.org/en/stable/api.html#horizontal-filtering-rows) for filtering. Examples are included for the standard metadata fields, but you can filter on any field in the metadata JSON object. For example, to filter by a custom field `metadata->custom_field`, use `metadata->custom_field=eq.value`."
        },
        {
          "info": {
            "name": "Create a conversation",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.telnyx.com/v2/ai/conversations",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a new AI Conversation."
        },
        {
          "info": {
            "name": "Get Insight Template Groups",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.telnyx.com/v2/ai/conversations/insight-groups",
            "params": [
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Consolidated page parameter (deepObject style). Originally: page[number], page[size]"
              }
            ]
          },
          "docs": "Get all insight groups"
        },
        {
          "info": {
            "name": "Create Insight Template Group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.telnyx.com/v2/ai/conversations/insight-groups",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a new insight group"
        },
        {
          "info": {
            "name": "Get Insight Template Group",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.telnyx.com/v2/ai/conversations/insight-groups/:group_id",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight group"
              }
            ]
          },
          "docs": "Get insight group by ID"
        },
        {
          "info": {
            "name": "Update Insight Template Group",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.telnyx.com/v2/ai/conversations/insight-groups/:group_id",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight group"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update an insight template group"
        },
        {
          "info": {
            "name": "Delete Insight Template Group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.telnyx.com/v2/ai/conversations/insight-groups/:group_id",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight group"
              }
            ]
          },
          "docs": "Delete insight group by ID"
        },
        {
          "info": {
            "name": "Assign Insight Template To Group",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.telnyx.com/v2/ai/conversations/insight-groups/:group_id/insights/:insight_id/assign",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight group"
              },
              {
                "name": "insight_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight"
              }
            ]
          },
          "docs": "Assign an insight to a group"
        },
        {
          "info": {
            "name": "Unassign Insight Template From Group",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.telnyx.com/v2/ai/conversations/insight-groups/:group_id/insights/:insight_id/unassign",
            "params": [
              {
                "name": "group_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight group"
              },
              {
                "name": "insight_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight"
              }
            ]
          },
          "docs": "Remove an insight from a group"
        },
        {
          "info": {
            "name": "Get Insight Templates",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.telnyx.com/v2/ai/conversations/insights",
            "params": [
              {
                "name": "page",
                "value": "",
                "type": "query",
                "description": "Consolidated page parameter (deepObject style). Originally: page[number], page[size]"
              }
            ]
          },
          "docs": "Get all insights"
        },
        {
          "info": {
            "name": "Create Insight Template",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.telnyx.com/v2/ai/conversations/insights",
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Create a new insight"
        },
        {
          "info": {
            "name": "Get Insight Template",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.telnyx.com/v2/ai/conversations/insights/:insight_id",
            "params": [
              {
                "name": "insight_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight"
              }
            ]
          },
          "docs": "Get insight by ID"
        },
        {
          "info": {
            "name": "Update Insight Template",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.telnyx.com/v2/ai/conversations/insights/:insight_id",
            "params": [
              {
                "name": "insight_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update an insight template"
        },
        {
          "info": {
            "name": "Delete Insight Template",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.telnyx.com/v2/ai/conversations/insights/:insight_id",
            "params": [
              {
                "name": "insight_id",
                "value": "",
                "type": "path",
                "description": "The ID of the insight"
              }
            ]
          },
          "docs": "Delete insight by ID"
        },
        {
          "info": {
            "name": "Get a conversation",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.telnyx.com/v2/ai/conversations/:conversation_id",
            "params": [
              {
                "name": "conversation_id",
                "value": "",
                "type": "path",
                "description": "The ID of the conversation to retrieve"
              }
            ]
          },
          "docs": "Retrieve a specific AI conversation by its ID."
        },
        {
          "info": {
            "name": "Update conversation metadata",
            "type": "http"
          },
          "http": {
            "method": "PUT",
            "url": "https://api.telnyx.com/v2/ai/conversations/:conversation_id",
            "params": [
              {
                "name": "conversation_id",
                "value": "",
                "type": "path",
                "description": "The ID of the conversation to update"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Update metadata for a specific conversation."
        },
        {
          "info": {
            "name": "Delete a conversation",
            "type": "http"
          },
          "http": {
            "method": "DELETE",
            "url": "https://api.telnyx.com/v2/ai/conversations/:conversation_id",
            "params": [
              {
                "name": "conversation_id",
                "value": "",
                "type": "path",
                "description": "The ID of the conversation to delete"
              }
            ]
          },
          "docs": "Delete a specific conversation by its ID."
        },
        {
          "info": {
            "name": "Get insights for a conversation",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.telnyx.com/v2/ai/conversations/:conversation_id/conversations-insights",
            "params": [
              {
                "name": "conversation_id",
                "value": "",
                "type": "path"
              }
            ]
          },
          "docs": "Retrieve insights for a specific conversation"
        },
        {
          "info": {
            "name": "Create Message",
            "type": "http"
          },
          "http": {
            "method": "POST",
            "url": "https://api.telnyx.com/v2/ai/conversations/:conversation_id/message",
            "params": [
              {
                "name": "conversation_id",
                "value": "",
                "type": "path",
                "description": "The ID of the conversation"
              }
            ],
            "body": {
              "type": "json",
              "data": "{}"
            }
          },
          "docs": "Add a new message to the conversation. Used to insert a new messages to a conversation manually ( without using chat endpoint )"
        },
        {
          "info": {
            "name": "Get conversation messages",
            "type": "http"
          },
          "http": {
            "method": "GET",
            "url": "https://api.telnyx.com/v2/ai/conversations/:conversation_id/messages",
            "params": [
              {
                "name": "conversation_id",
                "value": "",
                "type": "path"
              },
              {
                "name": "page[size]",
                "value": "",
                "type": "query",
                "description": "The number of messages to return per page."
              },
              {
                "name": "page[number]",
                "value": "",
                "type": "query",
                "description": "The page number to retrieve."
              }
            ]
          },
          "docs": "Retrieve messages for a specific conversation, including tool calls made by the assistant."
        }
      ]
    }
  ],
  "bundled": true
}