Skip to main content
GET
/
prompts
cURL
curl --request GET \
  --url https://www.greenflash.ai/api/v1/prompts \
  --header 'Authorization: Bearer <token>'
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "externalPromptId": "support-v1",
    "name": "Customer Support Prompt",
    "versionId": "123e4567-e89b-12d3-a456-426614174001",
    "productId": "123e4567-e89b-12d3-a456-426614174003",
    "archivedAt": null,
    "createdAt": "2025-10-01T12:00:00Z",
    "updatedAt": "2025-10-02T14:30:00Z",
    "components": [
      {
        "id": "123e4567-e89b-12d3-a456-426614174002",
        "externalComponentId": "base-instructions"
      }
    ]
  }
]

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

limit
number
default:50

Page size limit (cursor-based pagination). Use either limit/cursor OR page/pageSize, not both.

Required range: x <= 100
page
number

Page number (page-based pagination). Use either page/pageSize OR limit/cursor, not both.

Required range: x >= 1
pageSize
number

Number of items per page (page-based pagination). Use either page/pageSize OR limit/cursor, not both.

Required range: 1 <= x <= 30
includeArchived
boolean
default:false

Include archived prompts.

versionId
string<uuid>

Filter prompts by specific version ID.

productId
string<uuid>

Filter prompts by product ID.

activeOnly
boolean
default:false

Filter to only show prompts that are part of active versions. When true, only returns prompts associated with versions where isActive=true.

Response

Prompts retrieved successfully. Check the Link header for pagination URLs (first, prev, next).

id
string<uuid>
required

The Greenflash prompt ID.

externalPromptId
string | null
required

Your external identifier for the prompt.

name
string | null
required

Prompt name.

versionId
string<uuid> | null
required

The version ID this prompt is associated with, or null if the prompt is not part of any version.

productId
string<uuid> | null
required

The product ID this prompt is associated with.

archivedAt
string | null
required

ISO 8601 timestamp when archived, or null if active.

createdAt
string
required

ISO 8601 timestamp when created.

updatedAt
string
required

ISO 8601 timestamp when last updated.

components
object[]
required

Array of prompt component IDs that make up this prompt.