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

# Criar prompt

## Propósito

Cria um novo prompt dentro de um projeto.

## Parâmetros

Corpo JSON:

* `project_id` (string) obrigatório
* `key` (string) obrigatório
* `name` (string) obrigatório
* `description` (string) opcional

## Dados retornados

Objeto do prompt recém-criado com `id`, `project_id`, `key`, `name`, `description`, `latest_version_id`, `created_at`.

## Exemplo

```bash theme={null}
curl -X POST "${BASE_URL}/v1/integration/prompts" \
  -H "X-API-Key: ak_xxxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "project_id": "proj_abc",
    "key": "onboarding",
    "name": "Onboarding",
    "description": "Fluxo inicial"
  }'
```

## Códigos de status

* 200 Sucesso
* 404 Projeto não encontrado ou não pertence ao workspace
* 403 Projeto não autorizado pela API Key

## Casos de uso

* Provisionar prompts a partir de pipelines de integração


## OpenAPI

````yaml api-reference/openapi.json post /v1/integration/prompts
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:
    post:
      summary: Create prompt
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PromptCreateRequest'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PromptListResponse'
components:
  schemas:
    PromptCreateRequest:
      type: object
      properties:
        project_id:
          type: string
        key:
          type: string
        name:
          type: string
        description:
          type: string
          nullable: true
      required:
        - project_id
        - key
        - name
    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

````