For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
LoginTalk to us
DocumentationSDKsConnectAPI Reference
DocumentationSDKsConnectAPI Reference
  • API Reference
      • GETGet user preference
      • PUTUpdate user preference
      • POSTUpdate user preference (single)
LogoLogo
LoginTalk to us
API ReferenceUser Subscriptions

Update user preference (single)

POST
https://api.fyno.io/v1/:WSID/:version/subscriptions/list/:subscription_id/user
POST
/v1/:WSID/:version/subscriptions/list/:subscription_id/user
$curl -X POST https://api.fyno.io/v1/FYXXXXXXXX/live/subscriptions/list/SXXXXXXXXX/user \
> -H "Authorization: Bearer <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "channel": "sms",
> "distinct_id": "string",
> "status": "opted-in"
>}'
1{
2 "SXXXXXXXXX": {
3 "discord": "opted-in",
4 "email": "opted-in",
5 "inapp": "opted-in",
6 "push": "opted-in",
7 "slack": "opted-in",
8 "sms": "opted-in",
9 "teams": "opted-in",
10 "voice": "opted-in",
11 "webpush": "opted-in",
12 "whatsapp": "opted-in"
13 }
14}

This API enables you to update the channel preference of a user for a particular subscription topic.

Note: If the channel configuration for a subscription topic is set to ‘required’, then the user preference for the channel cannot be updated.

Was this page helpful?
Previous

Update User Property

Next
Built with

Authentication

AuthorizationBearer
Enter your API Key. If you don't have it already, you can create one from the API Keys page within your Fyno account

Path parameters

WSIDstringRequired
Enter your workspace ID. You can obtain this value from the API Keys page within your Fyno account.
versionenumRequiredDefaults to live
Specify the version for which you would like to manage the user profile.
Allowed values:
subscription_idstringRequired

Enter the subscription ID to update the channel preference for the subscription topic. To update the user preference for all subscription topics at once (global preference), use ‘all’ instead of the subscription id.

Request

This endpoint expects an object.
channelenumRequired
distinct_idstringRequired
statusenumRequired
Allowed values:

Response

Subscription updated successfully
SXXXXXXXXXobject

Errors

400
Bad Request Error
401
Unauthorized Error