> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://contentful.com/developers/docs/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://contentful.com/_mcp/server. # Create a comment POST https://api.contentful.com/spaces/{space_id}/environments/{environment_id}/entries/{entry_id}/comments Content-Type: application/vnd.contentful.management.v1+json Creates a comment on an entry with an auto-generated ID; limit is 100 comments per entry. Use `X-Contentful-Parent-Id` to reply to a specific comment. Reference: https://contentful.com/developers/docs/references/content-management-api/entry-comments/create-a-comment ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `space_id` (string, required) — ID of the space in form of a string - `environment_id` (string, required) — ID of the environment in form of a string - `entry_id` (string, required) — ID of the entry in form of a string ### Headers - `X-Contentful-Parent-Id` (string, optional) — Comment ID to reply to (creates a reply to the specified comment) - `X-Contentful-Parent-Entity-Reference` (string, optional) — Reference to a specific field and locale of the entry (must match pattern fields.\.\) ### Body (application/vnd.contentful.management.v1+json) This endpoint expects a map from string to any. - `map from string to any` ## Response ### 201 Created - Resource created successfully - `map from string to any` ## Examples **Request** ```json { "body": "Looks good to me!", "status": "active" } ``` **Response** ```json { "body": "Looks good to me!", "status": "active", "sys": { "createdAt": "2025-02-22T18:52:56.000Z", "createdBy": { "sys": { "id": "7BslKh9TdKGOK41VmLDjFZ", "linkType": "User", "type": "Link" } }, "environment": { "sys": { "id": "staging", "linkType": "Environment", "type": "Link" } }, "id": "", "parent": { "sys": { "id": "", "linkType": "Comment", "ref": "fields.description.en", "type": "Link" } }, "parentEntity": { "sys": { "id": "5KsDBWseXY6QegucYAoacS", "linkType": "Entry", "type": "Link" } }, "space": { "sys": { "id": "yadj1kx9rmg0", "linkType": "Space", "type": "Link" } }, "type": "Comment", "updatedAt": "2025-02-22T18:52:56.000Z", "updatedBy": { "sys": { "id": "4FLrUHftHW3v2BLi9fzfjU", "linkType": "User", "type": "Link" } }, "version": 1 } } ``` **SDK Code** ```javascript JavaScript import { createClient } from 'contentful-management' // Client init const client = contentful.createClient({ accessToken: '' }) const comment = await client.comment.create({ spaceId: '', entryId: '', environmentId: '', bodyFormat: 'plain-text' | 'rich-text', }, { body: 'Looks good to me!', status: 'active', }); ``` ```android Android No snippet for this SDK. ``` ```java Java No snippet for this SDK. ``` ```kotlin Kotlin No snippet for this SDK. ``` ```swift Swift No snippet for this SDK. ``` ```js-legacy JavaScript (legacy) No snippet for this SDK. ``` ```php PHP No snippet for this SDK. ``` ```ruby Ruby No snippet for this SDK. ``` ```python Python No snippet for this SDK. ``` ```.net .NET No snippet for this SDK. ```