All URIs are relative to /api
| Method | HTTP request | Description |
|---|---|---|
| changeWebhookUrl | PUT /instances/{instance_key}/webhook | Change Webhook url. |
| createInstance | POST /instances/create | Creates a new instance key. |
| deleteInstance | DELETE /instances/{instance_key}/delete | Delete Instance. |
| getContacts | GET /instances/{instance_key}/contacts | Get contacts. |
| getInstance | GET /instances/{instance_key}/ | Get Instance. |
| getQrCode | GET /instances/{instance_key}/qrcode | Get QrCode. |
| listInstances | GET /instances/list | Get all instances. |
| logoutInstance | DELETE /instances/{instance_key}/logout | Logout Instance. |
APIResponse changeWebhookUrl(instanceKey,
data)
Change Webhook url.
Changes the webhook url of an instance.
// Import classes:
//import WhatsAPI.infrastructure.*
//import models.*
val apiInstance = InstanceApi()
val instanceKey : kotlin.String = instanceKey_example // kotlin.String | Instance key
val `data` : WebhookPayload = // WebhookPayload | Message data
try {
val result : APIResponse = apiInstance.changeWebhookUrl(instanceKey, `data`)
println(result)
} catch (e: ClientException) {
println("4xx response calling InstanceApi#changeWebhookUrl")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling InstanceApi#changeWebhookUrl")
e.printStackTrace()
}| Name | Type | Description | Notes |
|---|---|---|---|
| instanceKey | kotlin.String | Instance key | |
| `data` | WebhookPayload | Message data |
Configure ApiKeyAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: application/json
- Accept: Not defined
APIResponse createInstance(
data)
Creates a new instance key.
This endpoint is used to create a new WhatsApp Web instance.
// Import classes:
//import WhatsAPI.infrastructure.*
//import models.*
val apiInstance = InstanceApi()
val `data` : CreateInstancePayload = // CreateInstancePayload | Instance data
try {
val result : APIResponse = apiInstance.createInstance(`data`)
println(result)
} catch (e: ClientException) {
println("4xx response calling InstanceApi#createInstance")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling InstanceApi#createInstance")
e.printStackTrace()
}| Name | Type | Description | Notes |
|---|---|---|---|
| `data` | CreateInstancePayload | Instance data |
Configure ApiKeyAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: application/json
- Accept: Not defined
APIResponse deleteInstance(instanceKey)
Delete Instance.
Deletes the instance with the provided key.
// Import classes:
//import WhatsAPI.infrastructure.*
//import models.*
val apiInstance = InstanceApi()
val instanceKey : kotlin.String = instanceKey_example // kotlin.String | Instance key
try {
val result : APIResponse = apiInstance.deleteInstance(instanceKey)
println(result)
} catch (e: ClientException) {
println("4xx response calling InstanceApi#deleteInstance")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling InstanceApi#deleteInstance")
e.printStackTrace()
}| Name | Type | Description | Notes |
|---|---|---|---|
| instanceKey | kotlin.String | Instance key |
Configure ApiKeyAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: Not defined
- Accept: Not defined
APIResponse getContacts(instanceKey)
Get contacts.
Fetches the list of contacts in the instance.
// Import classes:
//import WhatsAPI.infrastructure.*
//import models.*
val apiInstance = InstanceApi()
val instanceKey : kotlin.String = instanceKey_example // kotlin.String | Instance key
try {
val result : APIResponse = apiInstance.getContacts(instanceKey)
println(result)
} catch (e: ClientException) {
println("4xx response calling InstanceApi#getContacts")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling InstanceApi#getContacts")
e.printStackTrace()
}| Name | Type | Description | Notes |
|---|---|---|---|
| instanceKey | kotlin.String | Instance key |
Configure ApiKeyAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: Not defined
- Accept: Not defined
APIResponse getInstance(instanceKey)
Get Instance.
Returns the instance data of single instance with connection status.
// Import classes:
//import WhatsAPI.infrastructure.*
//import models.*
val apiInstance = InstanceApi()
val instanceKey : kotlin.String = instanceKey_example // kotlin.String | Instance key
try {
val result : APIResponse = apiInstance.getInstance(instanceKey)
println(result)
} catch (e: ClientException) {
println("4xx response calling InstanceApi#getInstance")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling InstanceApi#getInstance")
e.printStackTrace()
}| Name | Type | Description | Notes |
|---|---|---|---|
| instanceKey | kotlin.String | Instance key |
Configure ApiKeyAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: Not defined
- Accept: Not defined
APIResponse getQrCode(instanceKey)
Get QrCode.
Returns the qrcode in the base64 format.
// Import classes:
//import WhatsAPI.infrastructure.*
//import models.*
val apiInstance = InstanceApi()
val instanceKey : kotlin.String = instanceKey_example // kotlin.String | Instance key
try {
val result : APIResponse = apiInstance.getQrCode(instanceKey)
println(result)
} catch (e: ClientException) {
println("4xx response calling InstanceApi#getQrCode")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling InstanceApi#getQrCode")
e.printStackTrace()
}| Name | Type | Description | Notes |
|---|---|---|---|
| instanceKey | kotlin.String | Instance key |
Configure ApiKeyAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: Not defined
- Accept: Not defined
APIResponse listInstances()
Get all instances.
Fetches the list of all Instances with login status.
// Import classes:
//import WhatsAPI.infrastructure.*
//import models.*
val apiInstance = InstanceApi()
try {
val result : APIResponse = apiInstance.listInstances()
println(result)
} catch (e: ClientException) {
println("4xx response calling InstanceApi#listInstances")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling InstanceApi#listInstances")
e.printStackTrace()
}This endpoint does not need any parameter.
Configure ApiKeyAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: Not defined
- Accept: Not defined
APIResponse logoutInstance(instanceKey)
Logout Instance.
Logouts of the instance with the provided key.
// Import classes:
//import WhatsAPI.infrastructure.*
//import models.*
val apiInstance = InstanceApi()
val instanceKey : kotlin.String = instanceKey_example // kotlin.String | Instance key
try {
val result : APIResponse = apiInstance.logoutInstance(instanceKey)
println(result)
} catch (e: ClientException) {
println("4xx response calling InstanceApi#logoutInstance")
e.printStackTrace()
} catch (e: ServerException) {
println("5xx response calling InstanceApi#logoutInstance")
e.printStackTrace()
}| Name | Type | Description | Notes |
|---|---|---|---|
| instanceKey | kotlin.String | Instance key |
Configure ApiKeyAuth: ApiClient.apiKey["Authorization"] = "" ApiClient.apiKeyPrefix["Authorization"] = ""
- Content-Type: Not defined
- Accept: Not defined