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

# List goals

> Returns the campaign goal rule hierarchy - prioritized rules with conditions and per-goal actions (payout, cost, conversion and postback flags). Read-only in public API v1. Goal rules are managed in the panel.



## OpenAPI

````yaml openapi.public.yaml GET /api/v1/campaigns/{id}/goals
openapi: 3.0.3
info:
  title: Metricanic API
  version: 1.0.0
  description: >
    # Metricanic API


    Use the Metricanic REST API to manage campaigns, traffic sources, affiliate
    networks, landings, offers and rotators, and to read performance reports and
    individual events.


    Base URL: `https://panel.metricanic.com/api/v1`. Requests require an
    account-scoped Bearer key created in **Profile → API keys**. Use `read` for
    GET requests or `write` for supported mutations. Keys are intended for
    server-side integrations. Cross-origin browser writes are rejected.


    Start with the [API
    quickstart](https://docs.metricanic.com/api-reference/introduction), then
    follow the guides for
    [authentication](https://docs.metricanic.com/api-reference/authentication),
    [reports and event
    pagination](https://docs.metricanic.com/api-reference/reports-and-events),
    and [errors and retries](https://docs.metricanic.com/api-reference/errors).


    Only the operations in this specification are supported under `/api/v1`.
    Individual endpoint schemas define the request and response shapes. List
    endpoints do not all share the same pagination model. The product's OAuth
    MCP connection has separate, read-only capabilities.
  license:
    name: Proprietary
    url: https://metricanic.com/legal/terms
servers:
  - url: https://panel.metricanic.com
security:
  - bearerAuth: []
tags:
  - name: Auth
    description: Authentication and session endpoints.
  - name: Campaigns
    description: Campaign and campaign-related management endpoints.
  - name: Landings
    description: Landing page management endpoints.
  - name: Offers
    description: Offer management endpoints.
  - name: Reports
    description: Aggregated reporting and chart endpoints.
  - name: Rotators
    description: Rotator setup and routing-rule endpoints.
  - name: TrafficSources
    description: Traffic source configuration endpoints.
  - name: AffiliateNetworks
    description: Affiliate network management endpoints.
  - name: Events
    description: Raw event and error inspection endpoints.
paths:
  /api/v1/campaigns/{id}/goals:
    parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
    get:
      tags:
        - Campaigns
      summary: List goals
      description: >-
        Returns the campaign goal rule hierarchy - prioritized rules with
        conditions and per-goal actions (payout, cost, conversion and postback
        flags). Read-only in public API v1. Goal rules are managed in the panel.
      operationId: listCampaignGoals
      responses:
        '200':
          description: Campaign goal hierarchy
          content:
            application/json:
              example:
                ok: true
                data:
                  rules:
                    - id: 0f1e2d3c-4b5a-4c6d-8e7f-9a0b1c2d3e4f
                      priority: 0
                      enabled: true
                      label: Default
                      conditions: null
                      actions:
                        - idx: 0
                          label: purchase
                          enabled: true
                          payoutType: auto
                          payoutFixed: null
                          costType: none
                          costFixed: null
                          costShare: null
                          postbackUrl: null
                          postbackEnabled: false
                          storeValue: true
                          isConversion: true
                          affectsCost: false
                          affectsRevenue: true
              schema:
                $ref: '#/components/schemas/GoalRuleHierarchyResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          $ref: '#/components/responses/RateLimitedError'
        '503':
          $ref: '#/components/responses/ServiceUnavailableError'
        default:
          $ref: '#/components/responses/ErrorResponse'
components:
  schemas:
    GoalRuleHierarchyResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - true
        data:
          type: object
          properties:
            rules:
              type: array
              items:
                $ref: '#/components/schemas/GoalRuleNode'
      required:
        - ok
        - data
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        ok:
          type: boolean
          enum:
            - false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            details:
              type: object
              additionalProperties: true
          required:
            - code
            - message
          additionalProperties: false
        requestId:
          type: string
      required:
        - ok
        - error
      additionalProperties: false
    GoalRuleNode:
      type: object
      allOf:
        - $ref: '#/components/schemas/GoalRuleNodeInput'
        - type: object
          properties:
            id:
              type: string
            actions:
              type: array
              items:
                $ref: '#/components/schemas/GoalRuleAction'
          required:
            - id
    GoalRuleNodeInput:
      type: object
      properties:
        priority:
          type: integer
        enabled:
          type: boolean
        label:
          type: string
          nullable: true
        conditions:
          type: object
          nullable: true
        actions:
          type: array
          items:
            $ref: '#/components/schemas/GoalRuleActionInput'
      required:
        - priority
        - actions
    GoalRuleAction:
      type: object
      allOf:
        - $ref: '#/components/schemas/GoalRuleActionInput'
    GoalRuleActionInput:
      type: object
      properties:
        idx:
          type: integer
        label:
          type: string
          nullable: true
        enabled:
          type: boolean
        payoutType:
          type: string
        payoutFixed:
          type: number
          nullable: true
        costType:
          type: string
        costFixed:
          type: number
          nullable: true
        costShare:
          type: number
          minimum: 0
          maximum: 1000
          description: >-
            Revshare percentage in percent points. Example: 30 means 30%, 0.3
            means 0.3%, 250 means 250%.
          nullable: true
        postbackUrl:
          type: string
          nullable: true
        postbackEnabled:
          type: boolean
        storeValue:
          type: boolean
        isConversion:
          type: boolean
        affectsCost:
          type: boolean
        affectsRevenue:
          type: boolean
      required:
        - idx
  responses:
    RateLimitedError:
      description: Rate limit exceeded.
      headers:
        Retry-After:
          description: Seconds to wait before retrying when available.
          schema:
            type: string
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ServiceUnavailableError:
      description: A required platform dependency is temporarily unavailable.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    ErrorResponse:
      description: >-
        Standard API error envelope. Common platform errors include
        authentication failures, forbidden scope or origin, billing gate, rate
        limiting, and temporary service unavailability.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````