Analytics
SubmitCancellationFeedback
Submit cancellation feedback
Records optional feedback when a user cancels their subscription.
Usage
err := client.Analytics.SubmitCancellationFeedback(ctx, "org_xxx", &pgbeam.CancellationFeedbackRequest{
})Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| ctx | context.Context | Yes | Request context |
| orgID | string | Yes | Unique organization identifier. |
| req | *pgbeam.CancellationFeedbackRequest | Yes | Request body |
| req.Reason | *string | No | Predefined cancellation reason. |
| req.Feedback | *string | No | Free-text feedback from the user. |
Response
error — returns nil on success.
Example
import pgbeam "github.com/pgbeam/pgbeam-go"
client := pgbeam.NewClient(&pgbeam.ClientOptions{
APIKey: "pgb_your_api_key",
})
err := client.Analytics.SubmitCancellationFeedback(ctx, "org_xxx", &pgbeam.CancellationFeedbackRequest{
Reason: "...",
Feedback: "...",
})
if err != nil {
log.Fatal(err)
}Errors
| Status | Description |
|---|---|
| 400 | Invalid request parameters. |
| 401 | Missing or invalid authentication. |
| 403 | Operation not allowed by current plan limits. |
| 429 | Rate limited. Try again later. |