Open Context Protocol is live! 🚀 Read the launch post
createUserDefinedMessageSubscription

createUserDefinedMessageSubscription

Subscribe to User Defined Messages for a given Call SID.

Details

  • Method: POST
  • Path: /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/UserDefinedMessageSubscriptions.json
  • Operation ID: CreateUserDefinedMessageSubscription

Parameters

{
  "AccountSid": {
    "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "CallSid": {
    "description": "The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Messages subscription is associated with. This refers to the Call SID that is producing the user defined messages.",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "account_sid": {
      "type": "string",
      "minLength": 34,
      "maxLength": 34,
      "pattern": "^AC[0-9a-fA-F]{32}$",
      "nullable": true,
      "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that subscribed to the User Defined Messages."
    },
    "call_sid": {
      "type": "string",
      "minLength": 34,
      "maxLength": 34,
      "pattern": "^CA[0-9a-fA-F]{32}$",
      "nullable": true,
      "description": "The SID of the [Call](https://www.twilio.com/docs/voice/api/call-resource) the User Defined Message Subscription is associated with. This refers to the Call SID that is producing the User Defined Messages."
    },
    "sid": {
      "type": "string",
      "minLength": 34,
      "maxLength": 34,
      "pattern": "^ZY[0-9a-fA-F]{32}$",
      "nullable": true,
      "description": "The SID that uniquely identifies this User Defined Message Subscription."
    },
    "date_created": {
      "type": "string",
      "format": "date-time-rfc-2822",
      "nullable": true,
      "description": "The date that this User Defined Message Subscription was created, given in RFC 2822 format."
    },
    "uri": {
      "type": "string",
      "nullable": true,
      "description": "The URI of the User Defined Message Subscription Resource, relative to `https://api.twilio.com`."
    }
  }
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('twilio')

# Call this tool
result = await agent.call_tool('createUserDefinedMessageSubscription', {
    # Add required parameters here
})