Open Context Protocol is live! 🚀 Read the launch post

createQueue

Create a queue

Details

  • Method: POST
  • Path: /2010-04-01/Accounts/{AccountSid}/Queues.json
  • Operation ID: CreateQueue

Parameters

{
  "AccountSid": {
    "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that will create the resource.",
    "required": true,
    "location": "path",
    "type": "string"
  }
}

Response Schema

{
  "type": "object",
  "properties": {
    "date_updated": {
      "type": "string",
      "format": "date-time-rfc-2822",
      "nullable": true,
      "description": "The date and time in GMT that this resource was last updated, specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
    },
    "current_size": {
      "type": "integer",
      "default": 0,
      "description": "The number of calls currently in the queue."
    },
    "friendly_name": {
      "type": "string",
      "nullable": true,
      "description": "A string that you assigned to describe this resource."
    },
    "uri": {
      "type": "string",
      "nullable": true,
      "description": "The URI of this resource, relative to `https://api.twilio.com`."
    },
    "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 this Queue resource."
    },
    "average_wait_time": {
      "type": "integer",
      "default": 0,
      "description": " The average wait time in seconds of the members in this queue. This is calculated at the time of the request."
    },
    "sid": {
      "type": "string",
      "minLength": 34,
      "maxLength": 34,
      "pattern": "^QU[0-9a-fA-F]{32}$",
      "nullable": true,
      "description": "The unique string that that we created to identify this Queue resource."
    },
    "date_created": {
      "type": "string",
      "format": "date-time-rfc-2822",
      "nullable": true,
      "description": "The date and time in GMT that this resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format."
    },
    "max_size": {
      "type": "integer",
      "default": 0,
      "description": " The maximum number of calls that can be in the queue. The default is 1000 and the maximum is 5000."
    }
  }
}

Usage

from ocp_agent import OCPAgent

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

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