Automattic Widgets API

The widgets API from Automattic — 2 operation(s) for widgets.

GitHub OpenAPI
Pull this API's OpenAPI, operations, scores and pricing into your own code or AI agent with a free APIs.io key — sign in with GitHub, Google or LinkedIn. No form to fill in; signing in shares your email address with us (Privacy).

Operations 7

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /wp/v2/sites/{wpcom_site}/widgets List widgets on a site · GET /wp/v2/sites/{wpcom_site}/widgets #
Ask an LLM
“Which widgets are on my WordPress.com site?”
“Can I list only the widgets in one sidebar?”
Tell an agent
List the widgets on site {wpcom_site}.
Show the widgets in sidebar {sidebar} on site {wpcom_site}.
POST /wp/v2/sites/{wpcom_site}/widgets Add a widget to a sidebar · POST /wp/v2/sites/{wpcom_site}/widgets #
Ask an LLM
“How do I add a new widget to a sidebar?”
“Can I set a widget's instance settings when adding it?”
Tell an agent
Add widget {id_base} to sidebar {sidebar} on site {wpcom_site}.
Place a new {id_base} widget on {wpcom_site} in {sidebar} with instance {instance}.
GET /wp/v2/sites/{wpcom_site}/widgets/{id} Get a widget · GET /wp/v2/sites/{wpcom_site}/widgets/{id} #
Ask an LLM
“What type and instance does a specific widget have?”
“Can I look up one widget by its ID?”
Tell an agent
Get widget {id} on site {wpcom_site}.
Show the settings of widget {id} on {wpcom_site}.
POST /wp/v2/sites/{wpcom_site}/widgets/{id} Update a widget with form data · POST /wp/v2/sites/{wpcom_site}/widgets/{id} #
Ask an LLM
“How do I update a widget that doesn't support instance settings?”
“Can I send widget form data to change a widget's settings?”
Tell an agent
Update widget {id} on site {wpcom_site} using form data {form_data}.
Submit the widget admin form {form_data} for widget {id} on {wpcom_site}.
PUT /wp/v2/sites/{wpcom_site}/widgets/{id} Replace a widget · PUT /wp/v2/sites/{wpcom_site}/widgets/{id} #
Ask an LLM
“Can I overwrite a widget's type and settings in one call?”
“What happens to a widget's instance when I replace it?”
Tell an agent
Replace widget {id} on site {wpcom_site} with type {id_base} in {sidebar}.
Overwrite widget {id} on {wpcom_site} with instance {instance}.
PATCH /wp/v2/sites/{wpcom_site}/widgets/{id} Update a widget's instance · PATCH /wp/v2/sites/{wpcom_site}/widgets/{id} #
Ask an LLM
“Can I change just a widget's instance settings?”
“How do I move a widget to another sidebar?”
Tell an agent
Update the instance of widget {id} on site {wpcom_site} to {instance}.
Move widget {id} on {wpcom_site} to sidebar {sidebar}.
DELETE /wp/v2/sites/{wpcom_site}/widgets/{id} Remove a widget · DELETE /wp/v2/sites/{wpcom_site}/widgets/{id} #
Ask an LLM
“How do I remove a widget from a sidebar?”
“Can I force-delete a widget instead of moving it to inactive?”
Tell an agent destructive · confirm first
Remove widget {id} from site {wpcom_site}.
Delete widget {id} from {wpcom_site} with force {force}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/automattic:automattic-widgets-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

automattic-widgets-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WordPress.com REST API — wp/v2 namespace Widgets API
  version: v2
  description: Derived by API Evangelist from the WordPress.com REST API route index published at https://public-api.wordpress.com/wp/v2/. Paths, HTTP methods, and parameter names/types/descriptions/defaults are taken verbatim from that index. Response schemas are not published in the route index, so successful responses are described but not schematised; the error envelope was observed live on public-api.wordpress.com.
  contact:
    name: Automattic
    url: https://developer.wordpress.com/docs/api/
  x-derived-from: https://public-api.wordpress.com/wp/v2/
  x-derived-by: API Evangelist enrichment pipeline
servers:
- url: https://public-api.wordpress.com
security:
- bearerAuth: []
tags:
- name: Widgets
paths:
  /wp/v2/sites/{wpcom_site}/widgets:
    get:
      operationId: getWpV2SitesbyWpcomSiteWidgets
      summary: GET /wp/v2/sites/{wpcom_site}/widgets
      tags:
      - Widgets
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - view
          - embed
          - edit
          default: view
        description: Scope under which the request is made; determines fields present in response.
      - name: sidebar
        in: query
        required: false
        schema:
          type: string
        description: The sidebar to return widgets for.
    post:
      operationId: postWpV2SitesbyWpcomSiteWidgets
      summary: POST /wp/v2/sites/{wpcom_site}/widgets
      tags:
      - Widgets
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id:
                  type: string
                  description: Unique identifier for the widget.
                id_base:
                  type: string
                  description: The type of the widget. Corresponds to ID in widget-types endpoint.
                sidebar:
                  type: string
                  default: wp_inactive_widgets
                  description: The sidebar the widget belongs to.
                instance:
                  type: object
                  description: Instance settings of the widget, if supported.
                form_data:
                  type: string
                  description: URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only.
              required:
              - sidebar
  /wp/v2/sites/{wpcom_site}/widgets/{id}:
    get:
      operationId: getWpV2SitesbyWpcomSiteWidgetsbyId
      summary: GET /wp/v2/sites/{wpcom_site}/widgets/{id}
      tags:
      - Widgets
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: context
        in: query
        required: false
        schema:
          type: string
          enum:
          - view
          - embed
          - edit
          default: view
        description: Scope under which the request is made; determines fields present in response.
    post:
      operationId: postWpV2SitesbyWpcomSiteWidgetsbyId
      summary: POST /wp/v2/sites/{wpcom_site}/widgets/{id}
      tags:
      - Widgets
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id_base:
                  type: string
                  description: The type of the widget. Corresponds to ID in widget-types endpoint.
                sidebar:
                  type: string
                  description: The sidebar the widget belongs to.
                instance:
                  type: object
                  description: Instance settings of the widget, if supported.
                form_data:
                  type: string
                  description: URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only.
    put:
      operationId: putWpV2SitesbyWpcomSiteWidgetsbyId
      summary: PUT /wp/v2/sites/{wpcom_site}/widgets/{id}
      tags:
      - Widgets
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id_base:
                  type: string
                  description: The type of the widget. Corresponds to ID in widget-types endpoint.
                sidebar:
                  type: string
                  description: The sidebar the widget belongs to.
                instance:
                  type: object
                  description: Instance settings of the widget, if supported.
                form_data:
                  type: string
                  description: URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only.
    patch:
      operationId: patchWpV2SitesbyWpcomSiteWidgetsbyId
      summary: PATCH /wp/v2/sites/{wpcom_site}/widgets/{id}
      tags:
      - Widgets
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                id_base:
                  type: string
                  description: The type of the widget. Corresponds to ID in widget-types endpoint.
                sidebar:
                  type: string
                  description: The sidebar the widget belongs to.
                instance:
                  type: object
                  description: Instance settings of the widget, if supported.
                form_data:
                  type: string
                  description: URL-encoded form data from the widget admin form. Used to update a widget that does not support instance. Write only.
    delete:
      operationId: deleteWpV2SitesbyWpcomSiteWidgetsbyId
      summary: DELETE /wp/v2/sites/{wpcom_site}/widgets/{id}
      tags:
      - Widgets
      responses:
        '200':
          description: OK
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WPRestError'
      parameters:
      - name: wpcom_site
        in: path
        required: true
        schema:
          type: string
      - name: id
        in: path
        required: true
        schema:
          type: string
      - name: force
        in: query
        required: false
        schema:
          type: boolean
        description: Whether to force removal of the widget, or move it to the inactive sidebar.
components:
  schemas:
    WPRestError:
      type: object
      description: WordPress REST API error envelope (observed on public-api.wordpress.com).
      properties:
        code:
          type: string
          example: rest_unauthorized
        message:
          type: string
          example: Authentication required.
        data:
          type: object
          properties:
            status:
              type: integer
              example: 401
  securitySchemes:
    oauth2:
      type: oauth2
      description: WordPress.com OAuth 2.1, per https://public-api.wordpress.com/.well-known/openid-configuration
      flows:
        authorizationCode:
          authorizationUrl: https://public-api.wordpress.com/oauth2-1/authorize
          tokenUrl: https://public-api.wordpress.com/oauth2-1/token
          refreshUrl: https://public-api.wordpress.com/oauth2-1/token
          scopes:
            global: ''
            auth: ''
            openid: ''
            profile: ''
            email: ''
            users: ''
            sites: ''
            posts: ''
            comments: ''
            taxonomy: ''
            follow: ''
            sharing: ''
            freshly-pressed: ''
            notifications: ''
            insights: ''
            read: ''
            stats: ''
            media: ''
            menus: ''
            batch: ''
            videos: ''
    bearerAuth:
      type: http
      scheme: bearer