---
title: "Criar uma meta"
method: POST
path: "/api/management/goals"
tags: ["goals"]
---

# Criar uma meta

`POST /api/management/goals`

Cria uma meta e já calcula o progresso inicial dela. Os campos de recorte (`user_id`, `funnel_step_id`) e a lista de metas filhas (`children`) só são aceitos preenchidos nos tipos que os exigem; nos demais tipos eles devem ir nulos ou vazios. Metas do tipo `manual` informam o progresso no próprio corpo.

## Request body

- union — Payload para criação de metas de diferentes tipos.
  - object
    - `title` string, required — Título da meta.
    - `description` string — Descrição detalhada da meta.
    - `status` 'active' | 'inactive' | 'completed', required — Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída).
    - `type` 'manual', required — Tipo da meta.
    - `periodicity` integer, required — Periodicidade da meta.
    - `target` number, required — Valor alvo da meta.
    - `unit` string, required — Unidade utilizada na meta.
    - `comparison_mode` 'target', required — Modo de comparação utilizado para validação da meta.
    - `progress` number, required — Progresso inicial da meta manual.
    - `start_date` string, date, required — Data de início da meta.
    - `end_date` string, date, required — Data final da meta.
    - `children` string[] — Lista de metas filhas.
  - object
    - `title` string, required
    - `description` string
    - `status` 'active' | 'inactive' | 'completed', required — Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída).
    - `type` 'projects_created', required
    - `periodicity` integer, required
    - `target` number, required
    - `unit` string, required
    - `comparison_mode` 'target', required
    - `start_date` string, date, required
    - `end_date` string, date, required
    - `children` string[]
  - object
    - `title` string, required
    - `description` string
    - `status` 'active' | 'inactive' | 'completed', required — Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída).
    - `type` 'projects_created_by_user', required
    - `periodicity` integer, required
    - `target` number, required
    - `unit` string, required
    - `comparison_mode` 'target', required
    - `start_date` string, date, required
    - `end_date` string, date, required
    - `user_id` string, uuid, required — ID do usuário associado à meta.
    - `children` string[]
  - object
    - `title` string, required
    - `description` string
    - `status` 'active' | 'inactive' | 'completed', required — Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída).
    - `type` 'funnel_steps_links', required
    - `periodicity` integer, required
    - `target` number, required
    - `unit` string, required
    - `comparison_mode` 'target', required
    - `start_date` string, date, required
    - `end_date` string, date, required
    - `funnel_step_id` integer, required — ID da etapa do funil.
    - `children` string[]
  - object
    - `title` string, required
    - `description` string
    - `status` 'active' | 'inactive' | 'completed', required — Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída).
    - `type` 'funnel_steps_links_by_user', required
    - `periodicity` integer, required
    - `target` number, required
    - `unit` string, required
    - `comparison_mode` 'target', required
    - `start_date` string, date, required
    - `end_date` string, date, required
    - `funnel_step_id` integer, required — ID da etapa do funil.
    - `user_id` string, uuid, required — ID do usuário associado à meta.
    - `children` string[]
  - object
    - `title` string, required
    - `description` string
    - `status` 'active' | 'inactive' | 'completed', required — Status atual da meta. Valores possíveis: active (Ativa), inactive (Inativa), completed (Concluída).
    - `type` 'composite', required
    - `periodicity` integer, required
    - `target` number, required
    - `unit` string, required
    - `comparison_mode` 'target', required
    - `start_date` string, date, required
    - `end_date` string, date, required
    - `children` string[], required — Lista de UUIDs das metas filhas que compõem esta meta.

## Response `200`

Sucesso

- object
  - `response` boolean
  - `goal` object
    - `id` string
    - `title` string
    - `description` string
    - `status` string
    - `start_date` string, date
    - `end_date` string, date
    - `periodicity` integer
    - `type` string
    - `target` integer
    - `unit` string
    - `comparison_mode` string
    - `progress` integer
    - `progress_change_percentage` integer
    - `percentage` integer
    - `is_past_calculable` boolean
    - `created_at` string, date-time
    - `updated_at` string, date-time

## Other responses

- `422` — Erro de validação

## Changes

- **2026-09-22** `b43a04f35145` — 3 warning
  - removed the optional property `goal/deleted_at` from the response with the `200` status
  - removed the optional property `goal/funnel_step_id` from the response with the `200` status
  - removed the optional property `goal/user_id` from the response with the `200` status
- **2026-09-18** `3202abfa17f9` — 2 info
  - added the media type `application/json` for the response with the status `200`
  - added the non-success response with the status `422`
- **2026-06-15** `4a6533a99914` — 4 breaking, 6 warning
  - added the new required request property `oneOf[subschema #3: Meta de Projetos Criados por Usuário]/user_id`
  - added the new required request property `oneOf[subschema #4: Meta de Projetos em Etapa]/funnel_step_id`
  - added the new required request property `oneOf[subschema #5: Meta de Projetos em Etapa por Usuário]/funnel_step_id`
  - added the new required request property `oneOf[subschema #5: Meta de Projetos em Etapa por Usuário]/user_id`
  - …6 more
- …earlier changes not shown

[Full history](https://skmtc.dev/olie-ai/apis/olie-api/changes/api/management/goals/post.md)

---

[API](https://skmtc.dev/olie-ai/apis/olie-api.md) · [All operations](https://skmtc.dev/olie-ai/apis/olie-api/llms.txt) · [OpenAPI document](https://skmtc.dev/olie-ai/apis/olie-api/revisions/b43a04f35145?raw)
