Latest Legacy

List all sessions

This API retrieves a list of sessions based on a filter criteria over the last 90 days.

Note: The default rate limit for this API is 20 requests per minute. If the rate limit is exceeded, the API will throw the error “too many requests”.

API Endpoint

GET https://api.plivo.com/v1/Account/{auth_id}/Verify/Session/

Arguments

app_uuid string

Filters results based on sessions sent using a specific application.

status string

The phone number to which the message is to be delivered.

recipient string

Filters results by the number to which codes/OTPs were sent using Plivo APIs. You can filter the details by using the exact number in E.164 format — for example, +12025553434.

subaccount string

Filters for sessions sent using a specific subaccount’s Auth Token.

limit string

Denotes the number of results per page. The maximum number of results that can be fetched is 20.

Defaults to 20.

offset string

Denotes the number of value items by which the results should be offset. Defaults to 0. Read more about offset-based pagination.

Note: The subaccount filter is implicitly applied when a subaccount’s API credentials are used to fire this API. This argument should be used only when the parent account’s API credentials are used to fire this API.

Returns

This API returns a list of sessions matching the filters specified in the request.

The API response also contains a meta field with the fields:

  • limit: the size of the page returned in the response
  • offset: the offset for the page returned in the response
  • next: the URL that points to the next page of results
  • previous: the URL that points to the previous page of results

Response

 {
   "api_id": "3a7a0d6d-1b85-4593-921c-373e673a5799",
   "meta": {
       "limit": 20,
       "offset": 0,
       "next": null,
       "previous": null
   },
   "sessions": [
      {
           "session_uuid": "51e965f3-65a5-4ca0-9542-57154118a991",
           "app_uuid": "59728519-d145-45d6-8d46-60c06f7e8bbb",
           "recipient": "918681951370",
           "channel": "sms",
           "status": "expired",
           "count": 1,
           "attempt_details": [
               {
                   "channel": "sms",
                   "attempt_uuid": "bd460457-6c2f-4177-a879-e6a83c35d5a9",
                   "status": "undelivered",
                   "time": "2023-06-01T10:40:05.804031Z"
               }
           ],
           "charges": {
               "total_charge": "0.08",
               "validation_charge": "0.0000",
               "attempt_charges": [
                   {
                       "attempt_uuid": "bd460457-6c2f-4177-a879-e6a83c35d5a9",
                       "channel": "sms",
                       "charge": "0.08000"
                   }
               ]
           },


           "created_at": "2023-06-01T10:40:05.804031Z",
           "updated_at": "2023-06-01T10:40:05.804031Z"
       },


            {
           "session_uuid": "60ea68db-b123-46d9-9eb2-1201d516dbbd",
           "app_uuid": "ec66515e-86f6-4507-8620-31c039538d7a",
           "recipient": "919380013443",
           "channel": "voice",
           "status": "expired",
           "count": 3,
           "attempt_details": [
               {
                   "channel": "voice",
                   "attempt_uuid": "90cc6cde-db80-4d14-9716-3aaa2b403377",
                   "status": "ANSWER",
                   "time": "2023-06-01T08:52:39.363253Z"
               },
               {
                   "channel": "sms",
                   "attempt_uuid": "acbffc94-283b-42b3-8a96-65cbc18a9624",
                   "status": "delivered",
                   "time": "2023-06-01T08:52:59.484375Z"
               },
               {
                   "channel": "voice",
                   "attempt_uuid": "04a81620-c4ab-45d6-847d-cc3ae6fec121",
                   "status": "EARLY MEDIA",
                   "time": "2023-06-01T08:53:25.577153Z"
               }
           ],
           "charges": {
               "total_charge": "0.113",
               "validation_charge": "0.0000",
               "attempt_charges": [
                   {
                       "attempt_uuid": "90cc6cde-db80-4d14-9716-3aaa2b403377",
                       "channel": "voice",
                       "charge": "0.03300"
                   },
                   {
                       "attempt_uuid": "acbffc94-283b-42b3-8a96-65cbc18a9624",
                       "channel": "sms",
                       "charge": "0.08000"
                   },
                   {
                       "attempt_uuid": "04a81620-c4ab-45d6-847d-cc3ae6fec121",
                       "channel": "voice",
                       "charge": "0.00000"
                   }
               ]
           },
           "created_at": "2023-06-01T08:52:39.363253Z",
           "updated_at": "2023-06-01T08:53:25.577153Z"
       } 
       ] 
}