# WordPress (/integrations/wordpress)

[WordPress.com](https://wordpress.com/) hosts sites and their content. Connect a WordPress.com site through OAuth to create and manage posts, pages, media, comments, categories, tags, and users. Use the search operation to find content before reading or updating it.

## OAuth scopes \[#oauth-scopes]

Sim requests these scopes when someone connects a WordPress account. For a self-hosted deployment, register your own app with the provider using the settings below. See [Integrations and OAuth](/platform/self-hosting/integrations-oauth) for setup.

| Setting | Value |
| - | - |
| Redirect URI | `<NEXT_PUBLIC_APP_URL>/api/auth/oauth2/callback/wordpress` |
| Environment variables | `WORDPRESS_CLIENT_ID`, `WORDPRESS_CLIENT_SECRET` |

| Scope | Description |
| - | - |
| `global` | Full access to every WordPress.com site the account can manage |

## Use the block \[#usage-instructions]

Integrate with WordPress.com to create, update, and manage posts, pages, media, comments, categories, tags, and users. Connects to WordPress.com sites via OAuth.

## Actions \[#actions]

### WordPress Create Post \[#wordpress-create-post]

Create a new blog post in WordPress.com

#### Input \[#input]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `title` | string | Yes | Post title |
| `content` | string | No | Post content (HTML or plain text) |
| `status` | string | No | Post status: publish, draft, pending, private, or future |
| `excerpt` | string | No | Post excerpt |
| `categories` | string | No | Comma-separated category IDs |
| `tags` | string | No | Comma-separated tag IDs |
| `featuredMedia` | number | No | Featured image media ID |
| `slug` | string | No | URL slug for the post |
| `date` | string | No | Publish date in the site timezone, ISO 8601 (e.g., 2026-12-01T09:00:00). A future date with status publish schedules the post |

#### Output \[#output]

| Parameter | Type | Description |
| - | - | - |
| `post` | object | The created post |
| ↳ `id` | number | Post ID |
| ↳ `date` | string | Post creation date |
| ↳ `modified` | string | Post modification date |
| ↳ `slug` | string | Post slug |
| ↳ `status` | string | Post status |
| ↳ `type` | string | Post type |
| ↳ `link` | string | Post URL |
| ↳ `title` | object | Post title object |
| ↳ `content` | object | Post content object |
| ↳ `excerpt` | object | Post excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `categories` | array | Category IDs |
| ↳ `tags` | array | Tag IDs |

### WordPress Update Post \[#wordpress-update-post]

Update an existing blog post in WordPress.com

#### Input \[#input-1]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `postId` | number | Yes | The ID of the post to update |
| `title` | string | No | Post title |
| `content` | string | No | Post content (HTML or plain text) |
| `status` | string | No | Post status: publish, draft, pending, private, or future |
| `excerpt` | string | No | Post excerpt |
| `categories` | string | No | Comma-separated category IDs |
| `tags` | string | No | Comma-separated tag IDs |
| `featuredMedia` | number | No | Featured image media ID |
| `slug` | string | No | URL slug for the post |
| `date` | string | No | Publish date in the site timezone, ISO 8601 (e.g., 2026-12-01T09:00:00). A future date with status publish schedules the post |

#### Output \[#output-1]

| Parameter | Type | Description |
| - | - | - |
| `post` | object | The updated post |
| ↳ `id` | number | Post ID |
| ↳ `date` | string | Post creation date |
| ↳ `modified` | string | Post modification date |
| ↳ `slug` | string | Post slug |
| ↳ `status` | string | Post status |
| ↳ `type` | string | Post type |
| ↳ `link` | string | Post URL |
| ↳ `title` | object | Post title object |
| ↳ `content` | object | Post content object |
| ↳ `excerpt` | object | Post excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `categories` | array | Category IDs |
| ↳ `tags` | array | Tag IDs |

### WordPress Delete Post \[#wordpress-delete-post]

Delete a blog post from WordPress.com

#### Input \[#input-2]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `postId` | number | Yes | The ID of the post to delete |
| `force` | boolean | No | Bypass trash and force delete permanently |

#### Output \[#output-2]

| Parameter | Type | Description |
| - | - | - |
| `deleted` | boolean | Whether the post was deleted |
| `post` | object | The deleted post |
| ↳ `id` | number | Post ID |
| ↳ `date` | string | Post creation date |
| ↳ `modified` | string | Post modification date |
| ↳ `slug` | string | Post slug |
| ↳ `status` | string | Post status |
| ↳ `type` | string | Post type |
| ↳ `link` | string | Post URL |
| ↳ `title` | object | Post title object |
| ↳ `content` | object | Post content object |
| ↳ `excerpt` | object | Post excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `categories` | array | Category IDs |
| ↳ `tags` | array | Tag IDs |

### WordPress Get Post \[#wordpress-get-post]

Get a single blog post from WordPress.com by ID

#### Input \[#input-3]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `postId` | number | Yes | The ID of the post to retrieve |

#### Output \[#output-3]

| Parameter | Type | Description |
| - | - | - |
| `post` | object | The retrieved post |
| ↳ `id` | number | Post ID |
| ↳ `date` | string | Post creation date |
| ↳ `modified` | string | Post modification date |
| ↳ `slug` | string | Post slug |
| ↳ `status` | string | Post status |
| ↳ `type` | string | Post type |
| ↳ `link` | string | Post URL |
| ↳ `title` | object | Post title object |
| ↳ `content` | object | Post content object |
| ↳ `excerpt` | object | Post excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `categories` | array | Category IDs |
| ↳ `tags` | array | Tag IDs |

### WordPress List Posts \[#wordpress-list-posts]

List blog posts from WordPress.com with optional filters

#### Input \[#input-4]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `perPage` | number | No | Number of posts per page (e.g., 10, 25, 50). Default: 10, max: 100 |
| `page` | number | No | Page number for pagination (e.g., 1, 2, 3) |
| `status` | string | No | Post status filter: publish, draft, pending, private |
| `author` | number | No | Filter by author ID (e.g., 1, 42) |
| `categories` | string | No | Comma-separated category IDs to filter by (e.g., "1,2,3") |
| `tags` | string | No | Comma-separated tag IDs to filter by (e.g., "5,10,15") |
| `search` | string | No | Search term to filter posts (e.g., "tutorial", "announcement") |
| `orderBy` | string | No | Order by field: date, id, title, slug, modified |
| `order` | string | No | Order direction: asc or desc |

#### Output \[#output-4]

| Parameter | Type | Description |
| - | - | - |
| `posts` | array | List of posts |
| ↳ `id` | number | Post ID |
| ↳ `date` | string | Post creation date |
| ↳ `modified` | string | Post modification date |
| ↳ `slug` | string | Post slug |
| ↳ `status` | string | Post status |
| ↳ `type` | string | Post type |
| ↳ `link` | string | Post URL |
| ↳ `title` | object | Post title object |
| ↳ `content` | object | Post content object |
| ↳ `excerpt` | object | Post excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `categories` | array | Category IDs |
| ↳ `tags` | array | Tag IDs |
| `total` | number | Total number of posts |
| `totalPages` | number | Total number of pages |

### WordPress Create Page \[#wordpress-create-page]

Create a new page in WordPress.com

#### Input \[#input-5]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `title` | string | Yes | Page title |
| `content` | string | No | Page content (HTML or plain text) |
| `status` | string | No | Page status: publish, draft, pending, private, or future |
| `excerpt` | string | No | Page excerpt |
| `parent` | number | No | Parent page ID for hierarchical pages |
| `menuOrder` | number | No | Order in page menu |
| `featuredMedia` | number | No | Featured image media ID |
| `slug` | string | No | URL slug for the page |
| `date` | string | No | Publish date in the site timezone, ISO 8601 (e.g., 2026-12-01T09:00:00). A future date with status publish schedules the page |

#### Output \[#output-5]

| Parameter | Type | Description |
| - | - | - |
| `page` | object | The created page |
| ↳ `id` | number | Page ID |
| ↳ `date` | string | Page creation date |
| ↳ `modified` | string | Page modification date |
| ↳ `slug` | string | Page slug |
| ↳ `status` | string | Page status |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Page URL |
| ↳ `title` | object | Page title object |
| ↳ `content` | object | Page content object |
| ↳ `excerpt` | object | Page excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `parent` | number | Parent page ID |
| ↳ `menu_order` | number | Menu order |

### WordPress Update Page \[#wordpress-update-page]

Update an existing page in WordPress.com

#### Input \[#input-6]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `pageId` | number | Yes | The ID of the page to update |
| `title` | string | No | Page title |
| `content` | string | No | Page content (HTML or plain text) |
| `status` | string | No | Page status: publish, draft, pending, private, or future |
| `excerpt` | string | No | Page excerpt |
| `parent` | number | No | Parent page ID for hierarchical pages |
| `menuOrder` | number | No | Order in page menu |
| `featuredMedia` | number | No | Featured image media ID |
| `slug` | string | No | URL slug for the page |
| `date` | string | No | Publish date in the site timezone, ISO 8601 (e.g., 2026-12-01T09:00:00). A future date with status publish schedules the page |

#### Output \[#output-6]

| Parameter | Type | Description |
| - | - | - |
| `page` | object | The updated page |
| ↳ `id` | number | Page ID |
| ↳ `date` | string | Page creation date |
| ↳ `modified` | string | Page modification date |
| ↳ `slug` | string | Page slug |
| ↳ `status` | string | Page status |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Page URL |
| ↳ `title` | object | Page title object |
| ↳ `content` | object | Page content object |
| ↳ `excerpt` | object | Page excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `parent` | number | Parent page ID |
| ↳ `menu_order` | number | Menu order |

### WordPress Delete Page \[#wordpress-delete-page]

Delete a page from WordPress.com

#### Input \[#input-7]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `pageId` | number | Yes | The ID of the page to delete |
| `force` | boolean | No | Bypass trash and force delete permanently |

#### Output \[#output-7]

| Parameter | Type | Description |
| - | - | - |
| `deleted` | boolean | Whether the page was deleted |
| `page` | object | The deleted page |
| ↳ `id` | number | Page ID |
| ↳ `date` | string | Page creation date |
| ↳ `modified` | string | Page modification date |
| ↳ `slug` | string | Page slug |
| ↳ `status` | string | Page status |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Page URL |
| ↳ `title` | object | Page title object |
| ↳ `content` | object | Page content object |
| ↳ `excerpt` | object | Page excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `parent` | number | Parent page ID |
| ↳ `menu_order` | number | Menu order |

### WordPress Get Page \[#wordpress-get-page]

Get a single page from WordPress.com by ID

#### Input \[#input-8]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `pageId` | number | Yes | The ID of the page to retrieve |

#### Output \[#output-8]

| Parameter | Type | Description |
| - | - | - |
| `page` | object | The retrieved page |
| ↳ `id` | number | Page ID |
| ↳ `date` | string | Page creation date |
| ↳ `modified` | string | Page modification date |
| ↳ `slug` | string | Page slug |
| ↳ `status` | string | Page status |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Page URL |
| ↳ `title` | object | Page title object |
| ↳ `content` | object | Page content object |
| ↳ `excerpt` | object | Page excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `parent` | number | Parent page ID |
| ↳ `menu_order` | number | Menu order |

### WordPress List Pages \[#wordpress-list-pages]

List pages from WordPress.com with optional filters

#### Input \[#input-9]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `perPage` | number | No | Number of pages per request (e.g., 10, 25, 50). Default: 10, max: 100 |
| `page` | number | No | Page number for pagination (e.g., 1, 2, 3) |
| `status` | string | No | Page status filter: publish, draft, pending, private |
| `parent` | number | No | Filter by parent page ID (e.g., 123) |
| `search` | string | No | Search term to filter pages (e.g., "about", "contact") |
| `orderBy` | string | No | Order by field: date, id, title, slug, modified, menu_order |
| `order` | string | No | Order direction: asc or desc |

#### Output \[#output-9]

| Parameter | Type | Description |
| - | - | - |
| `pages` | array | List of pages |
| ↳ `id` | number | Page ID |
| ↳ `date` | string | Page creation date |
| ↳ `modified` | string | Page modification date |
| ↳ `slug` | string | Page slug |
| ↳ `status` | string | Page status |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Page URL |
| ↳ `title` | object | Page title object |
| ↳ `content` | object | Page content object |
| ↳ `excerpt` | object | Page excerpt object |
| ↳ `author` | number | Author ID |
| ↳ `featured_media` | number | Featured media ID |
| ↳ `parent` | number | Parent page ID |
| ↳ `menu_order` | number | Menu order |
| `total` | number | Total number of pages |
| `totalPages` | number | Total number of result pages |

### WordPress Upload Media \[#wordpress-upload-media]

Upload a media file (image, video, document) to WordPress.com

#### Input \[#input-10]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `file` | file | No | File to upload (UserFile object) |
| `filename` | string | No | Optional filename override (e.g., image.jpg) |
| `title` | string | No | Media title |
| `caption` | string | No | Media caption |
| `altText` | string | No | Alternative text for accessibility |
| `description` | string | No | Media description |

#### Output \[#output-10]

| Parameter | Type | Description |
| - | - | - |
| `media` | object | The uploaded media item |
| ↳ `id` | number | Media ID |
| ↳ `date` | string | Upload date |
| ↳ `slug` | string | Media slug |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Media page URL |
| ↳ `title` | object | Media title object |
| ↳ `caption` | object | Media caption object |
| ↳ `alt_text` | string | Alt text |
| ↳ `media_type` | string | Media type (image, video, etc.) |
| ↳ `mime_type` | string | MIME type |
| ↳ `source_url` | string | Direct URL to the media file |
| ↳ `media_details` | object | Media details (dimensions, etc.) |

### WordPress Get Media \[#wordpress-get-media]

Get a single media item from WordPress.com by ID

#### Input \[#input-11]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `mediaId` | number | Yes | The ID of the media item to retrieve |

#### Output \[#output-11]

| Parameter | Type | Description |
| - | - | - |
| `media` | object | The retrieved media item |
| ↳ `id` | number | Media ID |
| ↳ `date` | string | Upload date |
| ↳ `slug` | string | Media slug |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Media page URL |
| ↳ `title` | object | Media title object |
| ↳ `caption` | object | Media caption object |
| ↳ `alt_text` | string | Alt text |
| ↳ `media_type` | string | Media type (image, video, etc.) |
| ↳ `mime_type` | string | MIME type |
| ↳ `source_url` | string | Direct URL to the media file |
| ↳ `media_details` | object | Media details (dimensions, etc.) |

### WordPress List Media \[#wordpress-list-media]

List media items from the WordPress.com media library

#### Input \[#input-12]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `perPage` | number | No | Number of media items per request (e.g., 10, 25, 50). Default: 10, max: 100 |
| `page` | number | No | Page number for pagination (e.g., 1, 2, 3) |
| `search` | string | No | Search term to filter media (e.g., "logo", "banner") |
| `mediaType` | string | No | Filter by media type: image, video, audio, application |
| `mimeType` | string | No | Filter by specific MIME type (e.g., image/jpeg, image/png) |
| `orderBy` | string | No | Order by field: date, id, title, slug |
| `order` | string | No | Order direction: asc or desc |

#### Output \[#output-12]

| Parameter | Type | Description |
| - | - | - |
| `media` | array | List of media items |
| ↳ `id` | number | Media ID |
| ↳ `date` | string | Upload date |
| ↳ `slug` | string | Media slug |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Media page URL |
| ↳ `title` | object | Media title object |
| ↳ `caption` | object | Media caption object |
| ↳ `alt_text` | string | Alt text |
| ↳ `media_type` | string | Media type (image, video, etc.) |
| ↳ `mime_type` | string | MIME type |
| ↳ `source_url` | string | Direct URL to the media file |
| ↳ `media_details` | object | Media details (dimensions, etc.) |
| `total` | number | Total number of media items |
| `totalPages` | number | Total number of result pages |

### WordPress Delete Media \[#wordpress-delete-media]

Delete a media item from WordPress.com

#### Input \[#input-13]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `mediaId` | number | Yes | The ID of the media item to delete |

#### Output \[#output-13]

| Parameter | Type | Description |
| - | - | - |
| `deleted` | boolean | Whether the media was deleted |
| `media` | object | The deleted media item |
| ↳ `id` | number | Media ID |
| ↳ `date` | string | Upload date |
| ↳ `slug` | string | Media slug |
| ↳ `type` | string | Content type |
| ↳ `link` | string | Media page URL |
| ↳ `title` | object | Media title object |
| ↳ `caption` | object | Media caption object |
| ↳ `alt_text` | string | Alt text |
| ↳ `media_type` | string | Media type (image, video, etc.) |
| ↳ `mime_type` | string | MIME type |
| ↳ `source_url` | string | Direct URL to the media file |
| ↳ `media_details` | object | Media details (dimensions, etc.) |

### WordPress Create Comment \[#wordpress-create-comment]

Create a new comment on a WordPress.com post

#### Input \[#input-14]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `postId` | number | Yes | The ID of the post to comment on |
| `content` | string | Yes | Comment content |
| `parent` | number | No | Parent comment ID for replies |
| `authorName` | string | No | Comment author display name |
| `authorEmail` | string | No | Comment author email |
| `authorUrl` | string | No | Comment author URL |

#### Output \[#output-14]

| Parameter | Type | Description |
| - | - | - |
| `comment` | object | The created comment |
| ↳ `id` | number | Comment ID |
| ↳ `post` | number | Post ID |
| ↳ `parent` | number | Parent comment ID |
| ↳ `author` | number | Author user ID |
| ↳ `author_name` | string | Author display name |
| ↳ `author_email` | string | Author email |
| ↳ `author_url` | string | Author URL |
| ↳ `date` | string | Comment date |
| ↳ `content` | object | Comment content object |
| ↳ `link` | string | Comment permalink |
| ↳ `status` | string | Comment status |

### WordPress List Comments \[#wordpress-list-comments]

List comments from WordPress.com with optional filters

#### Input \[#input-15]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `perPage` | number | No | Number of comments per request (e.g., 10, 25, 50). Default: 10, max: 100 |
| `page` | number | No | Page number for pagination (e.g., 1, 2, 3) |
| `postId` | number | No | Filter by post ID (e.g., 123, 456) |
| `status` | string | No | Filter by comment status: approve, hold, spam, trash, all |
| `search` | string | No | Search term to filter comments (e.g., "question", "feedback") |
| `orderBy` | string | No | Order by field: date, id, parent |
| `order` | string | No | Order direction: asc or desc |
| `context` | string | No | Response context: view (default) or edit. edit returns author_email but requires the moderate_comments capability |

#### Output \[#output-15]

| Parameter | Type | Description |
| - | - | - |
| `comments` | array | List of comments |
| ↳ `id` | number | Comment ID |
| ↳ `post` | number | Post ID |
| ↳ `parent` | number | Parent comment ID |
| ↳ `author` | number | Author user ID |
| ↳ `author_name` | string | Author display name |
| ↳ `author_email` | string | Author email (edit context only) |
| ↳ `author_url` | string | Author URL |
| ↳ `date` | string | Comment date |
| ↳ `content` | object | Comment content object |
| ↳ `link` | string | Comment permalink |
| ↳ `status` | string | Comment status |
| `total` | number | Total number of comments |
| `totalPages` | number | Total number of result pages |

### WordPress Update Comment \[#wordpress-update-comment]

Update a comment in WordPress.com (content or status)

#### Input \[#input-16]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `commentId` | number | Yes | The ID of the comment to update |
| `content` | string | No | Updated comment content |
| `status` | string | No | Comment status: approved, hold, spam, trash |

#### Output \[#output-16]

| Parameter | Type | Description |
| - | - | - |
| `comment` | object | The updated comment |
| ↳ `id` | number | Comment ID |
| ↳ `post` | number | Post ID |
| ↳ `parent` | number | Parent comment ID |
| ↳ `author` | number | Author user ID |
| ↳ `author_name` | string | Author display name |
| ↳ `author_email` | string | Author email |
| ↳ `author_url` | string | Author URL |
| ↳ `date` | string | Comment date |
| ↳ `content` | object | Comment content object |
| ↳ `link` | string | Comment permalink |
| ↳ `status` | string | Comment status |

### WordPress Delete Comment \[#wordpress-delete-comment]

Delete a comment from WordPress.com

#### Input \[#input-17]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `commentId` | number | Yes | The ID of the comment to delete |
| `force` | boolean | No | Bypass trash and force delete permanently |

#### Output \[#output-17]

| Parameter | Type | Description |
| - | - | - |
| `deleted` | boolean | Whether the comment was deleted |
| `comment` | object | The deleted comment |
| ↳ `id` | number | Comment ID |
| ↳ `post` | number | Post ID |
| ↳ `parent` | number | Parent comment ID |
| ↳ `author` | number | Author user ID |
| ↳ `author_name` | string | Author display name |
| ↳ `author_email` | string | Author email |
| ↳ `author_url` | string | Author URL |
| ↳ `date` | string | Comment date |
| ↳ `content` | object | Comment content object |
| ↳ `link` | string | Comment permalink |
| ↳ `status` | string | Comment status |

### WordPress Create Category \[#wordpress-create-category]

Create a new category in WordPress.com

#### Input \[#input-18]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `name` | string | Yes | Category name |
| `description` | string | No | Category description |
| `parent` | number | No | Parent category ID for hierarchical categories |
| `slug` | string | No | URL slug for the category |

#### Output \[#output-18]

| Parameter | Type | Description |
| - | - | - |
| `category` | object | The created category |
| ↳ `id` | number | Category ID |
| ↳ `count` | number | Number of posts in this category |
| ↳ `description` | string | Category description |
| ↳ `link` | string | Category archive URL |
| ↳ `name` | string | Category name |
| ↳ `slug` | string | Category slug |
| ↳ `taxonomy` | string | Taxonomy name |
| ↳ `parent` | number | Parent category ID |

### WordPress List Categories \[#wordpress-list-categories]

List categories from WordPress.com

#### Input \[#input-19]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `perPage` | number | No | Number of categories per request (e.g., 10, 25, 50). Default: 10, max: 100 |
| `page` | number | No | Page number for pagination (e.g., 1, 2, 3) |
| `search` | string | No | Search term to filter categories (e.g., "news", "technology") |
| `order` | string | No | Order direction: asc or desc |

#### Output \[#output-19]

| Parameter | Type | Description |
| - | - | - |
| `categories` | array | List of categories |
| ↳ `id` | number | Category ID |
| ↳ `count` | number | Number of posts in this category |
| ↳ `description` | string | Category description |
| ↳ `link` | string | Category archive URL |
| ↳ `name` | string | Category name |
| ↳ `slug` | string | Category slug |
| ↳ `taxonomy` | string | Taxonomy name |
| ↳ `parent` | number | Parent category ID |
| `total` | number | Total number of categories |
| `totalPages` | number | Total number of result pages |

### WordPress Get Category \[#wordpress-get-category]

Get a single category from WordPress.com by ID

#### Input \[#input-20]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `categoryId` | number | Yes | The ID of the category to retrieve |

#### Output \[#output-20]

| Parameter | Type | Description |
| - | - | - |
| `category` | object | The retrieved category |
| ↳ `id` | number | Category ID |
| ↳ `count` | number | Number of posts in this category |
| ↳ `description` | string | Category description |
| ↳ `link` | string | Category archive URL |
| ↳ `name` | string | Category name |
| ↳ `slug` | string | Category slug |
| ↳ `taxonomy` | string | Taxonomy name |
| ↳ `parent` | number | Parent category ID |

### WordPress Update Category \[#wordpress-update-category]

Update an existing category in WordPress.com

#### Input \[#input-21]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `categoryId` | number | Yes | The ID of the category to update |
| `name` | string | No | Category name |
| `description` | string | No | Category description |
| `parent` | number | No | Parent category ID for hierarchical categories |
| `slug` | string | No | URL slug for the category |

#### Output \[#output-21]

| Parameter | Type | Description |
| - | - | - |
| `category` | object | The updated category |
| ↳ `id` | number | Category ID |
| ↳ `count` | number | Number of posts in this category |
| ↳ `description` | string | Category description |
| ↳ `link` | string | Category archive URL |
| ↳ `name` | string | Category name |
| ↳ `slug` | string | Category slug |
| ↳ `taxonomy` | string | Taxonomy name |
| ↳ `parent` | number | Parent category ID |

### WordPress Delete Category \[#wordpress-delete-category]

Delete a category from WordPress.com

#### Input \[#input-22]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `categoryId` | number | Yes | The ID of the category to delete |

#### Output \[#output-22]

| Parameter | Type | Description |
| - | - | - |
| `deleted` | boolean | Whether the category was deleted |
| `category` | object | The deleted category |
| ↳ `id` | number | Category ID |
| ↳ `count` | number | Number of posts in this category |
| ↳ `description` | string | Category description |
| ↳ `link` | string | Category archive URL |
| ↳ `name` | string | Category name |
| ↳ `slug` | string | Category slug |
| ↳ `taxonomy` | string | Taxonomy name |
| ↳ `parent` | number | Parent category ID |

### WordPress Create Tag \[#wordpress-create-tag]

Create a new tag in WordPress.com

#### Input \[#input-23]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `name` | string | Yes | Tag name |
| `description` | string | No | Tag description |
| `slug` | string | No | URL slug for the tag |

#### Output \[#output-23]

| Parameter | Type | Description |
| - | - | - |
| `tag` | object | The created tag |
| ↳ `id` | number | Tag ID |
| ↳ `count` | number | Number of posts with this tag |
| ↳ `description` | string | Tag description |
| ↳ `link` | string | Tag archive URL |
| ↳ `name` | string | Tag name |
| ↳ `slug` | string | Tag slug |
| ↳ `taxonomy` | string | Taxonomy name |

### WordPress List Tags \[#wordpress-list-tags]

List tags from WordPress.com

#### Input \[#input-24]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `perPage` | number | No | Number of tags per request (e.g., 10, 25, 50). Default: 10, max: 100 |
| `page` | number | No | Page number for pagination (e.g., 1, 2, 3) |
| `search` | string | No | Search term to filter tags (e.g., "javascript", "tutorial") |
| `order` | string | No | Order direction: asc or desc |

#### Output \[#output-24]

| Parameter | Type | Description |
| - | - | - |
| `tags` | array | List of tags |
| ↳ `id` | number | Tag ID |
| ↳ `count` | number | Number of posts with this tag |
| ↳ `description` | string | Tag description |
| ↳ `link` | string | Tag archive URL |
| ↳ `name` | string | Tag name |
| ↳ `slug` | string | Tag slug |
| ↳ `taxonomy` | string | Taxonomy name |
| `total` | number | Total number of tags |
| `totalPages` | number | Total number of result pages |

### WordPress Get Tag \[#wordpress-get-tag]

Get a single tag from WordPress.com by ID

#### Input \[#input-25]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `tagId` | number | Yes | The ID of the tag to retrieve |

#### Output \[#output-25]

| Parameter | Type | Description |
| - | - | - |
| `tag` | object | The retrieved tag |
| ↳ `id` | number | Tag ID |
| ↳ `count` | number | Number of posts with this tag |
| ↳ `description` | string | Tag description |
| ↳ `link` | string | Tag archive URL |
| ↳ `name` | string | Tag name |
| ↳ `slug` | string | Tag slug |
| ↳ `taxonomy` | string | Taxonomy name |

### WordPress Update Tag \[#wordpress-update-tag]

Update an existing tag in WordPress.com

#### Input \[#input-26]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `tagId` | number | Yes | The ID of the tag to update |
| `name` | string | No | Tag name |
| `description` | string | No | Tag description |
| `slug` | string | No | URL slug for the tag |

#### Output \[#output-26]

| Parameter | Type | Description |
| - | - | - |
| `tag` | object | The updated tag |
| ↳ `id` | number | Tag ID |
| ↳ `count` | number | Number of posts with this tag |
| ↳ `description` | string | Tag description |
| ↳ `link` | string | Tag archive URL |
| ↳ `name` | string | Tag name |
| ↳ `slug` | string | Tag slug |
| ↳ `taxonomy` | string | Taxonomy name |

### WordPress Delete Tag \[#wordpress-delete-tag]

Delete a tag from WordPress.com

#### Input \[#input-27]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `tagId` | number | Yes | The ID of the tag to delete |

#### Output \[#output-27]

| Parameter | Type | Description |
| - | - | - |
| `deleted` | boolean | Whether the tag was deleted |
| `tag` | object | The deleted tag |
| ↳ `id` | number | Tag ID |
| ↳ `count` | number | Number of posts with this tag |
| ↳ `description` | string | Tag description |
| ↳ `link` | string | Tag archive URL |
| ↳ `name` | string | Tag name |
| ↳ `slug` | string | Tag slug |
| ↳ `taxonomy` | string | Taxonomy name |

### WordPress Get Current User \[#wordpress-get-current-user]

Get information about the currently authenticated WordPress.com user

#### Input \[#input-28]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |

#### Output \[#output-28]

| Parameter | Type | Description |
| - | - | - |
| `user` | object | The current user |
| ↳ `id` | number | User ID |
| ↳ `username` | string | Username |
| ↳ `name` | string | Display name |
| ↳ `first_name` | string | First name |
| ↳ `last_name` | string | Last name |
| ↳ `email` | string | Email address |
| ↳ `url` | string | User website URL |
| ↳ `description` | string | User bio |
| ↳ `link` | string | Author archive URL |
| ↳ `slug` | string | User slug |
| ↳ `roles` | array | User roles |
| ↳ `avatar_urls` | object | Avatar URLs at different sizes |

### WordPress List Users \[#wordpress-list-users]

List users from WordPress.com (requires admin privileges)

#### Input \[#input-29]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `perPage` | number | No | Number of users per request (e.g., 10, 25, 50). Default: 10, max: 100 |
| `page` | number | No | Page number for pagination (e.g., 1, 2, 3) |
| `search` | string | No | Search term to filter users (e.g., "john", "admin") |
| `roles` | string | No | Comma-separated role names to filter by (e.g., "administrator,editor") |
| `order` | string | No | Order direction: asc or desc |
| `context` | string | No | Response context: view (default) or edit. edit returns username, first_name, last_name, email and roles but requires the list_users capability |

#### Output \[#output-29]

| Parameter | Type | Description |
| - | - | - |
| `users` | array | List of users |
| ↳ `id` | number | User ID |
| ↳ `username` | string | Username (edit context only) |
| ↳ `name` | string | Display name |
| ↳ `first_name` | string | First name (edit context only) |
| ↳ `last_name` | string | Last name (edit context only) |
| ↳ `email` | string | Email address (edit context only) |
| ↳ `url` | string | User website URL |
| ↳ `description` | string | User bio |
| ↳ `link` | string | Author archive URL |
| ↳ `slug` | string | User slug |
| ↳ `roles` | array | User roles (edit context only) |
| ↳ `avatar_urls` | object | Avatar URLs at different sizes |
| `total` | number | Total number of users |
| `totalPages` | number | Total number of result pages |

### WordPress Get User \[#wordpress-get-user]

Get a specific user from WordPress.com by ID

#### Input \[#input-30]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `userId` | number | Yes | The ID of the user to retrieve |

#### Output \[#output-30]

| Parameter | Type | Description |
| - | - | - |
| `user` | object | The retrieved user |
| ↳ `id` | number | User ID |
| ↳ `username` | string | Username (edit context only) |
| ↳ `name` | string | Display name |
| ↳ `first_name` | string | First name (edit context only) |
| ↳ `last_name` | string | Last name (edit context only) |
| ↳ `email` | string | Email address (edit context only) |
| ↳ `url` | string | User website URL |
| ↳ `description` | string | User bio |
| ↳ `link` | string | Author archive URL |
| ↳ `slug` | string | User slug |
| ↳ `roles` | array | User roles (edit context only) |
| ↳ `avatar_urls` | object | Avatar URLs at different sizes |

### WordPress Search Content \[#wordpress-search-content]

Search across all content types in WordPress.com (posts, pages, media)

#### Input \[#input-31]

| Parameter | Type | Required | Description |
| - | - | - | - |
| `siteId` | string | Yes | WordPress.com site ID or domain (e.g., 12345678 or mysite.wordpress.com) |
| `query` | string | Yes | Search query |
| `perPage` | number | No | Number of results per request (default: 10, max: 100) |
| `page` | number | No | Page number for pagination |
| `type` | string | No | Filter by search index type: post, term, or post-format |
| `subtype` | string | No | Filter by subtype within the selected type (e.g., post or page when type is post) |

#### Output \[#output-31]

| Parameter | Type | Description |
| - | - | - |
| `results` | array | Search results |
| ↳ `id` | number | Content ID (a string slug for post-format results) |
| ↳ `title` | string | Content title |
| ↳ `url` | string | Content URL |
| ↳ `type` | string | Content type (post, term, or post-format) |
| ↳ `subtype` | string | Subtype within the content type (e.g., post, page) |
| `total` | number | Total number of results |
| `totalPages` | number | Total number of result pages |
