---
updatedAt: 2025-09-17T22:50:34.000Z
agentTools:
  projectIndex: https://docs.motaword.com/llms.txt
---

# Create a new Active widget

Create a new widget for your Active project to be used in your website. Most website-specific configuration is provided via widgets. This does not create a new Active project, just a separate widget.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "MotaWord API",
    "description": "Use MotaWord API to post and track your translation projects.",
    "version": "1.0",
    "x-cli-name": "motaword",
    "x-cli-description": "Use MotaWord CLI to interact with your MotaWord account in many ways to manage your translation and localization needs. Visit motaword.com/developer for details."
  },
  "security": [
    {
      "mwoAuth": [
        "default"
      ]
    }
  ],
  "x-cli-cmd-groups": {
    "async": {
      "short": "Manage async operations",
      "long": "Manage async operations"
    },
    "token": {
      "short": "Manage token operations",
      "long": "Manage token operations"
    },
    "blog": {
      "short": "Manage blog articles",
      "long": "Manage blog articles"
    },
    "clients": {
      "short": "Manage client account",
      "long": "Manage client account"
    },
    "corporates": {
      "short": "Manage corporate account",
      "long": "Manage corporate account",
      "parent": "clients"
    },
    "documents": {
      "short": "Manage documents",
      "long": "Manage documents"
    },
    "glossaries": {
      "short": "Manage glossaries",
      "long": "Manage glossaries"
    },
    "styleguides": {
      "short": "Manage style guides",
      "long": "Manage style guides"
    },
    "projects": {
      "short": "Manage projects",
      "long": "Manage projects"
    },
    "activities": {
      "short": "Manage activities",
      "long": "Manage activities",
      "parent": "projects"
    },
    "translations": {
      "short": "Manage translations",
      "long": "Manage translations",
      "parent": "projects"
    },
    "project-documents": {
      "short": "Manage project source documents",
      "long": "Manage project source documents",
      "parent": "projects"
    },
    "reports": {
      "short": "Manage reports",
      "long": "Manage reports"
    },
    "search": {
      "short": "Manage search operations",
      "long": "Manage search operations"
    },
    "static": {
      "short": "Manage static endpoints",
      "long": "Manage static endpoints"
    },
    "stats": {
      "short": "Manage stats",
      "long": "Manage stats"
    },
    "strings": {
      "short": "Manage strings",
      "long": "Manage strings"
    },
    "users": {
      "short": "Manage users",
      "long": "Manage users"
    },
    "vendors": {
      "short": "Manage vendors",
      "long": "Manage vendors",
      "parent": "users"
    },
    "webhooks": {
      "short": "Manage webhooks",
      "long": "Manage webhooks"
    },
    "continuous-projects": {
      "short": "Manage your continuous projects",
      "long": "Manage your continuous localization or translation projects"
    }
  },
  "paths": {
    "/continuous_projects/{projectId}/widgets": {
      "post": {
        "summary": "Create a new Active widget",
        "description": "Create a new widget for your Active project to be used in your website. Most website-specific configuration is provided via widgets. This does not create a new Active project, just a separate widget.",
        "operationId": "createActiveWidget",
        "x-cli-cmd-group": "continuous-projects",
        "tags": [
          "ContinuousProject"
        ],
        "parameters": [
          {
            "in": "path",
            "name": "projectId",
            "required": true,
            "description": "Continuous project ID",
            "schema": {
              "type": "integer",
              "format": "int64"
            },
            "example": 74
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ActiveWidget"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated widget details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ActiveWidget"
                }
              }
            }
          },
          "404": {
            "description": "ProjectNotFound | ActiveWidgetNotFound | UnauthorizedUser",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "servers": [
    {
      "url": "https://api.motaword.com"
    },
    {
      "url": "https://sandbox.motaword.com"
    },
    {
      "url": "http://localhost"
    }
  ],
  "components": {
    "securitySchemes": {
      "mwoAuth": {
        "description": "OAuth2 authentication, Client Credentials flow.",
        "type": "oauth2",
        "flows": {
          "clientCredentials": {
            "tokenUrl": "/token",
            "scopes": {
              "privileged": "privileged",
              "default": "default"
            }
          },
          "password": {
            "tokenUrl": "/token",
            "refreshUrl": "/token",
            "scopes": {
              "privileged": "privileged",
              "default": "default"
            }
          },
          "authorizationCode": {
            "authorizationUrl": "https://www.motaword.com/auth/authorize",
            "tokenUrl": "/token",
            "refreshUrl": "/token",
            "scopes": {
              "privileged": "privileged",
              "default": "default"
            }
          }
        }
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "http_code": {
            "type": "integer",
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "help": {
            "type": "string"
          },
          "extra_data": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/AdditionalErrorData"
            },
            "description": "Additional structured data related to the error."
          }
        }
      },
      "ActiveWidget": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z"
          },
          "token": {
            "type": "string",
            "description": "Token that you should use when you are using this widget on your website."
          },
          "name": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "description": "Options are \"simple\", \"advanced\""
          },
          "theme": {
            "type": "string",
            "description": "\\\"light\\\", \\\"dark\\\" OR custom JSON."
          },
          "position": {
            "type": "string",
            "description": "Options are \"bottom-left\", \"bottom-right\", \"in-place\""
          },
          "use_dummy_translations": {
            "type": "boolean",
            "description": "When enabled, we will translate your website with dummy content, rather than actually using MT/TM."
          },
          "follow_user": {
            "type": "boolean",
            "description": "Specify whether we should follow the user around in your website and automatically translate pages."
          },
          "technology": {
            "type": "string",
            "description": "When a user changes technology (or when we automatically detect and change it for them), we will re-control whole site."
          },
          "url_mode": {
            "type": "string",
            "description": "When a user changes locale (or when we automatically detect and change it for them), we will change the URL of the page they are in. We can either change the path of the URL to prefix it with the locale code, or we can add a query parameter to the URL. We also use this mode to detect the locale for the current page when a user directly loads a page. When NULL, locale detection from URL will be disabled (even then, if the user has selected a locale manually, and followUser is enabled, we will still automatically translate the page in user's locale."
          },
          "url_change_mode": {
            "type": "string",
            "description": "When a user changes locale (or when we automatically detect and change it for them), we will change the URL of the page they are in. We can do this by actually redirecting the user to the new page, or by simply changing the URL in the address bar via browser's History API. When NULL, we won't apply any URL changes."
          },
          "live": {
            "type": "boolean",
            "description": "Whether ActiveJS should be considered live in an embedded site. Use `false` if you are still testing Active. Go to your Active dashboard and follow links to your website to actually test Active."
          },
          "modify_links": {
            "type": "boolean",
            "description": "We can automatically localize the same-domain URLs in your page. The way we localize the URL depends on urlMode configuration. We can either add/update the locale query parameter, or add/update the path of the URL."
          },
          "use_cache": {
            "type": "boolean",
            "description": "Should we make use of local browser cache for your visitors? We will refresh the cache when Active JS detects new activity in your project."
          },
          "force_cache_refresh_interval": {
            "type": "boolean",
            "description": "Determines whether to force-refresh local browser cache of your translations in certain period of times, no matter if there is a new activity in the project."
          },
          "language_mappings": {
            "type": "string",
            "description": "Continuous project language mappings"
          },
          "variables": {
            "type": "string",
            "description": "Continuous project variable definitions"
          },
          "sections": {
            "type": "string",
            "description": "Continuous project section rules"
          },
          "pages": {
            "type": "string",
            "description": "Continuous project page rules"
          },
          "elements": {
            "type": "string",
            "description": "Continuous project exclusive elements and rules"
          },
          "test_mode": {
            "type": "boolean",
            "description": "Is the Active Widget in test mode? This changes a couple behaviors in the widget to make it easier for you to test and develop your Active integration."
          },
          "restricted_domains": {
            "type": "string",
            "description": "JSON string for a list of domains that this widget's API interactions are limited to."
          },
          "auto_detect_source_language": {
            "type": "boolean",
            "description": "When true, we will ignore the source language of your project and try to automatically detect the source language of the given content. This is especially useful in environments with unpredictable source contents, such as a chat environment."
          },
          "allow_query_in_url": {
            "type": "boolean",
            "description": "When true, query params are included in filenames. When false, params are ignored."
          },
          "allow_hash_in_url": {
            "type": "boolean",
            "description": "When true, hash params are included in filenames. When false, params are ignored."
          },
          "optimize_per_page": {
            "type": "boolean",
            "description": "When true, Active ecosystem will optimize the script and data flows per page, rather than per project. This decreases the bandwidth usage per script, but makes translation publishing more complex and script serving per-page."
          },
          "path_regex": {
            "type": "string",
            "description": "Custom regex for path-type URL mode."
          },
          "query_name": {
            "type": "string",
            "description": "Query parameter name to be used with query-type URL mode. Default is 'locale'.",
            "default": "locale"
          },
          "reboot_on_url_change": {
            "type": "boolean",
            "description": "When true, Active ecosystem reboots itself when url changes."
          },
          "debug_mode": {
            "type": "boolean",
            "description": "When true, Active ecosystem will print debug-level logs from all Active modules."
          },
          "hit_backend_for_existing": {
            "type": "boolean",
            "description": "When true, Active ecosystem will collect all strings on TMS no matter if the translation is present in the cache."
          },
          "admin_mode": {
            "type": "boolean",
            "description": "Is the Active Widget in admin mode? This changes a couple of behaviors in the widget to configure some rules like elements, sections, pages, etc."
          },
          "convert_relative_urls_to_absolute": {
            "type": "boolean",
            "description": "Using this, all relative URLs (apart from the \"A\" tag) are converted to absolute URLs. This is especially useful when you are rendering a webpage via serve.motaword.com without using customer’s domain as hostname. When false, webpage will try to load relative assets from serve.motaword.com host"
          },
          "enforce_source_locale_in_path": {
            "type": "boolean",
            "description": "This option enforces source locale in path when urlMode is query."
          },
          "start_dynamic_after_dom": {
            "type": "boolean",
            "description": "Start the dynamic translation when document ready state is complete. Default it starts when interactive."
          },
          "url_mappings": {
            "type": "string",
            "description": "Continuous project url mappings"
          }
        }
      },
      "AdditionalErrorData": {
        "type": "object",
        "properties": {
          "file_id": {
            "type": "string"
          },
          "file_size": {
            "type": "integer"
          },
          "additional_info": {
            "type": "string"
          }
        }
      }
    }
  }
}
```