> ## Documentation Index
> Fetch the complete documentation index at: https://docs.peely.pro/llms.txt
> Use this file to discover all available pages before exploring further.

# Detalhar prompt

## Propósito

Obtém detalhes de um prompt específico. Opcionalmente retorna a versão ativa de um ambiente.

## Parâmetros

* `prompt_id` (path, string) obrigatório
* `environment` (query, string) opcional. Ex.: `production`, `staging`

## Dados retornados

`id`, `project_id`, `key`, `name`, `description`, `latest_version_id`, `active_version`.

## Exemplo

```bash theme={null}
curl -H "X-API-Key: ak_xxxxxxxxx" \
  "${BASE_URL}/v1/integration/prompts/pr_1?environment=production"
```

Resposta:

```json theme={null}
{
  "id": "pr_1",
  "project_id": "proj_abc",
  "key": "welcome",
  "name": "Boas-vindas",
  "latest_version_id": "ver_12",
  "active_version": {
    "id": "ver_12",
    "prompt_id": "pr_1",
    "version_number": 12,
    "content": "...",
    "metadata_": null,
    "created_at": "2025-11-27T12:00:00Z"
  }
}
```

## Códigos de status

* 200 Sucesso
* 404 Prompt não encontrado
* 403 Workspace inválido ou projeto não autorizado

## Casos de uso

* Verificar conteúdo e versão ativa usada em produção


## OpenAPI

````yaml api-reference/openapi.json get /v1/integration/prompts/{prompt_id}
openapi: 3.0.3
info:
  title: Propty Integration API
  version: 1.0.0
servers:
  - url: https://api.aivra.cloud
security:
  - ApiKeyAuth: []
paths:
  /v1/integration/prompts/{prompt_id}:
    get:
      summary: Get prompt detail
      parameters:
        - in: path
          name: prompt_id
          required: true
          schema:
            type: string
        - in: query
          name: environment
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptDetailResponse'
components:
  schemas:
    PromptDetailResponse:
      type: object
      properties:
        id:
          type: string
        project_id:
          type: string
        key:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
        latest_version_id:
          type: string
          nullable: true
        active_version:
          $ref: '#/components/schemas/ActiveVersionResponse'
      required:
        - id
        - project_id
        - key
        - name
    ActiveVersionResponse:
      type: object
      properties:
        id:
          type: string
        prompt_id:
          type: string
        version_number:
          type: integer
        content:
          type: string
        metadata_:
          type: object
          additionalProperties: true
          nullable: true
        created_at:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - prompt_id
        - version_number
        - content
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````