> ## 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.

# Atualizar prompt

## Propósito

Atualiza campos básicos do prompt (nome, chave, descrição).

## Parâmetros

* `prompt_id` (path, string) obrigatório
* Corpo JSON com qualquer combinação de:
  * `key` (string)
  * `name` (string)
  * `description` (string)

## Dados retornados

Objeto do prompt atualizado.

## Exemplo

```bash theme={null}
curl -X PATCH "${BASE_URL}/v1/integration/prompts/pr_1" \
  -H "X-API-Key: ak_xxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Boas-vindas v2",
    "description": "Com emojis"
  }'
```

## Códigos de status

* 200 Sucesso
* 404 Prompt não encontrado
* 403 Projeto não autorizado pela API Key

## Casos de uso

* Renomear e organizar prompts sem alterar versões


## OpenAPI

````yaml api-reference/openapi.json patch /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}:
    patch:
      summary: Update prompt
      parameters:
        - in: path
          name: prompt_id
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptUpdateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptListResponse'
components:
  schemas:
    PromptUpdateRequest:
      type: object
      properties:
        key:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
    PromptListResponse:
      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
        created_at:
          type: string
          format: date-time
          nullable: true
      required:
        - id
        - project_id
        - key
        - name
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key

````