Skip to content
Insy
For developers
Esc
↑↓navigate↵open⌘Jpreview
On this page

Account API (v1)

REST endpoints under /v1 that act on the signed-in Insy user's own account with an OAuth access token — profile, memberships, purchases, communities, products, payouts and support.

The Account API acts on the person who signed in through Sign in with Insy: their memberships and purchases, the communities and products they sell, their payout accounts and their support cases. It is the same set of operations the account MCP server offers as tools — one endpoint per tool, with the same permissions and validation.

Every endpoint on this page is also in the interactive API reference, under the Account API tags, with its request and response schemas and a Try-it panel.

Authentication

Send a bearer token — either credential works:

  • An OAuth access token, for an app acting for whoever signs in through Sign in with Insy. It carries the scopes that person approved.
  • An API key, for your own scripts on your own account. It carries the account scopes you picked when creating it — never its permission bits — and its IP allowlist applies.
curl https://api.insy.io/v1/me \
  -H "Authorization: Bearer a1b7c3d9e5f20486b3c1d7e9f5a20486b3c1d7e9"

An OAuth token issued with the resource parameter set to https://api.insy.io/mcp is bound to the account MCP server and is refused here with 401, as RFC 8707 intends. Tokens issued without a resource — what Sign in with Insy issues unless you ask otherwise — work here and on the MCP server alike, and so do API keys here.

Each endpoint needs one scope. A missing or expired token returns 401 in the rejected-request shape with WWW-Authenticate: Bearer error="invalid_token". A token without the endpoint’s scope returns 403 with reason: "insufficient_scope".

Responses

Every response uses the BaseResponse envelope. Failures add reason when Insy has a more specific code than errorCode:

{
  "success": false,
  "errorCode": "conflict",
  "reason": "billing_details_missing",
  "message": "Billing details and Stripe are not set up; nobody could pay. Point the user to the dashboard first."
}
Status errorCode Typical reason
400 bad_request invalid_input — the message names each field, e.g. published: Invalid input: expected boolean, received string.
403 forbidden insufficient_scope
404 not_found — The slug is unknown, or not among the user’s own.
409 conflict billing_details_missing, action_pending, action_unknown
422 unprocessable_entity idempotency_key_reused — see Retries and idempotency.
429 too_many_requests tool_budget_exceeded — see Rate limits.
500 internal_server_error failed — the message carries a reference to quote to Insy support.

Amounts are integers in minor units next to an ISO 4217 code — { "amountCents": 3400, "currency": "PLN" } — and dates are YYYY-MM-DD. Resources are addressed by slug. Changes reach only the user’s own communities, products and memberships: a slug that belongs to someone else answers 404 exactly like one that does not exist.

Rate limits

Each account may make 120 requests a minute and 3000 an hour, counted together across /v1 and the account MCP server and across every token and key of that account. Over the limit, requests answer 429 with a Retry-After header in seconds.

Two writes also have a budget of their own per account, shared with the MCP server and the Insy assistant, because each one reaches a person:

Endpoint Budget
POST /v1/support/cases 5 an hour
POST /v1/me/reports 5 a day (24 hours)

Over it the request answers 429 with errorCode: "too_many_requests" and reason: "tool_budget_exceeded". This answer has no Retry-After header; the message says how many minutes to wait.

Retries and idempotency

Send an Idempotency-Key header (up to 255 characters) on a write to make it safe to retry. A key names one request of your account, whichever endpoint it went to — all /v1 endpoints share one key space. For 24 hours, a second request with the same key, to the same endpoint and with the same body, returns the first request’s result without doing the work again.

  • The same key with a different body, or on another endpoint, answers 422 with reason: "idempotency_key_reused". Use a new key for a new request.
  • While the first request is still running, the second gets 409 with reason: "action_pending".
  • If the first request has not finished within 2 minutes — for example the server stopped mid-request — a retry gets 409 with reason: "action_unknown". Its outcome is unknown, and the request is never run again under that key. Check the account (list the products, for example) and, if the write did not happen, send it again with a new key.
  • The key and its body fingerprint are kept for the full 24 hours either way.
  • A request refused before it changed anything — invalid input, an unknown slug, missing billing details, an exhausted budget — does not use up the key; fix it and send it again.

A write sent without the header runs every time.

curl -X POST https://api.insy.io/v1/products/trading-ebook/variants \
  -H "Authorization: Bearer $INSY_TOKEN" \
  -H "Idempotency-Key: 6f1e2a4c-ebook-standard" \
  -H "Content-Type: application/json" \
  -d '{"name":"Standard","description":"Lifetime access to the ebook.","priceCents":4900,"currency":"PLN"}'

Profile and purchases

GET /v1/me — profile.read

Field Type Description
name string or null Display name.
email string or null Masked, e.g. j***@example.com. The full address is on GET /oauth/userinfo.
preferredLanguage string pl or en.
telegramLinked, discordLinked boolean Whether those accounts are connected.
activeMemberships number Memberships flagged active.
managedCommunities, managedProducts number What the user sells.

GET /v1/me/memberships — memberships.read

Up to 20 community memberships:

{
  "success": true,
  "data": [
    {
      "community": { "name": "Resellerzy", "slug": "resellerzy" },
      "active": true,
      "validUntil": "2026-11-03",
      "plan": {
        "name": "Monthly",
        "price": { "amountCents": 4900, "currency": "PLN" },
        "interval": "month"
      },
      "paymentMethod": "card",
      "joinedTelegram": true,
      "subscriptionStatus": "active"
    }
  ]
}

validUntil is null for lifetime access, and plan is null when the membership was not bought through a plan.

POST /v1/me/memberships/{communitySlug}/cancel — memberships.write

Cancels the subscription at the end of the paid period, or immediately when payment is overdue. Answers 200:

Field Type Description
community string Community name.
canceled string or null at_period_end, immediately or already_at_period_end.
accessUntil string or null Last day of access; null when canceled immediately.

Resuming a canceled subscription is done in the Insy app.

GET /v1/me/purchases — purchases.read

payments lists the 15 newest payments — date, status, amount, refunded, method, item (type, name, slug, plan) and receiptAvailable. ownedProducts lists up to 20 digital products the user bought, each with name, slug and creator.

POST /v1/me/reports — support.write

Raises a problem with something the user bought. The seller is asked to respond first; Insy steps in after 7 business days. Answers 201 with { "target": "…", "report": { "id", "caseId", "status" } }, or 404 when the user never bought the item.

Field Type Description
target string community or product.
slug string The community’s or product’s slug.
reason string no_access, not_as_described, refund_request, billing or other.
details string 10–2000 characters.

Selling

Slugs are 2–60 characters (products: up to 25) of lowercase letters, digits and single hyphens between words. A product’s category is one of the values the Insy app offers — Metodki, E-commerce, Krypto, Flipping / reselling, Trading, Bukmacherka, Social media & marketing, Automatyzacje & AI, Selfcare, Sport, Umiejętności, Inne. Communities and products are created in the Insy app, not over the API.

GET /v1/communities — communities.read

Communities the user owns or administers: name, slug, published, isOwner, members, newMembers, income and businessInfoMissing.

newMembers counts members who joined in the last 24 hours. income is { "amountCents": …, "currency": "PLN" }: the community’s completed payments in minor units, PLN payments only — a community that sells in another currency shows 0 for those sales. It covers the current day: payments since 00 UTC, not a rolling 24 hours.

GET /v1/communities/{slug}/stats — communities.read

The numbers on a community’s dashboard, for a community the user owns or administers: revenue, newMembers and pageViews over the last days (query parameter, 1–90, default 30), each with current, previous (the same number of days just before) and changePercent. revenue.current and revenue.previous are { "amountCents": …, "currency": "PLN" } and count completed PLN payments only, like the dashboard. A community the user does not manage answers 404.

GET /v1/communities/members — members.read

Finds members of the communities the user owns or administers, with the same matching as the member search in the Insy app. Moderators and plain members of a community cannot search it.

Query Description
q Required, 3–120 characters. Matches the start of an e-mail or of a Telegram username (a leading @ is ignored), case-insensitively, or a numeric Telegram user ID exactly.
community Optional community slug. Without it, every community the user manages is searched.

Answers an array of at most 10 matches, each with community (name, slug), name, email, telegramUserId, telegramUsername, role, active, banned, plan, validUntil and joinedTelegram. Inactive and banned memberships are included, marked by active and banned. No match is an empty array, not an error. A community the user does not manage answers 404.

GET /v1/communities/{slug}/activity — members.read

The community’s recent events, newest first, as on the dashboard’s Activity tab. Query: days (1–90, default 30) and types, a comma-separated list of event types — user_joined_community, user_left_community, user_kicked, membership_extended, subscription_payment_success, subscription_cancelled, subscription_cancelled_at_period_end, subscription_renewal_charge_failed, subscription_resumed, payment_refunded, user_joined_telegram, user_left_telegram, user_kicked_telegram, user_banned, user_unbanned, invite_code_used; without it, all of them.

Answers community (name, slug), days, events and truncated. Each event has type, date, member (name and a masked email, a***@example.com), plan and amount — the payment the event carried, { "amountCents": …, "currency": … }, or null. At most 20 events; truncated is true when the period had more.

GET /v1/communities/{slug}/members — members.read

The dashboard’s Members tab. Answers community, counts (active, expired, cancelled, paymentError, banned: how many members have each status), filter, total (how many match the filter), members (at most 20) and truncated.

Query Description
status Optional: active, expired, cancelled, payment-error or banned. Without it, every member, newest first.
expiringWithinDays Optional, 1–90: active memberships that end within that many days, soonest first. Overrides status; total counts every such membership.

Each member has name, a masked email, plan, active, banned, validUntil, joinedTelegram and subscriptionStatus (the Stripe subscription’s status, or null).

GET /v1/communities/{slug}/payments — earnings.read

The community’s recent payments, newest first, over the last days (1–90, default 30): first purchases, renewals, extensions and refunds, from the same activity as the Activity tab. Answers community, days, payments (at most 20), truncated and payouts, a sentence saying where payouts are — they are not in this response; they are in the dashboard’s Finance tab (Stripe).

Each payment has date, kind (first_purchase, renewal, extension or refund), amount (in the payment’s own currency, minor units), status, method, plan and buyer (name and a masked email). For a refund, amount is the refunded payment’s amount, not the refunded part. Totals over a period are in GET /v1/communities/{slug}/stats.

GET /v1/communities/{slug}/plans — communities.read

The community’s access plans, on sale or not: name, price (amountCents, currency), paymentMode (one_time or recurring), interval, intervalCount, active (on sale), trialDays, activeMembers and totalMembers (every membership ever bought on the plan). At most 20; truncated says there were more.

GET /v1/communities/{slug}/reviews — communities.read

The community’s visible reviews: averageScore (null with no reviews), totalReviews, distribution (the number of reviews per score, keyed "1" to "5") and latest, the 5 newest reviews with score, date, text (up to 300 characters, then …) and creatorReplied. Reviewers are not named.

These five endpoints, like stats, answer 404 for a community the user does not own or administer, and 400 for a query value out of range or not in the list.

PATCH /v1/communities/{slug} — communities.write

Body { "published": true } publishes the community, false unpublishes it — current members keep access. published is the only field read. Answers 200 with name, published, url and manageUrl, or { "unchanged": true, … } when it already was in that state. Publishing without billing details answers 409 with reason: "billing_details_missing".

GET /v1/products — products.read

Digital products the user sells: name, slug, published, type and category.

POST /v1/products/{slug}/variants — products.write

Adds a price variant. Answers 201 with product and variant: id, name, price (amountCents and currency), priceType and interval — as saved, which can differ from what you sent: a free price is saved as 0, an omitted currency is the product’s existing one (or PLN), and interval is null unless the price is a subscription.

Field Type Description
name string 2–100 characters.
description string 2–3000 characters.
priceCents integer Price in minor units. One-time and subscription prices must reach the currency’s minimum (PLN 10.00; EUR, USD and GBP 2.00), or the request answers 400; for pay_what_you_want it is the buyer’s minimum and may be 0; it is ignored for free.
currency string, optional PLN, EUR, USD, GBP, CHF, CZK, SEK, NOK, DKK, RON or UAH.
priceType string, optional one_time (the default), subscription, free or pay_what_you_want.
interval string month or year; required when priceType is subscription, ignored otherwise.

PATCH /v1/products/{slug} — products.write

Body { "published": true } makes the product visible and buyable; false hides it, and existing buyers keep access. Answers 200 with name, published and url, or { "unchanged": true, … }.

GET /v1/payouts/accounts — earnings.read

The user’s Stripe accounts for selling: businessName, serves (the communities and products each account is used for), canAcceptPayments, canReceivePayouts, detailsSubmitted, billingDetailsComplete, disabledReason, country and currency.

Support and help

POST /v1/support/cases — support.write

Opens a case with the Insy team. Answers 201 with caseId and the url of its conversation.

Field Type Description
category string access, wrong_email, subscription, payment, clipping, selling, payouts, dispute, bug or other.
subject string 3–120 characters.
description string 10–2000 characters.

GET /v1/help/search?q=… — help.read

Up to five help-center articles, each with title, section, url, route and excerpt. Developer pages are not included; the docs MCP server searches those.

GET /v1/help/article?route=… — help.read

One article by the route from a search: title, section, url and markdown (the first 6000 characters).

Was this page helpful?