> ## Documentation Index
> Fetch the complete documentation index at: https://snapwidget.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Widget

> Makes a widget. A social widget: a layout and the user's accounts from list_accounts (the first account gives the widget its service and header; the others add their posts), or one of the user's hashtag campaigns. A review widget: kind "review", a name, a layout and review sources; it shows only the reviews that are not hidden or pending (the "shown" count in list_review_sources), and the answer's reviews_shown says how many it shows. The answer is the widget as get_widget gives it; change its settings with update_widget, then use get_embed_code to put it on a site. A new pro widget counts for the plan's widget limit.



## OpenAPI

````yaml https://snapwidget.com/api/v1/openapi.json post /widgets
openapi: 3.1.0
info:
  title: SnapWidget API
  version: '1'
  description: >-
    Make and change social feed and review widgets, connect social accounts and
    get the embed code. The MCP server at https://snapwidget.com/mcp has the
    same actions for AI agents.
  termsOfService: https://snapwidget.com/terms
  contact:
    name: SnapWidget
    email: support@snapwidget.com
    url: https://snapwidget.com/docs/api-reference/introduction
servers:
  - url: https://snapwidget.com/api/v1
security:
  - token: []
tags:
  - name: Sign-up
  - name: Account
  - name: Social accounts
  - name: Widgets
  - name: Reviews
  - name: Campaigns
paths:
  /widgets:
    post:
      tags:
        - Widgets
      summary: Create Widget
      description: >-
        Makes a widget. A social widget: a layout and the user's accounts from
        list_accounts (the first account gives the widget its service and
        header; the others add their posts), or one of the user's hashtag
        campaigns. A review widget: kind "review", a name, a layout and review
        sources; it shows only the reviews that are not hidden or pending (the
        "shown" count in list_review_sources), and the answer's reviews_shown
        says how many it shows. The answer is the widget as get_widget gives it;
        change its settings with update_widget, then use get_embed_code to put
        it on a site. A new pro widget counts for the plan's widget limit.
      operationId: create_widget
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                kind:
                  description: >-
                    "social" (posts of accounts or a campaign) or "review"
                    (reviews). Not sent: social.
                  enum:
                    - social
                    - review
                  type: string
                layout:
                  description: >-
                    The layout: a social one from list_widget_types (for example
                    grid, slideshow, board, feed, scrolling, popup), or a review
                    one (wall, carousel, marquee, list, badge, avatars).
                  type: string
                accounts:
                  description: >-
                    Social widget: the account ids from list_accounts, in order.
                    The first gives the widget its service; at most the plan's
                    accounts per widget (get_account).
                  items:
                    type: integer
                  type: array
                campaign_id:
                  description: >-
                    Social widget: one of the user's campaigns (list_campaigns)
                    in place of accounts. Instagram, Pro plans.
                  type: integer
                name:
                  description: >-
                    The widget's name in the Widgets list (a review widget needs
                    it).
                  type: string
                source_ids:
                  description: >-
                    Review widget: the review source ids from
                    list_review_sources. Not sent: all the user's sources.
                  items:
                    type: string
                  type: array
              required:
                - layout
      responses:
        '201':
          description: The answer, as JSON.
          content:
            application/json:
              schema:
                type: object
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '422':
          $ref: '#/components/responses/Invalid'
        '429':
          $ref: '#/components/responses/TooManyRequests'
components:
  responses:
    Unauthorized:
      description: No token, or the token is wrong, expired or revoked.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Forbidden:
      description: >-
        The token or the plan has no API access, or the plan does not allow the
        change.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Invalid:
      description: An input is not valid.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    TooManyRequests:
      description: Too many calls. The Retry-After header gives the seconds to wait.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  schemas:
    Error:
      type: object
      properties:
        message:
          type: string
          description: What went wrong.
        errors:
          type: object
          description: The messages per input, when an input is not valid.
          additionalProperties:
            type: array
            items:
              type: string
        upgrade_url:
          type: string
          description: The upgrade page, when the plan does not allow it.
      required:
        - message
  securitySchemes:
    token:
      type: http
      scheme: bearer
      description: 'A token from the API page: https://snapwidget.com/settings/api'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.