> For a complete documentation index, fetch https://docs.voximplant.ai/llms.txt # GetAvailablePlans POST https://api.voximplant.com/platform_api/GetAvailablePlans Gets the allowed plans to change. **Example request:** Get allowed IM plans to change. Reference: https://docs.voximplant.ai/api-reference/management-api/reference/accounts/get-available-plans ## Authentication - `Authorization` header (bearer token, required) — Voximplant Management API uses signed JWT tokens generated from your service-account private key. Pass the token in the `Authorization` header as a Bearer value: ``` Authorization: Bearer $VOXIMPLANT_TOKEN ``` See [Authorization](/api-reference/management-api/authorization) for ready-to-copy snippets in bash, Python, Node.js and Go that turn your `credentials.json` into a token. ## Request ### Query parameters - `plan_type` (list of string, optional) — The plan type list separated by semicolons (;). The possible values are IM, MAU - `plan_subscription_template_id` (list of integer, optional) — The plan ID list separated by semicolons (;) ## Response ### 200 Successful response - `result` (list of PlanType, optional) ## Types ### PlanType The [GetAvailablePlans] function result item. - `plan_subscription_template_id` (integer, optional) — The current plan ID - `plan_type` (string, optional) — The plan type. The possible values are IM, MAU - `plan_name` (string, optional) — The plan name - `periodic_charge` (double, optional) — The plan monthly charge - `packages` (list of PlanPackageType, optional) — The account package array ### PlanPackageType The plan package info. - `price_group_id` (list of integer, optional) — The price group IDs - `package_name` (string, optional) — The package name - `may_overrun` (boolean, optional) — Whether overrun is enabled - `overrun_price` (double, optional) — The overrun amount - `overrun_resources` (integer, optional) — The number of resources (e.g., messages) per overrun - `package_size` (integer, optional) — The package size ## Examples **Response** ```json { "result": [ { "plan_subscription_template_id": 185, "plan_type": "IM", "plan_name": "IM small", "periodic_charge": 9170.604, "packages": [ { "price_group_id": [ 7561 ], "package_name": "small", "may_overrun": true, "overrun_price": 3.668242, "overrun_resources": 100, "package_size": 500000 } ] }, { "plan_subscription_template_id": 186, "plan_type": "IM", "plan_name": "IM medium", "periodic_charge": 91706.04, "packages": [ { "price_group_id": [ 7561 ], "package_name": "medium", "may_overrun": true, "overrun_price": 0.275118, "overrun_resources": 100, "package_size": 10000000 } ] } ] } ``` **SDK Code** ```python Allowed IM plans to change import requests url = "https://api.voximplant.com/platform_api/GetAvailablePlans" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript Allowed IM plans to change const url = 'https://api.voximplant.com/platform_api/GetAvailablePlans'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Allowed IM plans to change package main import ( "fmt" "net/http" "io" ) func main() { url := "https://api.voximplant.com/platform_api/GetAvailablePlans" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Allowed IM plans to change require 'uri' require 'net/http' url = URI("https://api.voximplant.com/platform_api/GetAvailablePlans") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java Allowed IM plans to change import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.voximplant.com/platform_api/GetAvailablePlans") .header("Authorization", "Bearer ") .asString(); ``` ```php Allowed IM plans to change request('POST', 'https://api.voximplant.com/platform_api/GetAvailablePlans', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp Allowed IM plans to change using RestSharp; var client = new RestClient("https://api.voximplant.com/platform_api/GetAvailablePlans"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift Allowed IM plans to change import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://api.voximplant.com/platform_api/GetAvailablePlans")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers 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() ```