Skip to main content
GET
/
api
/
prompts
curl -X GET "https://your-domain.com/api/prompts" \
  -H "Authorization: Bearer YOUR_API_KEY"
[
  {
    "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": []
  },
  {
    "id": "660f9511-f3ac-52e5-b827-557766551111",
    "command": "translate",
    "user_id": "user-123",
    "name": "Language Translator",
    "content": "Translate the following to {{language}}: {{text}}",
    "data": {},
    "meta": {},
    "tags": ["languages"],
    "is_active": true,
    "version_id": "ver-456",
    "created_at": 1709078400,
    "updated_at": 1709164800,
    "access_grants": []
  }
]
Returns a list of prompts that the authenticated user has access to based on their role and permissions. Admins with bypass access control see all prompts, while other users only see prompts they own or have read access to.

Response

Response
array
Array of prompt objects
curl -X GET "https://your-domain.com/api/prompts" \
  -H "Authorization: Bearer YOUR_API_KEY"
[
  {
    "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": []
  },
  {
    "id": "660f9511-f3ac-52e5-b827-557766551111",
    "command": "translate",
    "user_id": "user-123",
    "name": "Language Translator",
    "content": "Translate the following to {{language}}: {{text}}",
    "data": {},
    "meta": {},
    "tags": ["languages"],
    "is_active": true,
    "version_id": "ver-456",
    "created_at": 1709078400,
    "updated_at": 1709164800,
    "access_grants": []
  }
]