# This action ends the conversation
end_conversation_action = vocode_client.actions.create_action(
request=ActionParamsRequest(type="action_end_conversation", config={})
)
# This action makes an API call to our calendar endpoint
calendar_action = vocode_client.actions.create_action(
request={
"type": "action_external",
"config": {
"name": "Meeting_Booking_Assistant",
"description": ("Book a meeting for a 30 minute or 1 hour call."),
"url": "http://example.com/booking",
"speak_on_send": True,
"speak_on_receive": True,
"input_schema": {
"type": "object",
"properties": {
"length": {
"type": "string",
"enum": ["30m", "1hr"],
},
"time": {
"type": "string",
"pattern": "^\d{2}:\d0[ap]m$",
},
},
},
},
},
)