# Wix Integration

> Part of the [NextBlog documentation](https://nextblog.ai/docs.md). Live page: [https://nextblog.ai/docs/integration-wix](https://nextblog.ai/docs/integration-wix)

Publish blog posts to your Wix site with rich formatting and media support. This integration creates posts in your Wix blog automatically.

#### Prerequisites

Before you begin, make sure you have:

- A Wix site with a blog enabled
- Wix account with admin access
- API access enabled for your site

**Note:** If you haven't added a blog to your Wix site yet, you can do so by:

1. In the Wix website builder, click **"Pages and Menu"** in the left sidebar
2. Click **"Add Page"** or the **"+"** button
3. Select **"Blog"** from the page types
4. Your blog page will be created and ready to receive posts

### Step 1: Create API Key in Wix

#### 1.1 Visit Wix API Keys Page

Go to [https://manage.wix.com/account/api-keys](https://manage.wix.com/account/api-keys)

#### 1.2 Create New API Key

1. Click the **"Create API Key"** button
2. Enter a name: `NextBlog Integration`
3. Select the permissions: `Blog (write)`
4. Click **"Generate"** or **"Create"**

#### 1.3 Copy API Key

1. After creating the API key, it will be displayed
2. **Important:** Copy the API key immediately and save it securely
3. You can view this key again later, but it's best to copy it now

### Step 2: Get Your Wix Site ID

#### 2.1 Access Site Dashboard

1. Log into your Wix account
2. Go to your site dashboard
3. Click on **"Settings"** in the left sidebar

#### 2.2 Find Site ID

The easiest way to find your Site ID is from the Wix dashboard URL:

1. Go to your Wix dashboard
2. Look at your browser's address bar - it will look something like:

https://manage.wix.com/dashboard/412f6f5e-6c38-46df-aee1-66802a2001d1

The long string after `/dashboard/` (for example `412f6f5e-6c38-46df-aee1-66802a2001d1`) is your Site ID.

**Alternative method:** You can also find the Site ID by:

- Clicking on **"Settings"** → **"General Info"** or **"Site Info"**
- Looking for **"Site ID"** or **"Site Number"** in the settings
- Checking the Wix API documentation for your site

### Step 3: Configure Wix Integration in NextBlog

#### 3.1 Navigate to Project Settings

1. Log into your NextBlog dashboard
2. Click on your project to open it
3. Click on **"Settings"**

#### 3.2 Enable Wix Integration

1. Scroll down to the **"Wix Integration"** section
2. Toggle the **"Enable Wix Integration"** switch to ON

#### 3.3 Enter Wix Credentials

Fill in the following fields:

- **Wix API Key:** Paste the API key you copied in Step 1.3
- **Wix Site ID:** Paste the Site ID you found in Step 2.2

#### 3.4 Test Connection

1. Click the **"Test Connection"** button
2. Wait for the test to complete
3. If successful, you'll see a green success message
4. If it fails, check your credentials and try again

#### 3.5 Save Changes

Click the **"Save Changes"** button to save your Wix integration settings.

### How It Works

Once configured, here's what happens when you approve a blog post:

1. **Post Approval:** When you approve a blog post in NextBlog, the Wix integration is triggered
2. **Content Conversion:** The markdown content is converted to Wix rich content format
3. **Post Creation:** A new Wix blog post is created with:
  - Title from your NextBlog post
  - Rich content (converted from markdown)
  - Excerpt/description
  - SEO-friendly slug
  - Featured image (if provided)
  - Published status (based on your post status)
4. **Publishing:** The post is published to your Wix blog and is immediately live

### Troubleshooting

#### Connection Test Fails

**Common issues:**

- **Invalid API key:** Make sure you copied the entire API key correctly
- **Wrong Site ID:** Verify the Site ID is correct
- **Missing permissions:** Make sure the API key has Blog write permissions
- **Blog not enabled:** Ensure you have a blog enabled on your Wix site

#### Posts Not Publishing

**Check the following:**

- Make sure the integration is enabled in project settings
- Verify the connection test passes
- Check that you're approving posts (not just generating them)
- Look for error messages in your NextBlog dashboard

### Next Steps

Now that your Wix integration is set up:

- Generate or create a blog post in NextBlog
- Review and approve the post
- Check your Wix blog - the post should appear automatically!
- Customize the blog design in your Wix editor
