Get a prompt fragment
POST/api/v1/prompt-fragments/get
Returns one fragment by id.
The following access conditions are preserved as declared intent and are not implemented by generated code: Authorized scoped domain action.
Use this in a guide: Reuse and update shared assistant instructions
Request
Responses
- 200
Fragment returned
Use the fragmentId of an existing prompt fragment in your project.
Section ID: DOC-MA-profiles-prompts-api-getPromptFragment#example-agent-profiles-getPromptFragment-request
Request example
{
"fragmentId": "answer-style"
}
Guide request for Step 2: Check the sources and record their set version. Replace example resource identifiers with your own authorized values.
Section ID: DOC-MA-profiles-prompts-api-getPromptFragment#example-cookbook-managed-agents-profiles-prompts-prompt-fragments-02-request
Request example
{
"fragmentId": "safety"
}
Illustrative response shape; omitted default fields and actual outcomes depend on the operation.
Section ID: DOC-MA-profiles-prompts-api-getPromptFragment#example-agent-profiles-getPromptFragment-response
Response example
{
"fragment": {
"fragmentId": "example_123",
"name": "example",
"content": "Example text"
}
}
Document ID: DOC-MA-profiles-prompts-api-getPromptFragment. Section identities and revisions.
| Section | Stable reference |
|---|---|
| Get a prompt fragment | DOC-MA-profiles-prompts-api-getPromptFragment#overview |
| Request | DOC-MA-profiles-prompts-api-getPromptFragment#request |
| Responses | DOC-MA-profiles-prompts-api-getPromptFragment#responses |