SIM Card Groups API

SIM Card Groups operations API

Get all SIM card groups

Get all SIM card groups belonging to the user that match the given filters.

SecuritybearerAuth
Request
query Parameters
page[number]
integer >= 1
Default: 1

The page number to load

page[size]
integer [ 1 .. 250 ]
Default: 20

The size of the page

filter[name]
string <uuid>

A valid SIM card group name.

Example: filter[name]=My Test Group
filter[private_wireless_gateway_id]
string <uuid>

A Private Wireless Gateway ID associated with the group.

Example: filter[private_wireless_gateway_id]=7606c6d3-ff7c-49c1-943d-68879e9d584d
Responses
200

Successful response

Response Schema: application/json
Array of objects (SIMCardGroup)
object (PaginationMeta)
default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/sim_card_groups
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.SimCardGroup.list(page={"number":1,"size":20})
Response samples
application/json
{
  • "data": [
    • {
      • "consumed_data": {
        • "amount": "2048.1",
        • "unit": "MB"
        },
      • "created_at": "2018-02-02T22:25:27.521Z",
      • "data_limit": {
        • "amount": "2048.1",
        • "unit": "MB"
        },
      • "default": true,
      • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      • "name": "My Test Group",
      • "private_wireless_gateway_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
      • "record_type": "sim_card_group",
      • "sim_card_count": 10,
      • "updated_at": "2018-02-02T22:25:27.521Z"
      }
    ],
  • "meta": {
    • "page_number": 2,
    • "page_size": 25,
    • "total_pages": 3,
    • "total_results": 55
    }
}

Create a SIM card group

Creates a new SIM card group object

SecuritybearerAuth
Request
Request Body schema: application/json
required
object

Upper limit on the amount of data the SIM cards, within the group, can use.

name
required
string

A user friendly name for the SIM card group.

Responses
200

Successful Response

Response Schema: application/json
object (SIMCardGroup)
object (ConsumedData)

Represents the amount of data consumed.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

object

Upper limit on the amount of data the SIM cards, within the group, can use.

default
boolean

Indicates whether the SIM card group is the users default group.
The default group is created for the user and can not be removed.

id
string <uuid>

Identifies the resource.

name
string

A user friendly name for the SIM card group.

private_wireless_gateway_id
string <uuid>
Default: null

The identification of the related Private Wireless Gateway resource.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
post/sim_card_groups
Request samples
application/json
{
  • "data_limit": {
    • "amount": "2048.1",
    • "unit": "MB"
    },
  • "name": "My Test Group"
}
Response samples
application/json
{
  • "data": {
    • "consumed_data": {
      • "amount": "2048.1",
      • "unit": "MB"
      },
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "data_limit": {
      • "amount": "2048.1",
      • "unit": "MB"
      },
    • "default": true,
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "name": "My Test Group",
    • "private_wireless_gateway_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "sim_card_group",
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Delete a SIM card group

Permanently deletes a SIM card group

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
Responses
200

Successful Response

Response Schema: application/json
object (SIMCardGroup)
object (ConsumedData)

Represents the amount of data consumed.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

object

Upper limit on the amount of data the SIM cards, within the group, can use.

default
boolean

Indicates whether the SIM card group is the users default group.
The default group is created for the user and can not be removed.

id
string <uuid>

Identifies the resource.

name
string

A user friendly name for the SIM card group.

private_wireless_gateway_id
string <uuid>
Default: null

The identification of the related Private Wireless Gateway resource.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
delete/sim_card_groups/{id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

res = telnyx.SimCardGroup.retrieve('id')
res.delete()
Response samples
application/json
{
  • "data": {
    • "consumed_data": {
      • "amount": "2048.1",
      • "unit": "MB"
      },
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "data_limit": {
      • "amount": "2048.1",
      • "unit": "MB"
      },
    • "default": true,
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "name": "My Test Group",
    • "private_wireless_gateway_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "sim_card_group",
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Get SIM card group

Returns the details regarding a specific SIM card group

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
Responses
200

Successful Response

Response Schema: application/json
object (SIMCardGroup)
object (ConsumedData)

Represents the amount of data consumed.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

object

Upper limit on the amount of data the SIM cards, within the group, can use.

default
boolean

Indicates whether the SIM card group is the users default group.
The default group is created for the user and can not be removed.

id
string <uuid>

Identifies the resource.

name
string

A user friendly name for the SIM card group.

private_wireless_gateway_id
string <uuid>
Default: null

The identification of the related Private Wireless Gateway resource.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
get/sim_card_groups/{id}
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.SimCardGroup.retrieve("id")
Response samples
application/json
{
  • "data": {
    • "consumed_data": {
      • "amount": "2048.1",
      • "unit": "MB"
      },
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "data_limit": {
      • "amount": "2048.1",
      • "unit": "MB"
      },
    • "default": true,
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "name": "My Test Group",
    • "private_wireless_gateway_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "sim_card_group",
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Update a SIM card group

Updates a SIM card group

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
Request Body schema: application/json
required
object

Upper limit on the amount of data the SIM cards, within the group, can use.

name
string

A user friendly name for the SIM card group.

Responses
200

Successful Response

Response Schema: application/json
object (SIMCardGroup)
object (ConsumedData)

Represents the amount of data consumed.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

object

Upper limit on the amount of data the SIM cards, within the group, can use.

default
boolean

Indicates whether the SIM card group is the users default group.
The default group is created for the user and can not be removed.

id
string <uuid>

Identifies the resource.

name
string

A user friendly name for the SIM card group.

private_wireless_gateway_id
string <uuid>
Default: null

The identification of the related Private Wireless Gateway resource.

record_type
string

Identifies the type of the resource.

updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
patch/sim_card_groups/{id}
Request samples
application/json
{
  • "data_limit": {
    • "amount": "2048.1",
    • "unit": "MB"
    },
  • "name": "My Test Group"
}
Response samples
application/json
{
  • "data": {
    • "consumed_data": {
      • "amount": "2048.1",
      • "unit": "MB"
      },
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "data_limit": {
      • "amount": "2048.1",
      • "unit": "MB"
      },
    • "default": true,
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "name": "My Test Group",
    • "private_wireless_gateway_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "sim_card_group",
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Request Private Wireless Gateway removal from SIM card group

This action will asynchronously remove an existing Private Wireless Gateway definition from a SIM card group. Completing this operation defines that all SIM cards in the SIM card group will get their traffic handled by Telnyx's default mobile network configuration.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
Responses
202

Successful Response

Response Schema: application/json
object (SIMCardGroupAction)

This object represents a SIM card group action request. It allows tracking the current status of an operation that impacts the SIM card group and SIM card in it.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

id
string <uuid>

Identifies the resource.

record_type
string
object

A JSON object representation of the action params.

sim_card_group_id
string <uuid>

The SIM card group identification.

status
string
Enum: "in-progress" "completed" "failed"
type
string

Represents the type of the operation requested.

Enum: "set_private_wireless_gateway" "remove_private_wireless_gateway"
updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
post/sim_card_groups/{id}/actions/remove_private_wireless_gateway
Request samples
import telnyx
telnyx.api_key = "YOUR_API_KEY"

telnyx.SimCardGroups.post_actions.post_remove_private_wireless_gateway.create()
Response samples
application/json
{
  • "data": {
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "sim_card_group_action",
    • "settings": {
      • "private_wireless_gateway_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
      },
    • "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "status": "in-progress",
    • "type": "set_private_wireless_gateway",
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}

Request Private Wireless Gateway assignment for SIM card group

This action will asynchronously assign a provisioned Private Wireless Gateway to the SIM card group. Completing this operation defines that all SIM cards in the SIM card group will get their traffic controlled by the associated Private Wireless Gateway. This operation will also imply that new SIM cards assigned to a group will inherit its network definitions. If it's moved to a different group that doesn't have a Private Wireless Gateway, it'll use Telnyx's default mobile network configuration.

SecuritybearerAuth
Request
path Parameters
id
required
string <uuid>

Identifies the resource.

Example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
Request Body schema: application/json
required
private_wireless_gateway_id
required
string <uuid>

The identification of the related Private Wireless Gateway resource.

Responses
202

Successful Response

Response Schema: application/json
object (SIMCardGroupAction)

This object represents a SIM card group action request. It allows tracking the current status of an operation that impacts the SIM card group and SIM card in it.

created_at
string

ISO 8601 formatted date-time indicating when the resource was created.

id
string <uuid>

Identifies the resource.

record_type
string
object

A JSON object representation of the action params.

sim_card_group_id
string <uuid>

The SIM card group identification.

status
string
Enum: "in-progress" "completed" "failed"
type
string

Represents the type of the operation requested.

Enum: "set_private_wireless_gateway" "remove_private_wireless_gateway"
updated_at
string

ISO 8601 formatted date-time indicating when the resource was updated.

default

Unexpected error

Response Schema: application/json
Array of objects (Error)
Array
code
required
string <int>
detail
string
meta
object
object
title
required
string
post/sim_card_groups/{id}/actions/set_private_wireless_gateway
Request samples
application/json
{
  • "private_wireless_gateway_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
}
Response samples
application/json
{
  • "data": {
    • "created_at": "2018-02-02T22:25:27.521Z",
    • "id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "record_type": "sim_card_group_action",
    • "settings": {
      • "private_wireless_gateway_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58"
      },
    • "sim_card_group_id": "6a09cdc3-8948-47f0-aa62-74ac943d6c58",
    • "status": "in-progress",
    • "type": "set_private_wireless_gateway",
    • "updated_at": "2018-02-02T22:25:27.521Z"
    }
}