This is the API V2 documentation. To switch out of beta revert back to our API V1.

Open SidemenuAPI Reference
API Reference
Close Sidemenu

Billing Groups

List all billing groupslistBillingGroups

get https://api.telnyx.com/v2/billing_groups

List all billing groups

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/billing_groups?page[size]=10"
Parameters
In query
page[number]
integer (1)
optional

The page number to load

Default: 1
page[size]
integer (1 - 250)
optional

The size of the page

Default: 20
Responses
200

A paginated array of billing groups

default

Unexpected error

Success Response
{
  "data": [
    {
      "created_at": "2019-10-15T10:07:15.527Z",
      "deleted_at": null,
      "id": "f5586561-8ff0-4291-a0ac-84fe544797bd",
      "name": "My billing group name",
      "organization_id": "f1486bae-f067-460c-ad43-73a92848f902",
      "record_type": "billing_group",
      "updated_at": "2019-10-15T10:07:15.527Z"
    }
  ],
  "meta": {
    "page_number": 2,
    "page_size": 25,
    "total_pages": 3,
    "total_results": 55
  }
}

Create a billing groupcreateBillingGroup

post https://api.telnyx.com/v2/billing_groups

Create a billing group

curl -X POST \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"name": "My billing group name"}' \
  https://api.telnyx.com/v2/billing_groups
Parameters
In body
name
string
optional

A name for the billing group

Responses
200

Expected billing group response to a valid request

default

Unexpected error

Success Response
{
  "data": {
    "created_at": "2019-10-15T10:07:15.527Z",
    "deleted_at": null,
    "id": "f5586561-8ff0-4291-a0ac-84fe544797bd",
    "name": "My billing group name",
    "organization_id": "f1486bae-f067-460c-ad43-73a92848f902",
    "record_type": "billing_group",
    "updated_at": "2019-10-15T10:07:15.527Z"
  }
}

Retrieve a billing groupretrieveBillingGroup

get https://api.telnyx.com/v2/billing_groups/{id}

Retrieve a billing group

curl -X GET \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --globoff "https://api.telnyx.com/v2/billing_groups/{id}"
Parameters
In path
id
string (uuid)
required

The id of the billing group

Responses
200

Expected billing group response to a valid request

default

Unexpected error

Success Response
{
  "data": {
    "created_at": "2019-10-15T10:07:15.527Z",
    "deleted_at": null,
    "id": "f5586561-8ff0-4291-a0ac-84fe544797bd",
    "name": "My billing group name",
    "organization_id": "f1486bae-f067-460c-ad43-73a92848f902",
    "record_type": "billing_group",
    "updated_at": "2019-10-15T10:07:15.527Z"
  }
}

Update a billing groupupdateBillingGroup

patch https://api.telnyx.com/v2/billing_groups/{id}

Update a billing group

curl -X PATCH \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --data '{"name": "My updated billing group name"}' \
  https://api.telnyx.com/v2/billing_groups/{id}
Parameters
In path
id
string (uuid)
required

The id of the billing group

In body
name
string
optional

A name for the billing group

Responses
200

Expected billing group response to a valid request

default

Unexpected error

Success Response
{
  "data": {
    "created_at": "2019-10-15T10:07:15.527Z",
    "deleted_at": null,
    "id": "f5586561-8ff0-4291-a0ac-84fe544797bd",
    "name": "My billing group name",
    "organization_id": "f1486bae-f067-460c-ad43-73a92848f902",
    "record_type": "billing_group",
    "updated_at": "2019-10-15T10:07:15.527Z"
  }
}

Delete a billing groupdeleteBillingGroup

delete https://api.telnyx.com/v2/billing_groups/{id}

Delete a billing group

curl -X DELETE \
  --header "Content-Type: application/json" \
  --header "Accept: application/json" \
  --header "Authorization: Bearer YOUR_API_KEY" \
  "https://api.telnyx.com/v2/billing_groups/{id}"
Parameters
In path
id
string (uuid)
required

The id of the billing group

Responses
200

Expected billing group response to a valid request

default

Unexpected error

Success Response
{
  "data": {
    "created_at": "2019-10-15T10:07:15.527Z",
    "deleted_at": null,
    "id": "f5586561-8ff0-4291-a0ac-84fe544797bd",
    "name": "My billing group name",
    "organization_id": "f1486bae-f067-460c-ad43-73a92848f902",
    "record_type": "billing_group",
    "updated_at": "2019-10-15T10:07:15.527Z"
  }
}
Previous: Overview

Was this section helpful?was-this-page-helpful