> 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

> **Deprecated.** This method is deprecated. Planned removal date: 2025-01-01.

# Method name: onMemberCreated(event: CreatedMemberEvent)

# Method package: wixMembersBackend

# Method menu location: wixMembersBackend --> Events --> onMemberCreated

# Method Link: https://dev.wix.com/docs/velo/apis/wix-members-backend/events/on-member-created.md

# Method Description:

**Deprecated.**
This event will continue to work, but a newer version is available at
[onMemberCreated()](https://dev.wix.com/docs/velo/api-reference/wix-members-v2/events/on-member-created.md).

An event that is triggered when a site member is created.

The `onMemberCreated()` event handler runs when a site member is created.
 The received `CreatedMemberEvent` object contains information about the site member that was created.

 The site owner can configure the site to automatically approve members or require manual approval.
 A member who has been approved either automatically or manually has a status of `APPROVED`. A created member waiting for approval has a `status` of `PENDING`. A `PENDING` member cannot log into the site.

> **Note:** Backend events don’t work when previewing your site.



# Method Code Examples:

*** Note: do not assume any prop names or enum values other than the ones in the example.

## An event that occurs when a site member is created

```javascript
// Place this code in the events.js file
// of your site's Backend section.
// Add the file if it doesn't exist.

export function wixMembers_onMemberCreated(event) {
  const memberNickname = event.entity.profile.nickname;
  const creationEventId = event.metadata.id;
}

/*  Full event object:
 *  {
 *  "metadata": {
 *    "id": "b91e0e4e-1869-4705-ae8c-70b456b2ceed",
 *    "entityId": "583b58eb-708e-4eba-bb8d-af7f9914721b",
 *    "eventTime": "2021-12-10T15:00:29.236054Z",
 *    "triggeredByAnonymizeRequest": false
 *  },
 *  "entity": {
 *    "loginEmail": "john@example.com",
 *    "privacyStatus": "PUBLIC",
 *    "_id": "583b58eb-708e-4eba-bb8d-af7f9914721b",
 *    "_createdDate": "2021-12-10T10:44:37.000Z",
 *    "_updatedDate": "2021-12-10T10:44:36.939Z",
 *    "activityStatus": "ACTIVE",
 *    "profile": {
 *      "profilePhoto": {
 *        "_id": "a27d24_0dd318%7Emv2.jpg",
 *        "url": "http://static.wixstatic.com/media/a27d24_0dd318%7Emv2.jpg",
 *        "height": 0,
 *        "width": 0
 *      },
 *      "slug": "john40355",
 *      "coverPhoto": {
 *        "_id": "",
 *        "url": "https://example.com/myimage.jpg",
 *        "height": 0,
 *        "width": 0
 *      },
 *      "title": "Awesome title",
 *      "nickname": "John Doe"
 *    },
 *    "status": "APPROVED",
 *    "contactId": "583b58eb-708e-4eba-bb8d-af7f9914721b",
 *    "contactDetails": {
 *      "customFields": {
 *        "custom.pet-name": {
 *          "name": "Pet Name",
 *          "value": "Bob"
 *        }
 *      },
 *      "company": "Wix",
 *      "phones": [],
 *      "lastName": "Doe",
 *      "firstName": "John",
 *      "birthdate": "2000-01-01",
 *      "jobTitle": "Developer",
 *      "emails": [
 *        "john@example.com"
 *      ],
 *      "addresses": [
 *        {
 *          "city": "Jewell",
 *          "addressLine": "10 Cedarstone Drive",
 *          "_id": "156e50e8-8127-4617-a052-da66bb9a96a0",
 *          "country": "US",
 *          "postalCode": "43530",
 *          "subdivision": "US-OH"
 *        }
 *      ]
 *    }
 *  }
 *}
 */

```

---