# What each Twilio category cost per unit

> Each usage category counted in the range, in the unit Twilio counts it in, with its cost and its cost per unit beside the cost per unit over the range of the same length just before.

Source: https://docs.levelfour.ai/api-reference/twilio/get-providers-twilio-usage-unit-costs


## GET /api/v1/providers/twilio/usage/unit-costs

Each usage category counted in the range, in the unit Twilio counts it in, with its cost and its cost per unit beside the cost per unit over the range of the same length just before.

### Authentication

Send `Authorization: Bearer <token>`.

### Parameters

- `start` (query, string, required): First day, ISO 8601 (YYYY-MM-DD or a datetime)
- `end` (query, string, required): Last day, ISO 8601 (YYYY-MM-DD or a datetime), included

### Responses

#### 200: Successful Response

- `success` (boolean, default `true`)
- `timestamp` (string, required)
- `data` (object, required)
  - `start` (string, required)
  - `end` (string, required)
  - `previous_start` (string, required)
  - `previous_end` (string, required)
  - `items` (array of object, required)
    - `category` (string, required): Twilio's usage category, such as channels-whatsapp-template-marketing.
    - `label` (string, required): Twilio's own description of the category.
    - `product` (string, required): The Twilio product the category belongs to, such as WhatsApp or Voice.
    - `unit` (string, required): The unit Twilio counts the category in, such as messages or minutes.
    - `quantity` (number, required)
    - `cost` (number, required): USD. A bill in another currency is converted at each day's rate.
    - `cost_per_unit` (number, nullable, required): USD per unit, or null where nothing was counted.
    - `previous_cost_per_unit` (number, nullable, required): USD per unit over the range of the same length just before, or null where nothing was counted.

#### Errors

- `400`: Bad Request
- `401`: Authentication Error
- `403`: Authorization Error
- `404`: Not Found
- `409`: Conflict
- `422`: Validation Error
- `429`: Rate Limit Exceeded
- `500`: Internal Server Error

Body of `400`, `401`, `403`, `404`, `409`, `422`, `429`, `500`:

- `success` (`false`, required)
- `error` (object, required)
  - `code` (string, required)
  - `message` (string, required)
  - `details` (any)
- `timestamp` (date-time string, required)
