{"format":"xai-responses-function-tools","api_base":"https://api.wedget.app/v1/chat/ai","tools":[{"type":"function","name":"wedget_list_conversations","description":"List Wedget support conversations.","parameters":{"type":"object","properties":{"status":{"type":"string","enum":["open","closed","all"]},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/conversations"}},{"type":"function","name":"wedget_get_conversation","description":"Read a conversation and its visitor context.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/conversations/{id}"}},{"type":"function","name":"wedget_list_messages","description":"Read conversation messages, including internal notes.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"before_seq":{"type":"integer"},"since_seq":{"type":"integer"},"limit":{"type":"integer","minimum":1,"maximum":100}},"required":["id"],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/conversations/{id}/messages"}},{"type":"function","name":"wedget_reply","description":"Reply as the connected service agent. Read the latest messages first.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"body":{"type":"string"},"expected_last_seq":{"type":"integer"},"idempotency_key":{"type":"string"}},"required":["id","body","expected_last_seq","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/conversations/{id}/messages"}},{"type":"function","name":"wedget_add_note","description":"Add an internal note that visitors cannot see.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"body":{"type":"string"},"idempotency_key":{"type":"string"}},"required":["id","body","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/conversations/{id}/notes"}},{"type":"function","name":"wedget_update_conversation","description":"Update conversation state, priority, AI ownership, snooze time, or tags.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"state":{"type":"string","enum":["open","snoozed","closed"]},"priority":{"type":"integer","minimum":0,"maximum":3},"ai_handled":{"type":"boolean"},"snooze_until":{"type":"string","format":"date-time"},"add_tags":{"type":"array","items":{"type":"string"}},"remove_tags":{"type":"array","items":{"type":"string"}},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"PATCH","endpoint":"/conversations/{id}"}},{"type":"function","name":"wedget_list_visitors","description":"List recent workspace visitors.","parameters":{"type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":100}},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/visitors"}},{"type":"function","name":"wedget_get_visitor","description":"Read a visitor profile.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/visitors/{id}"}},{"type":"function","name":"wedget_list_customer_records","description":"Read support-context activity records for a visitor.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/visitors/{id}/records"}},{"type":"function","name":"wedget_moderate_visitor","description":"Ban or unban a visitor.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"banned":{"type":"boolean"},"reason":{"type":"string"},"idempotency_key":{"type":"string"}},"required":["id","banned","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"PATCH","endpoint":"/visitors/{id}"}},{"type":"function","name":"wedget_list_collections","description":"List help-center collections.","parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/collections"}},{"type":"function","name":"wedget_create_collection","description":"Create a help-center collection.","parameters":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"sort":{"type":"integer"},"idempotency_key":{"type":"string"}},"required":["title","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/collections"}},{"type":"function","name":"wedget_update_collection","description":"Edit a help-center collection.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"title":{"type":"string"},"description":{"type":"string"},"icon":{"type":"string"},"sort":{"type":"integer"},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"PATCH","endpoint":"/collections/{id}"}},{"type":"function","name":"wedget_delete_collection","description":"Delete a help-center collection.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"DELETE","endpoint":"/collections/{id}"}},{"type":"function","name":"wedget_list_articles","description":"List help-center articles.","parameters":{"type":"object","properties":{"q":{"type":"string"}},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/articles"}},{"type":"function","name":"wedget_create_article","description":"Create a help-center article draft.","parameters":{"type":"object","properties":{"title":{"type":"string"},"excerpt":{"type":"string"},"body":{"type":"string"},"collection_id":{"type":"string","format":"uuid"},"hero_image_url":{"type":"string","format":"uri"},"idempotency_key":{"type":"string"}},"required":["title","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/articles"}},{"type":"function","name":"wedget_get_article","description":"Read a help-center article and its translations.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/articles/{id}"}},{"type":"function","name":"wedget_update_article","description":"Edit a help-center article using its latest updated_at value.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"expected_updated_at":{"type":"string","format":"date-time"},"title":{"type":"string"},"excerpt":{"type":"string"},"body":{"type":"string"},"collection_id":{"type":"string","format":"uuid"},"hero_image_url":{"type":"string","format":"uri"},"sort":{"type":"integer"},"idempotency_key":{"type":"string"}},"required":["id","expected_updated_at","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"PATCH","endpoint":"/articles/{id}"}},{"type":"function","name":"wedget_publish_article","description":"Publish or unpublish an article using its latest updated_at value.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["draft","published"]},"expected_updated_at":{"type":"string","format":"date-time"},"idempotency_key":{"type":"string"}},"required":["id","status","expected_updated_at","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/articles/{id}/publication"}},{"type":"function","name":"wedget_delete_article","description":"Delete a help-center article.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"DELETE","endpoint":"/articles/{id}"}},{"type":"function","name":"wedget_get_widget","description":"Read safe widget appearance and behavior settings.","parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/widget"}},{"type":"function","name":"wedget_update_widget","description":"Edit safe widget appearance and behavior settings.","parameters":{"type":"object","properties":{"greeting":{"type":"string"},"subtext":{"type":"string"},"welcome_message":{"type":"string"},"branding":{"type":"object"},"expected_updated_at":{"type":"string","format":"date-time"},"idempotency_key":{"type":"string"}},"required":["expected_updated_at","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"PATCH","endpoint":"/widget"}},{"type":"function","name":"wedget_list_files","description":"List images, PDFs, and other attachments visible to this connection.","parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/files"}},{"type":"function","name":"wedget_list_news","description":"List workspace news items.","parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/news"}},{"type":"function","name":"wedget_get_news","description":"Read a news item.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"}},"required":["id"],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/news/{id}"}},{"type":"function","name":"wedget_create_news","description":"Create a news draft.","parameters":{"type":"object","properties":{"title":{"type":"string"},"excerpt":{"type":"string"},"body":{"type":"string"},"banner_image_url":{"type":"string","format":"uri"},"idempotency_key":{"type":"string"}},"required":["title","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/news"}},{"type":"function","name":"wedget_update_news","description":"Edit a news item using its latest updated_at value.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"expected_updated_at":{"type":"string","format":"date-time"},"title":{"type":"string"},"excerpt":{"type":"string"},"body":{"type":"string"},"banner_image_url":{"type":"string","format":"uri"},"sort":{"type":"integer"},"idempotency_key":{"type":"string"}},"required":["id","expected_updated_at","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"PATCH","endpoint":"/news/{id}"}},{"type":"function","name":"wedget_publish_news","description":"Publish or unpublish a news item.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["draft","published"]},"expected_updated_at":{"type":"string","format":"date-time"},"idempotency_key":{"type":"string"}},"required":["id","status","expected_updated_at","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/news/{id}/publication"}},{"type":"function","name":"wedget_delete_news","description":"Delete a news item.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"DELETE","endpoint":"/news/{id}"}},{"type":"function","name":"wedget_list_automations","description":"List proactive automations and offers.","parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/automations"}},{"type":"function","name":"wedget_create_automation","description":"Create an automation.","parameters":{"type":"object","properties":{"name":{"type":"string"},"enabled":{"type":"boolean"},"trigger":{"type":"object"},"conditions":{"type":"array","items":{"type":"object"}},"action":{"type":"object"},"idempotency_key":{"type":"string"}},"required":["name","trigger","action","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/automations"}},{"type":"function","name":"wedget_update_automation","description":"Edit an automation.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"enabled":{"type":"boolean"},"trigger":{"type":"object"},"conditions":{"type":"array","items":{"type":"object"}},"action":{"type":"object"},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"PATCH","endpoint":"/automations/{id}"}},{"type":"function","name":"wedget_delete_automation","description":"Delete an automation.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"DELETE","endpoint":"/automations/{id}"}},{"type":"function","name":"wedget_list_saved_replies","description":"List saved replies.","parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/canned"}},{"type":"function","name":"wedget_create_saved_reply","description":"Create a saved reply.","parameters":{"type":"object","properties":{"shortcut":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"idempotency_key":{"type":"string"}},"required":["shortcut","title","body","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"POST","endpoint":"/canned"}},{"type":"function","name":"wedget_update_saved_reply","description":"Edit a saved reply.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"shortcut":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"PATCH","endpoint":"/canned/{id}"}},{"type":"function","name":"wedget_delete_saved_reply","description":"Delete a saved reply.","parameters":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"idempotency_key":{"type":"string"}},"required":["id","idempotency_key"],"additionalProperties":false},"x-wedget":{"method":"DELETE","endpoint":"/canned/{id}"}},{"type":"function","name":"wedget_get_analytics","description":"Read support analytics for the last 1 to 90 days.","parameters":{"type":"object","properties":{"days":{"type":"integer","minimum":1,"maximum":90}},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/analytics"}},{"type":"function","name":"wedget_list_team","description":"List teammate names, roles, and availability.","parameters":{"type":"object","properties":{},"required":[],"additionalProperties":false},"x-wedget":{"method":"GET","endpoint":"/team"}}]}