zernio 0.0.144

API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
Documentation
# \WhatsAppPhoneNumbersApi

All URIs are relative to *https://zernio.com/api*

Method | HTTP request | Description
------------- | ------------- | -------------
[**get_whats_app_phone_number**]WhatsAppPhoneNumbersApi.md#get_whats_app_phone_number | **GET** /v1/whatsapp/phone-numbers/{phoneNumberId} | Get phone number
[**get_whats_app_phone_numbers**]WhatsAppPhoneNumbersApi.md#get_whats_app_phone_numbers | **GET** /v1/whatsapp/phone-numbers | List phone numbers
[**purchase_whats_app_phone_number**]WhatsAppPhoneNumbersApi.md#purchase_whats_app_phone_number | **POST** /v1/whatsapp/phone-numbers/purchase | Purchase phone number
[**release_whats_app_phone_number**]WhatsAppPhoneNumbersApi.md#release_whats_app_phone_number | **DELETE** /v1/whatsapp/phone-numbers/{phoneNumberId} | Release phone number



## get_whats_app_phone_number

> models::GetWhatsAppPhoneNumber200Response get_whats_app_phone_number(phone_number_id)
Get phone number

Retrieve the current status of a purchased phone number. Used to poll for Meta pre-verification completion after purchase. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**phone_number_id** | **String** | Phone number record ID | [required] |

### Return type

[**models::GetWhatsAppPhoneNumber200Response**](getWhatsAppPhoneNumber_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## get_whats_app_phone_numbers

> models::GetWhatsAppPhoneNumbers200Response get_whats_app_phone_numbers(status, profile_id)
List phone numbers

List all WhatsApp phone numbers purchased by the authenticated user. By default, released numbers are excluded. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**status** | Option<**String**> | Filter by status (by default excludes released numbers) |  |
**profile_id** | Option<**String**> | Filter by profile |  |

### Return type

[**models::GetWhatsAppPhoneNumbers200Response**](getWhatsAppPhoneNumbers_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## purchase_whats_app_phone_number

> models::PurchaseWhatsAppPhoneNumber200Response purchase_whats_app_phone_number(purchase_whats_app_phone_number_request)
Purchase phone number

Initiate purchasing a WhatsApp phone number. Payment-first flow: the user does not pick a specific number. The system either creates a Stripe Checkout Session (first number) or increments the existing subscription quantity and provisions inline (subsequent numbers).  Requires a paid plan. The maximum number of phone numbers is determined by the user's plan. 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**purchase_whats_app_phone_number_request** | [**PurchaseWhatsAppPhoneNumberRequest**]PurchaseWhatsAppPhoneNumberRequest.md |  | [required] |

### Return type

[**models::PurchaseWhatsAppPhoneNumber200Response**](purchaseWhatsAppPhoneNumber_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)


## release_whats_app_phone_number

> models::ReleaseWhatsAppPhoneNumber200Response release_whats_app_phone_number(phone_number_id)
Release phone number

Release a purchased phone number. This will: 1. Disconnect any linked WhatsApp social account 2. Decrement the Stripe subscription quantity (or cancel if last number) 3. Release the number from Telnyx 4. Mark the number as released 

### Parameters


Name | Type | Description  | Required | Notes
------------- | ------------- | ------------- | ------------- | -------------
**phone_number_id** | **String** | Phone number record ID | [required] |

### Return type

[**models::ReleaseWhatsAppPhoneNumber200Response**](releaseWhatsAppPhoneNumber_200_response.md)

### Authorization

[bearerAuth](../README.md#bearerAuth)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)