We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://docs.strapi.io/dev-docs/api/rest
Hi, I am developing CMS to manage content. I have a collection containing dynamic zones. When I create data with REST API, I get the issue:
__component
Invalid key __component
messages[0].__component is a required field
strapi version: 5.5.0 node: 18.19.0
curl --location 'http://localhost:1337/api/prompts' \ --header 'Content-Type: application/json' \ --data '{ "data": { "messages": [ { "contents": [ { "text": "[Completed Task: -1]\nHi there! What can I get for you today?\n[Next Task: 1]" } ], "role": "assistant" } ], } }'
curl --location 'http://localhost:1337/api/prompts' \ --header 'Content-Type: application/json' \ --data '{ "data": { "messages": [ { "contents": [ { "text": "[Completed Task: -1]\nHi there! What can I get for you today?\n[Next Task: 1]" } ], "__component": "prompt.message-text", "role": "assistant" } ], } }'
curl --location 'http://localhost:1337/api/prompts' \ --header 'Content-Type: application/json' \ --data '{ "data": { "messages": [ { "contents": [ { "text": "[Completed Task: -1]\nHi there! What can I get for you today?\n[Next Task: 1]" } ], "__component": "", "role": "assistant" } ], } }'
No response
The text was updated successfully, but these errors were encountered:
👋 Thank you for your contribution!
❄️ We are currently in an end-of-year contribution freeze period. For more information, please check our announcement.
Your issue will be processed once contributions resume.
Thank you for your understanding!
Sorry, something went wrong.
No branches or pull requests
Link to the documentation page or resource
https://docs.strapi.io/dev-docs/api/rest
Describe the bug
Hi, I am developing CMS to manage content. I have a collection containing dynamic zones. When I create data with REST API, I get the issue:
__component
then I get error 400 -Invalid key __component
__component
then I get error 400 -messages[0].__component is a required field
I want to know. How to create data have dynamic zone with REST API?
strapi version: 5.5.0
node: 18.19.0
Additional context
curl --location 'http://localhost:1337/api/prompts' \ --header 'Content-Type: application/json' \ --data '{ "data": { "messages": [ { "contents": [ { "text": "[Completed Task: -1]\nHi there! What can I get for you today?\n[Next Task: 1]" } ], "role": "assistant" } ], } }'
curl --location 'http://localhost:1337/api/prompts' \ --header 'Content-Type: application/json' \ --data '{ "data": { "messages": [ { "contents": [ { "text": "[Completed Task: -1]\nHi there! What can I get for you today?\n[Next Task: 1]" } ], "__component": "prompt.message-text", "role": "assistant" } ], } }'
curl --location 'http://localhost:1337/api/prompts' \ --header 'Content-Type: application/json' \ --data '{ "data": { "messages": [ { "contents": [ { "text": "[Completed Task: -1]\nHi there! What can I get for you today?\n[Next Task: 1]" } ], "__component": "", "role": "assistant" } ], } }'
Suggested improvements or fixes
No response
Related issue(s)/PR(s)
No response
The text was updated successfully, but these errors were encountered: