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(ctx, instanceKey).Data(data).Execute()
Change Webhook url.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
data := *openapiclient.NewWebhookPayload() // WebhookPayload | Message data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstanceApi.ChangeWebhookUrl(context.Background(), instanceKey).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstanceApi.ChangeWebhookUrl``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ChangeWebhookUrl`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `InstanceApi.ChangeWebhookUrl`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiChangeWebhookUrlRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
data | WebhookPayload | Message data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse CreateInstance(ctx).Data(data).Execute()
Creates a new instance key.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
data := *openapiclient.NewCreateInstancePayload() // CreateInstancePayload | Instance data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstanceApi.CreateInstance(context.Background()).Data(data).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstanceApi.CreateInstance``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateInstance`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `InstanceApi.CreateInstance`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateInstanceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
data | CreateInstancePayload | Instance data |
- Content-Type: application/json
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse DeleteInstance(ctx, instanceKey).Execute()
Delete Instance.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstanceApi.DeleteInstance(context.Background(), instanceKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstanceApi.DeleteInstance``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteInstance`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `InstanceApi.DeleteInstance`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiDeleteInstanceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse GetContacts(ctx, instanceKey).Execute()
Get contacts.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstanceApi.GetContacts(context.Background(), instanceKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstanceApi.GetContacts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetContacts`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `InstanceApi.GetContacts`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiGetContactsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse GetInstance(ctx, instanceKey).Execute()
Get Instance.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstanceApi.GetInstance(context.Background(), instanceKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstanceApi.GetInstance``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetInstance`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `InstanceApi.GetInstance`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiGetInstanceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse GetQrCode(ctx, instanceKey).Execute()
Get QrCode.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstanceApi.GetQrCode(context.Background(), instanceKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstanceApi.GetQrCode``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetQrCode`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `InstanceApi.GetQrCode`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiGetQrCodeRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse ListInstances(ctx).Execute()
Get all instances.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstanceApi.ListInstances(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstanceApi.ListInstances``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListInstances`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `InstanceApi.ListInstances`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiListInstancesRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]
APIResponse LogoutInstance(ctx, instanceKey).Execute()
Logout Instance.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
instanceKey := "instanceKey_example" // string | Instance key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.InstanceApi.LogoutInstance(context.Background(), instanceKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `InstanceApi.LogoutInstance``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `LogoutInstance`: APIResponse
fmt.Fprintf(os.Stdout, "Response from `InstanceApi.LogoutInstance`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
instanceKey | string | Instance key |
Other parameters are passed through a pointer to a apiLogoutInstanceRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: /
[Back to top] [Back to API list] [Back to Model list] [Back to README]