Variant community access
Give a variant's buyers access to a Discord, Telegram, Slack, or WhatsApp community.
Choose the community a variant's buyers join, on one platform at a time. The
server, group, or channel must already be connected to your store; see
community connections. Retrieve the variant to
see the saved access under other_settings.community_servers.
Give buyers of a normal product's variant access to a community your store has connected: a Discord server with optional roles, a Telegram group, a Slack channel, or a WhatsApp group. It replaces the variant's access on the platform you send and keeps its access on the other platforms. community.role_ids is for Discord only: for other platforms leave it out or send an empty list. Discord roles must belong to the chosen server. Read the saved access on the variant (GET /v2/products/{product}/variants/{variant}) under other_settings.community_servers.<platform>, as server_id, roles (the Discord role IDs you sent as role_ids), required, and remove_on_expire. For Discord the same values are also in other_settings.discord_server, discord_roles, discord_data_required, and discord_kick_on_expire. Requires the listing API-key ability and the listing permission in your team role. Send the variant's updated_at as expected_updated_at to refuse the change when the variant was edited since you read it. Repeating the same body without expected_updated_at gives the same result. A server, group, channel, or role your store has not connected returns 422 on community.server_id or community.role_ids, and so do roles for a platform other than Discord. A stale expected_updated_at returns 422 on expected_updated_at. A variant of a listing that is not a normal product returns 422 on community. A variant of another product returns 404. OAuth callers use the admin grant and select a store with X-STORE. Current membership and role permissions apply to every request.
AuthorizationBearer <API Key>Provide your SellApp API key as a bearer token.
product*integerThe product path parameter.
variant*integerThe variant path parameter.
X-STORE?stringStore slug. Required for OAuth access tokens. API keys may omit it to use their current store, or the first accessible store when no current store is selected.
application/json- body
community*expected_updated_at?|The variant's updated_at from your last read. The change is refused with 422 when the variant changed since.
date-timeThe variant with its saved community access in other_settings.
application/json- response
data*curl -X PUT 'https://sell.app/api/v2/products/1/variants/2/community-access' \ -H 'X-STORE: launch-lab' \ -H 'Content-Type: application/json' \ -d '{ "community": { "platform": "discord", "server_id": "1187040134912155648", "role_ids": [ "1187040299781210112" ], "required": true, "remove_on_expire": true }, "expected_updated_at": "2024-01-10T18:47:22.000000Z"}'{ "data": { "id": 2, "product_id": 1, "title": "Professional Edition", "description": "Includes templates, examples and email support.", "deliverable": { "data": { "removeDuplicate": false, "parsingMode": "COMMA", "stock": 3, "comment": "Thanks for the purchase! I'll send you a contract by email. Make sure to sign it with your blood.", "serials": [ "1", "2", "3" ] }, "types": [ "TEXT", "MANUAL" ] }, "pricing": { "humble": true, "frequency": { "value": 1, "interval": "MONTH" }, "type": "SINGLE_PAYMENT", "price": { "price": "1999", "currency": "USD" } }, "minimum_purchase_quantity": 1, "maximum_purchase_quantity": 3, "bulk_discount": [ { "discount_percentage": 10, "minimum_purchase_amount": 10 } ], "payment_methods": [ "BTC", "STRIPE" ], "other_settings": { "quantity_increments": 2, "discord_data_required": true, "discord_server": "1187040134912155648", "discord_roles": [ "1187040299781210112" ], "discord_kick_on_expire": true, "community_servers": { "discord": { "server_id": "1187040134912155648", "roles": [ "1187040299781210112" ], "required": true, "remove_on_expire": true } } }, "order": 1, "created_at": "2024-01-10T18:47:22.000000Z", "updated_at": "2026-07-03T09:12:00.000000Z", "deleted_at": null, "product": { "additional_information": [ { "required": true, "key": "5ebae238c0afae7f4a4b96b30ff6f34c", "type": "CHECKBOX", "label": "I agree to the purchase terms" } ] }, "is_draft": false }}