Skip to main content
POST
/
portouts
/
reports
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const report = await client.portouts.reports.create({
  params: { filters: {} },
  report_type: 'export_portouts_csv',
});

console.log(report.data);
{
  "data": {
    "id": "eef3340b-8903-4466-b445-89b697315a3a",
    "report_type": "export_portouts_csv",
    "status": "completed",
    "params": {
      "filters": {
        "status__in": [
          "pending"
        ],
        "customer_reference__in": [
          "my-customer-reference"
        ],
        "end_user_name": "McPortersen",
        "phone_numbers__overlaps": [
          "+1234567890"
        ],
        "created_at__lt": "2023-11-07T05:31:56Z",
        "created_at__gt": "2023-11-07T05:31:56Z"
      }
    },
    "document_id": "f1486bae-f067-460c-ad43-73a92848f902",
    "record_type": "portout_report",
    "created_at": "2021-03-19T10:07:15.527000Z",
    "updated_at": "2021-03-19T10:07:15.527000Z"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

The parameters for generating a new port-out related report.

report_type
enum<string>
required

Identifies the type of report

Available options:
export_portouts_csv
Example:

"export_portouts_csv"

params
object
required

The parameters for generating a port-outs CSV report.

Response

Successful response

data
object