# Plivo

> Send messages, make calls and look up Plivo message, call and recording records.

App · 16 actions. Web page: https://docs.lodol.com/docs/integrations/plivo

## Actions

### Delete a recording

Delete a recording.

**Inputs**

- Recording ID (`recording_id`, text, required): Recording ID.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {}
}
```

### Get a application record

Get a application record.

**Inputs**

- App (`app_id`, text, required): App ID.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "answer_url": "example",
    "app_id": "example",
    "app_name": "example",
    "message_url": "example"
  }
}
```

### Get a call record

Get a call record.

**Inputs**

- Call uuid (`call_uuid`, text, required): Call uuid.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "call_direction": "example",
    "call_duration": "example",
    "call_uuid": "example",
    "end_time": "example",
    "from_number": "example",
    "hangup_cause_name": "example",
    "to_number": "example"
  }
}
```

### Get a endpoint record

Get a endpoint record.

**Inputs**

- Endpoint (`endpoint_id`, text, required): Endpoint ID.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "alias": "example",
    "endpoint_id": "example",
    "sip_uri": "example",
    "username": "example"
  }
}
```

### Get a message record

Get a message record.

**Inputs**

- Message uuid (`message_uuid`, text, required): Message uuid.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "from_number": "example",
    "message_direction": "example",
    "message_state": "example",
    "message_time": "example",
    "message_uuid": "example",
    "to_number": "example"
  }
}
```

### Get a number record

Get a number record.

**Inputs**

- Number (`number`, text, required): Number.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "application": "example",
    "carrier": "example",
    "number": "example",
    "number_type": "example"
  }
}
```

### Get a recording record

Get a recording record.

**Inputs**

- Recording ID (`recording_id`, text, required): Recording ID.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "add_time": "example",
    "call_uuid": "example",
    "recording_duration_ms": 1,
    "recording_id": "example",
    "recording_url": "example"
  }
}
```

### Get account details

Get account details.

**Inputs**: None.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "account_type": "example",
    "auth_id": "example",
    "cash_credits": "example",
    "name": "example"
  }
}
```

### List applications

List applications.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 20.
- Offset (`offset`, number): Offset. At least 0.
- App name (`app_name`, text): App name.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "meta": {
      "limit": 1,
      "next": "example",
      "offset": 1,
      "total_count": 1
    },
    "objects": [
      {
        "answer_url": "example",
        "app_id": "example",
        "app_name": "example",
        "message_url": "example"
      }
    ]
  }
}
```

### List completed calls

List completed calls.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 20.
- Offset (`offset`, number): Offset. At least 0.
- Call direction (`call_direction`, text): Call direction. One of: `inbound`, `outbound`.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- From number (`from_number`, text): From number.
- To number (`to_number`, text): To number.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "meta": {
      "limit": 1,
      "next": "example",
      "offset": 1,
      "total_count": 1
    },
    "objects": [
      {
        "call_direction": "example",
        "call_duration": "example",
        "call_uuid": "example",
        "end_time": "example",
        "from_number": "example",
        "hangup_cause_name": "example",
        "to_number": "example"
      }
    ]
  }
}
```

### List message records

List message records.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 20.
- Offset (`offset`, number): Offset. At least 0.
- Message direction (`message_direction`, text): Message direction. One of: `inbound`, `outbound`.
- Message state (`message_state`, text): Message state. One of: `queued`, `sent`, `delivered`, `undelivered`, `failed`, `received`.
- Start time (`start_time`, date and time): Start time.
- End time (`end_time`, date and time): End time.
- From number (`from_number`, text): From number.
- To number (`to_number`, text): To number.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "meta": {
      "limit": 1,
      "next": "example",
      "offset": 1,
      "total_count": 1
    },
    "objects": [
      {
        "from_number": "example",
        "message_direction": "example",
        "message_state": "example",
        "message_time": "example",
        "message_uuid": "example",
        "to_number": "example"
      }
    ]
  }
}
```

### List recordings

List recordings.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 20.
- Offset (`offset`, number): Offset. At least 0.
- Call uuid (`call_uuid`, text): Call uuid.
- From number (`from_number`, text): From number.
- To number (`to_number`, text): To number.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "meta": {
      "limit": 1,
      "next": "example",
      "offset": 1,
      "total_count": 1
    },
    "objects": [
      {
        "add_time": "example",
        "call_uuid": "example",
        "recording_duration_ms": 1,
        "recording_id": "example",
        "recording_url": "example"
      }
    ]
  }
}
```

### List SIP endpoints

List SIP endpoints.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 20.
- Offset (`offset`, number): Offset. At least 0.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "meta": {
      "limit": 1,
      "next": "example",
      "offset": 1,
      "total_count": 1
    },
    "objects": [
      {
        "alias": "example",
        "endpoint_id": "example",
        "sip_uri": "example",
        "username": "example"
      }
    ]
  }
}
```

### List your phone numbers

List your phone numbers.

**Inputs**

- Limit (`limit`, number): Limit. From 1 to 20.
- Offset (`offset`, number): Offset. At least 0.
- Number type (`number_type`, text): Number type. One of: `local`, `tollfree`, `mobile`, `national`.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "meta": {
      "limit": 1,
      "next": "example",
      "offset": 1,
      "total_count": 1
    },
    "objects": [
      {
        "application": "example",
        "carrier": "example",
        "number": "example",
        "number_type": "example"
      }
    ]
  }
}
```

### Make an outbound call

Make an outbound call.

**Inputs**

- From number (`from_number`, text, required): From number.
- To number (`to_number`, text, required): To number.
- Answer URL (`answer_url`, text, required): Answer URL.
- Answer method (`answer_method`, text): Answer method. One of: `GET`, `POST`.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "api_id": "example",
    "message": "example",
    "request_uuid": "example"
  }
}
```

### Send an SMS or MMS

Send an SMS or MMS.

**Inputs**

- From number (`from_number`, text, required): From number.
- To number (`to_number`, text, required): To number.
- Text (`text`, text): Text.
- Type (`type`, text): Type. One of: `sms`, `mms`.
- Media URLS (`media_urls`, list): Image or video URLs for an MMS.

**Outputs**

- `data` (object): The response from Plivo.

**Example output**

```json
{
  "data": {
    "api_id": "example",
    "message": "example",
    "message_uuid": [
      "example"
    ]
  }
}
```
