Saltar para o conteúdo principal
POST
/
public
/
api
/
v1
/
clients
/
{clientPublicId}
/
suspend
Suspend client
curl --request POST \
  --url https://api.gennia.ai/public/api/v1/clients/{clientPublicId}/suspend \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "reason": "Customer requested cancellation pending refund review."
}
'
{
  "createdAt": "2023-11-07T05:31:56Z",
  "creditsBalance": 123,
  "creditsUsedThisPeriod": 123,
  "currentPeriodEnd": "2023-11-07T05:31:56Z",
  "currentPeriodStart": "2023-11-07T05:31:56Z",
  "extraCreditsBalance": 123,
  "nextCreditRenewalAt": "2023-11-07T05:31:56Z",
  "pendingInvitations": [
    {
      "createdAt": "2023-11-07T05:31:56Z",
      "email": "<string>",
      "expiresAt": "2023-11-07T05:31:56Z",
      "isExpired": true,
      "name": "<string>",
      "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "role": "<string>"
    }
  ],
  "pendingPlan": {
    "currency": "<string>",
    "effectiveAt": "2023-11-07T05:31:56Z",
    "name": "<string>",
    "priceCents": 123,
    "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "plan": {
    "billingIntervalMonths": 123,
    "creditsIncluded": 123,
    "currency": "<string>",
    "name": "<string>",
    "priceCents": 123,
    "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  },
  "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "seatsLimit": 123,
  "unlimitedCredits": true,
  "users": [
    {
      "completedOnboarding": true,
      "email": "<string>",
      "lastSeenAt": "2023-11-07T05:31:56Z",
      "name": "<string>",
      "publicId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "role": "<string>"
    }
  ],
  "usersCount": 123,
  "workspaceName": "<string>"
}

Autorizações

X-Api-Key
string
header
obrigatório

Parâmetros de caminho

clientPublicId
string<uuid>
obrigatório

Corpo

application/json

Optional body describing why a client workspace is being suspended.

cancellationReason
enum<string>

Structured cancellation reason for analytics/churn tracking.

Opções disponíveis:
customer_request,
payment_failed,
switching_provider,
not_needed,
price,
feature_missing,
other
reason
string

Free-form note explaining the suspension.

Maximum string length: 500
Exemplo:

"Customer requested cancellation pending refund review."

Resposta

OK

createdAt
string<date-time>
creditsBalance
number
creditsUsedThisPeriod
number
currentPeriodEnd
string<date-time>
currentPeriodStart
string<date-time>
extraCreditsBalance
number
nextCreditRenewalAt
string<date-time>
pendingInvitations
object[]
pendingPlan
object
plan
object
publicId
string<uuid>
seatsLimit
integer<int32>
subscriptionStatus
enum<string>
Opções disponíveis:
active,
past_due,
canceled,
trialing,
pending_onboarding,
suspended
unlimitedCredits
boolean
users
object[]
usersCount
integer<int32>
workspaceName
string