> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# CreateFollowedChannel

# Package: accounts

# Namespace: LoyaltySocialMedia

# Method link: https://dev.wix.com/docs/api-reference/crm/loyalty-program/accounts/social-media/create-followed-channel.md

## Permission Scopes:
Manage Loyalty: SCOPE.DC-LOYALTY.MANAGE-LOYALTY

## Introduction

Creates an entity for the specified account ID when the account follows a social media channel.

Members can only follow enabled channels. A Wix user has to enable channels in the dashboard.

>**Note:**
>This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities.md).

---

## REST API

### Schema

```
 Method: createFollowedChannel
 Description: Creates an entity for the specified account GUID when the account follows a social media channel.  Members can only follow enabled channels. A Wix user has to enable channels in the dashboard.  >**Note:** >This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities.md).
 URL: https://www.wixapis.com/loyalty-social-media/v1/followed-channels
 Method: POST
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  followedChannel, followedChannel.channel
 Method parameters: 
   param name: followedChannel | type: FollowedChannel   | required: true 
        - name: channel | type: Type | description: Followed social media channel. | required: true 
             - enum:
             -     FACEBOOK: Facebook social media channel.
             -     INSTAGRAM: Instagram social media channel.
             -     LINKEDIN: LinkedIn social media channel.
             -     X: X social media channel.
             -     TIKTOK: TikTok social media channel.
 Return type: CreateFollowedChannelResponse
  - name: followedChannel | type: FollowedChannel | description: Followed social media channel details.  
     - name: id | type: string | description: Followed social media channel GUID.  | read-only: true | validation: format GUID
     - name: accountId | type: string | description: GUID of the account that has followed a social media channel.  | read-only: true | validation: format GUID
     - name: channel | type: Type | description: Followed social media channel.  
         - enum:
         -     FACEBOOK: Facebook social media channel.
         -     INSTAGRAM: Instagram social media channel.
         -     LINKEDIN: LinkedIn social media channel.
         -     X: X social media channel.
         -     TIKTOK: TikTok social media channel.
     - name: createdDate | type: string | description: Date and time when an entity for following a social media channel was created.  | read-only: true | validation: format date-time


```

### Examples

### Create a record for the followed social media channel
```curl
curl -X POST \ 'https://www.wixapis.com/loyalty-social-media/v1/followed-channels' \
  -H 'Authorization: <AUTH>' \
  -H 'Content-Type: application/json' \
  -d '{
        "followedChannel": {
          "channel": "X"
        }
      }'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.loyalty.socialMedia.createFollowedChannel(followedChannel)
 Description: Creates an entity for the specified account GUID when the account follows a social media channel.  Members can only follow enabled channels. A Wix user has to enable channels in the dashboard.  >**Note:** >This method requires [visitor or member authentication](https://dev.wix.com/docs/api-reference/articles/authentication/about-identities.md).
 # Note: If the parameter `a.b` is listed under required parameters, `b` is only required if `a` is also present.
 Required parameters:  followedChannel, followedChannel.channel
 Method parameters: 
   param name: followedChannel | type: FollowedChannel   | required: true 
        - name: channel | type: Type | description: Followed social media channel. | required: true 
             - enum:
             -     FACEBOOK: Facebook social media channel.
             -     INSTAGRAM: Instagram social media channel.
             -     LINKEDIN: LinkedIn social media channel.
             -     X: X social media channel.
             -     TIKTOK: TikTok social media channel.
 Return type: PROMISE<FollowedChannel>
  - name: _id | type: string | description: Followed social media channel GUID.  | read-only: true | validation: format GUID
  - name: accountId | type: string | description: GUID of the account that has followed a social media channel.  | read-only: true | validation: format GUID
  - name: channel | type: Type | description: Followed social media channel.  
     - enum:
     -     FACEBOOK: Facebook social media channel.
     -     INSTAGRAM: Instagram social media channel.
     -     LINKEDIN: LinkedIn social media channel.
     -     X: X social media channel.
     -     TIKTOK: TikTok social media channel.
  - name: _createdDate | type: Date | description: Date and time when an entity for following a social media channel was created.  | read-only: true 


```

### Examples

### createFollowedChannel
```javascript
import { socialMedia } from '@wix/loyalty';

async function createFollowedChannel(followedChannel) {
  const response = await socialMedia.createFollowedChannel(followedChannel);
};
```

### createFollowedChannel (self-managed)
Self-managed SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { socialMedia } from '@wix/loyalty';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { socialMedia },
  // Include the auth strategy and host as relevant
});


async function createFollowedChannel(followedChannel) {
  const response = await myWixClient.socialMedia.createFollowedChannel(followedChannel);
};
```

---