# Plugin

Plugins enable developers to replace DatoCMS field components with HTML5 applications so the editing experiences of the DatoCMS web app can be customized.

## Object payload

**`id`**

- Type: string
- Example: `"RMAMRffBRlmBuDlQsIWZ0g"`

RFC 4122 UUID of plugin expressed in URL-safe base64 format

**`type`**

- Type: string

Must be exactly `"plugin"`.

**`name`**

- Type: string
- Example: `"5 stars"`

The name of the plugin

**`description`**

- Type: null, string
- Example: `"A better rating experience!"`

A description of the plugin

**`url`**

- Type: string
- Example: `"https://cdn.rawgit.com/datocms/extensions/master/samples/five-stars/extension.ts"`

The entry point URL of the plugin

**`parameters`**

- Type: null, object
- Example: `{ devMode: true }`

Global plugin configuration. Plugins can persist whatever information they want in this object to reuse it later. Refer to the CMA for details about technical limits. It returns `null` if the credentials you are using cannot edit the schema of the project.

**`package_name`**

- Type: null, string
- Example: `"datocms-plugin-star-rating-editor"`

NPM package name of the plugin (or null if it's a private plugin)

**`package_version`**

- Type: null, string
- Example: `"0.0.4"`

The installed version of the plugin (or null if it's a private plugin)

**`permissions`**

- Type: Array\<string\>

Permissions granted to this plugin

**`enabled`**

- Type: boolean

Whether the plugin is enabled or not. When disabled, the plugin behaves as if it didn't exist: fields using it as editor/addon fall back to the default editor, and any sidebar panel/page/config screen/asset source it registers does not render.

**`meta.version`**

- Type: string
- Example: `"2"`

Version of the plugin. Legacy plugins are v1, new plugins are v2

<details>
<summary>Show deprecated</summary>

**`plugin_type`**

- Deprecated
- Type: null, enum

The type of field extension a legacy plugin implements

This field makes sense for legacy plugins only. Modern plugins declare their capabilities at run-time.

<details>
<summary>Show enum values</summary>

**`field_editor`**

Field editor plugin

**`sidebar`**

Sidebar plugin

**`field_addon`**

Field addon plugin

</details>

**`field_types`**

- Deprecated
- Type: null, Array\<string\>

On which types of field in which a legacy plugin can be used

This field makes sense for legacy plugins only. Modern plugins declare their capabilities at run-time.

**`parameter_definitions`**

- Deprecated
- Type: null, object

The schema for the parameters a legacy plugin can persist

This field makes sense for legacy plugins only. Modern plugins declare can store anything they want in the parameters attribute.

<details>
<summary>Show object format</summary>

**`global`**

- Type: Array

**`instance`**

- Type: Array

</details>

</details>

## Available endpoints

-   [Create a new plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/create.md)
-   [Update a plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/update.md)
-   [List all plugins](https://www.datocms.com/docs/content-management-api/resources/plugin/instances.md)
-   [Retrieve a plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/self.md)
-   [Delete a plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/destroy.md)
-   [Retrieve all fields using the plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/fields.md)

## Related content in "Content Management API"

- [Content Management API Overview](https://www.datocms.com/docs/content-management-api.md)
- [Using the JavaScript CMA client](https://www.datocms.com/docs/content-management-api/using-the-nodejs-clients.md)
- [API versioning](https://www.datocms.com/docs/content-management-api/api-versioning.md)
- [Authentication](https://www.datocms.com/docs/content-management-api/authentication.md)
- [Environments](https://www.datocms.com/docs/content-management-api/setting-the-environment.md)
- [Error codes & handling failures (CMA)](https://www.datocms.com/docs/content-management-api/errors.md)
- [Pagination](https://www.datocms.com/docs/content-management-api/pagination.md)
- [Asynchronous jobs](https://www.datocms.com/docs/content-management-api/async-jobs.md)
- [CMA Technical Limits & Rate Limits](https://www.datocms.com/docs/content-management-api/technical-limits.md)
- [Record](https://www.datocms.com/docs/content-management-api/resources/item.md)
- [Scheduled publication](https://www.datocms.com/docs/content-management-api/resources/scheduled-publication.md)
- [Scheduled unpublishing](https://www.datocms.com/docs/content-management-api/resources/scheduled-unpublishing.md)
- [Upload](https://www.datocms.com/docs/content-management-api/resources/upload.md)
- [Site](https://www.datocms.com/docs/content-management-api/resources/site.md)
- [Model/Block model](https://www.datocms.com/docs/content-management-api/resources/item-type.md)
- [Field](https://www.datocms.com/docs/content-management-api/resources/field.md)
- [Fieldset](https://www.datocms.com/docs/content-management-api/resources/fieldset.md)
- [Record version](https://www.datocms.com/docs/content-management-api/resources/item-version.md)
- [Upload permission](https://www.datocms.com/docs/content-management-api/resources/upload-request.md)
- [Upload track](https://www.datocms.com/docs/content-management-api/resources/upload-track.md)
- [Manual tags](https://www.datocms.com/docs/content-management-api/resources/upload-tag.md)
- [Smart tags](https://www.datocms.com/docs/content-management-api/resources/upload-smart-tag.md)
- [Upload Collection](https://www.datocms.com/docs/content-management-api/resources/upload-collection.md)
- [Search Index](https://www.datocms.com/docs/content-management-api/resources/search-index.md)
- [Search result](https://www.datocms.com/docs/content-management-api/resources/search-result.md)
- [Search indexing activity](https://www.datocms.com/docs/content-management-api/resources/search-index-event.md)
- [Environment](https://www.datocms.com/docs/content-management-api/resources/environment.md)
- [Maintenance mode](https://www.datocms.com/docs/content-management-api/resources/maintenance-mode.md)
- [Menu Item](https://www.datocms.com/docs/content-management-api/resources/menu-item.md)
- [Schema Menu Item](https://www.datocms.com/docs/content-management-api/resources/schema-menu-item.md)
- [Uploads filter](https://www.datocms.com/docs/content-management-api/resources/upload-filter.md)
- [Model filter](https://www.datocms.com/docs/content-management-api/resources/item-type-filter.md)
- [Plugin](https://www.datocms.com/docs/content-management-api/resources/plugin.md)
- [Create a new plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/create.md)
- [Update a plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/update.md)
- [List all plugins](https://www.datocms.com/docs/content-management-api/resources/plugin/instances.md)
- [Retrieve a plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/self.md)
- [Delete a plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/destroy.md)
- [Retrieve all fields using the plugin](https://www.datocms.com/docs/content-management-api/resources/plugin/fields.md)
- [Workflow](https://www.datocms.com/docs/content-management-api/resources/workflow.md)
- [Asynchronous job](https://www.datocms.com/docs/content-management-api/resources/job.md)
- [Job result](https://www.datocms.com/docs/content-management-api/resources/job-result.md)
- [Account](https://www.datocms.com/docs/content-management-api/resources/account.md)
- [Organization](https://www.datocms.com/docs/content-management-api/resources/organization.md)
- [Invitation](https://www.datocms.com/docs/content-management-api/resources/site-invitation.md)
- [Collaborator](https://www.datocms.com/docs/content-management-api/resources/user.md)
- [Role](https://www.datocms.com/docs/content-management-api/resources/role.md)
- [API token](https://www.datocms.com/docs/content-management-api/resources/access-token.md)
- [Webhook](https://www.datocms.com/docs/content-management-api/resources/webhook.md)
- [Webhook call](https://www.datocms.com/docs/content-management-api/resources/webhook-call.md)
- [Build trigger](https://www.datocms.com/docs/content-management-api/resources/build-trigger.md)
- [Deploy activity](https://www.datocms.com/docs/content-management-api/resources/build-event.md)
- [Subscription limit](https://www.datocms.com/docs/content-management-api/resources/subscription-limit.md)
- [Subscription feature](https://www.datocms.com/docs/content-management-api/resources/subscription-feature.md)
- [SSO Settings](https://www.datocms.com/docs/content-management-api/resources/sso-settings.md)
- [SSO User](https://www.datocms.com/docs/content-management-api/resources/sso-user.md)
- [SSO Group](https://www.datocms.com/docs/content-management-api/resources/sso-group.md)
- [White-label settings](https://www.datocms.com/docs/content-management-api/resources/white-label-settings.md)
- [Audit log event](https://www.datocms.com/docs/content-management-api/resources/audit-log-event.md)