> 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

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: management-api
  version: 1.0.0
paths:
  /GetAvailablePlans:
    post:
      operationId: get-available-plans
      summary: GetAvailablePlans
      description: |-
        Gets the allowed plans to change.

        **Example request:** Get allowed IM plans to change.
      tags:
        - subpackage_accounts
      parameters:
        - name: plan_type
          in: query
          description: >-
            The plan type list separated by semicolons (;). The possible values
            are IM, MAU
          required: false
          schema:
            type: array
            items:
              type: string
        - name: plan_subscription_template_id
          in: query
          description: The plan ID list separated by semicolons (;)
          required: false
          schema:
            type: array
            items:
              type: integer
        - name: Authorization
          in: header
          description: >-
            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.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/accounts_GetAvailablePlans_Response_200'
servers:
  - url: https://api.voximplant.com/platform_api
components:
  schemas:
    PlanPackageType:
      type: object
      properties:
        price_group_id:
          type: array
          items:
            type: integer
          description: The price group IDs
        package_name:
          type: string
          description: The package name
        may_overrun:
          type: boolean
          description: Whether overrun is enabled
        overrun_price:
          type: number
          format: double
          description: The overrun amount
        overrun_resources:
          type: integer
          description: The number of resources (e.g., messages) per overrun
        package_size:
          type: integer
          description: The package size
      description: The plan package info.
      title: PlanPackageType
    PlanType:
      type: object
      properties:
        plan_subscription_template_id:
          type: integer
          description: The current plan ID
        plan_type:
          type: string
          description: The plan type. The possible values are IM, MAU
        plan_name:
          type: string
          description: The plan name
        periodic_charge:
          type: number
          format: double
          description: The plan monthly charge
        packages:
          type: array
          items:
            $ref: '#/components/schemas/PlanPackageType'
          description: The account package array
      description: The [GetAvailablePlans] function result item.
      title: PlanType
    accounts_GetAvailablePlans_Response_200:
      type: object
      properties:
        result:
          type: array
          items:
            $ref: '#/components/schemas/PlanType'
      title: accounts_GetAvailablePlans_Response_200
  securitySchemes:
    JwtAuth:
      type: http
      scheme: bearer
      description: >-
        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.

```

## SDK Code Examples

```python Allowed IM plans to change
import requests

url = "https://api.voximplant.com/platform_api/GetAvailablePlans"

headers = {"Authorization": "Bearer <token>"}

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 <token>'}};

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 <token>")

	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 <token>'

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<String> response = Unirest.post("https://api.voximplant.com/platform_api/GetAvailablePlans")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Allowed IM plans to change
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.voximplant.com/platform_api/GetAvailablePlans', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

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 <token>");
IRestResponse response = client.Execute(request);
```

```swift Allowed IM plans to change
import Foundation

let headers = ["Authorization": "Bearer <token>"]

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()
```