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

fetchCallNotification

Error notifications for calls

Details

  • Method: GET
  • Path: /2010-04-01/Accounts/{AccountSid}/Calls/{CallSid}/Notifications/{Sid}.json
  • Operation ID: FetchCallNotification

Parameters

{
  "AccountSid": {
    "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Call Notification resource to fetch.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "CallSid": {
    "description": "The [Call](https://www.twilio.com/docs/voice/api/call-resource) SID of the Call Notification resource to fetch.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "Sid": {
    "description": "The Twilio-provided string that uniquely identifies the Call Notification resource to fetch.",
    "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 created the Call Notification resource."
    },
    "api_version": {
      "type": "string",
      "nullable": true,
      "description": "The API version used to create the Call Notification resource."
    },
    "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 Call Notification resource is associated with."
    },
    "date_created": {
      "type": "string",
      "format": "date-time-rfc-2822",
      "nullable": true,
      "description": "The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
    },
    "date_updated": {
      "type": "string",
      "format": "date-time-rfc-2822",
      "nullable": true,
      "description": "The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
    },
    "error_code": {
      "type": "string",
      "nullable": true,
      "description": "A unique error code for the error condition that is described in our [Error Dictionary](https://www.twilio.com/docs/api/errors)."
    },
    "log": {
      "type": "string",
      "nullable": true,
      "description": "An integer log level that corresponds to the type of notification: `0` is ERROR, `1` is WARNING."
    },
    "message_date": {
      "type": "string",
      "format": "date-time-rfc-2822",
      "nullable": true,
      "description": "The date the notification was actually generated in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Message buffering can cause this value to differ from `date_created`."
    },
    "message_text": {
      "type": "string",
      "nullable": true,
      "description": "The text of the notification."
    },
    "more_info": {
      "type": "string",
      "format": "uri",
      "nullable": true,
      "description": "The URL for more information about the error condition. This value is a page in our [Error Dictionary](https://www.twilio.com/docs/api/errors)."
    },
    "request_method": {
      "type": "string",
      "format": "http-method",
      "enum": [
        "GET",
        "POST"
      ],
      "nullable": true,
      "description": "The HTTP method used to generate the notification. If the notification was generated during a phone call, this is the HTTP Method used to request the resource on your server. If the notification was generated by your use of our REST API, this is the HTTP method used to call the resource on our servers."
    },
    "request_url": {
      "type": "string",
      "format": "uri",
      "nullable": true,
      "description": "The URL of the resource that generated the notification. If the notification was generated during a phone call, this is the URL of the resource on your server that caused the notification. If the notification was generated by your use of our REST API, this is the URL of the resource you called."
    },
    "request_variables": {
      "type": "string",
      "nullable": true,
      "description": "The HTTP GET or POST variables we sent to your server. However, if the notification was generated by our REST API, this contains the HTTP POST or PUT variables you sent to our API."
    },
    "response_body": {
      "type": "string",
      "nullable": true,
      "description": "The HTTP body returned by your server."
    },
    "response_headers": {
      "type": "string",
      "nullable": true,
      "description": "The HTTP headers returned by your server."
    },
    "sid": {
      "type": "string",
      "minLength": 34,
      "maxLength": 34,
      "pattern": "^NO[0-9a-fA-F]{32}$",
      "nullable": true,
      "description": "The unique string that that we created to identify the Call Notification resource."
    },
    "uri": {
      "type": "string",
      "nullable": true,
      "description": "The URI of the 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('fetchCallNotification', {
    # Add required parameters here
})