---
title: "Get Public Goal"
method: GET
path: "/v2/public/goals/{goal_id}"
tags: ["goals"]
---

# Get Public Goal

`GET /v2/public/goals/{goal_id}`

## Request

- Base URL: `https://api.sanka.com`
- URL: `https://api.sanka.com/v2/public/goals/{goal_id}`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/sankahq/apis/sanka-public-api/docs/v2/public/goals/:goal_id/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `goal_id` string, uuid, required

## Query parameters

- `fiscal_year` integer, nullable
- `language` string, nullable
- `workspace_id` string, nullable

## Headers

- `X-Workspace-Code` string

## Response `200`

Successful Response

- GetPublicGoal200Envelope
  - `success` true, required
  - `data` GoalDetailData, required
    - `goal` GoalData, required
      - `id` string, uuid, required
      - `name` string, required
      - `metric` 'deals_created' | 'invoice_revenue' | 'custom', required
      - `unit` 'count' | 'money' | 'number', required
      - `source` string, required
      - `definition` GoalMetricDefinition, required: What a goal counts or sums: one object's active records, by the month of one of their dates, narrowed by filters (the same expressions as saved views).
        - `source` string, required
        - `measure` string
        - `date_field` string
        - `filters` SearchFilterExpression[]
          - `field` FieldReference, required
            - `field_id` string, required
            - `source` 'standard_field' | 'custom_property' | 'association' | 'record_display' | 'formatted_id' | 'system', nullable
            - `label` string, nullable
          - `operator` 'equals' | 'not_equals' | 'contains' | 'does_not_contain' | 'starts_with' | 'ends_with' | 'in' | 'not_in' | 'is_empty' | 'is_not_empty' | 'greater_than' | 'greater_than_or_equal' | 'less_than' | 'less_than_or_equal' | 'between' | 'equal_or_after_today' | 'equal_or_before_today' | 'last_x_days' | 'more_than_x_days', required
          - `value` unknown
          - `selected_label` string, nullable
      - `amount` 'before_tax' | 'including_tax', nullable, required
      - `currency` string, nullable, required
      - `assignment` 'company' | 'people' | 'company_and_people', required
      - `assignees` GoalOwner[], required
        - `id` integer, required
        - `label` string, required
      - `version` integer, required
      - `archived` boolean, required
      - `created_at` string, date-time, required
      - `updated_at` string, date-time, required
    - `fiscal_year` integer, required
    - `fiscal_year_start_month` integer, required
    - `months` string[], required
    - `rows` GoalTargetRow[], required
      - `owner` GoalOwner, required
        - `id` integer, required
        - `label` string, required
      - `targets` string[], required
    - `can_edit` boolean, required
  - `meta` EnvelopeMeta, required
    - `ctx_id` string, required
    - `pagination` PaginationMeta
      - `page` integer, required
      - `page_size` integer, required
      - `total` integer, required
      - `next_cursor` string, nullable
    - `toast` ToastMessage
      - `variant` 'success' | 'error' | 'info' | 'warning', required
      - `code` string, required
      - `message` string, required
      - `i18n` ToastMessageI18n, required
        - `en` string, required
        - `ja` string, required

## Other responses

- `401`: Error response
- `422`: Error response

## Changes

- **2026-10-05** `0ae44d305596`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sankahq/apis/sanka-public-api/changes/v2/public/goals/:goal_id/get.md)

---

[API](https://skmtc.dev/sankahq/apis/sanka-public-api.md) - [All operations](https://skmtc.dev/sankahq/apis/sanka-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sankahq/apis/sanka-public-api/revisions/16f03a9e3ab9?raw)
