//native
type Telnyx = {
apiKey: string
}
/**
* 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.
*/
export async function main(auth: Telnyx, id: string) {
const url = new URL(
`https://api.telnyx.com/v2/sim_card_groups/${id}/actions/remove_private_wireless_gateway`
)
const response = await fetch(url, {
method: 'POST',
headers: {
Authorization: 'Bearer ' + auth.apiKey
},
body: undefined
})
if (!response.ok) {
const text = await response.text()
throw new Error(`${response.status} ${text}`)
}
return await response.json()
}
Submitted by hugo697 428 days ago