openapi: 3.1.0 info: title: DatoCMS Content Management API description: >- The DatoCMS Content Management API (CMA) is a JSON:API-based REST API for managing content, schema, uploads, environments, and configuration on a DatoCMS project. It exposes 150+ endpoints across 40+ resources for items, item types, fields, uploads, sites, environments, webhooks, plugins, workflows, and roles. For public content delivery, DatoCMS recommends the Content Delivery API GraphQL endpoint instead. version: '3.0.0' contact: name: DatoCMS url: https://www.datocms.com/support externalDocs: description: DatoCMS CMA documentation url: https://www.datocms.com/docs/content-management-api servers: - url: https://site-api.datocms.com description: DatoCMS production CMA security: - apiTokenAuth: [] tags: - name: Items - name: Item Types - name: Fields - name: Uploads - name: Environments - name: Webhooks - name: Site paths: /site: get: operationId: getSite summary: Retrieve site details tags: [Site] responses: '200': description: Site content: application/vnd.api+json: schema: $ref: '#/components/schemas/SiteResponse' /items: get: operationId: listItems summary: List items (records) tags: [Items] parameters: - $ref: '#/components/parameters/PageOffset' - $ref: '#/components/parameters/PageLimit' - name: filter[type] in: query description: Item type API key or ID to filter by. schema: type: string responses: '200': description: Collection of items content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemListResponse' post: operationId: createItem summary: Create an item tags: [Items] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemRequest' responses: '201': description: Created item content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemResponse' /items/{itemId}: parameters: - $ref: '#/components/parameters/ItemId' get: operationId: getItem summary: Retrieve an item tags: [Items] responses: '200': description: Item content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemResponse' put: operationId: updateItem summary: Update an item tags: [Items] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemRequest' responses: '200': description: Updated item content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemResponse' delete: operationId: deleteItem summary: Delete an item tags: [Items] responses: '204': description: Deleted /items/{itemId}/publish: parameters: - $ref: '#/components/parameters/ItemId' put: operationId: publishItem summary: Publish an item tags: [Items] responses: '200': description: Published content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemResponse' /item-types: get: operationId: listItemTypes summary: List item types (models) tags: [Item Types] responses: '200': description: Collection of item types content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemTypeListResponse' post: operationId: createItemType summary: Create an item type tags: [Item Types] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemTypeRequest' responses: '201': description: Created item type content: application/vnd.api+json: schema: $ref: '#/components/schemas/ItemTypeResponse' /fields: get: operationId: listFields summary: List fields tags: [Fields] responses: '200': description: Collection of fields content: application/vnd.api+json: schema: $ref: '#/components/schemas/FieldListResponse' /uploads: get: operationId: listUploads summary: List uploads tags: [Uploads] responses: '200': description: Collection of uploads content: application/vnd.api+json: schema: $ref: '#/components/schemas/UploadListResponse' post: operationId: createUpload summary: Create an upload tags: [Uploads] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/UploadRequest' responses: '201': description: Created upload content: application/vnd.api+json: schema: $ref: '#/components/schemas/UploadResponse' /environments: get: operationId: listEnvironments summary: List environments tags: [Environments] responses: '200': description: Collection of environments content: application/vnd.api+json: schema: $ref: '#/components/schemas/EnvironmentListResponse' /webhooks: get: operationId: listWebhooks summary: List webhooks tags: [Webhooks] responses: '200': description: Collection of webhooks content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookListResponse' post: operationId: createWebhook summary: Create a webhook tags: [Webhooks] requestBody: required: true content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookRequest' responses: '201': description: Created webhook content: application/vnd.api+json: schema: $ref: '#/components/schemas/WebhookResponse' components: securitySchemes: apiTokenAuth: type: http scheme: bearer bearerFormat: API token parameters: ItemId: name: itemId in: path required: true schema: type: string PageOffset: name: page[offset] in: query schema: type: integer minimum: 0 PageLimit: name: page[limit] in: query schema: type: integer minimum: 1 maximum: 500 schemas: JsonApiResource: type: object required: [type, id] properties: type: type: string id: type: string attributes: type: object relationships: type: object meta: type: object ItemRequest: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' ItemResponse: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' ItemListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/JsonApiResource' meta: type: object ItemTypeRequest: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' ItemTypeResponse: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' ItemTypeListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/JsonApiResource' FieldListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/JsonApiResource' UploadRequest: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' UploadResponse: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' UploadListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/JsonApiResource' EnvironmentListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/JsonApiResource' WebhookRequest: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' WebhookResponse: type: object properties: data: $ref: '#/components/schemas/JsonApiResource' WebhookListResponse: type: object properties: data: type: array items: $ref: '#/components/schemas/JsonApiResource' SiteResponse: type: object properties: data: $ref: '#/components/schemas/JsonApiResource'