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

# Update Goal

> Update a goal



## OpenAPI

````yaml https://api.oviond.com/openapi.json put /v1/goals/{id}
openapi: 3.1.0
info:
  title: Oviond Backend API
  version: 1.0.0
  description: Authentication, account management, billing, and media services for Oviond.
  x-logo:
    url: https://app.oviond.com/img/oviond-full-logo.svg
    altText: Oviond
servers:
  - url: https://api.oviond.com
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
paths:
  /v1/goals/{id}:
    put:
      tags:
        - Goals
      summary: Update Goal
      description: Update a goal
      operationId: update_goal
      parameters:
        - schema:
            type: string
          required: true
          name: id
          in: path
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGoalRequest'
      responses:
        '200':
          description: Goal updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SuccessResponse'
        '404':
          description: Goal not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
components:
  schemas:
    UpdateGoalRequest:
      type: object
      properties:
        name:
          type: string
        description:
          type:
            - string
            - 'null'
        target_value:
          type: number
        operator:
          type: string
          enum:
            - '>='
            - '='
            - <=
        goal_type:
          type: string
          enum:
            - static
            - change
        symbol:
          type:
            - string
            - 'null'
          enum:
            - numbers
            - decimal
            - '%'
            - currency
        client_id:
          type:
            - string
            - 'null'
        query:
          $ref: '#/components/schemas/GoalQuery'
    SuccessResponse:
      type: object
      properties:
        success:
          type: boolean
          enum:
            - true
      required:
        - success
    GoalQuery:
      type: object
      properties:
        datasource_id:
          type: string
          enum:
            - advanced-web-ranking
            - ac
            - adroll
            - ahrefs
            - basecamp
            - brightlocal
            - call-rail
            - drip
            - keywords
            - sendin-blue
            - sendgrid
            - moosend
            - mailer-lite
            - pingdom
            - uptime-robot
            - piwik-pro
            - wordpress
            - pabbly-connect
            - ment
            - twilio
            - switchy
            - vimeo
            - pinterest
            - pinterest-ads
            - gtres
            - paypal
            - gps
            - gs
            - CUSTOM_IMPORT
            - CUSTOM_DATA
            - CALCULATION
            - GOALS
            - str
            - wistia
            - ca-mon
            - convertkit
            - woocommerce
            - xero
            - matomo
            - go-high-level
            - wcs
            - bing-webmaster-tools
            - pipedrive
            - salesforce
            - tiktok
            - tiktok-ads
            - twr
            - twr-ads
            - spf
            - ytbe
            - google-local-services-ads
            - klaviyo
            - gsh
            - ga4
            - lkdin-ads
            - lkdin-pg
            - mlchmp
            - inst-ads
            - inst
            - fb-ads
            - fb-pg
            - gmb
            - serpstat
            - hubspot
            - gadw
            - sem-rush
            - se-ranking
            - microsoft-ads
            - plausible
            - snapchat-ads
            - amazon-advertising
            - microsoft-clarity
            - serp-watch
            - vbout
            - moz
            - chatgpt-ads
            - demo
        data_view:
          type: string
        metrics:
          type: array
          items:
            $ref: '#/components/schemas/MetricSelection'
        dimensions:
          type: array
          items:
            $ref: '#/components/schemas/DimensionSelection'
        filters:
          type: array
          items:
            $ref: '#/components/schemas/WidgetFilter'
        advanced:
          type: object
          additionalProperties: {}
        date_range:
          type:
            - object
            - 'null'
          properties:
            current_start:
              type:
                - string
                - 'null'
            current_end:
              type:
                - string
                - 'null'
            previous_start:
              type:
                - string
                - 'null'
            previous_end:
              type:
                - string
                - 'null'
        show_custom_date_range:
          type:
            - boolean
            - 'null'
    MetricSelection:
      type: object
      properties:
        value:
          type: string
        label:
          type: string
        data_view:
          type: string
      required:
        - value
    DimensionSelection:
      type: object
      properties:
        value:
          type: string
        label:
          type: string
        data_view:
          type: string
      required:
        - value
    WidgetFilter:
      type: object
      properties:
        id:
          anyOf:
            - type: number
            - type: string
        field:
          type: string
          example: sessionMedium
        operator:
          type: string
          description: >-
            Canonical: equals, not_equals, contains, not_contains, starts_with,
            ends_with, greater_than, less_than, greater_than_or_equal,
            less_than_or_equal (vendor tokens also accepted).
          example: contains
        value:
          anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: array
              items: {}
          example: cpc
        logicalOperator:
          type: string
          enum:
            - and
            - or
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: >-
        Oviond API key (prefix `oviond_`) sent as a Bearer token — the
        credential for REST/programmatic and headless integrations. Manage keys
        in Settings → API Keys. API keys do NOT authenticate the MCP endpoint
        (/mcp), which uses OAuth 2.1 + PKCE.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        Supabase-issued JWT used by the Oviond web app session. External API
        consumers should authenticate with an Oviond API key (ApiKeyAuth)
        instead.

````