> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/open-webui/open-webui/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Prompt

> Retrieve a specific prompt by command or ID

Retrieves a prompt either by its unique command trigger or by its ID. Returns the prompt with user information and access control details.

## Endpoints

* **GET /api/prompts/command/{command}** - Get prompt by command
* **GET /api/prompts/id/{id}** - Get prompt by ID

## Path Parameters

<ParamField path="command" type="string" required>
  The command trigger for the prompt (only for `/command/{command}` endpoint)
</ParamField>

<ParamField path="id" type="string" required>
  The unique prompt ID (only for `/id/{id}` endpoint)
</ParamField>

## Response

<ResponseField name="id" type="string" required>
  Unique identifier for the prompt
</ResponseField>

<ResponseField name="command" type="string" required>
  Command trigger for the prompt
</ResponseField>

<ResponseField name="user_id" type="string" required>
  ID of the user who created the prompt
</ResponseField>

<ResponseField name="name" type="string" required>
  Display name for the prompt
</ResponseField>

<ResponseField name="content" type="string" required>
  The prompt template content
</ResponseField>

<ResponseField name="data" type="object" optional>
  Additional data associated with the prompt
</ResponseField>

<ResponseField name="meta" type="object" optional>
  Metadata for the prompt
</ResponseField>

<ResponseField name="tags" type="array" optional>
  Array of tag strings
</ResponseField>

<ResponseField name="is_active" type="boolean" required>
  Whether the prompt is currently active
</ResponseField>

<ResponseField name="version_id" type="string" optional>
  ID of the active history entry (current version)
</ResponseField>

<ResponseField name="created_at" type="integer" required>
  Unix timestamp (epoch seconds) when prompt was created
</ResponseField>

<ResponseField name="updated_at" type="integer" required>
  Unix timestamp (epoch seconds) when prompt was last updated
</ResponseField>

<ResponseField name="access_grants" type="array" default={[]}>
  Array of access grant objects
</ResponseField>

<ResponseField name="user" type="object" optional>
  Information about the user who created the prompt

  <Expandable title="User Object">
    <ResponseField name="id" type="string" required>
      User ID
    </ResponseField>

    <ResponseField name="name" type="string" required>
      User's display name
    </ResponseField>

    <ResponseField name="email" type="string" required>
      User's email address
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="write_access" type="boolean" required>
  Whether the authenticated user has write access to this prompt
</ResponseField>

## Error Responses

* **404 Not Found**: Prompt does not exist or user does not have read access

<RequestExample>
  ```bash Get by Command theme={null}
  curl -X GET "https://your-domain.com/api/prompts/command/summarize" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```

  ```bash Get by ID theme={null}
  curl -X GET "https://your-domain.com/api/prompts/id/550e8400-e29b-41d4-a716-446655440000" \
    -H "Authorization: Bearer YOUR_API_KEY"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "command": "summarize",
    "user_id": "user-123",
    "name": "Text Summarizer",
    "content": "Please summarize the following text: {{input}}",
    "data": {},
    "meta": {},
    "tags": ["productivity", "writing"],
    "is_active": true,
    "version_id": "ver-123",
    "created_at": 1709164800,
    "updated_at": 1709251200,
    "access_grants": [],
    "user": {
      "id": "user-123",
      "name": "John Doe",
      "email": "john@example.com"
    },
    "write_access": true
  }
  ```
</ResponseExample>
