Open Context Protocol is live! 🚀 Read the launch post

listParticipant

Retrieve a list of participants belonging to the account used to make the request

Details

  • Method: GET
  • Path: /2010-04-01/Accounts/{AccountSid}/Conferences/{ConferenceSid}/Participants.json
  • Operation ID: ListParticipant

Parameters

{
  "AccountSid": {
    "description": "The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Participant resources to read.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "ConferenceSid": {
    "description": "The SID of the conference with the participants to read.",
    "required": true,
    "location": "path",
    "type": "string"
  },
  "Muted": {
    "description": "Whether to return only participants that are muted. Can be: `true` or `false`.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "Hold": {
    "description": "Whether to return only participants that are on hold. Can be: `true` or `false`.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "Coaching": {
    "description": "Whether to return only participants who are coaching another call. Can be: `true` or `false`.",
    "required": false,
    "location": "query",
    "type": "boolean"
  },
  "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": "ListParticipantResponse",
  "type": "object",
  "properties": {
    "participants": {
      "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 Participant 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 Participant resource is associated with."
          },
          "label": {
            "type": "string",
            "nullable": true,
            "description": "The user-specified label of this participant, if one was given when the participant was created. This may be used to fetch, update or delete the participant."
          },
          "call_sid_to_coach": {
            "type": "string",
            "minLength": 34,
            "maxLength": 34,
            "pattern": "^CA[0-9a-fA-F]{32}$",
            "nullable": true,
            "description": "The SID of the participant who is being `coached`. The participant being coached is the only participant who can hear the participant who is `coaching`."
          },
          "coaching": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the participant is coaching another call. Can be: `true` or `false`. If not present, defaults to `false` unless `call_sid_to_coach` is defined. If `true`, `call_sid_to_coach` must be defined."
          },
          "conference_sid": {
            "type": "string",
            "minLength": 34,
            "maxLength": 34,
            "pattern": "^CF[0-9a-fA-F]{32}$",
            "nullable": true,
            "description": "The SID of the conference the participant is in."
          },
          "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."
          },
          "end_conference_on_exit": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the conference ends when the participant leaves. Can be: `true` or `false` and the default is `false`. If `true`, the conference ends and all other participants drop out when the participant leaves."
          },
          "muted": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the participant is muted. Can be `true` or `false`."
          },
          "hold": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the participant is on hold. Can be `true` or `false`."
          },
          "start_conference_on_enter": {
            "type": "boolean",
            "nullable": true,
            "description": "Whether the conference starts when the participant joins the conference, if it has not already started. Can be: `true` or `false` and the default is `true`. If `false` and the conference has not started, the participant is muted and hears background music until another participant starts the conference."
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "connecting",
              "ringing",
              "connected",
              "complete",
              "failed"
            ],
            "description": "The status of the participant's call in a session. Can be: `queued`, `connecting`, `ringing`, `connected`, `complete`, or `failed`."
          },
          "queue_time": {
            "type": "string",
            "nullable": true,
            "description": "The wait time in milliseconds before participant's call is placed. Only available in the response to a create participant request."
          },
          "uri": {
            "type": "string",
            "nullable": true,
            "description": "The URI of the resource, relative to `https://api.twilio.com`."
          }
        }
      }
    },
    "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('listParticipant', {
    # Add required parameters here
})