Open Context Protocol is live! 🚀 Read the launch post

listApplication

Retrieve a list of applications representing an application within the requesting account

Details

  • Method: GET
  • Path: /2010-04-01/Accounts/{AccountSid}/Applications.json
  • Operation ID: ListApplication

Parameters

{
  "AccountSid": {
    "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Application resources to read.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "FriendlyName": {
    "description": "The string that identifies the Application resources to read.",
    "required": false,
    "location": "query",
    "type": "string"
  },
  "PageSize": {
    "description": "How many resources to return in each list page. The default is 50, and the maximum is 1000.",
    "required": false,
    "location": "query",
    "type": "integer",
    "format": "int64"
  },
  "Page": {
    "description": "The page index. This value is simply for client state.",
    "required": false,
    "location": "query",
    "type": "integer"
  },
  "PageToken": {
    "description": "The page token. This is provided by the API.",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "title": "ListApplicationResponse",
  "type": "object",
  "properties": {
    "applications": {
      "type": "array",
      "items": {
        "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 Application resource."
          },
          "api_version": {
            "type": "string",
            "nullable": true,
            "description": "The API version used to start a new TwiML session."
          },
          "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."
          },
          "friendly_name": {
            "type": "string",
            "nullable": true,
            "description": "The string that you assigned to describe the resource."
          },
          "message_status_callback": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The URL we call using a POST method to send message status information to your application."
          },
          "sid": {
            "type": "string",
            "minLength": 34,
            "maxLength": 34,
            "pattern": "^AP[0-9a-fA-F]{32}$",
            "nullable": true,
            "description": "The unique string that that we created to identify the Application resource."
          },
          "sms_fallback_method": {
            "type": "string",
            "format": "http-method",
            "enum": [
              "GET",
              "POST"
            ],
            "nullable": true,
            "description": "The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`."
          },
          "sms_fallback_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`."
          },
          "sms_method": {
            "type": "string",
            "format": "http-method",
            "enum": [
              "GET",
              "POST"
            ],
            "nullable": true,
            "description": "The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`."
          },
          "sms_status_callback": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The URL we call using a POST method to send status information to your application about SMS messages that refer to the application."
          },
          "sms_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The URL we call when the phone number receives an incoming SMS message."
          },
          "status_callback": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The URL we call using the `status_callback_method` to send status information to your application."
          },
          "status_callback_method": {
            "type": "string",
            "format": "http-method",
            "enum": [
              "GET",
              "POST"
            ],
            "nullable": true,
            "description": "The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`."
          },
          "uri": {
            "type": "string",
            "nullable": true,
            "description": "The URI of the resource, relative to `https://api.twilio.com`."
          },
          "voice_caller_id_lookup": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether we look up the caller's caller-ID name from the CNAM database (additional charges apply). Can be: `true` or `false`."
          },
          "voice_fallback_method": {
            "type": "string",
            "format": "http-method",
            "enum": [
              "GET",
              "POST"
            ],
            "nullable": true,
            "description": "The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`."
          },
          "voice_fallback_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`."
          },
          "voice_method": {
            "type": "string",
            "format": "http-method",
            "enum": [
              "GET",
              "POST"
            ],
            "nullable": true,
            "description": "The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`."
          },
          "voice_url": {
            "type": "string",
            "format": "uri",
            "nullable": true,
            "description": "The URL we call when the phone number assigned to this application receives a call."
          },
          "public_application_connect_enabled": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether to allow other Twilio accounts to dial this applicaton using Dial verb. Can be: `true` or `false`."
          }
        }
      }
    },
    "end": {
      "type": "integer"
    },
    "first_page_uri": {
      "format": "uri",
      "type": "string"
    },
    "next_page_uri": {
      "format": "uri",
      "nullable": true,
      "type": "string"
    },
    "page": {
      "type": "integer"
    },
    "page_size": {
      "type": "integer"
    },
    "previous_page_uri": {
      "format": "uri",
      "nullable": true,
      "type": "string"
    },
    "start": {
      "type": "integer"
    },
    "uri": {
      "format": "uri",
      "type": "string"
    }
  }
}

Usage

from ocp_agent import OCPAgent

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

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