Skip to content
Follow yggy on LinkedInFollow @yggy_tech on X

Sync billed seats to the actual member count

POST
/api/v1/billing/seats/sync
curl --request POST \
--url https://api.yggy.tech/api/v1/billing/seats/sync \
--header 'Authorization: Bearer <token>'

Sets the Stripe subscription quantity to the current organization member count. Use when billed seats drift from actual members.

Seat sync result with refreshed subscription

Media type application/json
object
synced
required
boolean
memberCount
required
number
previousSeats
required
number | null
subscriptionId
required
string | null
subscription
required
object
id
required
string
plan
required
string
referenceId
required
string
status
required
string | null
stripeCustomerId
required
string | null
stripeSubscriptionId
required
string | null
currentPriceId
required
string | null
periodStart
required
string | null
periodEnd
required
string | null
trialStart
required
string | null
trialEnd
required
string | null
cancelAtPeriodEnd
required
boolean | null
cancelAt
required
string | null
canceledAt
required
string | null
endedAt
required
string | null
seats
required
number | null
memberCount
required
number | null
graceEndsAt
required

While a payment is overdue: when the paid plan ends unless a payment succeeds

string | null
Example generated
{
"synced": true,
"memberCount": 1,
"previousSeats": 1,
"subscriptionId": "example",
"subscription": {
"id": "example",
"plan": "example",
"referenceId": "example",
"status": "example",
"stripeCustomerId": "example",
"stripeSubscriptionId": "example",
"currentPriceId": "example",
"periodStart": "example",
"periodEnd": "example",
"trialStart": "example",
"trialEnd": "example",
"cancelAtPeriodEnd": true,
"cancelAt": "example",
"canceledAt": "example",
"endedAt": "example",
"seats": 1,
"memberCount": 1,
"graceEndsAt": "example"
}
}

No active organization

Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
Allowed values: INTERNAL_ERROR VALIDATION_ERROR UNAUTHORIZED RATE_LIMITED ORG_REQUIRED FORBIDDEN NOT_FOUND CONFLICT PROJECT_DENIED USAGE_LIMIT_EXCEEDED HUGINN_ERROR HUGINN_STREAM_ERROR QUERY_FAILED PROVIDER_CONFLICT PROVIDER_CONFIG_INVALID PROVIDER_NOT_CONNECTED PROVIDER_RATE_LIMITED PROJECT_MEMBER_USER_NOT_IN_ORG PROJECT_MEMBER_UNKNOWN_ROLE PROJECT_MEMBER_LAST_OWNER PROJECT_CONFLICT STORAGE_NOT_CONFIGURED BILLING_NOT_CONFIGURED LICENSE_INACTIVE PLAN_REQUIRED MEMBER_LIMIT_REACHED SAGA_ASK_QUOTA_EXCEEDED SAGA_ASK_RATE_LIMITED SAGA_ASK_BUSY SAGA_ASK_PAUSED SAGA_ASK_UPSTREAM SAGA_DICTATION_BUSY SAGA_DICTATION_UNAVAILABLE SAGA_SHARE_LINK_LIMIT PROJECT_MEMBERSHIP_JWT_TOO_LARGE WEBHOOK_URL_INVALID WEBHOOK_ADDRESS_BLOCKED WEBHOOK_EVENT_UNKNOWN WEBHOOK_ENDPOINT_LIMIT WEBHOOK_ENDPOINT_DISABLED WEBHOOK_DELIVERY_IN_PROGRESS ORG_KEY_PERSONAL_SCOPE API_KEY_PERMISSION_EXCEEDS_ROLE API_KEY_NO_PERMISSIONS ORG_KEY_GRAPH_SCOPE_UNAVAILABLE ORG_KEY_TOO_MANY_PROJECTS SENDER_IS_LOGIN_EMAIL SENDER_TAKEN
details
Example
{
"success": false,
"error": {
"code": "INTERNAL_ERROR"
}
}

Not authenticated

Media type application/json
object
success
required
boolean
error
required
object
message
required
string
code
required
string
Allowed values: INTERNAL_ERROR VALIDATION_ERROR UNAUTHORIZED RATE_LIMITED ORG_REQUIRED FORBIDDEN NOT_FOUND CONFLICT PROJECT_DENIED USAGE_LIMIT_EXCEEDED HUGINN_ERROR HUGINN_STREAM_ERROR QUERY_FAILED PROVIDER_CONFLICT PROVIDER_CONFIG_INVALID PROVIDER_NOT_CONNECTED PROVIDER_RATE_LIMITED PROJECT_MEMBER_USER_NOT_IN_ORG PROJECT_MEMBER_UNKNOWN_ROLE PROJECT_MEMBER_LAST_OWNER PROJECT_CONFLICT STORAGE_NOT_CONFIGURED BILLING_NOT_CONFIGURED LICENSE_INACTIVE PLAN_REQUIRED MEMBER_LIMIT_REACHED SAGA_ASK_QUOTA_EXCEEDED SAGA_ASK_RATE_LIMITED SAGA_ASK_BUSY SAGA_ASK_PAUSED SAGA_ASK_UPSTREAM SAGA_DICTATION_BUSY SAGA_DICTATION_UNAVAILABLE SAGA_SHARE_LINK_LIMIT PROJECT_MEMBERSHIP_JWT_TOO_LARGE WEBHOOK_URL_INVALID WEBHOOK_ADDRESS_BLOCKED WEBHOOK_EVENT_UNKNOWN WEBHOOK_ENDPOINT_LIMIT WEBHOOK_ENDPOINT_DISABLED WEBHOOK_DELIVERY_IN_PROGRESS ORG_KEY_PERSONAL_SCOPE API_KEY_PERMISSION_EXCEEDS_ROLE API_KEY_NO_PERMISSIONS ORG_KEY_GRAPH_SCOPE_UNAVAILABLE ORG_KEY_TOO_MANY_PROJECTS SENDER_IS_LOGIN_EMAIL SENDER_TAKEN
details
Example
{
"success": false,
"error": {
"code": "INTERNAL_ERROR"
}
}