PgBeam Docs
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

ParameterTypeRequiredDescription
ctxcontext.ContextYesRequest context
orgIDstringYesUnique organization identifier.
req*pgbeam.CancellationFeedbackRequestYesRequest body
req.Reason*stringNoPredefined cancellation reason.
req.Feedback*stringNoFree-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

StatusDescription
400Invalid request parameters.
401Missing or invalid authentication.
403Operation not allowed by current plan limits.
429Rate limited. Try again later.

On this page