Cancel a membership subscription
Cancels at the end of the paid period where the plan allows it; access lasts until accessUntil.
Scope: memberships.write.
POST
/v1/me/memberships/{communitySlug}/cancelAuthorization
AuthorizationBearer token (API Key) · headerrequiredAPI Key for programmatic access (format: insy_xxxxx)
Path parameters
communitySlugstringrequiredResponses
200Successful response
successbooleanrequiredWhether the request was successful
errorCodestringrequiredThe error code returned by the request
Allowed:
not_foundbad_requestalready_existsunauthorizedforbiddeninternal_server_errorservice_unavailabletimeoutconflictprecondition_failedunprocessable_entitytoo_many_requestsmessagestringrequiredThe message returned by the request
dataV1CancellationObjectShow propertiesHide properties
communitystringrequiredCommunity name.
canceledstring | nullrequiredAllowed:
immediatelyat_period_endalready_at_period_endaccessUntilstring<date> | nullrequiredLast day of access; null when access ended immediately.
400Invalid input (`errorCode: bad_request`, `reason: invalid_input`).
401Missing, invalid or expired access token or API key.
403The token lacks the operation's scope (`reason: insufficient_scope`).
429Per-account rate limit (120/min, 3000/h, shared with `/mcp`); see `Retry-After`.
Try it
Server
Authorization
Parameters
Request
curl -X POST "https://api.insy.io/v1/me/memberships/string/cancel" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://api.insy.io/v1/me/memberships/string/cancel", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.post(
"https://api.insy.io/v1/me/memberships/string/cancel",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"success": true,
"errorCode": "not_found",
"message": "Success",
"data": {
"community": "string",
"canceled": "immediately",
"accessUntil": "2019-08-24"
}
}Invalid input (`errorCode: bad_request`, `reason: invalid_input`).
Missing, invalid or expired access token or API key.
The token lacks the operation's scope (`reason: insufficient_scope`).
Per-account rate limit (120/min, 3000/h, shared with `/mcp`); see `Retry-After`.