> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.getdial.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.getdial.ai/_mcp/server.

# List billing activity

GET https://getdial.ai/api/v1/billing/activity

The unified billing activity ledger — usage (calls, SMS, number ownership), wallet credits, and subscription payments — merged newest-first and cursor-paginated. Each item has a `type` that selects which fields are present. Pagination is Stripe-style: pass `limit` (max page size) and `starting_after` set to the `occurredAt` of the last item you received to fetch the next page (only items strictly older are returned). `hasMore` indicates whether further pages exist.

Reference: https://docs.getdial.ai/api-reference/rest-api/billing/list-billing-activity

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: rest
  version: 1.0.0
paths:
  /api/v1/billing/activity:
    get:
      operationId: list-billing-activity
      summary: List billing activity
      description: >-
        The unified billing activity ledger — usage (calls, SMS, number
        ownership), wallet credits, and subscription payments — merged
        newest-first and cursor-paginated. Each item has a `type` that selects
        which fields are present. Pagination is Stripe-style: pass `limit` (max
        page size) and `starting_after` set to the `occurredAt` of the last item
        you received to fetch the next page (only items strictly older are
        returned). `hasMore` indicates whether further pages exist.
      tags:
        - subpackage_billing
      parameters:
        - name: filter
          in: query
          description: >-
            Scope the feed: `all`, `usage` only, or `payment-credits`
            (subscription payments + wallet credits).
          required: false
          schema:
            $ref: '#/components/schemas/ApiV1BillingActivityGetParametersFilter'
            default: all
        - name: limit
          in: query
          description: Max items per page (clamped to 1–100).
          required: false
          schema:
            type: integer
            default: 50
        - name: starting_after
          in: query
          description: >-
            Exclusive cursor — an exact ISO timestamp (the `occurredAt` of the
            last item from the previous page). Only items strictly older are
            returned.
          required: false
          schema:
            type: string
            format: date-time
        - name: Authorization
          in: header
          description: 'Your Dial API key, sent as `Authorization: Bearer sk_live_...`'
          required: true
          schema:
            type: string
      responses:
        '200':
          description: One page of activity, newest-first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Billing_listBillingActivity_Response_200'
        '400':
          description: Invalid `limit` or `starting_after`.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
servers:
  - url: https://getdial.ai
    description: Dial API (provisional host)
components:
  schemas:
    ApiV1BillingActivityGetParametersFilter:
      type: string
      enum:
        - all
        - usage
        - payment-credits
      default: all
      title: ApiV1BillingActivityGetParametersFilter
    ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsType:
      type: string
      enum:
        - usage
        - credit
        - payment
      title: >-
        ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsType
    ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsAttribution:
      type: string
      enum:
        - wallet
        - entitlement
      title: >-
        ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsAttribution
    ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsKind:
      type: string
      enum:
        - card
        - welcome
        - manual
      description: Credit rows only.
      title: >-
        ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsKind
    ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItems:
      type: object
      properties:
        type:
          $ref: >-
            #/components/schemas/ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsType
        occurredAt:
          type: string
          format: date-time
        amountCents:
          type: integer
          description: 'Credits/payments: amount; usage: see totalCents.'
        totalCents:
          type: integer
          description: Usage rows only — billed amount in USD cents.
        fareName:
          type: string
        number:
          type:
            - string
            - 'null'
        billedQuantity:
          type: integer
        attribution:
          $ref: >-
            #/components/schemas/ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsAttribution
        phoneNumberId:
          type: string
        callId:
          type:
            - string
            - 'null'
        messageId:
          type:
            - string
            - 'null'
        kind:
          $ref: >-
            #/components/schemas/ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItemsKind
          description: Credit rows only.
        invoiceId:
          type:
            - string
            - 'null'
          description: >-
            Stripe invoice id (credit/payment rows); pass to Download an
            invoice.
        reason:
          type: string
          description: Payment rows only — Stripe billing reason.
      description: >-
        An activity item. `type` selects the shape: `usage` (fareName, number,
        billedQuantity, totalCents, attribution, phoneNumberId, callId,
        messageId); `credit` (amountCents, kind, invoiceId); `payment`
        (amountCents, invoiceId, reason).
      title: ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItems
    Billing_listBillingActivity_Response_200:
      type: object
      properties:
        data:
          type: array
          items:
            $ref: >-
              #/components/schemas/ApiV1BillingActivityGetResponsesContentApplicationJsonSchemaDataItems
        hasMore:
          type: boolean
          description: True when more items exist older than the last one returned.
      title: Billing_listBillingActivity_Response_200
    ErrorError:
      oneOf:
        - type: string
        - type: object
          additionalProperties:
            description: Any type
      description: An error message, or a validation-error object for 400 responses.
      title: ErrorError
    Error:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorError'
          description: An error message, or a validation-error object for 400 responses.
      title: Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your Dial API key, sent as `Authorization: Bearer sk_live_...`'

```

## Examples



**Request**

```json
{}
```

**Response**

```json
{
  "data": [
    {
      "type": "usage",
      "occurredAt": "2024-01-15T09:30:00Z",
      "amountCents": 1,
      "totalCents": 1,
      "fareName": "sms.tier_1.message",
      "number": "+14155550123",
      "billedQuantity": 1,
      "attribution": "wallet",
      "phoneNumberId": "pn_8f3a2b1c",
      "callId": null,
      "messageId": "msg_4d2f7e9a",
      "kind": null,
      "invoiceId": null,
      "reason": null
    },
    {
      "type": "credit",
      "occurredAt": "2024-01-14T16:45:00Z",
      "amountCents": 5000,
      "fareName": null,
      "number": null,
      "billedQuantity": null,
      "attribution": null,
      "phoneNumberId": null,
      "callId": null,
      "messageId": null,
      "kind": "card",
      "invoiceId": "in_1J2K3L4M5N6O7P",
      "reason": null
    },
    {
      "type": "payment",
      "occurredAt": "2024-01-10T12:00:00Z",
      "amountCents": 9999,
      "fareName": null,
      "number": null,
      "billedQuantity": null,
      "attribution": null,
      "phoneNumberId": null,
      "callId": null,
      "messageId": null,
      "kind": null,
      "invoiceId": "in_9Z8Y7X6W5V4U3T",
      "reason": "subscription_create"
    }
  ],
  "hasMore": true
}
```

**SDK Code**

```python
import requests

url = "https://getdial.ai/api/v1/billing/activity"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.get(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://getdial.ai/api/v1/billing/activity';
const options = {
  method: 'GET',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://getdial.ai/api/v1/billing/activity"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("GET", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://getdial.ai/api/v1/billing/activity")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://getdial.ai/api/v1/billing/activity")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://getdial.ai/api/v1/billing/activity', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://getdial.ai/api/v1/billing/activity");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://getdial.ai/api/v1/billing/activity")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```