[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-twilio-twilio-conversations-classic-api":3,"mdc-9n5aiu-key":35,"related-repo-twilio-twilio-conversations-classic-api":3863,"related-org-twilio-twilio-conversations-classic-api":3964},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":25,"repoUrl":26,"updatedAt":27,"license":28,"forks":29,"topics":30,"repo":31,"sourceUrl":33,"mdContent":34},"twilio-conversations-classic-api","build multi-channel messaging with Twilio Conversations","Build multi-channel messaging experiences using Twilio Conversations (classic) API. Covers creating conversations, adding participants (SMS, WhatsApp, chat), sending messages, and handling webhooks. Use this skill to manage persistent multi-party or multi-channel conversations beyond single-message SMS\u002FWhatsApp.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"twilio","Twilio","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Ftwilio.png",[12,16,19,22],{"name":13,"slug":14,"type":15},"SMS","sms","tag",{"name":17,"slug":18,"type":15},"WhatsApp","whatsapp",{"name":20,"slug":21,"type":15},"Messaging","messaging",{"name":23,"slug":24,"type":15},"API Development","api-development",25,"https:\u002F\u002Fgithub.com\u002Ftwilio\u002Fai","2026-07-17T06:05:45.049544",null,7,[],{"repoUrl":26,"stars":25,"forks":29,"topics":32,"description":28},[],"https:\u002F\u002Fgithub.com\u002Ftwilio\u002Fai\u002Ftree\u002FHEAD\u002Fskills\u002Ftwilio\u002Ftwilio-conversations-classic-api","---\nname: twilio-conversations-classic-api\ndescription: >\n  Build multi-channel messaging experiences using Twilio Conversations (classic) API.\n  Covers creating conversations, adding participants (SMS, WhatsApp, chat),\n  sending messages, and handling webhooks. Use this skill to manage persistent\n  multi-party or multi-channel conversations beyond single-message SMS\u002FWhatsApp.\n---\n\n## Overview\n\nConversations (classic) API provides persistent, multi-channel threads where participants on SMS, WhatsApp, and web chat can message together. Unlike single-message APIs, Conversations maintains history and supports multi-agent access.\n\n**Note:** This is the Conversations (classic) API (v1).\n\n---\n\n## Prerequisites\n\n- Twilio account with Conversations (classic) enabled\n  — New to Twilio? See `twilio-account-setup`\n  — Enable at: [Console > Conversations > Manage > Overview](https:\u002F\u002Fconsole.twilio.com\u002Fus1\u002Fdevelop\u002Fconversations\u002Fmanage\u002Foverview) > **Enable Conversations**\n- Environment variables:\n  - `TWILIO_ACCOUNT_SID`\n  - `TWILIO_AUTH_TOKEN`\n  — See `twilio-iam-auth-setup` for credential setup and best practices\n- SDK: `pip install twilio` \u002F `npm install twilio`\n- For SMS\u002FWhatsApp participants: a Twilio number assigned to a Conversations Service\n\n---\n\n## Setup: Create a Conversation Service (classic)\n\nA Conversation Service is the parent configuration container for all your conversations in the classic API. You need one before creating conversations with SMS\u002FWhatsApp participants.\n\n**Python**\n```python\nimport os\nfrom twilio.rest import Client\n\nclient = Client(os.environ[\"TWILIO_ACCOUNT_SID\"], os.environ[\"TWILIO_AUTH_TOKEN\"])\n\n# Create a Conversation Service\nservice = client.conversations.v1.services.create(\n    friendly_name=\"Customer Support Service\"\n)\nprint(f\"Service SID: {service.sid}\")\n```\n\n**Node.js**\n```node\nconst twilio = require(\"twilio\");\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);\n\n\u002F\u002F Create a Conversation Service\nconst service = await client.conversations.v1.services.create({\n    friendlyName: \"Customer Support Service\"\n});\nconsole.log(`Service SID: ${service.sid}`);\n```\n\n**Next:** Assign your Twilio phone number to this service at [Console > Conversations > Manage > Services](https:\u002F\u002Fconsole.twilio.com\u002Fus1\u002Fdevelop\u002Fconversations\u002Fmanage\u002Fservices) > Select your service > Add phone number.\n\n---\n\n## Quickstart\n\n**Python**\n```python\nimport os\nfrom twilio.rest import Client\n\nclient = Client(os.environ[\"TWILIO_ACCOUNT_SID\"], os.environ[\"TWILIO_AUTH_TOKEN\"])\n\n# Create a conversation (use default service or specify service_sid)\nconversation = client.conversations.v1.conversations.create(\n    friendly_name=\"Customer Support - Order #12345\"\n)\n\n# Add an SMS participant\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .create(\n        messaging_binding_address=\"+15558675310\",\n        messaging_binding_proxy_address=\"+15017122661\"\n    )\n\n# Send a message\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .messages \\\n    .create(body=\"Hello! How can I help you today?\", author=\"support-agent\")\n```\n\n**Node.js**\n```node\nconst twilio = require(\"twilio\");\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);\n\n\u002F\u002F Create a conversation (use default service or specify serviceSid)\nconst conversation = await client.conversations.v1.conversations.create({\n    friendlyName: \"Customer Support - Order #12345\",\n});\n\n\u002F\u002F Add an SMS participant\nawait client.conversations.v1\n    .conversations(conversation.sid)\n    .participants.create({\n        messagingBindingAddress: \"+15558675310\",\n        messagingBindingProxyAddress: \"+15017122661\",\n    });\n\n\u002F\u002F Send a message\nawait client.conversations.v1\n    .conversations(conversation.sid)\n    .messages.create({ body: \"Hello! How can I help you today?\", author: \"support-agent\" });\n```\n\n---\n\n## Key Patterns\n\n### Add Participants by Channel\n\n**WhatsApp participant — Python**\n```python\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .create(\n        messaging_binding_address=\"whatsapp:+15558675310\",\n        messaging_binding_proxy_address=\"whatsapp:+14155238886\"\n    )\n```\n\n**WhatsApp participant — Node.js**\n```node\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .participants.create({\n        messagingBindingAddress: \"whatsapp:+15558675310\",\n        messagingBindingProxyAddress: \"whatsapp:+14155238886\",\n    });\n```\n\n**Chat participant (web\u002Fmobile) — Python**\n```python\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .create(identity=\"user-123\")\n```\n\n**Chat participant (web\u002Fmobile) — Node.js**\n```node\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .participants.create({ identity: \"user-123\" });\n```\n\n### Send Media (All Channels)\n\n**Python**\n```python\n# Send a message with media\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .messages \\\n    .create(\n        body=\"Check out this image!\",\n        author=\"support-agent\",\n        media_url=\"https:\u002F\u002Fexample.com\u002Fimage.jpg\"\n    )\n\n# Multiple media URLs (up to 10)\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .messages \\\n    .create(\n        body=\"Here are the documents\",\n        author=\"support-agent\",\n        media_url=[\n            \"https:\u002F\u002Fexample.com\u002Fdoc1.pdf\",\n            \"https:\u002F\u002Fexample.com\u002Fdoc2.pdf\"\n        ]\n    )\n```\n\n**Node.js**\n```node\n\u002F\u002F Send a message with media\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .messages.create({\n        body: \"Check out this image!\",\n        author: \"support-agent\",\n        mediaUrl: \"https:\u002F\u002Fexample.com\u002Fimage.jpg\"\n    });\n\n\u002F\u002F Multiple media URLs (up to 10)\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .messages.create({\n        body: \"Here are the documents\",\n        author: \"support-agent\",\n        mediaUrl: [\n            \"https:\u002F\u002Fexample.com\u002Fdoc1.pdf\",\n            \"https:\u002F\u002Fexample.com\u002Fdoc2.pdf\"\n        ]\n    });\n```\n\nMedia must be publicly accessible URLs. Supported: JPG, PNG, GIF, PDF, vCard. Max 10 URLs per message. Works across all channels: SMS (as MMS), WhatsApp, and chat participants all receive media.\n\n### Add Multiple Participants\n\n**Python**\n```python\n# Add multiple SMS participants to a conversation\nparticipant_numbers = [\n    \"+15558675310\",\n    \"+15558675311\",\n    \"+15558675312\"\n]\n\ntwilio_number = \"+15017122661\"\n\nfor phone_number in participant_numbers:\n    client.conversations.v1 \\\n        .conversations(conversation.sid) \\\n        .participants \\\n        .create(\n            messaging_binding_address=phone_number,\n            messaging_binding_proxy_address=twilio_number\n        )\n```\n\n**Node.js**\n```node\n\u002F\u002F Add multiple SMS participants to a conversation\nconst participantNumbers = [\n    \"+15558675310\",\n    \"+15558675311\",\n    \"+15558675312\"\n];\n\nconst twilioNumber = \"+15017122661\";\n\nfor (const phoneNumber of participantNumbers) {\n    await client.conversations.v1\n        .conversations(conversationSid)\n        .participants.create({\n            messagingBindingAddress: phoneNumber,\n            messagingBindingProxyAddress: twilioNumber\n        });\n}\n```\n\n### Fetch Message History\n\n**Python**\n```python\n# Get all messages from a conversation\nmessages = client.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .messages \\\n    .list(limit=50)\n\nfor message in messages:\n    print(f\"{message.author}: {message.body}\")\n```\n\n**Node.js**\n```node\n\u002F\u002F Get all messages from a conversation\nconst messages = await client.conversations.v1\n    .conversations(conversationSid)\n    .messages\n    .list({ limit: 50 });\n\nmessages.forEach(message => {\n    console.log(`${message.author}: ${message.body}`);\n});\n```\n\n### List Conversations\n\n**Python**\n```python\n# List all conversations\nconversations = client.conversations.v1.conversations.list(limit=20)\n\nfor conv in conversations:\n    print(f\"{conv.friendly_name} - {conv.sid}\")\n\n# Filter by state\nactive_conversations = client.conversations.v1.conversations.list(\n    state=\"active\",\n    limit=20\n)\n```\n\n**Node.js**\n```node\n\u002F\u002F List all conversations\nconst conversations = await client.conversations.v1.conversations.list({ limit: 20 });\n\nconversations.forEach(conv => {\n    console.log(`${conv.friendlyName} - ${conv.sid}`);\n});\n\n\u002F\u002F Filter by state\nconst activeConversations = await client.conversations.v1.conversations.list({\n    state: \"active\",\n    limit: 20\n});\n```\n\n### Remove Participants\n\n**Python**\n```python\n# Remove a participant by participant SID\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants(participant_sid) \\\n    .delete()\n\n# Find and remove by phone number\nparticipants = client.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .list()\n\nfor p in participants:\n    if p.messaging_binding and p.messaging_binding.get(\"address\") == \"+15558675310\":\n        client.conversations.v1 \\\n            .conversations(conversation.sid) \\\n            .participants(p.sid) \\\n            .delete()\n```\n\n**Node.js**\n```node\n\u002F\u002F Remove a participant by participant SID\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .participants(participantSid)\n    .remove();\n\n\u002F\u002F Find and remove by phone number\nconst participants = await client.conversations.v1\n    .conversations(conversationSid)\n    .participants\n    .list();\n\nfor (const p of participants) {\n    if (p.messagingBinding?.address === \"+15558675310\") {\n        await client.conversations.v1\n            .conversations(conversationSid)\n            .participants(p.sid)\n            .remove();\n    }\n}\n```\n\n### Close\u002FComplete Conversations\n\n**Python**\n```python\n# Close a conversation (marks it inactive)\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .update(state=\"closed\")\n\n# Delete a conversation completely\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .delete()\n```\n\n**Node.js**\n```node\n\u002F\u002F Close a conversation (marks it inactive)\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .update({ state: \"closed\" });\n\n\u002F\u002F Delete a conversation completely\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .remove();\n```\n\n### Handle Incoming Messages (Webhook)\n\nConfigure at Console > Conversations > Manage > Global Webhooks.\n\n> **Security:** Always validate the `X-Twilio-Signature` header in production to confirm requests originate from Twilio. See `twilio-webhook-architecture` for validation patterns.\n\n**Python (Flask)**\n```python\nfrom twilio.request_validator import RequestValidator\n\n@app.route(\"\u002Fconversations\u002Fwebhook\", methods=[\"POST\"])\ndef conversations_webhook():\n    validator = RequestValidator(os.environ[\"TWILIO_AUTH_TOKEN\"])\n    if not validator.validate(request.url, request.form, request.headers.get(\"X-Twilio-Signature\", \"\")):\n        return \"\", 403\n\n    event_type = request.form.get(\"EventType\")\n    conversation_sid = request.form.get(\"ConversationSid\")\n    author = request.form.get(\"Author\")\n\n    if event_type == \"onMessageAdded\" and author != \"support-agent\":\n        client.conversations.v1.conversations(conversation_sid).messages.create(\n            body=\"Thanks — an agent will be with you shortly.\",\n            author=\"support-bot\"\n        )\n    return \"\", 204\n```\n\n**Node.js (Express)**\n```node\napp.post(\"\u002Fconversations\u002Fwebhook\", async (req, res) => {\n    const valid = twilio.validateRequest(\n        process.env.TWILIO_AUTH_TOKEN,\n        req.headers[\"x-twilio-signature\"],\n        `https:\u002F\u002F${req.headers.host}${req.originalUrl}`,\n        req.body\n    );\n    if (!valid) return res.status(403).send(\"Forbidden\");\n\n    const { EventType, ConversationSid, Author } = req.body;\n    if (EventType === \"onMessageAdded\" && Author !== \"support-agent\") {\n        await client.conversations.v1\n            .conversations(ConversationSid)\n            .messages.create({ body: \"Thanks — an agent will be with you shortly.\", author: \"support-bot\" });\n    }\n    res.sendStatus(204);\n});\n```\n\n---\n\n## Advanced Context\n\n### Message Delivery Status\n\nTrack message delivery through webhooks. Configure at Console > Conversations > Manage > Global Webhooks.\n\n**Available delivery events:**\n- `onMessageAdded` — Message created\n- `onMessageUpdated` — Message status changed\n- `onDeliveryUpdated` — Delivery receipt received (SMS\u002FWhatsApp only)\n\n**Python (Flask)**\n```python\n@app.route(\"\u002Fconversations\u002Fwebhook\", methods=[\"POST\"])\ndef delivery_webhook():\n    event_type = request.form.get(\"EventType\")\n    \n    if event_type == \"onDeliveryUpdated\":\n        delivery_status = request.form.get(\"DeliveryStatus\")\n        message_sid = request.form.get(\"MessageSid\")\n        print(f\"Message {message_sid}: {delivery_status}\")\n        # Status values: sent, delivered, failed, undelivered\n    \n    return \"\", 204\n```\n\n**Node.js (Express)**\n```node\napp.post(\"\u002Fconversations\u002Fwebhook\", (req, res) => {\n    const { EventType, DeliveryStatus, MessageSid } = req.body;\n    \n    if (EventType === \"onDeliveryUpdated\") {\n        console.log(`Message ${MessageSid}: ${DeliveryStatus}`);\n        \u002F\u002F Status values: sent, delivered, failed, undelivered\n    }\n    \n    res.sendStatus(204);\n});\n```\n\n### Conversation Attributes (Metadata)\n\nStore custom metadata on conversations (order IDs, customer info, tags).\n\n**Python**\n```python\n# Set attributes when creating\nconversation = client.conversations.v1.conversations.create(\n    friendly_name=\"Customer Support - Order #12345\",\n    attributes='{\"order_id\": \"12345\", \"priority\": \"high\", \"customer_tier\": \"gold\"}'\n)\n\n# Update attributes on existing conversation\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .update(attributes='{\"order_id\": \"12345\", \"status\": \"resolved\"}')\n\n# Read attributes\nconv = client.conversations.v1.conversations(conversation.sid).fetch()\nimport json\nattrs = json.loads(conv.attributes)\nprint(f\"Order ID: {attrs['order_id']}\")\n```\n\n**Node.js**\n```node\n\u002F\u002F Set attributes when creating\nconst conversation = await client.conversations.v1.conversations.create({\n    friendlyName: \"Customer Support - Order #12345\",\n    attributes: JSON.stringify({ orderId: \"12345\", priority: \"high\", customerTier: \"gold\" })\n});\n\n\u002F\u002F Update attributes on existing conversation\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .update({ attributes: JSON.stringify({ orderId: \"12345\", status: \"resolved\" }) });\n\n\u002F\u002F Read attributes\nconst conv = await client.conversations.v1.conversations(conversationSid).fetch();\nconst attrs = JSON.parse(conv.attributes);\nconsole.log(`Order ID: ${attrs.orderId}`);\n```\n\n### Participant Attributes (Metadata)\n\nStore metadata on individual participants (role, name, account info).\n\n**Python**\n```python\n# Set attributes when adding participant\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .create(\n        messaging_binding_address=\"+15558675310\",\n        messaging_binding_proxy_address=\"+15017122661\",\n        attributes='{\"name\": \"John Doe\", \"role\": \"customer\", \"account_id\": \"A123\"}'\n    )\n\n# Update participant attributes\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants(participant_sid) \\\n    .update(attributes='{\"role\": \"vip_customer\", \"satisfaction\": \"high\"}')\n```\n\n**Node.js**\n```node\n\u002F\u002F Set attributes when adding participant\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .participants.create({\n        messagingBindingAddress: \"+15558675310\",\n        messagingBindingProxyAddress: \"+15017122661\",\n        attributes: JSON.stringify({ name: \"John Doe\", role: \"customer\", accountId: \"A123\" })\n    });\n\n\u002F\u002F Update participant attributes\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .participants(participantSid)\n    .update({ attributes: JSON.stringify({ role: \"vip_customer\", satisfaction: \"high\" }) });\n```\n\n---\n\n## Limits\n\n| Limit | Value |\n|-------|-------|\n| Participants per conversation | 1,000 |\n| Messages per conversation | Unlimited (older messages may be archived) |\n| Message retention | Configurable (default: indefinite) |\n\n---\n\n## CANNOT\n\n- **Cannot add SMS participants without a Twilio number** — Number must be assigned to a Conversations (classic) Service\n- **Cannot send WhatsApp messages outside the 24-hour window** — Subject to service window rules. See `twilio-whatsapp-send-message`\n- **Cannot use chat participants without Access Tokens** — Client-side SDK auth required. See `twilio-iam-auth-setup`\n- **Cannot use WhatsApp Groups API** — Deprecated April 2020. Use Conversations (classic) API instead.\n- **Conversations v1 (classic) is in maintenance mode** — Consider Conversations v2 API for new projects with enhanced features and scalability.\n\n---\n\n## Next Steps\n\n- **WhatsApp setup and rules:** `twilio-whatsapp-send-message`\n- **SMS setup:** `twilio-sms-send-message`\n- **Access Tokens for chat clients:** `twilio-iam-auth-setup`\n- **Webhook security:** `twilio-webhook-architecture`\n",{"data":36,"body":37},{"name":4,"description":6},{"type":38,"children":39},"root",[40,49,55,66,70,76,171,174,180,185,193,295,303,375,394,397,403,410,613,620,779,782,788,795,803,861,869,921,929,965,973,1002,1008,1015,1186,1193,1348,1353,1359,1366,1507,1514,1652,1658,1665,1733,1740,1816,1822,1829,1921,1928,2027,2033,2040,2185,2192,2353,2359,2366,2439,2446,2519,2525,2530,2560,2568,2715,2723,2862,2865,2871,2877,2882,2890,2926,2933,3024,3031,3113,3119,3124,3131,3260,3267,3387,3393,3398,3405,3522,3529,3638,3641,3647,3714,3717,3723,3787,3790,3796,3857],{"type":41,"tag":42,"props":43,"children":45},"element","h2",{"id":44},"overview",[46],{"type":47,"value":48},"text","Overview",{"type":41,"tag":50,"props":51,"children":52},"p",{},[53],{"type":47,"value":54},"Conversations (classic) API provides persistent, multi-channel threads where participants on SMS, WhatsApp, and web chat can message together. Unlike single-message APIs, Conversations maintains history and supports multi-agent access.",{"type":41,"tag":50,"props":56,"children":57},{},[58,64],{"type":41,"tag":59,"props":60,"children":61},"strong",{},[62],{"type":47,"value":63},"Note:",{"type":47,"value":65}," This is the Conversations (classic) API (v1).",{"type":41,"tag":67,"props":68,"children":69},"hr",{},[],{"type":41,"tag":42,"props":71,"children":73},{"id":72},"prerequisites",[74],{"type":47,"value":75},"Prerequisites",{"type":41,"tag":77,"props":78,"children":79},"ul",{},[80,111,147,166],{"type":41,"tag":81,"props":82,"children":83},"li",{},[84,86,93,95,104,106],{"type":47,"value":85},"Twilio account with Conversations (classic) enabled\n— New to Twilio? See ",{"type":41,"tag":87,"props":88,"children":90},"code",{"className":89},[],[91],{"type":47,"value":92},"twilio-account-setup",{"type":47,"value":94},"\n— Enable at: ",{"type":41,"tag":96,"props":97,"children":101},"a",{"href":98,"rel":99},"https:\u002F\u002Fconsole.twilio.com\u002Fus1\u002Fdevelop\u002Fconversations\u002Fmanage\u002Foverview",[100],"nofollow",[102],{"type":47,"value":103},"Console > Conversations > Manage > Overview",{"type":47,"value":105}," > ",{"type":41,"tag":59,"props":107,"children":108},{},[109],{"type":47,"value":110},"Enable Conversations",{"type":41,"tag":81,"props":112,"children":113},{},[114,116],{"type":47,"value":115},"Environment variables:\n",{"type":41,"tag":77,"props":117,"children":118},{},[119,128],{"type":41,"tag":81,"props":120,"children":121},{},[122],{"type":41,"tag":87,"props":123,"children":125},{"className":124},[],[126],{"type":47,"value":127},"TWILIO_ACCOUNT_SID",{"type":41,"tag":81,"props":129,"children":130},{},[131,137,139,145],{"type":41,"tag":87,"props":132,"children":134},{"className":133},[],[135],{"type":47,"value":136},"TWILIO_AUTH_TOKEN",{"type":47,"value":138},"\n— See ",{"type":41,"tag":87,"props":140,"children":142},{"className":141},[],[143],{"type":47,"value":144},"twilio-iam-auth-setup",{"type":47,"value":146}," for credential setup and best practices",{"type":41,"tag":81,"props":148,"children":149},{},[150,152,158,160],{"type":47,"value":151},"SDK: ",{"type":41,"tag":87,"props":153,"children":155},{"className":154},[],[156],{"type":47,"value":157},"pip install twilio",{"type":47,"value":159}," \u002F ",{"type":41,"tag":87,"props":161,"children":163},{"className":162},[],[164],{"type":47,"value":165},"npm install twilio",{"type":41,"tag":81,"props":167,"children":168},{},[169],{"type":47,"value":170},"For SMS\u002FWhatsApp participants: a Twilio number assigned to a Conversations Service",{"type":41,"tag":67,"props":172,"children":173},{},[],{"type":41,"tag":42,"props":175,"children":177},{"id":176},"setup-create-a-conversation-service-classic",[178],{"type":47,"value":179},"Setup: Create a Conversation Service (classic)",{"type":41,"tag":50,"props":181,"children":182},{},[183],{"type":47,"value":184},"A Conversation Service is the parent configuration container for all your conversations in the classic API. You need one before creating conversations with SMS\u002FWhatsApp participants.",{"type":41,"tag":50,"props":186,"children":187},{},[188],{"type":41,"tag":59,"props":189,"children":190},{},[191],{"type":47,"value":192},"Python",{"type":41,"tag":194,"props":195,"children":200},"pre",{"className":196,"code":197,"language":198,"meta":199,"style":199},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import os\nfrom twilio.rest import Client\n\nclient = Client(os.environ[\"TWILIO_ACCOUNT_SID\"], os.environ[\"TWILIO_AUTH_TOKEN\"])\n\n# Create a Conversation Service\nservice = client.conversations.v1.services.create(\n    friendly_name=\"Customer Support Service\"\n)\nprint(f\"Service SID: {service.sid}\")\n","python","",[201],{"type":41,"tag":87,"props":202,"children":203},{"__ignoreMap":199},[204,215,224,234,243,251,260,268,277,286],{"type":41,"tag":205,"props":206,"children":209},"span",{"class":207,"line":208},"line",1,[210],{"type":41,"tag":205,"props":211,"children":212},{},[213],{"type":47,"value":214},"import os\n",{"type":41,"tag":205,"props":216,"children":218},{"class":207,"line":217},2,[219],{"type":41,"tag":205,"props":220,"children":221},{},[222],{"type":47,"value":223},"from twilio.rest import Client\n",{"type":41,"tag":205,"props":225,"children":227},{"class":207,"line":226},3,[228],{"type":41,"tag":205,"props":229,"children":231},{"emptyLinePlaceholder":230},true,[232],{"type":47,"value":233},"\n",{"type":41,"tag":205,"props":235,"children":237},{"class":207,"line":236},4,[238],{"type":41,"tag":205,"props":239,"children":240},{},[241],{"type":47,"value":242},"client = Client(os.environ[\"TWILIO_ACCOUNT_SID\"], os.environ[\"TWILIO_AUTH_TOKEN\"])\n",{"type":41,"tag":205,"props":244,"children":246},{"class":207,"line":245},5,[247],{"type":41,"tag":205,"props":248,"children":249},{"emptyLinePlaceholder":230},[250],{"type":47,"value":233},{"type":41,"tag":205,"props":252,"children":254},{"class":207,"line":253},6,[255],{"type":41,"tag":205,"props":256,"children":257},{},[258],{"type":47,"value":259},"# Create a Conversation Service\n",{"type":41,"tag":205,"props":261,"children":262},{"class":207,"line":29},[263],{"type":41,"tag":205,"props":264,"children":265},{},[266],{"type":47,"value":267},"service = client.conversations.v1.services.create(\n",{"type":41,"tag":205,"props":269,"children":271},{"class":207,"line":270},8,[272],{"type":41,"tag":205,"props":273,"children":274},{},[275],{"type":47,"value":276},"    friendly_name=\"Customer Support Service\"\n",{"type":41,"tag":205,"props":278,"children":280},{"class":207,"line":279},9,[281],{"type":41,"tag":205,"props":282,"children":283},{},[284],{"type":47,"value":285},")\n",{"type":41,"tag":205,"props":287,"children":289},{"class":207,"line":288},10,[290],{"type":41,"tag":205,"props":291,"children":292},{},[293],{"type":47,"value":294},"print(f\"Service SID: {service.sid}\")\n",{"type":41,"tag":50,"props":296,"children":297},{},[298],{"type":41,"tag":59,"props":299,"children":300},{},[301],{"type":47,"value":302},"Node.js",{"type":41,"tag":194,"props":304,"children":308},{"className":305,"code":306,"language":307,"meta":199,"style":199},"language-node shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const twilio = require(\"twilio\");\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);\n\n\u002F\u002F Create a Conversation Service\nconst service = await client.conversations.v1.services.create({\n    friendlyName: \"Customer Support Service\"\n});\nconsole.log(`Service SID: ${service.sid}`);\n","node",[309],{"type":41,"tag":87,"props":310,"children":311},{"__ignoreMap":199},[312,320,328,335,343,351,359,367],{"type":41,"tag":205,"props":313,"children":314},{"class":207,"line":208},[315],{"type":41,"tag":205,"props":316,"children":317},{},[318],{"type":47,"value":319},"const twilio = require(\"twilio\");\n",{"type":41,"tag":205,"props":321,"children":322},{"class":207,"line":217},[323],{"type":41,"tag":205,"props":324,"children":325},{},[326],{"type":47,"value":327},"const client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);\n",{"type":41,"tag":205,"props":329,"children":330},{"class":207,"line":226},[331],{"type":41,"tag":205,"props":332,"children":333},{"emptyLinePlaceholder":230},[334],{"type":47,"value":233},{"type":41,"tag":205,"props":336,"children":337},{"class":207,"line":236},[338],{"type":41,"tag":205,"props":339,"children":340},{},[341],{"type":47,"value":342},"\u002F\u002F Create a Conversation Service\n",{"type":41,"tag":205,"props":344,"children":345},{"class":207,"line":245},[346],{"type":41,"tag":205,"props":347,"children":348},{},[349],{"type":47,"value":350},"const service = await client.conversations.v1.services.create({\n",{"type":41,"tag":205,"props":352,"children":353},{"class":207,"line":253},[354],{"type":41,"tag":205,"props":355,"children":356},{},[357],{"type":47,"value":358},"    friendlyName: \"Customer Support Service\"\n",{"type":41,"tag":205,"props":360,"children":361},{"class":207,"line":29},[362],{"type":41,"tag":205,"props":363,"children":364},{},[365],{"type":47,"value":366},"});\n",{"type":41,"tag":205,"props":368,"children":369},{"class":207,"line":270},[370],{"type":41,"tag":205,"props":371,"children":372},{},[373],{"type":47,"value":374},"console.log(`Service SID: ${service.sid}`);\n",{"type":41,"tag":50,"props":376,"children":377},{},[378,383,385,392],{"type":41,"tag":59,"props":379,"children":380},{},[381],{"type":47,"value":382},"Next:",{"type":47,"value":384}," Assign your Twilio phone number to this service at ",{"type":41,"tag":96,"props":386,"children":389},{"href":387,"rel":388},"https:\u002F\u002Fconsole.twilio.com\u002Fus1\u002Fdevelop\u002Fconversations\u002Fmanage\u002Fservices",[100],[390],{"type":47,"value":391},"Console > Conversations > Manage > Services",{"type":47,"value":393}," > Select your service > Add phone number.",{"type":41,"tag":67,"props":395,"children":396},{},[],{"type":41,"tag":42,"props":398,"children":400},{"id":399},"quickstart",[401],{"type":47,"value":402},"Quickstart",{"type":41,"tag":50,"props":404,"children":405},{},[406],{"type":41,"tag":59,"props":407,"children":408},{},[409],{"type":47,"value":192},{"type":41,"tag":194,"props":411,"children":413},{"className":196,"code":412,"language":198,"meta":199,"style":199},"import os\nfrom twilio.rest import Client\n\nclient = Client(os.environ[\"TWILIO_ACCOUNT_SID\"], os.environ[\"TWILIO_AUTH_TOKEN\"])\n\n# Create a conversation (use default service or specify service_sid)\nconversation = client.conversations.v1.conversations.create(\n    friendly_name=\"Customer Support - Order #12345\"\n)\n\n# Add an SMS participant\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .create(\n        messaging_binding_address=\"+15558675310\",\n        messaging_binding_proxy_address=\"+15017122661\"\n    )\n\n# Send a message\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .messages \\\n    .create(body=\"Hello! How can I help you today?\", author=\"support-agent\")\n",[414],{"type":41,"tag":87,"props":415,"children":416},{"__ignoreMap":199},[417,424,431,438,445,452,460,468,476,483,490,499,508,517,526,535,544,553,562,570,579,587,595,604],{"type":41,"tag":205,"props":418,"children":419},{"class":207,"line":208},[420],{"type":41,"tag":205,"props":421,"children":422},{},[423],{"type":47,"value":214},{"type":41,"tag":205,"props":425,"children":426},{"class":207,"line":217},[427],{"type":41,"tag":205,"props":428,"children":429},{},[430],{"type":47,"value":223},{"type":41,"tag":205,"props":432,"children":433},{"class":207,"line":226},[434],{"type":41,"tag":205,"props":435,"children":436},{"emptyLinePlaceholder":230},[437],{"type":47,"value":233},{"type":41,"tag":205,"props":439,"children":440},{"class":207,"line":236},[441],{"type":41,"tag":205,"props":442,"children":443},{},[444],{"type":47,"value":242},{"type":41,"tag":205,"props":446,"children":447},{"class":207,"line":245},[448],{"type":41,"tag":205,"props":449,"children":450},{"emptyLinePlaceholder":230},[451],{"type":47,"value":233},{"type":41,"tag":205,"props":453,"children":454},{"class":207,"line":253},[455],{"type":41,"tag":205,"props":456,"children":457},{},[458],{"type":47,"value":459},"# Create a conversation (use default service or specify service_sid)\n",{"type":41,"tag":205,"props":461,"children":462},{"class":207,"line":29},[463],{"type":41,"tag":205,"props":464,"children":465},{},[466],{"type":47,"value":467},"conversation = client.conversations.v1.conversations.create(\n",{"type":41,"tag":205,"props":469,"children":470},{"class":207,"line":270},[471],{"type":41,"tag":205,"props":472,"children":473},{},[474],{"type":47,"value":475},"    friendly_name=\"Customer Support - Order #12345\"\n",{"type":41,"tag":205,"props":477,"children":478},{"class":207,"line":279},[479],{"type":41,"tag":205,"props":480,"children":481},{},[482],{"type":47,"value":285},{"type":41,"tag":205,"props":484,"children":485},{"class":207,"line":288},[486],{"type":41,"tag":205,"props":487,"children":488},{"emptyLinePlaceholder":230},[489],{"type":47,"value":233},{"type":41,"tag":205,"props":491,"children":493},{"class":207,"line":492},11,[494],{"type":41,"tag":205,"props":495,"children":496},{},[497],{"type":47,"value":498},"# Add an SMS participant\n",{"type":41,"tag":205,"props":500,"children":502},{"class":207,"line":501},12,[503],{"type":41,"tag":205,"props":504,"children":505},{},[506],{"type":47,"value":507},"client.conversations.v1 \\\n",{"type":41,"tag":205,"props":509,"children":511},{"class":207,"line":510},13,[512],{"type":41,"tag":205,"props":513,"children":514},{},[515],{"type":47,"value":516},"    .conversations(conversation.sid) \\\n",{"type":41,"tag":205,"props":518,"children":520},{"class":207,"line":519},14,[521],{"type":41,"tag":205,"props":522,"children":523},{},[524],{"type":47,"value":525},"    .participants \\\n",{"type":41,"tag":205,"props":527,"children":529},{"class":207,"line":528},15,[530],{"type":41,"tag":205,"props":531,"children":532},{},[533],{"type":47,"value":534},"    .create(\n",{"type":41,"tag":205,"props":536,"children":538},{"class":207,"line":537},16,[539],{"type":41,"tag":205,"props":540,"children":541},{},[542],{"type":47,"value":543},"        messaging_binding_address=\"+15558675310\",\n",{"type":41,"tag":205,"props":545,"children":547},{"class":207,"line":546},17,[548],{"type":41,"tag":205,"props":549,"children":550},{},[551],{"type":47,"value":552},"        messaging_binding_proxy_address=\"+15017122661\"\n",{"type":41,"tag":205,"props":554,"children":556},{"class":207,"line":555},18,[557],{"type":41,"tag":205,"props":558,"children":559},{},[560],{"type":47,"value":561},"    )\n",{"type":41,"tag":205,"props":563,"children":565},{"class":207,"line":564},19,[566],{"type":41,"tag":205,"props":567,"children":568},{"emptyLinePlaceholder":230},[569],{"type":47,"value":233},{"type":41,"tag":205,"props":571,"children":573},{"class":207,"line":572},20,[574],{"type":41,"tag":205,"props":575,"children":576},{},[577],{"type":47,"value":578},"# Send a message\n",{"type":41,"tag":205,"props":580,"children":582},{"class":207,"line":581},21,[583],{"type":41,"tag":205,"props":584,"children":585},{},[586],{"type":47,"value":507},{"type":41,"tag":205,"props":588,"children":590},{"class":207,"line":589},22,[591],{"type":41,"tag":205,"props":592,"children":593},{},[594],{"type":47,"value":516},{"type":41,"tag":205,"props":596,"children":598},{"class":207,"line":597},23,[599],{"type":41,"tag":205,"props":600,"children":601},{},[602],{"type":47,"value":603},"    .messages \\\n",{"type":41,"tag":205,"props":605,"children":607},{"class":207,"line":606},24,[608],{"type":41,"tag":205,"props":609,"children":610},{},[611],{"type":47,"value":612},"    .create(body=\"Hello! How can I help you today?\", author=\"support-agent\")\n",{"type":41,"tag":50,"props":614,"children":615},{},[616],{"type":41,"tag":59,"props":617,"children":618},{},[619],{"type":47,"value":302},{"type":41,"tag":194,"props":621,"children":623},{"className":305,"code":622,"language":307,"meta":199,"style":199},"const twilio = require(\"twilio\");\nconst client = twilio(process.env.TWILIO_ACCOUNT_SID, process.env.TWILIO_AUTH_TOKEN);\n\n\u002F\u002F Create a conversation (use default service or specify serviceSid)\nconst conversation = await client.conversations.v1.conversations.create({\n    friendlyName: \"Customer Support - Order #12345\",\n});\n\n\u002F\u002F Add an SMS participant\nawait client.conversations.v1\n    .conversations(conversation.sid)\n    .participants.create({\n        messagingBindingAddress: \"+15558675310\",\n        messagingBindingProxyAddress: \"+15017122661\",\n    });\n\n\u002F\u002F Send a message\nawait client.conversations.v1\n    .conversations(conversation.sid)\n    .messages.create({ body: \"Hello! How can I help you today?\", author: \"support-agent\" });\n",[624],{"type":41,"tag":87,"props":625,"children":626},{"__ignoreMap":199},[627,634,641,648,656,664,672,679,686,694,702,710,718,726,734,742,749,757,764,771],{"type":41,"tag":205,"props":628,"children":629},{"class":207,"line":208},[630],{"type":41,"tag":205,"props":631,"children":632},{},[633],{"type":47,"value":319},{"type":41,"tag":205,"props":635,"children":636},{"class":207,"line":217},[637],{"type":41,"tag":205,"props":638,"children":639},{},[640],{"type":47,"value":327},{"type":41,"tag":205,"props":642,"children":643},{"class":207,"line":226},[644],{"type":41,"tag":205,"props":645,"children":646},{"emptyLinePlaceholder":230},[647],{"type":47,"value":233},{"type":41,"tag":205,"props":649,"children":650},{"class":207,"line":236},[651],{"type":41,"tag":205,"props":652,"children":653},{},[654],{"type":47,"value":655},"\u002F\u002F Create a conversation (use default service or specify serviceSid)\n",{"type":41,"tag":205,"props":657,"children":658},{"class":207,"line":245},[659],{"type":41,"tag":205,"props":660,"children":661},{},[662],{"type":47,"value":663},"const conversation = await client.conversations.v1.conversations.create({\n",{"type":41,"tag":205,"props":665,"children":666},{"class":207,"line":253},[667],{"type":41,"tag":205,"props":668,"children":669},{},[670],{"type":47,"value":671},"    friendlyName: \"Customer Support - Order #12345\",\n",{"type":41,"tag":205,"props":673,"children":674},{"class":207,"line":29},[675],{"type":41,"tag":205,"props":676,"children":677},{},[678],{"type":47,"value":366},{"type":41,"tag":205,"props":680,"children":681},{"class":207,"line":270},[682],{"type":41,"tag":205,"props":683,"children":684},{"emptyLinePlaceholder":230},[685],{"type":47,"value":233},{"type":41,"tag":205,"props":687,"children":688},{"class":207,"line":279},[689],{"type":41,"tag":205,"props":690,"children":691},{},[692],{"type":47,"value":693},"\u002F\u002F Add an SMS participant\n",{"type":41,"tag":205,"props":695,"children":696},{"class":207,"line":288},[697],{"type":41,"tag":205,"props":698,"children":699},{},[700],{"type":47,"value":701},"await client.conversations.v1\n",{"type":41,"tag":205,"props":703,"children":704},{"class":207,"line":492},[705],{"type":41,"tag":205,"props":706,"children":707},{},[708],{"type":47,"value":709},"    .conversations(conversation.sid)\n",{"type":41,"tag":205,"props":711,"children":712},{"class":207,"line":501},[713],{"type":41,"tag":205,"props":714,"children":715},{},[716],{"type":47,"value":717},"    .participants.create({\n",{"type":41,"tag":205,"props":719,"children":720},{"class":207,"line":510},[721],{"type":41,"tag":205,"props":722,"children":723},{},[724],{"type":47,"value":725},"        messagingBindingAddress: \"+15558675310\",\n",{"type":41,"tag":205,"props":727,"children":728},{"class":207,"line":519},[729],{"type":41,"tag":205,"props":730,"children":731},{},[732],{"type":47,"value":733},"        messagingBindingProxyAddress: \"+15017122661\",\n",{"type":41,"tag":205,"props":735,"children":736},{"class":207,"line":528},[737],{"type":41,"tag":205,"props":738,"children":739},{},[740],{"type":47,"value":741},"    });\n",{"type":41,"tag":205,"props":743,"children":744},{"class":207,"line":537},[745],{"type":41,"tag":205,"props":746,"children":747},{"emptyLinePlaceholder":230},[748],{"type":47,"value":233},{"type":41,"tag":205,"props":750,"children":751},{"class":207,"line":546},[752],{"type":41,"tag":205,"props":753,"children":754},{},[755],{"type":47,"value":756},"\u002F\u002F Send a message\n",{"type":41,"tag":205,"props":758,"children":759},{"class":207,"line":555},[760],{"type":41,"tag":205,"props":761,"children":762},{},[763],{"type":47,"value":701},{"type":41,"tag":205,"props":765,"children":766},{"class":207,"line":564},[767],{"type":41,"tag":205,"props":768,"children":769},{},[770],{"type":47,"value":709},{"type":41,"tag":205,"props":772,"children":773},{"class":207,"line":572},[774],{"type":41,"tag":205,"props":775,"children":776},{},[777],{"type":47,"value":778},"    .messages.create({ body: \"Hello! How can I help you today?\", author: \"support-agent\" });\n",{"type":41,"tag":67,"props":780,"children":781},{},[],{"type":41,"tag":42,"props":783,"children":785},{"id":784},"key-patterns",[786],{"type":47,"value":787},"Key Patterns",{"type":41,"tag":789,"props":790,"children":792},"h3",{"id":791},"add-participants-by-channel",[793],{"type":47,"value":794},"Add Participants by Channel",{"type":41,"tag":50,"props":796,"children":797},{},[798],{"type":41,"tag":59,"props":799,"children":800},{},[801],{"type":47,"value":802},"WhatsApp participant — Python",{"type":41,"tag":194,"props":804,"children":806},{"className":196,"code":805,"language":198,"meta":199,"style":199},"client.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .create(\n        messaging_binding_address=\"whatsapp:+15558675310\",\n        messaging_binding_proxy_address=\"whatsapp:+14155238886\"\n    )\n",[807],{"type":41,"tag":87,"props":808,"children":809},{"__ignoreMap":199},[810,817,824,831,838,846,854],{"type":41,"tag":205,"props":811,"children":812},{"class":207,"line":208},[813],{"type":41,"tag":205,"props":814,"children":815},{},[816],{"type":47,"value":507},{"type":41,"tag":205,"props":818,"children":819},{"class":207,"line":217},[820],{"type":41,"tag":205,"props":821,"children":822},{},[823],{"type":47,"value":516},{"type":41,"tag":205,"props":825,"children":826},{"class":207,"line":226},[827],{"type":41,"tag":205,"props":828,"children":829},{},[830],{"type":47,"value":525},{"type":41,"tag":205,"props":832,"children":833},{"class":207,"line":236},[834],{"type":41,"tag":205,"props":835,"children":836},{},[837],{"type":47,"value":534},{"type":41,"tag":205,"props":839,"children":840},{"class":207,"line":245},[841],{"type":41,"tag":205,"props":842,"children":843},{},[844],{"type":47,"value":845},"        messaging_binding_address=\"whatsapp:+15558675310\",\n",{"type":41,"tag":205,"props":847,"children":848},{"class":207,"line":253},[849],{"type":41,"tag":205,"props":850,"children":851},{},[852],{"type":47,"value":853},"        messaging_binding_proxy_address=\"whatsapp:+14155238886\"\n",{"type":41,"tag":205,"props":855,"children":856},{"class":207,"line":29},[857],{"type":41,"tag":205,"props":858,"children":859},{},[860],{"type":47,"value":561},{"type":41,"tag":50,"props":862,"children":863},{},[864],{"type":41,"tag":59,"props":865,"children":866},{},[867],{"type":47,"value":868},"WhatsApp participant — Node.js",{"type":41,"tag":194,"props":870,"children":872},{"className":305,"code":871,"language":307,"meta":199,"style":199},"await client.conversations.v1\n    .conversations(conversationSid)\n    .participants.create({\n        messagingBindingAddress: \"whatsapp:+15558675310\",\n        messagingBindingProxyAddress: \"whatsapp:+14155238886\",\n    });\n",[873],{"type":41,"tag":87,"props":874,"children":875},{"__ignoreMap":199},[876,883,891,898,906,914],{"type":41,"tag":205,"props":877,"children":878},{"class":207,"line":208},[879],{"type":41,"tag":205,"props":880,"children":881},{},[882],{"type":47,"value":701},{"type":41,"tag":205,"props":884,"children":885},{"class":207,"line":217},[886],{"type":41,"tag":205,"props":887,"children":888},{},[889],{"type":47,"value":890},"    .conversations(conversationSid)\n",{"type":41,"tag":205,"props":892,"children":893},{"class":207,"line":226},[894],{"type":41,"tag":205,"props":895,"children":896},{},[897],{"type":47,"value":717},{"type":41,"tag":205,"props":899,"children":900},{"class":207,"line":236},[901],{"type":41,"tag":205,"props":902,"children":903},{},[904],{"type":47,"value":905},"        messagingBindingAddress: \"whatsapp:+15558675310\",\n",{"type":41,"tag":205,"props":907,"children":908},{"class":207,"line":245},[909],{"type":41,"tag":205,"props":910,"children":911},{},[912],{"type":47,"value":913},"        messagingBindingProxyAddress: \"whatsapp:+14155238886\",\n",{"type":41,"tag":205,"props":915,"children":916},{"class":207,"line":253},[917],{"type":41,"tag":205,"props":918,"children":919},{},[920],{"type":47,"value":741},{"type":41,"tag":50,"props":922,"children":923},{},[924],{"type":41,"tag":59,"props":925,"children":926},{},[927],{"type":47,"value":928},"Chat participant (web\u002Fmobile) — Python",{"type":41,"tag":194,"props":930,"children":932},{"className":196,"code":931,"language":198,"meta":199,"style":199},"client.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .create(identity=\"user-123\")\n",[933],{"type":41,"tag":87,"props":934,"children":935},{"__ignoreMap":199},[936,943,950,957],{"type":41,"tag":205,"props":937,"children":938},{"class":207,"line":208},[939],{"type":41,"tag":205,"props":940,"children":941},{},[942],{"type":47,"value":507},{"type":41,"tag":205,"props":944,"children":945},{"class":207,"line":217},[946],{"type":41,"tag":205,"props":947,"children":948},{},[949],{"type":47,"value":516},{"type":41,"tag":205,"props":951,"children":952},{"class":207,"line":226},[953],{"type":41,"tag":205,"props":954,"children":955},{},[956],{"type":47,"value":525},{"type":41,"tag":205,"props":958,"children":959},{"class":207,"line":236},[960],{"type":41,"tag":205,"props":961,"children":962},{},[963],{"type":47,"value":964},"    .create(identity=\"user-123\")\n",{"type":41,"tag":50,"props":966,"children":967},{},[968],{"type":41,"tag":59,"props":969,"children":970},{},[971],{"type":47,"value":972},"Chat participant (web\u002Fmobile) — Node.js",{"type":41,"tag":194,"props":974,"children":976},{"className":305,"code":975,"language":307,"meta":199,"style":199},"await client.conversations.v1\n    .conversations(conversationSid)\n    .participants.create({ identity: \"user-123\" });\n",[977],{"type":41,"tag":87,"props":978,"children":979},{"__ignoreMap":199},[980,987,994],{"type":41,"tag":205,"props":981,"children":982},{"class":207,"line":208},[983],{"type":41,"tag":205,"props":984,"children":985},{},[986],{"type":47,"value":701},{"type":41,"tag":205,"props":988,"children":989},{"class":207,"line":217},[990],{"type":41,"tag":205,"props":991,"children":992},{},[993],{"type":47,"value":890},{"type":41,"tag":205,"props":995,"children":996},{"class":207,"line":226},[997],{"type":41,"tag":205,"props":998,"children":999},{},[1000],{"type":47,"value":1001},"    .participants.create({ identity: \"user-123\" });\n",{"type":41,"tag":789,"props":1003,"children":1005},{"id":1004},"send-media-all-channels",[1006],{"type":47,"value":1007},"Send Media (All Channels)",{"type":41,"tag":50,"props":1009,"children":1010},{},[1011],{"type":41,"tag":59,"props":1012,"children":1013},{},[1014],{"type":47,"value":192},{"type":41,"tag":194,"props":1016,"children":1018},{"className":196,"code":1017,"language":198,"meta":199,"style":199},"# Send a message with media\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .messages \\\n    .create(\n        body=\"Check out this image!\",\n        author=\"support-agent\",\n        media_url=\"https:\u002F\u002Fexample.com\u002Fimage.jpg\"\n    )\n\n# Multiple media URLs (up to 10)\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .messages \\\n    .create(\n        body=\"Here are the documents\",\n        author=\"support-agent\",\n        media_url=[\n            \"https:\u002F\u002Fexample.com\u002Fdoc1.pdf\",\n            \"https:\u002F\u002Fexample.com\u002Fdoc2.pdf\"\n        ]\n    )\n",[1019],{"type":41,"tag":87,"props":1020,"children":1021},{"__ignoreMap":199},[1022,1030,1037,1044,1051,1058,1066,1074,1082,1089,1096,1104,1111,1118,1125,1132,1140,1147,1155,1163,1171,1179],{"type":41,"tag":205,"props":1023,"children":1024},{"class":207,"line":208},[1025],{"type":41,"tag":205,"props":1026,"children":1027},{},[1028],{"type":47,"value":1029},"# Send a message with media\n",{"type":41,"tag":205,"props":1031,"children":1032},{"class":207,"line":217},[1033],{"type":41,"tag":205,"props":1034,"children":1035},{},[1036],{"type":47,"value":507},{"type":41,"tag":205,"props":1038,"children":1039},{"class":207,"line":226},[1040],{"type":41,"tag":205,"props":1041,"children":1042},{},[1043],{"type":47,"value":516},{"type":41,"tag":205,"props":1045,"children":1046},{"class":207,"line":236},[1047],{"type":41,"tag":205,"props":1048,"children":1049},{},[1050],{"type":47,"value":603},{"type":41,"tag":205,"props":1052,"children":1053},{"class":207,"line":245},[1054],{"type":41,"tag":205,"props":1055,"children":1056},{},[1057],{"type":47,"value":534},{"type":41,"tag":205,"props":1059,"children":1060},{"class":207,"line":253},[1061],{"type":41,"tag":205,"props":1062,"children":1063},{},[1064],{"type":47,"value":1065},"        body=\"Check out this image!\",\n",{"type":41,"tag":205,"props":1067,"children":1068},{"class":207,"line":29},[1069],{"type":41,"tag":205,"props":1070,"children":1071},{},[1072],{"type":47,"value":1073},"        author=\"support-agent\",\n",{"type":41,"tag":205,"props":1075,"children":1076},{"class":207,"line":270},[1077],{"type":41,"tag":205,"props":1078,"children":1079},{},[1080],{"type":47,"value":1081},"        media_url=\"https:\u002F\u002Fexample.com\u002Fimage.jpg\"\n",{"type":41,"tag":205,"props":1083,"children":1084},{"class":207,"line":279},[1085],{"type":41,"tag":205,"props":1086,"children":1087},{},[1088],{"type":47,"value":561},{"type":41,"tag":205,"props":1090,"children":1091},{"class":207,"line":288},[1092],{"type":41,"tag":205,"props":1093,"children":1094},{"emptyLinePlaceholder":230},[1095],{"type":47,"value":233},{"type":41,"tag":205,"props":1097,"children":1098},{"class":207,"line":492},[1099],{"type":41,"tag":205,"props":1100,"children":1101},{},[1102],{"type":47,"value":1103},"# Multiple media URLs (up to 10)\n",{"type":41,"tag":205,"props":1105,"children":1106},{"class":207,"line":501},[1107],{"type":41,"tag":205,"props":1108,"children":1109},{},[1110],{"type":47,"value":507},{"type":41,"tag":205,"props":1112,"children":1113},{"class":207,"line":510},[1114],{"type":41,"tag":205,"props":1115,"children":1116},{},[1117],{"type":47,"value":516},{"type":41,"tag":205,"props":1119,"children":1120},{"class":207,"line":519},[1121],{"type":41,"tag":205,"props":1122,"children":1123},{},[1124],{"type":47,"value":603},{"type":41,"tag":205,"props":1126,"children":1127},{"class":207,"line":528},[1128],{"type":41,"tag":205,"props":1129,"children":1130},{},[1131],{"type":47,"value":534},{"type":41,"tag":205,"props":1133,"children":1134},{"class":207,"line":537},[1135],{"type":41,"tag":205,"props":1136,"children":1137},{},[1138],{"type":47,"value":1139},"        body=\"Here are the documents\",\n",{"type":41,"tag":205,"props":1141,"children":1142},{"class":207,"line":546},[1143],{"type":41,"tag":205,"props":1144,"children":1145},{},[1146],{"type":47,"value":1073},{"type":41,"tag":205,"props":1148,"children":1149},{"class":207,"line":555},[1150],{"type":41,"tag":205,"props":1151,"children":1152},{},[1153],{"type":47,"value":1154},"        media_url=[\n",{"type":41,"tag":205,"props":1156,"children":1157},{"class":207,"line":564},[1158],{"type":41,"tag":205,"props":1159,"children":1160},{},[1161],{"type":47,"value":1162},"            \"https:\u002F\u002Fexample.com\u002Fdoc1.pdf\",\n",{"type":41,"tag":205,"props":1164,"children":1165},{"class":207,"line":572},[1166],{"type":41,"tag":205,"props":1167,"children":1168},{},[1169],{"type":47,"value":1170},"            \"https:\u002F\u002Fexample.com\u002Fdoc2.pdf\"\n",{"type":41,"tag":205,"props":1172,"children":1173},{"class":207,"line":581},[1174],{"type":41,"tag":205,"props":1175,"children":1176},{},[1177],{"type":47,"value":1178},"        ]\n",{"type":41,"tag":205,"props":1180,"children":1181},{"class":207,"line":589},[1182],{"type":41,"tag":205,"props":1183,"children":1184},{},[1185],{"type":47,"value":561},{"type":41,"tag":50,"props":1187,"children":1188},{},[1189],{"type":41,"tag":59,"props":1190,"children":1191},{},[1192],{"type":47,"value":302},{"type":41,"tag":194,"props":1194,"children":1196},{"className":305,"code":1195,"language":307,"meta":199,"style":199},"\u002F\u002F Send a message with media\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .messages.create({\n        body: \"Check out this image!\",\n        author: \"support-agent\",\n        mediaUrl: \"https:\u002F\u002Fexample.com\u002Fimage.jpg\"\n    });\n\n\u002F\u002F Multiple media URLs (up to 10)\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .messages.create({\n        body: \"Here are the documents\",\n        author: \"support-agent\",\n        mediaUrl: [\n            \"https:\u002F\u002Fexample.com\u002Fdoc1.pdf\",\n            \"https:\u002F\u002Fexample.com\u002Fdoc2.pdf\"\n        ]\n    });\n",[1197],{"type":41,"tag":87,"props":1198,"children":1199},{"__ignoreMap":199},[1200,1208,1215,1222,1230,1238,1246,1254,1261,1268,1276,1283,1290,1297,1305,1312,1320,1327,1334,1341],{"type":41,"tag":205,"props":1201,"children":1202},{"class":207,"line":208},[1203],{"type":41,"tag":205,"props":1204,"children":1205},{},[1206],{"type":47,"value":1207},"\u002F\u002F Send a message with media\n",{"type":41,"tag":205,"props":1209,"children":1210},{"class":207,"line":217},[1211],{"type":41,"tag":205,"props":1212,"children":1213},{},[1214],{"type":47,"value":701},{"type":41,"tag":205,"props":1216,"children":1217},{"class":207,"line":226},[1218],{"type":41,"tag":205,"props":1219,"children":1220},{},[1221],{"type":47,"value":890},{"type":41,"tag":205,"props":1223,"children":1224},{"class":207,"line":236},[1225],{"type":41,"tag":205,"props":1226,"children":1227},{},[1228],{"type":47,"value":1229},"    .messages.create({\n",{"type":41,"tag":205,"props":1231,"children":1232},{"class":207,"line":245},[1233],{"type":41,"tag":205,"props":1234,"children":1235},{},[1236],{"type":47,"value":1237},"        body: \"Check out this image!\",\n",{"type":41,"tag":205,"props":1239,"children":1240},{"class":207,"line":253},[1241],{"type":41,"tag":205,"props":1242,"children":1243},{},[1244],{"type":47,"value":1245},"        author: \"support-agent\",\n",{"type":41,"tag":205,"props":1247,"children":1248},{"class":207,"line":29},[1249],{"type":41,"tag":205,"props":1250,"children":1251},{},[1252],{"type":47,"value":1253},"        mediaUrl: \"https:\u002F\u002Fexample.com\u002Fimage.jpg\"\n",{"type":41,"tag":205,"props":1255,"children":1256},{"class":207,"line":270},[1257],{"type":41,"tag":205,"props":1258,"children":1259},{},[1260],{"type":47,"value":741},{"type":41,"tag":205,"props":1262,"children":1263},{"class":207,"line":279},[1264],{"type":41,"tag":205,"props":1265,"children":1266},{"emptyLinePlaceholder":230},[1267],{"type":47,"value":233},{"type":41,"tag":205,"props":1269,"children":1270},{"class":207,"line":288},[1271],{"type":41,"tag":205,"props":1272,"children":1273},{},[1274],{"type":47,"value":1275},"\u002F\u002F Multiple media URLs (up to 10)\n",{"type":41,"tag":205,"props":1277,"children":1278},{"class":207,"line":492},[1279],{"type":41,"tag":205,"props":1280,"children":1281},{},[1282],{"type":47,"value":701},{"type":41,"tag":205,"props":1284,"children":1285},{"class":207,"line":501},[1286],{"type":41,"tag":205,"props":1287,"children":1288},{},[1289],{"type":47,"value":890},{"type":41,"tag":205,"props":1291,"children":1292},{"class":207,"line":510},[1293],{"type":41,"tag":205,"props":1294,"children":1295},{},[1296],{"type":47,"value":1229},{"type":41,"tag":205,"props":1298,"children":1299},{"class":207,"line":519},[1300],{"type":41,"tag":205,"props":1301,"children":1302},{},[1303],{"type":47,"value":1304},"        body: \"Here are the documents\",\n",{"type":41,"tag":205,"props":1306,"children":1307},{"class":207,"line":528},[1308],{"type":41,"tag":205,"props":1309,"children":1310},{},[1311],{"type":47,"value":1245},{"type":41,"tag":205,"props":1313,"children":1314},{"class":207,"line":537},[1315],{"type":41,"tag":205,"props":1316,"children":1317},{},[1318],{"type":47,"value":1319},"        mediaUrl: [\n",{"type":41,"tag":205,"props":1321,"children":1322},{"class":207,"line":546},[1323],{"type":41,"tag":205,"props":1324,"children":1325},{},[1326],{"type":47,"value":1162},{"type":41,"tag":205,"props":1328,"children":1329},{"class":207,"line":555},[1330],{"type":41,"tag":205,"props":1331,"children":1332},{},[1333],{"type":47,"value":1170},{"type":41,"tag":205,"props":1335,"children":1336},{"class":207,"line":564},[1337],{"type":41,"tag":205,"props":1338,"children":1339},{},[1340],{"type":47,"value":1178},{"type":41,"tag":205,"props":1342,"children":1343},{"class":207,"line":572},[1344],{"type":41,"tag":205,"props":1345,"children":1346},{},[1347],{"type":47,"value":741},{"type":41,"tag":50,"props":1349,"children":1350},{},[1351],{"type":47,"value":1352},"Media must be publicly accessible URLs. Supported: JPG, PNG, GIF, PDF, vCard. Max 10 URLs per message. Works across all channels: SMS (as MMS), WhatsApp, and chat participants all receive media.",{"type":41,"tag":789,"props":1354,"children":1356},{"id":1355},"add-multiple-participants",[1357],{"type":47,"value":1358},"Add Multiple Participants",{"type":41,"tag":50,"props":1360,"children":1361},{},[1362],{"type":41,"tag":59,"props":1363,"children":1364},{},[1365],{"type":47,"value":192},{"type":41,"tag":194,"props":1367,"children":1369},{"className":196,"code":1368,"language":198,"meta":199,"style":199},"# Add multiple SMS participants to a conversation\nparticipant_numbers = [\n    \"+15558675310\",\n    \"+15558675311\",\n    \"+15558675312\"\n]\n\ntwilio_number = \"+15017122661\"\n\nfor phone_number in participant_numbers:\n    client.conversations.v1 \\\n        .conversations(conversation.sid) \\\n        .participants \\\n        .create(\n            messaging_binding_address=phone_number,\n            messaging_binding_proxy_address=twilio_number\n        )\n",[1370],{"type":41,"tag":87,"props":1371,"children":1372},{"__ignoreMap":199},[1373,1381,1389,1397,1405,1413,1421,1428,1436,1443,1451,1459,1467,1475,1483,1491,1499],{"type":41,"tag":205,"props":1374,"children":1375},{"class":207,"line":208},[1376],{"type":41,"tag":205,"props":1377,"children":1378},{},[1379],{"type":47,"value":1380},"# Add multiple SMS participants to a conversation\n",{"type":41,"tag":205,"props":1382,"children":1383},{"class":207,"line":217},[1384],{"type":41,"tag":205,"props":1385,"children":1386},{},[1387],{"type":47,"value":1388},"participant_numbers = [\n",{"type":41,"tag":205,"props":1390,"children":1391},{"class":207,"line":226},[1392],{"type":41,"tag":205,"props":1393,"children":1394},{},[1395],{"type":47,"value":1396},"    \"+15558675310\",\n",{"type":41,"tag":205,"props":1398,"children":1399},{"class":207,"line":236},[1400],{"type":41,"tag":205,"props":1401,"children":1402},{},[1403],{"type":47,"value":1404},"    \"+15558675311\",\n",{"type":41,"tag":205,"props":1406,"children":1407},{"class":207,"line":245},[1408],{"type":41,"tag":205,"props":1409,"children":1410},{},[1411],{"type":47,"value":1412},"    \"+15558675312\"\n",{"type":41,"tag":205,"props":1414,"children":1415},{"class":207,"line":253},[1416],{"type":41,"tag":205,"props":1417,"children":1418},{},[1419],{"type":47,"value":1420},"]\n",{"type":41,"tag":205,"props":1422,"children":1423},{"class":207,"line":29},[1424],{"type":41,"tag":205,"props":1425,"children":1426},{"emptyLinePlaceholder":230},[1427],{"type":47,"value":233},{"type":41,"tag":205,"props":1429,"children":1430},{"class":207,"line":270},[1431],{"type":41,"tag":205,"props":1432,"children":1433},{},[1434],{"type":47,"value":1435},"twilio_number = \"+15017122661\"\n",{"type":41,"tag":205,"props":1437,"children":1438},{"class":207,"line":279},[1439],{"type":41,"tag":205,"props":1440,"children":1441},{"emptyLinePlaceholder":230},[1442],{"type":47,"value":233},{"type":41,"tag":205,"props":1444,"children":1445},{"class":207,"line":288},[1446],{"type":41,"tag":205,"props":1447,"children":1448},{},[1449],{"type":47,"value":1450},"for phone_number in participant_numbers:\n",{"type":41,"tag":205,"props":1452,"children":1453},{"class":207,"line":492},[1454],{"type":41,"tag":205,"props":1455,"children":1456},{},[1457],{"type":47,"value":1458},"    client.conversations.v1 \\\n",{"type":41,"tag":205,"props":1460,"children":1461},{"class":207,"line":501},[1462],{"type":41,"tag":205,"props":1463,"children":1464},{},[1465],{"type":47,"value":1466},"        .conversations(conversation.sid) \\\n",{"type":41,"tag":205,"props":1468,"children":1469},{"class":207,"line":510},[1470],{"type":41,"tag":205,"props":1471,"children":1472},{},[1473],{"type":47,"value":1474},"        .participants \\\n",{"type":41,"tag":205,"props":1476,"children":1477},{"class":207,"line":519},[1478],{"type":41,"tag":205,"props":1479,"children":1480},{},[1481],{"type":47,"value":1482},"        .create(\n",{"type":41,"tag":205,"props":1484,"children":1485},{"class":207,"line":528},[1486],{"type":41,"tag":205,"props":1487,"children":1488},{},[1489],{"type":47,"value":1490},"            messaging_binding_address=phone_number,\n",{"type":41,"tag":205,"props":1492,"children":1493},{"class":207,"line":537},[1494],{"type":41,"tag":205,"props":1495,"children":1496},{},[1497],{"type":47,"value":1498},"            messaging_binding_proxy_address=twilio_number\n",{"type":41,"tag":205,"props":1500,"children":1501},{"class":207,"line":546},[1502],{"type":41,"tag":205,"props":1503,"children":1504},{},[1505],{"type":47,"value":1506},"        )\n",{"type":41,"tag":50,"props":1508,"children":1509},{},[1510],{"type":41,"tag":59,"props":1511,"children":1512},{},[1513],{"type":47,"value":302},{"type":41,"tag":194,"props":1515,"children":1517},{"className":305,"code":1516,"language":307,"meta":199,"style":199},"\u002F\u002F Add multiple SMS participants to a conversation\nconst participantNumbers = [\n    \"+15558675310\",\n    \"+15558675311\",\n    \"+15558675312\"\n];\n\nconst twilioNumber = \"+15017122661\";\n\nfor (const phoneNumber of participantNumbers) {\n    await client.conversations.v1\n        .conversations(conversationSid)\n        .participants.create({\n            messagingBindingAddress: phoneNumber,\n            messagingBindingProxyAddress: twilioNumber\n        });\n}\n",[1518],{"type":41,"tag":87,"props":1519,"children":1520},{"__ignoreMap":199},[1521,1529,1537,1544,1551,1558,1566,1573,1581,1588,1596,1604,1612,1620,1628,1636,1644],{"type":41,"tag":205,"props":1522,"children":1523},{"class":207,"line":208},[1524],{"type":41,"tag":205,"props":1525,"children":1526},{},[1527],{"type":47,"value":1528},"\u002F\u002F Add multiple SMS participants to a conversation\n",{"type":41,"tag":205,"props":1530,"children":1531},{"class":207,"line":217},[1532],{"type":41,"tag":205,"props":1533,"children":1534},{},[1535],{"type":47,"value":1536},"const participantNumbers = [\n",{"type":41,"tag":205,"props":1538,"children":1539},{"class":207,"line":226},[1540],{"type":41,"tag":205,"props":1541,"children":1542},{},[1543],{"type":47,"value":1396},{"type":41,"tag":205,"props":1545,"children":1546},{"class":207,"line":236},[1547],{"type":41,"tag":205,"props":1548,"children":1549},{},[1550],{"type":47,"value":1404},{"type":41,"tag":205,"props":1552,"children":1553},{"class":207,"line":245},[1554],{"type":41,"tag":205,"props":1555,"children":1556},{},[1557],{"type":47,"value":1412},{"type":41,"tag":205,"props":1559,"children":1560},{"class":207,"line":253},[1561],{"type":41,"tag":205,"props":1562,"children":1563},{},[1564],{"type":47,"value":1565},"];\n",{"type":41,"tag":205,"props":1567,"children":1568},{"class":207,"line":29},[1569],{"type":41,"tag":205,"props":1570,"children":1571},{"emptyLinePlaceholder":230},[1572],{"type":47,"value":233},{"type":41,"tag":205,"props":1574,"children":1575},{"class":207,"line":270},[1576],{"type":41,"tag":205,"props":1577,"children":1578},{},[1579],{"type":47,"value":1580},"const twilioNumber = \"+15017122661\";\n",{"type":41,"tag":205,"props":1582,"children":1583},{"class":207,"line":279},[1584],{"type":41,"tag":205,"props":1585,"children":1586},{"emptyLinePlaceholder":230},[1587],{"type":47,"value":233},{"type":41,"tag":205,"props":1589,"children":1590},{"class":207,"line":288},[1591],{"type":41,"tag":205,"props":1592,"children":1593},{},[1594],{"type":47,"value":1595},"for (const phoneNumber of participantNumbers) {\n",{"type":41,"tag":205,"props":1597,"children":1598},{"class":207,"line":492},[1599],{"type":41,"tag":205,"props":1600,"children":1601},{},[1602],{"type":47,"value":1603},"    await client.conversations.v1\n",{"type":41,"tag":205,"props":1605,"children":1606},{"class":207,"line":501},[1607],{"type":41,"tag":205,"props":1608,"children":1609},{},[1610],{"type":47,"value":1611},"        .conversations(conversationSid)\n",{"type":41,"tag":205,"props":1613,"children":1614},{"class":207,"line":510},[1615],{"type":41,"tag":205,"props":1616,"children":1617},{},[1618],{"type":47,"value":1619},"        .participants.create({\n",{"type":41,"tag":205,"props":1621,"children":1622},{"class":207,"line":519},[1623],{"type":41,"tag":205,"props":1624,"children":1625},{},[1626],{"type":47,"value":1627},"            messagingBindingAddress: phoneNumber,\n",{"type":41,"tag":205,"props":1629,"children":1630},{"class":207,"line":528},[1631],{"type":41,"tag":205,"props":1632,"children":1633},{},[1634],{"type":47,"value":1635},"            messagingBindingProxyAddress: twilioNumber\n",{"type":41,"tag":205,"props":1637,"children":1638},{"class":207,"line":537},[1639],{"type":41,"tag":205,"props":1640,"children":1641},{},[1642],{"type":47,"value":1643},"        });\n",{"type":41,"tag":205,"props":1645,"children":1646},{"class":207,"line":546},[1647],{"type":41,"tag":205,"props":1648,"children":1649},{},[1650],{"type":47,"value":1651},"}\n",{"type":41,"tag":789,"props":1653,"children":1655},{"id":1654},"fetch-message-history",[1656],{"type":47,"value":1657},"Fetch Message History",{"type":41,"tag":50,"props":1659,"children":1660},{},[1661],{"type":41,"tag":59,"props":1662,"children":1663},{},[1664],{"type":47,"value":192},{"type":41,"tag":194,"props":1666,"children":1668},{"className":196,"code":1667,"language":198,"meta":199,"style":199},"# Get all messages from a conversation\nmessages = client.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .messages \\\n    .list(limit=50)\n\nfor message in messages:\n    print(f\"{message.author}: {message.body}\")\n",[1669],{"type":41,"tag":87,"props":1670,"children":1671},{"__ignoreMap":199},[1672,1680,1688,1695,1702,1710,1717,1725],{"type":41,"tag":205,"props":1673,"children":1674},{"class":207,"line":208},[1675],{"type":41,"tag":205,"props":1676,"children":1677},{},[1678],{"type":47,"value":1679},"# Get all messages from a conversation\n",{"type":41,"tag":205,"props":1681,"children":1682},{"class":207,"line":217},[1683],{"type":41,"tag":205,"props":1684,"children":1685},{},[1686],{"type":47,"value":1687},"messages = client.conversations.v1 \\\n",{"type":41,"tag":205,"props":1689,"children":1690},{"class":207,"line":226},[1691],{"type":41,"tag":205,"props":1692,"children":1693},{},[1694],{"type":47,"value":516},{"type":41,"tag":205,"props":1696,"children":1697},{"class":207,"line":236},[1698],{"type":41,"tag":205,"props":1699,"children":1700},{},[1701],{"type":47,"value":603},{"type":41,"tag":205,"props":1703,"children":1704},{"class":207,"line":245},[1705],{"type":41,"tag":205,"props":1706,"children":1707},{},[1708],{"type":47,"value":1709},"    .list(limit=50)\n",{"type":41,"tag":205,"props":1711,"children":1712},{"class":207,"line":253},[1713],{"type":41,"tag":205,"props":1714,"children":1715},{"emptyLinePlaceholder":230},[1716],{"type":47,"value":233},{"type":41,"tag":205,"props":1718,"children":1719},{"class":207,"line":29},[1720],{"type":41,"tag":205,"props":1721,"children":1722},{},[1723],{"type":47,"value":1724},"for message in messages:\n",{"type":41,"tag":205,"props":1726,"children":1727},{"class":207,"line":270},[1728],{"type":41,"tag":205,"props":1729,"children":1730},{},[1731],{"type":47,"value":1732},"    print(f\"{message.author}: {message.body}\")\n",{"type":41,"tag":50,"props":1734,"children":1735},{},[1736],{"type":41,"tag":59,"props":1737,"children":1738},{},[1739],{"type":47,"value":302},{"type":41,"tag":194,"props":1741,"children":1743},{"className":305,"code":1742,"language":307,"meta":199,"style":199},"\u002F\u002F Get all messages from a conversation\nconst messages = await client.conversations.v1\n    .conversations(conversationSid)\n    .messages\n    .list({ limit: 50 });\n\nmessages.forEach(message => {\n    console.log(`${message.author}: ${message.body}`);\n});\n",[1744],{"type":41,"tag":87,"props":1745,"children":1746},{"__ignoreMap":199},[1747,1755,1763,1770,1778,1786,1793,1801,1809],{"type":41,"tag":205,"props":1748,"children":1749},{"class":207,"line":208},[1750],{"type":41,"tag":205,"props":1751,"children":1752},{},[1753],{"type":47,"value":1754},"\u002F\u002F Get all messages from a conversation\n",{"type":41,"tag":205,"props":1756,"children":1757},{"class":207,"line":217},[1758],{"type":41,"tag":205,"props":1759,"children":1760},{},[1761],{"type":47,"value":1762},"const messages = await client.conversations.v1\n",{"type":41,"tag":205,"props":1764,"children":1765},{"class":207,"line":226},[1766],{"type":41,"tag":205,"props":1767,"children":1768},{},[1769],{"type":47,"value":890},{"type":41,"tag":205,"props":1771,"children":1772},{"class":207,"line":236},[1773],{"type":41,"tag":205,"props":1774,"children":1775},{},[1776],{"type":47,"value":1777},"    .messages\n",{"type":41,"tag":205,"props":1779,"children":1780},{"class":207,"line":245},[1781],{"type":41,"tag":205,"props":1782,"children":1783},{},[1784],{"type":47,"value":1785},"    .list({ limit: 50 });\n",{"type":41,"tag":205,"props":1787,"children":1788},{"class":207,"line":253},[1789],{"type":41,"tag":205,"props":1790,"children":1791},{"emptyLinePlaceholder":230},[1792],{"type":47,"value":233},{"type":41,"tag":205,"props":1794,"children":1795},{"class":207,"line":29},[1796],{"type":41,"tag":205,"props":1797,"children":1798},{},[1799],{"type":47,"value":1800},"messages.forEach(message => {\n",{"type":41,"tag":205,"props":1802,"children":1803},{"class":207,"line":270},[1804],{"type":41,"tag":205,"props":1805,"children":1806},{},[1807],{"type":47,"value":1808},"    console.log(`${message.author}: ${message.body}`);\n",{"type":41,"tag":205,"props":1810,"children":1811},{"class":207,"line":279},[1812],{"type":41,"tag":205,"props":1813,"children":1814},{},[1815],{"type":47,"value":366},{"type":41,"tag":789,"props":1817,"children":1819},{"id":1818},"list-conversations",[1820],{"type":47,"value":1821},"List Conversations",{"type":41,"tag":50,"props":1823,"children":1824},{},[1825],{"type":41,"tag":59,"props":1826,"children":1827},{},[1828],{"type":47,"value":192},{"type":41,"tag":194,"props":1830,"children":1832},{"className":196,"code":1831,"language":198,"meta":199,"style":199},"# List all conversations\nconversations = client.conversations.v1.conversations.list(limit=20)\n\nfor conv in conversations:\n    print(f\"{conv.friendly_name} - {conv.sid}\")\n\n# Filter by state\nactive_conversations = client.conversations.v1.conversations.list(\n    state=\"active\",\n    limit=20\n)\n",[1833],{"type":41,"tag":87,"props":1834,"children":1835},{"__ignoreMap":199},[1836,1844,1852,1859,1867,1875,1882,1890,1898,1906,1914],{"type":41,"tag":205,"props":1837,"children":1838},{"class":207,"line":208},[1839],{"type":41,"tag":205,"props":1840,"children":1841},{},[1842],{"type":47,"value":1843},"# List all conversations\n",{"type":41,"tag":205,"props":1845,"children":1846},{"class":207,"line":217},[1847],{"type":41,"tag":205,"props":1848,"children":1849},{},[1850],{"type":47,"value":1851},"conversations = client.conversations.v1.conversations.list(limit=20)\n",{"type":41,"tag":205,"props":1853,"children":1854},{"class":207,"line":226},[1855],{"type":41,"tag":205,"props":1856,"children":1857},{"emptyLinePlaceholder":230},[1858],{"type":47,"value":233},{"type":41,"tag":205,"props":1860,"children":1861},{"class":207,"line":236},[1862],{"type":41,"tag":205,"props":1863,"children":1864},{},[1865],{"type":47,"value":1866},"for conv in conversations:\n",{"type":41,"tag":205,"props":1868,"children":1869},{"class":207,"line":245},[1870],{"type":41,"tag":205,"props":1871,"children":1872},{},[1873],{"type":47,"value":1874},"    print(f\"{conv.friendly_name} - {conv.sid}\")\n",{"type":41,"tag":205,"props":1876,"children":1877},{"class":207,"line":253},[1878],{"type":41,"tag":205,"props":1879,"children":1880},{"emptyLinePlaceholder":230},[1881],{"type":47,"value":233},{"type":41,"tag":205,"props":1883,"children":1884},{"class":207,"line":29},[1885],{"type":41,"tag":205,"props":1886,"children":1887},{},[1888],{"type":47,"value":1889},"# Filter by state\n",{"type":41,"tag":205,"props":1891,"children":1892},{"class":207,"line":270},[1893],{"type":41,"tag":205,"props":1894,"children":1895},{},[1896],{"type":47,"value":1897},"active_conversations = client.conversations.v1.conversations.list(\n",{"type":41,"tag":205,"props":1899,"children":1900},{"class":207,"line":279},[1901],{"type":41,"tag":205,"props":1902,"children":1903},{},[1904],{"type":47,"value":1905},"    state=\"active\",\n",{"type":41,"tag":205,"props":1907,"children":1908},{"class":207,"line":288},[1909],{"type":41,"tag":205,"props":1910,"children":1911},{},[1912],{"type":47,"value":1913},"    limit=20\n",{"type":41,"tag":205,"props":1915,"children":1916},{"class":207,"line":492},[1917],{"type":41,"tag":205,"props":1918,"children":1919},{},[1920],{"type":47,"value":285},{"type":41,"tag":50,"props":1922,"children":1923},{},[1924],{"type":41,"tag":59,"props":1925,"children":1926},{},[1927],{"type":47,"value":302},{"type":41,"tag":194,"props":1929,"children":1931},{"className":305,"code":1930,"language":307,"meta":199,"style":199},"\u002F\u002F List all conversations\nconst conversations = await client.conversations.v1.conversations.list({ limit: 20 });\n\nconversations.forEach(conv => {\n    console.log(`${conv.friendlyName} - ${conv.sid}`);\n});\n\n\u002F\u002F Filter by state\nconst activeConversations = await client.conversations.v1.conversations.list({\n    state: \"active\",\n    limit: 20\n});\n",[1932],{"type":41,"tag":87,"props":1933,"children":1934},{"__ignoreMap":199},[1935,1943,1951,1958,1966,1974,1981,1988,1996,2004,2012,2020],{"type":41,"tag":205,"props":1936,"children":1937},{"class":207,"line":208},[1938],{"type":41,"tag":205,"props":1939,"children":1940},{},[1941],{"type":47,"value":1942},"\u002F\u002F List all conversations\n",{"type":41,"tag":205,"props":1944,"children":1945},{"class":207,"line":217},[1946],{"type":41,"tag":205,"props":1947,"children":1948},{},[1949],{"type":47,"value":1950},"const conversations = await client.conversations.v1.conversations.list({ limit: 20 });\n",{"type":41,"tag":205,"props":1952,"children":1953},{"class":207,"line":226},[1954],{"type":41,"tag":205,"props":1955,"children":1956},{"emptyLinePlaceholder":230},[1957],{"type":47,"value":233},{"type":41,"tag":205,"props":1959,"children":1960},{"class":207,"line":236},[1961],{"type":41,"tag":205,"props":1962,"children":1963},{},[1964],{"type":47,"value":1965},"conversations.forEach(conv => {\n",{"type":41,"tag":205,"props":1967,"children":1968},{"class":207,"line":245},[1969],{"type":41,"tag":205,"props":1970,"children":1971},{},[1972],{"type":47,"value":1973},"    console.log(`${conv.friendlyName} - ${conv.sid}`);\n",{"type":41,"tag":205,"props":1975,"children":1976},{"class":207,"line":253},[1977],{"type":41,"tag":205,"props":1978,"children":1979},{},[1980],{"type":47,"value":366},{"type":41,"tag":205,"props":1982,"children":1983},{"class":207,"line":29},[1984],{"type":41,"tag":205,"props":1985,"children":1986},{"emptyLinePlaceholder":230},[1987],{"type":47,"value":233},{"type":41,"tag":205,"props":1989,"children":1990},{"class":207,"line":270},[1991],{"type":41,"tag":205,"props":1992,"children":1993},{},[1994],{"type":47,"value":1995},"\u002F\u002F Filter by state\n",{"type":41,"tag":205,"props":1997,"children":1998},{"class":207,"line":279},[1999],{"type":41,"tag":205,"props":2000,"children":2001},{},[2002],{"type":47,"value":2003},"const activeConversations = await client.conversations.v1.conversations.list({\n",{"type":41,"tag":205,"props":2005,"children":2006},{"class":207,"line":288},[2007],{"type":41,"tag":205,"props":2008,"children":2009},{},[2010],{"type":47,"value":2011},"    state: \"active\",\n",{"type":41,"tag":205,"props":2013,"children":2014},{"class":207,"line":492},[2015],{"type":41,"tag":205,"props":2016,"children":2017},{},[2018],{"type":47,"value":2019},"    limit: 20\n",{"type":41,"tag":205,"props":2021,"children":2022},{"class":207,"line":501},[2023],{"type":41,"tag":205,"props":2024,"children":2025},{},[2026],{"type":47,"value":366},{"type":41,"tag":789,"props":2028,"children":2030},{"id":2029},"remove-participants",[2031],{"type":47,"value":2032},"Remove Participants",{"type":41,"tag":50,"props":2034,"children":2035},{},[2036],{"type":41,"tag":59,"props":2037,"children":2038},{},[2039],{"type":47,"value":192},{"type":41,"tag":194,"props":2041,"children":2043},{"className":196,"code":2042,"language":198,"meta":199,"style":199},"# Remove a participant by participant SID\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants(participant_sid) \\\n    .delete()\n\n# Find and remove by phone number\nparticipants = client.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .list()\n\nfor p in participants:\n    if p.messaging_binding and p.messaging_binding.get(\"address\") == \"+15558675310\":\n        client.conversations.v1 \\\n            .conversations(conversation.sid) \\\n            .participants(p.sid) \\\n            .delete()\n",[2044],{"type":41,"tag":87,"props":2045,"children":2046},{"__ignoreMap":199},[2047,2055,2062,2069,2077,2085,2092,2100,2108,2115,2122,2130,2137,2145,2153,2161,2169,2177],{"type":41,"tag":205,"props":2048,"children":2049},{"class":207,"line":208},[2050],{"type":41,"tag":205,"props":2051,"children":2052},{},[2053],{"type":47,"value":2054},"# Remove a participant by participant SID\n",{"type":41,"tag":205,"props":2056,"children":2057},{"class":207,"line":217},[2058],{"type":41,"tag":205,"props":2059,"children":2060},{},[2061],{"type":47,"value":507},{"type":41,"tag":205,"props":2063,"children":2064},{"class":207,"line":226},[2065],{"type":41,"tag":205,"props":2066,"children":2067},{},[2068],{"type":47,"value":516},{"type":41,"tag":205,"props":2070,"children":2071},{"class":207,"line":236},[2072],{"type":41,"tag":205,"props":2073,"children":2074},{},[2075],{"type":47,"value":2076},"    .participants(participant_sid) \\\n",{"type":41,"tag":205,"props":2078,"children":2079},{"class":207,"line":245},[2080],{"type":41,"tag":205,"props":2081,"children":2082},{},[2083],{"type":47,"value":2084},"    .delete()\n",{"type":41,"tag":205,"props":2086,"children":2087},{"class":207,"line":253},[2088],{"type":41,"tag":205,"props":2089,"children":2090},{"emptyLinePlaceholder":230},[2091],{"type":47,"value":233},{"type":41,"tag":205,"props":2093,"children":2094},{"class":207,"line":29},[2095],{"type":41,"tag":205,"props":2096,"children":2097},{},[2098],{"type":47,"value":2099},"# Find and remove by phone number\n",{"type":41,"tag":205,"props":2101,"children":2102},{"class":207,"line":270},[2103],{"type":41,"tag":205,"props":2104,"children":2105},{},[2106],{"type":47,"value":2107},"participants = client.conversations.v1 \\\n",{"type":41,"tag":205,"props":2109,"children":2110},{"class":207,"line":279},[2111],{"type":41,"tag":205,"props":2112,"children":2113},{},[2114],{"type":47,"value":516},{"type":41,"tag":205,"props":2116,"children":2117},{"class":207,"line":288},[2118],{"type":41,"tag":205,"props":2119,"children":2120},{},[2121],{"type":47,"value":525},{"type":41,"tag":205,"props":2123,"children":2124},{"class":207,"line":492},[2125],{"type":41,"tag":205,"props":2126,"children":2127},{},[2128],{"type":47,"value":2129},"    .list()\n",{"type":41,"tag":205,"props":2131,"children":2132},{"class":207,"line":501},[2133],{"type":41,"tag":205,"props":2134,"children":2135},{"emptyLinePlaceholder":230},[2136],{"type":47,"value":233},{"type":41,"tag":205,"props":2138,"children":2139},{"class":207,"line":510},[2140],{"type":41,"tag":205,"props":2141,"children":2142},{},[2143],{"type":47,"value":2144},"for p in participants:\n",{"type":41,"tag":205,"props":2146,"children":2147},{"class":207,"line":519},[2148],{"type":41,"tag":205,"props":2149,"children":2150},{},[2151],{"type":47,"value":2152},"    if p.messaging_binding and p.messaging_binding.get(\"address\") == \"+15558675310\":\n",{"type":41,"tag":205,"props":2154,"children":2155},{"class":207,"line":528},[2156],{"type":41,"tag":205,"props":2157,"children":2158},{},[2159],{"type":47,"value":2160},"        client.conversations.v1 \\\n",{"type":41,"tag":205,"props":2162,"children":2163},{"class":207,"line":537},[2164],{"type":41,"tag":205,"props":2165,"children":2166},{},[2167],{"type":47,"value":2168},"            .conversations(conversation.sid) \\\n",{"type":41,"tag":205,"props":2170,"children":2171},{"class":207,"line":546},[2172],{"type":41,"tag":205,"props":2173,"children":2174},{},[2175],{"type":47,"value":2176},"            .participants(p.sid) \\\n",{"type":41,"tag":205,"props":2178,"children":2179},{"class":207,"line":555},[2180],{"type":41,"tag":205,"props":2181,"children":2182},{},[2183],{"type":47,"value":2184},"            .delete()\n",{"type":41,"tag":50,"props":2186,"children":2187},{},[2188],{"type":41,"tag":59,"props":2189,"children":2190},{},[2191],{"type":47,"value":302},{"type":41,"tag":194,"props":2193,"children":2195},{"className":305,"code":2194,"language":307,"meta":199,"style":199},"\u002F\u002F Remove a participant by participant SID\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .participants(participantSid)\n    .remove();\n\n\u002F\u002F Find and remove by phone number\nconst participants = await client.conversations.v1\n    .conversations(conversationSid)\n    .participants\n    .list();\n\nfor (const p of participants) {\n    if (p.messagingBinding?.address === \"+15558675310\") {\n        await client.conversations.v1\n            .conversations(conversationSid)\n            .participants(p.sid)\n            .remove();\n    }\n}\n",[2196],{"type":41,"tag":87,"props":2197,"children":2198},{"__ignoreMap":199},[2199,2207,2214,2221,2229,2237,2244,2252,2260,2267,2275,2283,2290,2298,2306,2314,2322,2330,2338,2346],{"type":41,"tag":205,"props":2200,"children":2201},{"class":207,"line":208},[2202],{"type":41,"tag":205,"props":2203,"children":2204},{},[2205],{"type":47,"value":2206},"\u002F\u002F Remove a participant by participant SID\n",{"type":41,"tag":205,"props":2208,"children":2209},{"class":207,"line":217},[2210],{"type":41,"tag":205,"props":2211,"children":2212},{},[2213],{"type":47,"value":701},{"type":41,"tag":205,"props":2215,"children":2216},{"class":207,"line":226},[2217],{"type":41,"tag":205,"props":2218,"children":2219},{},[2220],{"type":47,"value":890},{"type":41,"tag":205,"props":2222,"children":2223},{"class":207,"line":236},[2224],{"type":41,"tag":205,"props":2225,"children":2226},{},[2227],{"type":47,"value":2228},"    .participants(participantSid)\n",{"type":41,"tag":205,"props":2230,"children":2231},{"class":207,"line":245},[2232],{"type":41,"tag":205,"props":2233,"children":2234},{},[2235],{"type":47,"value":2236},"    .remove();\n",{"type":41,"tag":205,"props":2238,"children":2239},{"class":207,"line":253},[2240],{"type":41,"tag":205,"props":2241,"children":2242},{"emptyLinePlaceholder":230},[2243],{"type":47,"value":233},{"type":41,"tag":205,"props":2245,"children":2246},{"class":207,"line":29},[2247],{"type":41,"tag":205,"props":2248,"children":2249},{},[2250],{"type":47,"value":2251},"\u002F\u002F Find and remove by phone number\n",{"type":41,"tag":205,"props":2253,"children":2254},{"class":207,"line":270},[2255],{"type":41,"tag":205,"props":2256,"children":2257},{},[2258],{"type":47,"value":2259},"const participants = await client.conversations.v1\n",{"type":41,"tag":205,"props":2261,"children":2262},{"class":207,"line":279},[2263],{"type":41,"tag":205,"props":2264,"children":2265},{},[2266],{"type":47,"value":890},{"type":41,"tag":205,"props":2268,"children":2269},{"class":207,"line":288},[2270],{"type":41,"tag":205,"props":2271,"children":2272},{},[2273],{"type":47,"value":2274},"    .participants\n",{"type":41,"tag":205,"props":2276,"children":2277},{"class":207,"line":492},[2278],{"type":41,"tag":205,"props":2279,"children":2280},{},[2281],{"type":47,"value":2282},"    .list();\n",{"type":41,"tag":205,"props":2284,"children":2285},{"class":207,"line":501},[2286],{"type":41,"tag":205,"props":2287,"children":2288},{"emptyLinePlaceholder":230},[2289],{"type":47,"value":233},{"type":41,"tag":205,"props":2291,"children":2292},{"class":207,"line":510},[2293],{"type":41,"tag":205,"props":2294,"children":2295},{},[2296],{"type":47,"value":2297},"for (const p of participants) {\n",{"type":41,"tag":205,"props":2299,"children":2300},{"class":207,"line":519},[2301],{"type":41,"tag":205,"props":2302,"children":2303},{},[2304],{"type":47,"value":2305},"    if (p.messagingBinding?.address === \"+15558675310\") {\n",{"type":41,"tag":205,"props":2307,"children":2308},{"class":207,"line":528},[2309],{"type":41,"tag":205,"props":2310,"children":2311},{},[2312],{"type":47,"value":2313},"        await client.conversations.v1\n",{"type":41,"tag":205,"props":2315,"children":2316},{"class":207,"line":537},[2317],{"type":41,"tag":205,"props":2318,"children":2319},{},[2320],{"type":47,"value":2321},"            .conversations(conversationSid)\n",{"type":41,"tag":205,"props":2323,"children":2324},{"class":207,"line":546},[2325],{"type":41,"tag":205,"props":2326,"children":2327},{},[2328],{"type":47,"value":2329},"            .participants(p.sid)\n",{"type":41,"tag":205,"props":2331,"children":2332},{"class":207,"line":555},[2333],{"type":41,"tag":205,"props":2334,"children":2335},{},[2336],{"type":47,"value":2337},"            .remove();\n",{"type":41,"tag":205,"props":2339,"children":2340},{"class":207,"line":564},[2341],{"type":41,"tag":205,"props":2342,"children":2343},{},[2344],{"type":47,"value":2345},"    }\n",{"type":41,"tag":205,"props":2347,"children":2348},{"class":207,"line":572},[2349],{"type":41,"tag":205,"props":2350,"children":2351},{},[2352],{"type":47,"value":1651},{"type":41,"tag":789,"props":2354,"children":2356},{"id":2355},"closecomplete-conversations",[2357],{"type":47,"value":2358},"Close\u002FComplete Conversations",{"type":41,"tag":50,"props":2360,"children":2361},{},[2362],{"type":41,"tag":59,"props":2363,"children":2364},{},[2365],{"type":47,"value":192},{"type":41,"tag":194,"props":2367,"children":2369},{"className":196,"code":2368,"language":198,"meta":199,"style":199},"# Close a conversation (marks it inactive)\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .update(state=\"closed\")\n\n# Delete a conversation completely\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .delete()\n",[2370],{"type":41,"tag":87,"props":2371,"children":2372},{"__ignoreMap":199},[2373,2381,2388,2395,2403,2410,2418,2425,2432],{"type":41,"tag":205,"props":2374,"children":2375},{"class":207,"line":208},[2376],{"type":41,"tag":205,"props":2377,"children":2378},{},[2379],{"type":47,"value":2380},"# Close a conversation (marks it inactive)\n",{"type":41,"tag":205,"props":2382,"children":2383},{"class":207,"line":217},[2384],{"type":41,"tag":205,"props":2385,"children":2386},{},[2387],{"type":47,"value":507},{"type":41,"tag":205,"props":2389,"children":2390},{"class":207,"line":226},[2391],{"type":41,"tag":205,"props":2392,"children":2393},{},[2394],{"type":47,"value":516},{"type":41,"tag":205,"props":2396,"children":2397},{"class":207,"line":236},[2398],{"type":41,"tag":205,"props":2399,"children":2400},{},[2401],{"type":47,"value":2402},"    .update(state=\"closed\")\n",{"type":41,"tag":205,"props":2404,"children":2405},{"class":207,"line":245},[2406],{"type":41,"tag":205,"props":2407,"children":2408},{"emptyLinePlaceholder":230},[2409],{"type":47,"value":233},{"type":41,"tag":205,"props":2411,"children":2412},{"class":207,"line":253},[2413],{"type":41,"tag":205,"props":2414,"children":2415},{},[2416],{"type":47,"value":2417},"# Delete a conversation completely\n",{"type":41,"tag":205,"props":2419,"children":2420},{"class":207,"line":29},[2421],{"type":41,"tag":205,"props":2422,"children":2423},{},[2424],{"type":47,"value":507},{"type":41,"tag":205,"props":2426,"children":2427},{"class":207,"line":270},[2428],{"type":41,"tag":205,"props":2429,"children":2430},{},[2431],{"type":47,"value":516},{"type":41,"tag":205,"props":2433,"children":2434},{"class":207,"line":279},[2435],{"type":41,"tag":205,"props":2436,"children":2437},{},[2438],{"type":47,"value":2084},{"type":41,"tag":50,"props":2440,"children":2441},{},[2442],{"type":41,"tag":59,"props":2443,"children":2444},{},[2445],{"type":47,"value":302},{"type":41,"tag":194,"props":2447,"children":2449},{"className":305,"code":2448,"language":307,"meta":199,"style":199},"\u002F\u002F Close a conversation (marks it inactive)\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .update({ state: \"closed\" });\n\n\u002F\u002F Delete a conversation completely\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .remove();\n",[2450],{"type":41,"tag":87,"props":2451,"children":2452},{"__ignoreMap":199},[2453,2461,2468,2475,2483,2490,2498,2505,2512],{"type":41,"tag":205,"props":2454,"children":2455},{"class":207,"line":208},[2456],{"type":41,"tag":205,"props":2457,"children":2458},{},[2459],{"type":47,"value":2460},"\u002F\u002F Close a conversation (marks it inactive)\n",{"type":41,"tag":205,"props":2462,"children":2463},{"class":207,"line":217},[2464],{"type":41,"tag":205,"props":2465,"children":2466},{},[2467],{"type":47,"value":701},{"type":41,"tag":205,"props":2469,"children":2470},{"class":207,"line":226},[2471],{"type":41,"tag":205,"props":2472,"children":2473},{},[2474],{"type":47,"value":890},{"type":41,"tag":205,"props":2476,"children":2477},{"class":207,"line":236},[2478],{"type":41,"tag":205,"props":2479,"children":2480},{},[2481],{"type":47,"value":2482},"    .update({ state: \"closed\" });\n",{"type":41,"tag":205,"props":2484,"children":2485},{"class":207,"line":245},[2486],{"type":41,"tag":205,"props":2487,"children":2488},{"emptyLinePlaceholder":230},[2489],{"type":47,"value":233},{"type":41,"tag":205,"props":2491,"children":2492},{"class":207,"line":253},[2493],{"type":41,"tag":205,"props":2494,"children":2495},{},[2496],{"type":47,"value":2497},"\u002F\u002F Delete a conversation completely\n",{"type":41,"tag":205,"props":2499,"children":2500},{"class":207,"line":29},[2501],{"type":41,"tag":205,"props":2502,"children":2503},{},[2504],{"type":47,"value":701},{"type":41,"tag":205,"props":2506,"children":2507},{"class":207,"line":270},[2508],{"type":41,"tag":205,"props":2509,"children":2510},{},[2511],{"type":47,"value":890},{"type":41,"tag":205,"props":2513,"children":2514},{"class":207,"line":279},[2515],{"type":41,"tag":205,"props":2516,"children":2517},{},[2518],{"type":47,"value":2236},{"type":41,"tag":789,"props":2520,"children":2522},{"id":2521},"handle-incoming-messages-webhook",[2523],{"type":47,"value":2524},"Handle Incoming Messages (Webhook)",{"type":41,"tag":50,"props":2526,"children":2527},{},[2528],{"type":47,"value":2529},"Configure at Console > Conversations > Manage > Global Webhooks.",{"type":41,"tag":2531,"props":2532,"children":2533},"blockquote",{},[2534],{"type":41,"tag":50,"props":2535,"children":2536},{},[2537,2542,2544,2550,2552,2558],{"type":41,"tag":59,"props":2538,"children":2539},{},[2540],{"type":47,"value":2541},"Security:",{"type":47,"value":2543}," Always validate the ",{"type":41,"tag":87,"props":2545,"children":2547},{"className":2546},[],[2548],{"type":47,"value":2549},"X-Twilio-Signature",{"type":47,"value":2551}," header in production to confirm requests originate from Twilio. See ",{"type":41,"tag":87,"props":2553,"children":2555},{"className":2554},[],[2556],{"type":47,"value":2557},"twilio-webhook-architecture",{"type":47,"value":2559}," for validation patterns.",{"type":41,"tag":50,"props":2561,"children":2562},{},[2563],{"type":41,"tag":59,"props":2564,"children":2565},{},[2566],{"type":47,"value":2567},"Python (Flask)",{"type":41,"tag":194,"props":2569,"children":2571},{"className":196,"code":2570,"language":198,"meta":199,"style":199},"from twilio.request_validator import RequestValidator\n\n@app.route(\"\u002Fconversations\u002Fwebhook\", methods=[\"POST\"])\ndef conversations_webhook():\n    validator = RequestValidator(os.environ[\"TWILIO_AUTH_TOKEN\"])\n    if not validator.validate(request.url, request.form, request.headers.get(\"X-Twilio-Signature\", \"\")):\n        return \"\", 403\n\n    event_type = request.form.get(\"EventType\")\n    conversation_sid = request.form.get(\"ConversationSid\")\n    author = request.form.get(\"Author\")\n\n    if event_type == \"onMessageAdded\" and author != \"support-agent\":\n        client.conversations.v1.conversations(conversation_sid).messages.create(\n            body=\"Thanks — an agent will be with you shortly.\",\n            author=\"support-bot\"\n        )\n    return \"\", 204\n",[2572],{"type":41,"tag":87,"props":2573,"children":2574},{"__ignoreMap":199},[2575,2583,2590,2598,2606,2614,2622,2630,2637,2645,2653,2661,2668,2676,2684,2692,2700,2707],{"type":41,"tag":205,"props":2576,"children":2577},{"class":207,"line":208},[2578],{"type":41,"tag":205,"props":2579,"children":2580},{},[2581],{"type":47,"value":2582},"from twilio.request_validator import RequestValidator\n",{"type":41,"tag":205,"props":2584,"children":2585},{"class":207,"line":217},[2586],{"type":41,"tag":205,"props":2587,"children":2588},{"emptyLinePlaceholder":230},[2589],{"type":47,"value":233},{"type":41,"tag":205,"props":2591,"children":2592},{"class":207,"line":226},[2593],{"type":41,"tag":205,"props":2594,"children":2595},{},[2596],{"type":47,"value":2597},"@app.route(\"\u002Fconversations\u002Fwebhook\", methods=[\"POST\"])\n",{"type":41,"tag":205,"props":2599,"children":2600},{"class":207,"line":236},[2601],{"type":41,"tag":205,"props":2602,"children":2603},{},[2604],{"type":47,"value":2605},"def conversations_webhook():\n",{"type":41,"tag":205,"props":2607,"children":2608},{"class":207,"line":245},[2609],{"type":41,"tag":205,"props":2610,"children":2611},{},[2612],{"type":47,"value":2613},"    validator = RequestValidator(os.environ[\"TWILIO_AUTH_TOKEN\"])\n",{"type":41,"tag":205,"props":2615,"children":2616},{"class":207,"line":253},[2617],{"type":41,"tag":205,"props":2618,"children":2619},{},[2620],{"type":47,"value":2621},"    if not validator.validate(request.url, request.form, request.headers.get(\"X-Twilio-Signature\", \"\")):\n",{"type":41,"tag":205,"props":2623,"children":2624},{"class":207,"line":29},[2625],{"type":41,"tag":205,"props":2626,"children":2627},{},[2628],{"type":47,"value":2629},"        return \"\", 403\n",{"type":41,"tag":205,"props":2631,"children":2632},{"class":207,"line":270},[2633],{"type":41,"tag":205,"props":2634,"children":2635},{"emptyLinePlaceholder":230},[2636],{"type":47,"value":233},{"type":41,"tag":205,"props":2638,"children":2639},{"class":207,"line":279},[2640],{"type":41,"tag":205,"props":2641,"children":2642},{},[2643],{"type":47,"value":2644},"    event_type = request.form.get(\"EventType\")\n",{"type":41,"tag":205,"props":2646,"children":2647},{"class":207,"line":288},[2648],{"type":41,"tag":205,"props":2649,"children":2650},{},[2651],{"type":47,"value":2652},"    conversation_sid = request.form.get(\"ConversationSid\")\n",{"type":41,"tag":205,"props":2654,"children":2655},{"class":207,"line":492},[2656],{"type":41,"tag":205,"props":2657,"children":2658},{},[2659],{"type":47,"value":2660},"    author = request.form.get(\"Author\")\n",{"type":41,"tag":205,"props":2662,"children":2663},{"class":207,"line":501},[2664],{"type":41,"tag":205,"props":2665,"children":2666},{"emptyLinePlaceholder":230},[2667],{"type":47,"value":233},{"type":41,"tag":205,"props":2669,"children":2670},{"class":207,"line":510},[2671],{"type":41,"tag":205,"props":2672,"children":2673},{},[2674],{"type":47,"value":2675},"    if event_type == \"onMessageAdded\" and author != \"support-agent\":\n",{"type":41,"tag":205,"props":2677,"children":2678},{"class":207,"line":519},[2679],{"type":41,"tag":205,"props":2680,"children":2681},{},[2682],{"type":47,"value":2683},"        client.conversations.v1.conversations(conversation_sid).messages.create(\n",{"type":41,"tag":205,"props":2685,"children":2686},{"class":207,"line":528},[2687],{"type":41,"tag":205,"props":2688,"children":2689},{},[2690],{"type":47,"value":2691},"            body=\"Thanks — an agent will be with you shortly.\",\n",{"type":41,"tag":205,"props":2693,"children":2694},{"class":207,"line":537},[2695],{"type":41,"tag":205,"props":2696,"children":2697},{},[2698],{"type":47,"value":2699},"            author=\"support-bot\"\n",{"type":41,"tag":205,"props":2701,"children":2702},{"class":207,"line":546},[2703],{"type":41,"tag":205,"props":2704,"children":2705},{},[2706],{"type":47,"value":1506},{"type":41,"tag":205,"props":2708,"children":2709},{"class":207,"line":555},[2710],{"type":41,"tag":205,"props":2711,"children":2712},{},[2713],{"type":47,"value":2714},"    return \"\", 204\n",{"type":41,"tag":50,"props":2716,"children":2717},{},[2718],{"type":41,"tag":59,"props":2719,"children":2720},{},[2721],{"type":47,"value":2722},"Node.js (Express)",{"type":41,"tag":194,"props":2724,"children":2726},{"className":305,"code":2725,"language":307,"meta":199,"style":199},"app.post(\"\u002Fconversations\u002Fwebhook\", async (req, res) => {\n    const valid = twilio.validateRequest(\n        process.env.TWILIO_AUTH_TOKEN,\n        req.headers[\"x-twilio-signature\"],\n        `https:\u002F\u002F${req.headers.host}${req.originalUrl}`,\n        req.body\n    );\n    if (!valid) return res.status(403).send(\"Forbidden\");\n\n    const { EventType, ConversationSid, Author } = req.body;\n    if (EventType === \"onMessageAdded\" && Author !== \"support-agent\") {\n        await client.conversations.v1\n            .conversations(ConversationSid)\n            .messages.create({ body: \"Thanks — an agent will be with you shortly.\", author: \"support-bot\" });\n    }\n    res.sendStatus(204);\n});\n",[2727],{"type":41,"tag":87,"props":2728,"children":2729},{"__ignoreMap":199},[2730,2738,2746,2754,2762,2770,2778,2786,2794,2801,2809,2817,2824,2832,2840,2847,2855],{"type":41,"tag":205,"props":2731,"children":2732},{"class":207,"line":208},[2733],{"type":41,"tag":205,"props":2734,"children":2735},{},[2736],{"type":47,"value":2737},"app.post(\"\u002Fconversations\u002Fwebhook\", async (req, res) => {\n",{"type":41,"tag":205,"props":2739,"children":2740},{"class":207,"line":217},[2741],{"type":41,"tag":205,"props":2742,"children":2743},{},[2744],{"type":47,"value":2745},"    const valid = twilio.validateRequest(\n",{"type":41,"tag":205,"props":2747,"children":2748},{"class":207,"line":226},[2749],{"type":41,"tag":205,"props":2750,"children":2751},{},[2752],{"type":47,"value":2753},"        process.env.TWILIO_AUTH_TOKEN,\n",{"type":41,"tag":205,"props":2755,"children":2756},{"class":207,"line":236},[2757],{"type":41,"tag":205,"props":2758,"children":2759},{},[2760],{"type":47,"value":2761},"        req.headers[\"x-twilio-signature\"],\n",{"type":41,"tag":205,"props":2763,"children":2764},{"class":207,"line":245},[2765],{"type":41,"tag":205,"props":2766,"children":2767},{},[2768],{"type":47,"value":2769},"        `https:\u002F\u002F${req.headers.host}${req.originalUrl}`,\n",{"type":41,"tag":205,"props":2771,"children":2772},{"class":207,"line":253},[2773],{"type":41,"tag":205,"props":2774,"children":2775},{},[2776],{"type":47,"value":2777},"        req.body\n",{"type":41,"tag":205,"props":2779,"children":2780},{"class":207,"line":29},[2781],{"type":41,"tag":205,"props":2782,"children":2783},{},[2784],{"type":47,"value":2785},"    );\n",{"type":41,"tag":205,"props":2787,"children":2788},{"class":207,"line":270},[2789],{"type":41,"tag":205,"props":2790,"children":2791},{},[2792],{"type":47,"value":2793},"    if (!valid) return res.status(403).send(\"Forbidden\");\n",{"type":41,"tag":205,"props":2795,"children":2796},{"class":207,"line":279},[2797],{"type":41,"tag":205,"props":2798,"children":2799},{"emptyLinePlaceholder":230},[2800],{"type":47,"value":233},{"type":41,"tag":205,"props":2802,"children":2803},{"class":207,"line":288},[2804],{"type":41,"tag":205,"props":2805,"children":2806},{},[2807],{"type":47,"value":2808},"    const { EventType, ConversationSid, Author } = req.body;\n",{"type":41,"tag":205,"props":2810,"children":2811},{"class":207,"line":492},[2812],{"type":41,"tag":205,"props":2813,"children":2814},{},[2815],{"type":47,"value":2816},"    if (EventType === \"onMessageAdded\" && Author !== \"support-agent\") {\n",{"type":41,"tag":205,"props":2818,"children":2819},{"class":207,"line":501},[2820],{"type":41,"tag":205,"props":2821,"children":2822},{},[2823],{"type":47,"value":2313},{"type":41,"tag":205,"props":2825,"children":2826},{"class":207,"line":510},[2827],{"type":41,"tag":205,"props":2828,"children":2829},{},[2830],{"type":47,"value":2831},"            .conversations(ConversationSid)\n",{"type":41,"tag":205,"props":2833,"children":2834},{"class":207,"line":519},[2835],{"type":41,"tag":205,"props":2836,"children":2837},{},[2838],{"type":47,"value":2839},"            .messages.create({ body: \"Thanks — an agent will be with you shortly.\", author: \"support-bot\" });\n",{"type":41,"tag":205,"props":2841,"children":2842},{"class":207,"line":528},[2843],{"type":41,"tag":205,"props":2844,"children":2845},{},[2846],{"type":47,"value":2345},{"type":41,"tag":205,"props":2848,"children":2849},{"class":207,"line":537},[2850],{"type":41,"tag":205,"props":2851,"children":2852},{},[2853],{"type":47,"value":2854},"    res.sendStatus(204);\n",{"type":41,"tag":205,"props":2856,"children":2857},{"class":207,"line":546},[2858],{"type":41,"tag":205,"props":2859,"children":2860},{},[2861],{"type":47,"value":366},{"type":41,"tag":67,"props":2863,"children":2864},{},[],{"type":41,"tag":42,"props":2866,"children":2868},{"id":2867},"advanced-context",[2869],{"type":47,"value":2870},"Advanced Context",{"type":41,"tag":789,"props":2872,"children":2874},{"id":2873},"message-delivery-status",[2875],{"type":47,"value":2876},"Message Delivery Status",{"type":41,"tag":50,"props":2878,"children":2879},{},[2880],{"type":47,"value":2881},"Track message delivery through webhooks. Configure at Console > Conversations > Manage > Global Webhooks.",{"type":41,"tag":50,"props":2883,"children":2884},{},[2885],{"type":41,"tag":59,"props":2886,"children":2887},{},[2888],{"type":47,"value":2889},"Available delivery events:",{"type":41,"tag":77,"props":2891,"children":2892},{},[2893,2904,2915],{"type":41,"tag":81,"props":2894,"children":2895},{},[2896,2902],{"type":41,"tag":87,"props":2897,"children":2899},{"className":2898},[],[2900],{"type":47,"value":2901},"onMessageAdded",{"type":47,"value":2903}," — Message created",{"type":41,"tag":81,"props":2905,"children":2906},{},[2907,2913],{"type":41,"tag":87,"props":2908,"children":2910},{"className":2909},[],[2911],{"type":47,"value":2912},"onMessageUpdated",{"type":47,"value":2914}," — Message status changed",{"type":41,"tag":81,"props":2916,"children":2917},{},[2918,2924],{"type":41,"tag":87,"props":2919,"children":2921},{"className":2920},[],[2922],{"type":47,"value":2923},"onDeliveryUpdated",{"type":47,"value":2925}," — Delivery receipt received (SMS\u002FWhatsApp only)",{"type":41,"tag":50,"props":2927,"children":2928},{},[2929],{"type":41,"tag":59,"props":2930,"children":2931},{},[2932],{"type":47,"value":2567},{"type":41,"tag":194,"props":2934,"children":2936},{"className":196,"code":2935,"language":198,"meta":199,"style":199},"@app.route(\"\u002Fconversations\u002Fwebhook\", methods=[\"POST\"])\ndef delivery_webhook():\n    event_type = request.form.get(\"EventType\")\n    \n    if event_type == \"onDeliveryUpdated\":\n        delivery_status = request.form.get(\"DeliveryStatus\")\n        message_sid = request.form.get(\"MessageSid\")\n        print(f\"Message {message_sid}: {delivery_status}\")\n        # Status values: sent, delivered, failed, undelivered\n    \n    return \"\", 204\n",[2937],{"type":41,"tag":87,"props":2938,"children":2939},{"__ignoreMap":199},[2940,2947,2955,2962,2970,2978,2986,2994,3002,3010,3017],{"type":41,"tag":205,"props":2941,"children":2942},{"class":207,"line":208},[2943],{"type":41,"tag":205,"props":2944,"children":2945},{},[2946],{"type":47,"value":2597},{"type":41,"tag":205,"props":2948,"children":2949},{"class":207,"line":217},[2950],{"type":41,"tag":205,"props":2951,"children":2952},{},[2953],{"type":47,"value":2954},"def delivery_webhook():\n",{"type":41,"tag":205,"props":2956,"children":2957},{"class":207,"line":226},[2958],{"type":41,"tag":205,"props":2959,"children":2960},{},[2961],{"type":47,"value":2644},{"type":41,"tag":205,"props":2963,"children":2964},{"class":207,"line":236},[2965],{"type":41,"tag":205,"props":2966,"children":2967},{},[2968],{"type":47,"value":2969},"    \n",{"type":41,"tag":205,"props":2971,"children":2972},{"class":207,"line":245},[2973],{"type":41,"tag":205,"props":2974,"children":2975},{},[2976],{"type":47,"value":2977},"    if event_type == \"onDeliveryUpdated\":\n",{"type":41,"tag":205,"props":2979,"children":2980},{"class":207,"line":253},[2981],{"type":41,"tag":205,"props":2982,"children":2983},{},[2984],{"type":47,"value":2985},"        delivery_status = request.form.get(\"DeliveryStatus\")\n",{"type":41,"tag":205,"props":2987,"children":2988},{"class":207,"line":29},[2989],{"type":41,"tag":205,"props":2990,"children":2991},{},[2992],{"type":47,"value":2993},"        message_sid = request.form.get(\"MessageSid\")\n",{"type":41,"tag":205,"props":2995,"children":2996},{"class":207,"line":270},[2997],{"type":41,"tag":205,"props":2998,"children":2999},{},[3000],{"type":47,"value":3001},"        print(f\"Message {message_sid}: {delivery_status}\")\n",{"type":41,"tag":205,"props":3003,"children":3004},{"class":207,"line":279},[3005],{"type":41,"tag":205,"props":3006,"children":3007},{},[3008],{"type":47,"value":3009},"        # Status values: sent, delivered, failed, undelivered\n",{"type":41,"tag":205,"props":3011,"children":3012},{"class":207,"line":288},[3013],{"type":41,"tag":205,"props":3014,"children":3015},{},[3016],{"type":47,"value":2969},{"type":41,"tag":205,"props":3018,"children":3019},{"class":207,"line":492},[3020],{"type":41,"tag":205,"props":3021,"children":3022},{},[3023],{"type":47,"value":2714},{"type":41,"tag":50,"props":3025,"children":3026},{},[3027],{"type":41,"tag":59,"props":3028,"children":3029},{},[3030],{"type":47,"value":2722},{"type":41,"tag":194,"props":3032,"children":3034},{"className":305,"code":3033,"language":307,"meta":199,"style":199},"app.post(\"\u002Fconversations\u002Fwebhook\", (req, res) => {\n    const { EventType, DeliveryStatus, MessageSid } = req.body;\n    \n    if (EventType === \"onDeliveryUpdated\") {\n        console.log(`Message ${MessageSid}: ${DeliveryStatus}`);\n        \u002F\u002F Status values: sent, delivered, failed, undelivered\n    }\n    \n    res.sendStatus(204);\n});\n",[3035],{"type":41,"tag":87,"props":3036,"children":3037},{"__ignoreMap":199},[3038,3046,3054,3061,3069,3077,3085,3092,3099,3106],{"type":41,"tag":205,"props":3039,"children":3040},{"class":207,"line":208},[3041],{"type":41,"tag":205,"props":3042,"children":3043},{},[3044],{"type":47,"value":3045},"app.post(\"\u002Fconversations\u002Fwebhook\", (req, res) => {\n",{"type":41,"tag":205,"props":3047,"children":3048},{"class":207,"line":217},[3049],{"type":41,"tag":205,"props":3050,"children":3051},{},[3052],{"type":47,"value":3053},"    const { EventType, DeliveryStatus, MessageSid } = req.body;\n",{"type":41,"tag":205,"props":3055,"children":3056},{"class":207,"line":226},[3057],{"type":41,"tag":205,"props":3058,"children":3059},{},[3060],{"type":47,"value":2969},{"type":41,"tag":205,"props":3062,"children":3063},{"class":207,"line":236},[3064],{"type":41,"tag":205,"props":3065,"children":3066},{},[3067],{"type":47,"value":3068},"    if (EventType === \"onDeliveryUpdated\") {\n",{"type":41,"tag":205,"props":3070,"children":3071},{"class":207,"line":245},[3072],{"type":41,"tag":205,"props":3073,"children":3074},{},[3075],{"type":47,"value":3076},"        console.log(`Message ${MessageSid}: ${DeliveryStatus}`);\n",{"type":41,"tag":205,"props":3078,"children":3079},{"class":207,"line":253},[3080],{"type":41,"tag":205,"props":3081,"children":3082},{},[3083],{"type":47,"value":3084},"        \u002F\u002F Status values: sent, delivered, failed, undelivered\n",{"type":41,"tag":205,"props":3086,"children":3087},{"class":207,"line":29},[3088],{"type":41,"tag":205,"props":3089,"children":3090},{},[3091],{"type":47,"value":2345},{"type":41,"tag":205,"props":3093,"children":3094},{"class":207,"line":270},[3095],{"type":41,"tag":205,"props":3096,"children":3097},{},[3098],{"type":47,"value":2969},{"type":41,"tag":205,"props":3100,"children":3101},{"class":207,"line":279},[3102],{"type":41,"tag":205,"props":3103,"children":3104},{},[3105],{"type":47,"value":2854},{"type":41,"tag":205,"props":3107,"children":3108},{"class":207,"line":288},[3109],{"type":41,"tag":205,"props":3110,"children":3111},{},[3112],{"type":47,"value":366},{"type":41,"tag":789,"props":3114,"children":3116},{"id":3115},"conversation-attributes-metadata",[3117],{"type":47,"value":3118},"Conversation Attributes (Metadata)",{"type":41,"tag":50,"props":3120,"children":3121},{},[3122],{"type":47,"value":3123},"Store custom metadata on conversations (order IDs, customer info, tags).",{"type":41,"tag":50,"props":3125,"children":3126},{},[3127],{"type":41,"tag":59,"props":3128,"children":3129},{},[3130],{"type":47,"value":192},{"type":41,"tag":194,"props":3132,"children":3134},{"className":196,"code":3133,"language":198,"meta":199,"style":199},"# Set attributes when creating\nconversation = client.conversations.v1.conversations.create(\n    friendly_name=\"Customer Support - Order #12345\",\n    attributes='{\"order_id\": \"12345\", \"priority\": \"high\", \"customer_tier\": \"gold\"}'\n)\n\n# Update attributes on existing conversation\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .update(attributes='{\"order_id\": \"12345\", \"status\": \"resolved\"}')\n\n# Read attributes\nconv = client.conversations.v1.conversations(conversation.sid).fetch()\nimport json\nattrs = json.loads(conv.attributes)\nprint(f\"Order ID: {attrs['order_id']}\")\n",[3135],{"type":41,"tag":87,"props":3136,"children":3137},{"__ignoreMap":199},[3138,3146,3153,3161,3169,3176,3183,3191,3198,3205,3213,3220,3228,3236,3244,3252],{"type":41,"tag":205,"props":3139,"children":3140},{"class":207,"line":208},[3141],{"type":41,"tag":205,"props":3142,"children":3143},{},[3144],{"type":47,"value":3145},"# Set attributes when creating\n",{"type":41,"tag":205,"props":3147,"children":3148},{"class":207,"line":217},[3149],{"type":41,"tag":205,"props":3150,"children":3151},{},[3152],{"type":47,"value":467},{"type":41,"tag":205,"props":3154,"children":3155},{"class":207,"line":226},[3156],{"type":41,"tag":205,"props":3157,"children":3158},{},[3159],{"type":47,"value":3160},"    friendly_name=\"Customer Support - Order #12345\",\n",{"type":41,"tag":205,"props":3162,"children":3163},{"class":207,"line":236},[3164],{"type":41,"tag":205,"props":3165,"children":3166},{},[3167],{"type":47,"value":3168},"    attributes='{\"order_id\": \"12345\", \"priority\": \"high\", \"customer_tier\": \"gold\"}'\n",{"type":41,"tag":205,"props":3170,"children":3171},{"class":207,"line":245},[3172],{"type":41,"tag":205,"props":3173,"children":3174},{},[3175],{"type":47,"value":285},{"type":41,"tag":205,"props":3177,"children":3178},{"class":207,"line":253},[3179],{"type":41,"tag":205,"props":3180,"children":3181},{"emptyLinePlaceholder":230},[3182],{"type":47,"value":233},{"type":41,"tag":205,"props":3184,"children":3185},{"class":207,"line":29},[3186],{"type":41,"tag":205,"props":3187,"children":3188},{},[3189],{"type":47,"value":3190},"# Update attributes on existing conversation\n",{"type":41,"tag":205,"props":3192,"children":3193},{"class":207,"line":270},[3194],{"type":41,"tag":205,"props":3195,"children":3196},{},[3197],{"type":47,"value":507},{"type":41,"tag":205,"props":3199,"children":3200},{"class":207,"line":279},[3201],{"type":41,"tag":205,"props":3202,"children":3203},{},[3204],{"type":47,"value":516},{"type":41,"tag":205,"props":3206,"children":3207},{"class":207,"line":288},[3208],{"type":41,"tag":205,"props":3209,"children":3210},{},[3211],{"type":47,"value":3212},"    .update(attributes='{\"order_id\": \"12345\", \"status\": \"resolved\"}')\n",{"type":41,"tag":205,"props":3214,"children":3215},{"class":207,"line":492},[3216],{"type":41,"tag":205,"props":3217,"children":3218},{"emptyLinePlaceholder":230},[3219],{"type":47,"value":233},{"type":41,"tag":205,"props":3221,"children":3222},{"class":207,"line":501},[3223],{"type":41,"tag":205,"props":3224,"children":3225},{},[3226],{"type":47,"value":3227},"# Read attributes\n",{"type":41,"tag":205,"props":3229,"children":3230},{"class":207,"line":510},[3231],{"type":41,"tag":205,"props":3232,"children":3233},{},[3234],{"type":47,"value":3235},"conv = client.conversations.v1.conversations(conversation.sid).fetch()\n",{"type":41,"tag":205,"props":3237,"children":3238},{"class":207,"line":519},[3239],{"type":41,"tag":205,"props":3240,"children":3241},{},[3242],{"type":47,"value":3243},"import json\n",{"type":41,"tag":205,"props":3245,"children":3246},{"class":207,"line":528},[3247],{"type":41,"tag":205,"props":3248,"children":3249},{},[3250],{"type":47,"value":3251},"attrs = json.loads(conv.attributes)\n",{"type":41,"tag":205,"props":3253,"children":3254},{"class":207,"line":537},[3255],{"type":41,"tag":205,"props":3256,"children":3257},{},[3258],{"type":47,"value":3259},"print(f\"Order ID: {attrs['order_id']}\")\n",{"type":41,"tag":50,"props":3261,"children":3262},{},[3263],{"type":41,"tag":59,"props":3264,"children":3265},{},[3266],{"type":47,"value":302},{"type":41,"tag":194,"props":3268,"children":3270},{"className":305,"code":3269,"language":307,"meta":199,"style":199},"\u002F\u002F Set attributes when creating\nconst conversation = await client.conversations.v1.conversations.create({\n    friendlyName: \"Customer Support - Order #12345\",\n    attributes: JSON.stringify({ orderId: \"12345\", priority: \"high\", customerTier: \"gold\" })\n});\n\n\u002F\u002F Update attributes on existing conversation\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .update({ attributes: JSON.stringify({ orderId: \"12345\", status: \"resolved\" }) });\n\n\u002F\u002F Read attributes\nconst conv = await client.conversations.v1.conversations(conversationSid).fetch();\nconst attrs = JSON.parse(conv.attributes);\nconsole.log(`Order ID: ${attrs.orderId}`);\n",[3271],{"type":41,"tag":87,"props":3272,"children":3273},{"__ignoreMap":199},[3274,3282,3289,3296,3304,3311,3318,3326,3333,3340,3348,3355,3363,3371,3379],{"type":41,"tag":205,"props":3275,"children":3276},{"class":207,"line":208},[3277],{"type":41,"tag":205,"props":3278,"children":3279},{},[3280],{"type":47,"value":3281},"\u002F\u002F Set attributes when creating\n",{"type":41,"tag":205,"props":3283,"children":3284},{"class":207,"line":217},[3285],{"type":41,"tag":205,"props":3286,"children":3287},{},[3288],{"type":47,"value":663},{"type":41,"tag":205,"props":3290,"children":3291},{"class":207,"line":226},[3292],{"type":41,"tag":205,"props":3293,"children":3294},{},[3295],{"type":47,"value":671},{"type":41,"tag":205,"props":3297,"children":3298},{"class":207,"line":236},[3299],{"type":41,"tag":205,"props":3300,"children":3301},{},[3302],{"type":47,"value":3303},"    attributes: JSON.stringify({ orderId: \"12345\", priority: \"high\", customerTier: \"gold\" })\n",{"type":41,"tag":205,"props":3305,"children":3306},{"class":207,"line":245},[3307],{"type":41,"tag":205,"props":3308,"children":3309},{},[3310],{"type":47,"value":366},{"type":41,"tag":205,"props":3312,"children":3313},{"class":207,"line":253},[3314],{"type":41,"tag":205,"props":3315,"children":3316},{"emptyLinePlaceholder":230},[3317],{"type":47,"value":233},{"type":41,"tag":205,"props":3319,"children":3320},{"class":207,"line":29},[3321],{"type":41,"tag":205,"props":3322,"children":3323},{},[3324],{"type":47,"value":3325},"\u002F\u002F Update attributes on existing conversation\n",{"type":41,"tag":205,"props":3327,"children":3328},{"class":207,"line":270},[3329],{"type":41,"tag":205,"props":3330,"children":3331},{},[3332],{"type":47,"value":701},{"type":41,"tag":205,"props":3334,"children":3335},{"class":207,"line":279},[3336],{"type":41,"tag":205,"props":3337,"children":3338},{},[3339],{"type":47,"value":890},{"type":41,"tag":205,"props":3341,"children":3342},{"class":207,"line":288},[3343],{"type":41,"tag":205,"props":3344,"children":3345},{},[3346],{"type":47,"value":3347},"    .update({ attributes: JSON.stringify({ orderId: \"12345\", status: \"resolved\" }) });\n",{"type":41,"tag":205,"props":3349,"children":3350},{"class":207,"line":492},[3351],{"type":41,"tag":205,"props":3352,"children":3353},{"emptyLinePlaceholder":230},[3354],{"type":47,"value":233},{"type":41,"tag":205,"props":3356,"children":3357},{"class":207,"line":501},[3358],{"type":41,"tag":205,"props":3359,"children":3360},{},[3361],{"type":47,"value":3362},"\u002F\u002F Read attributes\n",{"type":41,"tag":205,"props":3364,"children":3365},{"class":207,"line":510},[3366],{"type":41,"tag":205,"props":3367,"children":3368},{},[3369],{"type":47,"value":3370},"const conv = await client.conversations.v1.conversations(conversationSid).fetch();\n",{"type":41,"tag":205,"props":3372,"children":3373},{"class":207,"line":519},[3374],{"type":41,"tag":205,"props":3375,"children":3376},{},[3377],{"type":47,"value":3378},"const attrs = JSON.parse(conv.attributes);\n",{"type":41,"tag":205,"props":3380,"children":3381},{"class":207,"line":528},[3382],{"type":41,"tag":205,"props":3383,"children":3384},{},[3385],{"type":47,"value":3386},"console.log(`Order ID: ${attrs.orderId}`);\n",{"type":41,"tag":789,"props":3388,"children":3390},{"id":3389},"participant-attributes-metadata",[3391],{"type":47,"value":3392},"Participant Attributes (Metadata)",{"type":41,"tag":50,"props":3394,"children":3395},{},[3396],{"type":47,"value":3397},"Store metadata on individual participants (role, name, account info).",{"type":41,"tag":50,"props":3399,"children":3400},{},[3401],{"type":41,"tag":59,"props":3402,"children":3403},{},[3404],{"type":47,"value":192},{"type":41,"tag":194,"props":3406,"children":3408},{"className":196,"code":3407,"language":198,"meta":199,"style":199},"# Set attributes when adding participant\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants \\\n    .create(\n        messaging_binding_address=\"+15558675310\",\n        messaging_binding_proxy_address=\"+15017122661\",\n        attributes='{\"name\": \"John Doe\", \"role\": \"customer\", \"account_id\": \"A123\"}'\n    )\n\n# Update participant attributes\nclient.conversations.v1 \\\n    .conversations(conversation.sid) \\\n    .participants(participant_sid) \\\n    .update(attributes='{\"role\": \"vip_customer\", \"satisfaction\": \"high\"}')\n",[3409],{"type":41,"tag":87,"props":3410,"children":3411},{"__ignoreMap":199},[3412,3420,3427,3434,3441,3448,3455,3463,3471,3478,3485,3493,3500,3507,3514],{"type":41,"tag":205,"props":3413,"children":3414},{"class":207,"line":208},[3415],{"type":41,"tag":205,"props":3416,"children":3417},{},[3418],{"type":47,"value":3419},"# Set attributes when adding participant\n",{"type":41,"tag":205,"props":3421,"children":3422},{"class":207,"line":217},[3423],{"type":41,"tag":205,"props":3424,"children":3425},{},[3426],{"type":47,"value":507},{"type":41,"tag":205,"props":3428,"children":3429},{"class":207,"line":226},[3430],{"type":41,"tag":205,"props":3431,"children":3432},{},[3433],{"type":47,"value":516},{"type":41,"tag":205,"props":3435,"children":3436},{"class":207,"line":236},[3437],{"type":41,"tag":205,"props":3438,"children":3439},{},[3440],{"type":47,"value":525},{"type":41,"tag":205,"props":3442,"children":3443},{"class":207,"line":245},[3444],{"type":41,"tag":205,"props":3445,"children":3446},{},[3447],{"type":47,"value":534},{"type":41,"tag":205,"props":3449,"children":3450},{"class":207,"line":253},[3451],{"type":41,"tag":205,"props":3452,"children":3453},{},[3454],{"type":47,"value":543},{"type":41,"tag":205,"props":3456,"children":3457},{"class":207,"line":29},[3458],{"type":41,"tag":205,"props":3459,"children":3460},{},[3461],{"type":47,"value":3462},"        messaging_binding_proxy_address=\"+15017122661\",\n",{"type":41,"tag":205,"props":3464,"children":3465},{"class":207,"line":270},[3466],{"type":41,"tag":205,"props":3467,"children":3468},{},[3469],{"type":47,"value":3470},"        attributes='{\"name\": \"John Doe\", \"role\": \"customer\", \"account_id\": \"A123\"}'\n",{"type":41,"tag":205,"props":3472,"children":3473},{"class":207,"line":279},[3474],{"type":41,"tag":205,"props":3475,"children":3476},{},[3477],{"type":47,"value":561},{"type":41,"tag":205,"props":3479,"children":3480},{"class":207,"line":288},[3481],{"type":41,"tag":205,"props":3482,"children":3483},{"emptyLinePlaceholder":230},[3484],{"type":47,"value":233},{"type":41,"tag":205,"props":3486,"children":3487},{"class":207,"line":492},[3488],{"type":41,"tag":205,"props":3489,"children":3490},{},[3491],{"type":47,"value":3492},"# Update participant attributes\n",{"type":41,"tag":205,"props":3494,"children":3495},{"class":207,"line":501},[3496],{"type":41,"tag":205,"props":3497,"children":3498},{},[3499],{"type":47,"value":507},{"type":41,"tag":205,"props":3501,"children":3502},{"class":207,"line":510},[3503],{"type":41,"tag":205,"props":3504,"children":3505},{},[3506],{"type":47,"value":516},{"type":41,"tag":205,"props":3508,"children":3509},{"class":207,"line":519},[3510],{"type":41,"tag":205,"props":3511,"children":3512},{},[3513],{"type":47,"value":2076},{"type":41,"tag":205,"props":3515,"children":3516},{"class":207,"line":528},[3517],{"type":41,"tag":205,"props":3518,"children":3519},{},[3520],{"type":47,"value":3521},"    .update(attributes='{\"role\": \"vip_customer\", \"satisfaction\": \"high\"}')\n",{"type":41,"tag":50,"props":3523,"children":3524},{},[3525],{"type":41,"tag":59,"props":3526,"children":3527},{},[3528],{"type":47,"value":302},{"type":41,"tag":194,"props":3530,"children":3532},{"className":305,"code":3531,"language":307,"meta":199,"style":199},"\u002F\u002F Set attributes when adding participant\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .participants.create({\n        messagingBindingAddress: \"+15558675310\",\n        messagingBindingProxyAddress: \"+15017122661\",\n        attributes: JSON.stringify({ name: \"John Doe\", role: \"customer\", accountId: \"A123\" })\n    });\n\n\u002F\u002F Update participant attributes\nawait client.conversations.v1\n    .conversations(conversationSid)\n    .participants(participantSid)\n    .update({ attributes: JSON.stringify({ role: \"vip_customer\", satisfaction: \"high\" }) });\n",[3533],{"type":41,"tag":87,"props":3534,"children":3535},{"__ignoreMap":199},[3536,3544,3551,3558,3565,3572,3579,3587,3594,3601,3609,3616,3623,3630],{"type":41,"tag":205,"props":3537,"children":3538},{"class":207,"line":208},[3539],{"type":41,"tag":205,"props":3540,"children":3541},{},[3542],{"type":47,"value":3543},"\u002F\u002F Set attributes when adding participant\n",{"type":41,"tag":205,"props":3545,"children":3546},{"class":207,"line":217},[3547],{"type":41,"tag":205,"props":3548,"children":3549},{},[3550],{"type":47,"value":701},{"type":41,"tag":205,"props":3552,"children":3553},{"class":207,"line":226},[3554],{"type":41,"tag":205,"props":3555,"children":3556},{},[3557],{"type":47,"value":890},{"type":41,"tag":205,"props":3559,"children":3560},{"class":207,"line":236},[3561],{"type":41,"tag":205,"props":3562,"children":3563},{},[3564],{"type":47,"value":717},{"type":41,"tag":205,"props":3566,"children":3567},{"class":207,"line":245},[3568],{"type":41,"tag":205,"props":3569,"children":3570},{},[3571],{"type":47,"value":725},{"type":41,"tag":205,"props":3573,"children":3574},{"class":207,"line":253},[3575],{"type":41,"tag":205,"props":3576,"children":3577},{},[3578],{"type":47,"value":733},{"type":41,"tag":205,"props":3580,"children":3581},{"class":207,"line":29},[3582],{"type":41,"tag":205,"props":3583,"children":3584},{},[3585],{"type":47,"value":3586},"        attributes: JSON.stringify({ name: \"John Doe\", role: \"customer\", accountId: \"A123\" })\n",{"type":41,"tag":205,"props":3588,"children":3589},{"class":207,"line":270},[3590],{"type":41,"tag":205,"props":3591,"children":3592},{},[3593],{"type":47,"value":741},{"type":41,"tag":205,"props":3595,"children":3596},{"class":207,"line":279},[3597],{"type":41,"tag":205,"props":3598,"children":3599},{"emptyLinePlaceholder":230},[3600],{"type":47,"value":233},{"type":41,"tag":205,"props":3602,"children":3603},{"class":207,"line":288},[3604],{"type":41,"tag":205,"props":3605,"children":3606},{},[3607],{"type":47,"value":3608},"\u002F\u002F Update participant attributes\n",{"type":41,"tag":205,"props":3610,"children":3611},{"class":207,"line":492},[3612],{"type":41,"tag":205,"props":3613,"children":3614},{},[3615],{"type":47,"value":701},{"type":41,"tag":205,"props":3617,"children":3618},{"class":207,"line":501},[3619],{"type":41,"tag":205,"props":3620,"children":3621},{},[3622],{"type":47,"value":890},{"type":41,"tag":205,"props":3624,"children":3625},{"class":207,"line":510},[3626],{"type":41,"tag":205,"props":3627,"children":3628},{},[3629],{"type":47,"value":2228},{"type":41,"tag":205,"props":3631,"children":3632},{"class":207,"line":519},[3633],{"type":41,"tag":205,"props":3634,"children":3635},{},[3636],{"type":47,"value":3637},"    .update({ attributes: JSON.stringify({ role: \"vip_customer\", satisfaction: \"high\" }) });\n",{"type":41,"tag":67,"props":3639,"children":3640},{},[],{"type":41,"tag":42,"props":3642,"children":3644},{"id":3643},"limits",[3645],{"type":47,"value":3646},"Limits",{"type":41,"tag":3648,"props":3649,"children":3650},"table",{},[3651,3670],{"type":41,"tag":3652,"props":3653,"children":3654},"thead",{},[3655],{"type":41,"tag":3656,"props":3657,"children":3658},"tr",{},[3659,3665],{"type":41,"tag":3660,"props":3661,"children":3662},"th",{},[3663],{"type":47,"value":3664},"Limit",{"type":41,"tag":3660,"props":3666,"children":3667},{},[3668],{"type":47,"value":3669},"Value",{"type":41,"tag":3671,"props":3672,"children":3673},"tbody",{},[3674,3688,3701],{"type":41,"tag":3656,"props":3675,"children":3676},{},[3677,3683],{"type":41,"tag":3678,"props":3679,"children":3680},"td",{},[3681],{"type":47,"value":3682},"Participants per conversation",{"type":41,"tag":3678,"props":3684,"children":3685},{},[3686],{"type":47,"value":3687},"1,000",{"type":41,"tag":3656,"props":3689,"children":3690},{},[3691,3696],{"type":41,"tag":3678,"props":3692,"children":3693},{},[3694],{"type":47,"value":3695},"Messages per conversation",{"type":41,"tag":3678,"props":3697,"children":3698},{},[3699],{"type":47,"value":3700},"Unlimited (older messages may be archived)",{"type":41,"tag":3656,"props":3702,"children":3703},{},[3704,3709],{"type":41,"tag":3678,"props":3705,"children":3706},{},[3707],{"type":47,"value":3708},"Message retention",{"type":41,"tag":3678,"props":3710,"children":3711},{},[3712],{"type":47,"value":3713},"Configurable (default: indefinite)",{"type":41,"tag":67,"props":3715,"children":3716},{},[],{"type":41,"tag":42,"props":3718,"children":3720},{"id":3719},"cannot",[3721],{"type":47,"value":3722},"CANNOT",{"type":41,"tag":77,"props":3724,"children":3725},{},[3726,3736,3752,3767,3777],{"type":41,"tag":81,"props":3727,"children":3728},{},[3729,3734],{"type":41,"tag":59,"props":3730,"children":3731},{},[3732],{"type":47,"value":3733},"Cannot add SMS participants without a Twilio number",{"type":47,"value":3735}," — Number must be assigned to a Conversations (classic) Service",{"type":41,"tag":81,"props":3737,"children":3738},{},[3739,3744,3746],{"type":41,"tag":59,"props":3740,"children":3741},{},[3742],{"type":47,"value":3743},"Cannot send WhatsApp messages outside the 24-hour window",{"type":47,"value":3745}," — Subject to service window rules. See ",{"type":41,"tag":87,"props":3747,"children":3749},{"className":3748},[],[3750],{"type":47,"value":3751},"twilio-whatsapp-send-message",{"type":41,"tag":81,"props":3753,"children":3754},{},[3755,3760,3762],{"type":41,"tag":59,"props":3756,"children":3757},{},[3758],{"type":47,"value":3759},"Cannot use chat participants without Access Tokens",{"type":47,"value":3761}," — Client-side SDK auth required. See ",{"type":41,"tag":87,"props":3763,"children":3765},{"className":3764},[],[3766],{"type":47,"value":144},{"type":41,"tag":81,"props":3768,"children":3769},{},[3770,3775],{"type":41,"tag":59,"props":3771,"children":3772},{},[3773],{"type":47,"value":3774},"Cannot use WhatsApp Groups API",{"type":47,"value":3776}," — Deprecated April 2020. Use Conversations (classic) API instead.",{"type":41,"tag":81,"props":3778,"children":3779},{},[3780,3785],{"type":41,"tag":59,"props":3781,"children":3782},{},[3783],{"type":47,"value":3784},"Conversations v1 (classic) is in maintenance mode",{"type":47,"value":3786}," — Consider Conversations v2 API for new projects with enhanced features and scalability.",{"type":41,"tag":67,"props":3788,"children":3789},{},[],{"type":41,"tag":42,"props":3791,"children":3793},{"id":3792},"next-steps",[3794],{"type":47,"value":3795},"Next Steps",{"type":41,"tag":77,"props":3797,"children":3798},{},[3799,3814,3829,3843],{"type":41,"tag":81,"props":3800,"children":3801},{},[3802,3807,3809],{"type":41,"tag":59,"props":3803,"children":3804},{},[3805],{"type":47,"value":3806},"WhatsApp setup and rules:",{"type":47,"value":3808}," ",{"type":41,"tag":87,"props":3810,"children":3812},{"className":3811},[],[3813],{"type":47,"value":3751},{"type":41,"tag":81,"props":3815,"children":3816},{},[3817,3822,3823],{"type":41,"tag":59,"props":3818,"children":3819},{},[3820],{"type":47,"value":3821},"SMS setup:",{"type":47,"value":3808},{"type":41,"tag":87,"props":3824,"children":3826},{"className":3825},[],[3827],{"type":47,"value":3828},"twilio-sms-send-message",{"type":41,"tag":81,"props":3830,"children":3831},{},[3832,3837,3838],{"type":41,"tag":59,"props":3833,"children":3834},{},[3835],{"type":47,"value":3836},"Access Tokens for chat clients:",{"type":47,"value":3808},{"type":41,"tag":87,"props":3839,"children":3841},{"className":3840},[],[3842],{"type":47,"value":144},{"type":41,"tag":81,"props":3844,"children":3845},{},[3846,3851,3852],{"type":41,"tag":59,"props":3847,"children":3848},{},[3849],{"type":47,"value":3850},"Webhook security:",{"type":47,"value":3808},{"type":41,"tag":87,"props":3853,"children":3855},{"className":3854},[],[3856],{"type":47,"value":2557},{"type":41,"tag":3858,"props":3859,"children":3860},"style",{},[3861],{"type":47,"value":3862},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":3864,"total":3963},[3865,3876,3896,3907,3919,3934,3951],{"slug":92,"name":92,"fn":3866,"description":3867,"org":3868,"tags":3869,"stars":25,"repoUrl":26,"updatedAt":3875},"configure Twilio accounts and credentials","Create and configure a Twilio account from scratch. Covers free trial signup, trial limitations, getting credentials (Account SID and Auth Token), buying a phone number, verifying recipient numbers for trial use, SDK installation, first API call, subaccount management (creation, inheritance, credential isolation, limits), and enabling specific products (AI Assistants, Conversations, Verify, ConversationRelay, WhatsApp). Use this skill before any other Twilio skill if you do not yet have a Twilio account or need to enable a product. For Organization-level governance (SSO, SCIM, multi-team), see `twilio-organizations-setup`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3870,3871,3874],{"name":23,"slug":24,"type":15},{"name":3872,"slug":3873,"type":15},"Communications","communications",{"name":13,"slug":14,"type":15},"2026-08-01T05:43:28.968968",{"slug":3877,"name":3877,"fn":3878,"description":3879,"org":3880,"tags":3881,"stars":25,"repoUrl":26,"updatedAt":3895},"twilio-agent-augmentation-architect","augment human agents with AI intelligence","Planning skill for augmenting human agents with real-time AI intelligence. Qualifies the developer's use case across coaching, compliance, QA, and routing to recommend the right Conversation Intelligence + Conversation Memory + TaskRouter architecture. Handles both \"I want to add AI coaching to my call center\" and \"configure Conversation Intelligence operators for script adherence.\"\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3882,3885,3888,3891,3894],{"name":3883,"slug":3884,"type":15},"Agents","agents",{"name":3886,"slug":3887,"type":15},"AI","ai",{"name":3889,"slug":3890,"type":15},"Coaching","coaching",{"name":3892,"slug":3893,"type":15},"QA","qa",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:58.250609",{"slug":3897,"name":3897,"fn":3898,"description":3899,"org":3900,"tags":3901,"stars":25,"repoUrl":26,"updatedAt":3906},"twilio-agent-connect","connect AI agents to Twilio channels","Connect third-party AI agents (OpenAI, Bedrock, LangChain, Microsoft Foundry) to Twilio's communication channels using the Twilio Agent Connect SDK. Covers identity resolution, memory and context management via Conversation Memory, conversation orchestration via Conversation Orchestrator, multi-channel handling (Voice, SMS, RCS, WhatsApp, Chat), and AI-to-human escalation. Use this skill when integrating an existing LLM agent with Twilio services.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3902,3903,3904,3905],{"name":3883,"slug":3884,"type":15},{"name":23,"slug":24,"type":15},{"name":3872,"slug":3873,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T06:06:05.217098",{"slug":3908,"name":3908,"fn":3909,"description":3910,"org":3911,"tags":3912,"stars":25,"repoUrl":26,"updatedAt":3918},"twilio-ai-agent-architect","plan Twilio conversational AI agents","Planning skill for AI-powered conversational agents. Qualifies the developer's use case across outcome sophistication, entry point, and customer profile to recommend the right Twilio Conversations architecture and implementation skills. Handles both high-level requests (\"build me a voice AI assistant\") and specific ones (\"integrate ConversationRelay with my OpenAI backend\").\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3913,3914,3917],{"name":3883,"slug":3884,"type":15},{"name":3915,"slug":3916,"type":15},"Architecture","architecture",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:48.883723",{"slug":3920,"name":3920,"fn":3921,"description":3922,"org":3923,"tags":3924,"stars":25,"repoUrl":26,"updatedAt":3933},"twilio-call-recordings","record and manage Twilio voice calls","Record Twilio voice calls correctly. Covers the critical distinction between Record verb (voicemail) and Dial record (call recording), dual-channel for QA, mid-call pause for PCI, Conference recording, and the ConversationRelay workaround. Use this skill whenever you need to capture call audio for compliance, QA, or analytics.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3925,3928,3931,3932],{"name":3926,"slug":3927,"type":15},"Audio","audio",{"name":3929,"slug":3930,"type":15},"Compliance","compliance",{"name":3892,"slug":3893,"type":15},{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.268412",{"slug":3935,"name":3935,"fn":3936,"description":3937,"org":3938,"tags":3939,"stars":25,"repoUrl":26,"updatedAt":3950},"twilio-cli-reference","manage Twilio resources via CLI","Twilio CLI reference for managing Twilio resources from the terminal. Covers installation, credential profiles, phone number provisioning, sending SMS and email, webhook configuration, local development with a tunneling service, debugging with watch and logs, serverless deployment, and plugin ecosystem. Use when the developer asks to \"just do it\", \"set this up\", \"run a command\", mentions \"CLI\", \"command line\", or \"terminal\", or when an AI agent can execute a task directly instead of writing application code.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3940,3943,3946,3949],{"name":3941,"slug":3942,"type":15},"CLI","cli",{"name":3944,"slug":3945,"type":15},"Local Development","local-development",{"name":3947,"slug":3948,"type":15},"Operations","operations",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:54.925664",{"slug":3952,"name":3952,"fn":3953,"description":3954,"org":3955,"tags":3956,"stars":25,"repoUrl":26,"updatedAt":3962},"twilio-compliance-onboarding","manage Twilio messaging and voice compliance","Registrations required BEFORE Twilio traffic works. Covers messaging programs (A2P 10DLC, toll-free verification, WhatsApp WABA, RCS, short code, alphanumeric sender) and voice trust programs (STIR\u002FSHAKEN, Voice Integrity, Branded Calling, CNAM). Each number\u002Fsender type has its own program — registration blocks traffic until complete.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3957,3958,3959,3960,3961],{"name":3929,"slug":3930,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":17,"slug":18,"type":15},"2026-07-17T06:05:47.897229",57,{"items":3965,"total":3963},[3966,3972,3980,3987,3993,4000,4007,4015,4031,4044,4060,4078],{"slug":92,"name":92,"fn":3866,"description":3867,"org":3967,"tags":3968,"stars":25,"repoUrl":26,"updatedAt":3875},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3969,3970,3971],{"name":23,"slug":24,"type":15},{"name":3872,"slug":3873,"type":15},{"name":13,"slug":14,"type":15},{"slug":3877,"name":3877,"fn":3878,"description":3879,"org":3973,"tags":3974,"stars":25,"repoUrl":26,"updatedAt":3895},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3975,3976,3977,3978,3979],{"name":3883,"slug":3884,"type":15},{"name":3886,"slug":3887,"type":15},{"name":3889,"slug":3890,"type":15},{"name":3892,"slug":3893,"type":15},{"name":9,"slug":8,"type":15},{"slug":3897,"name":3897,"fn":3898,"description":3899,"org":3981,"tags":3982,"stars":25,"repoUrl":26,"updatedAt":3906},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3983,3984,3985,3986],{"name":3883,"slug":3884,"type":15},{"name":23,"slug":24,"type":15},{"name":3872,"slug":3873,"type":15},{"name":9,"slug":8,"type":15},{"slug":3908,"name":3908,"fn":3909,"description":3910,"org":3988,"tags":3989,"stars":25,"repoUrl":26,"updatedAt":3918},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3990,3991,3992],{"name":3883,"slug":3884,"type":15},{"name":3915,"slug":3916,"type":15},{"name":9,"slug":8,"type":15},{"slug":3920,"name":3920,"fn":3921,"description":3922,"org":3994,"tags":3995,"stars":25,"repoUrl":26,"updatedAt":3933},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3996,3997,3998,3999],{"name":3926,"slug":3927,"type":15},{"name":3929,"slug":3930,"type":15},{"name":3892,"slug":3893,"type":15},{"name":9,"slug":8,"type":15},{"slug":3935,"name":3935,"fn":3936,"description":3937,"org":4001,"tags":4002,"stars":25,"repoUrl":26,"updatedAt":3950},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4003,4004,4005,4006],{"name":3941,"slug":3942,"type":15},{"name":3944,"slug":3945,"type":15},{"name":3947,"slug":3948,"type":15},{"name":9,"slug":8,"type":15},{"slug":3952,"name":3952,"fn":3953,"description":3954,"org":4008,"tags":4009,"stars":25,"repoUrl":26,"updatedAt":3962},{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4010,4011,4012,4013,4014],{"name":3929,"slug":3930,"type":15},{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":9,"slug":8,"type":15},{"name":17,"slug":18,"type":15},{"slug":4016,"name":4016,"fn":4017,"description":4018,"org":4019,"tags":4020,"stars":25,"repoUrl":26,"updatedAt":4030},"twilio-compliance-traffic","ensure compliance for Twilio messaging traffic","Rules you must follow for Twilio messaging and voice traffic. Covers TCPA (consent tiers, quiet hours, DNC), GDPR (EU consent, right to deletion), PCI DSS (payment recording, Pay verb), HIPAA (BAA, PHI), FDCPA (debt collection limits), CAN-SPAM, WhatsApp policies, SHAKEN\u002FSTIR, and consent management patterns. Use this skill proactively when developers have working traffic to ensure they follow the rules.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4021,4022,4023,4026,4029],{"name":3929,"slug":3930,"type":15},{"name":20,"slug":21,"type":15},{"name":4024,"slug":4025,"type":15},"Regulatory Compliance","regulatory-compliance",{"name":4027,"slug":4028,"type":15},"Security","security",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.952779",{"slug":4032,"name":4032,"fn":4033,"description":4034,"org":4035,"tags":4036,"stars":25,"repoUrl":26,"updatedAt":4043},"twilio-conference-calls","build multi-party calls with Twilio Conference","Build multi-party calls using Twilio Conference. Covers warm transfer, cold transfer, coaching (whisper), hold vs mute, participant modes, and supervisor barge. Use this skill for any contact center, support line, or scenario requiring transfers, holds, or multi-party calls.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4037,4038,4039,4042],{"name":3926,"slug":3927,"type":15},{"name":3872,"slug":3873,"type":15},{"name":4040,"slug":4041,"type":15},"Meetings","meetings",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:55.603708",{"slug":4045,"name":4045,"fn":4046,"description":4047,"org":4048,"tags":4049,"stars":25,"repoUrl":26,"updatedAt":4059},"twilio-content-template-builder","create and send message templates with Twilio","Create, manage, and send message templates using Twilio's Content API. Covers template creation for WhatsApp, SMS, RCS, and MMS; variable usage; WhatsApp Meta approval; and sending templates via ContentSid. Use this skill when building structured messages that require pre-approval or consistent formatting across channels.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4050,4053,4054,4055,4058],{"name":4051,"slug":4052,"type":15},"Email","email",{"name":20,"slug":21,"type":15},{"name":13,"slug":14,"type":15},{"name":4056,"slug":4057,"type":15},"Templates","templates",{"name":9,"slug":8,"type":15},"2026-07-17T06:04:26.637309",{"slug":4061,"name":4061,"fn":4062,"description":4063,"org":4064,"tags":4065,"stars":25,"repoUrl":26,"updatedAt":4077},"twilio-conversation-intelligence","build conversation intelligence pipelines","Twilio Conversation Intelligence development guide. Use when building real-time or post-call conversation analysis, language operator pipelines, sentiment analysis, agent assist, cross-channel analytics, or querying aggregated conversation insights (sentiment trends, escalation rates, dashboards).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4066,4067,4070,4073,4076],{"name":3883,"slug":3884,"type":15},{"name":4068,"slug":4069,"type":15},"Analytics","analytics",{"name":4071,"slug":4072,"type":15},"Monitoring","monitoring",{"name":4074,"slug":4075,"type":15},"NLP","nlp",{"name":9,"slug":8,"type":15},"2026-07-17T06:07:52.545387",{"slug":4079,"name":4079,"fn":4080,"description":4081,"org":4082,"tags":4083,"stars":25,"repoUrl":26,"updatedAt":4089},"twilio-conversation-memory","manage conversation memory with Twilio","Store and retrieve conversation context using Twilio Conversation Memory. Covers Memory Store provisioning, profile management, traits, observations, conversation summaries, and semantic Recall. Use this skill to give AI agents or human agents persistent memory of conversations across sessions and channels.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[4084,4085,4088],{"name":3883,"slug":3884,"type":15},{"name":4086,"slug":4087,"type":15},"Memory","memory",{"name":9,"slug":8,"type":15},"2026-07-17T06:04:19.526724"]