Asana Goals API

The Asana Goals API is a powerful tool that allows developers to programmatically interact with and manipulate goals within the Asana platform. By utilizing the API, users can create, update, and track progress on goals, as well as set key results and milestones to measure success. This enables teams to align on business objectives, monitor performance, and adjust strategies as needed.

Operations 10

GET /goals Asana Get goals #
POST /goals Asana Create a goal #
GET /goals/{goal_gid} Asana Get a goal #
PUT /goals/{goal_gid} Asana Update a goal #
DELETE /goals/{goal_gid} Asana Delete a goal #
POST /goals/{goal_gid}/addFollowers Asana Add a collaborator to a goal #
POST /goals/{goal_gid}/removeFollowers Asana Remove a collaborator from a goal #
GET /goals/{goal_gid}/parentGoals Asana Get parent goals from a goal #
POST /goals/{goal_gid}/setMetric Asana Create a goal metric #
POST /goals/{goal_gid}/setMetricCurrentValue Asana Update a goal metric #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/asana-goals-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

asana-goals-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Asana Allocations Goals API
  description: The Asana Allocations API allows users to manage and allocate resources within their Asana project management system. An allocation object represents how much of a resource (e.g. person, team) is dedicated to a specific work object (e.g. project, portfolio) over a specific period of time. The effort value can be a percentage or number of hours.
  version: '1.0'
  termsOfService: https://asana.com/terms
  contact:
    name: Asana Support
    url: https://asana.com/support
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0
servers:
- url: https://app.asana.com/api/1.0
  description: Main endpoint.
security:
- personalAccessToken: []
- oauth2: []
tags:
- name: Goals
  description: Manage goals in the goal-tracking system.
paths:
  /goals:
    parameters:
    - $ref: '#/components/parameters/pretty'
    get:
      summary: Asana Get goals
      description: Returns compact goal records.
      operationId: getGoals
      tags:
      - Goals
      parameters:
      - name: workspace
        in: query
        required: false
        schema:
          type: string
      - name: team
        in: query
        required: false
        schema:
          type: string
      - name: project
        in: query
        required: false
        schema:
          type: string
      - name: is_workspace_level
        in: query
        required: false
        schema:
          type: boolean
      - name: time_periods
        in: query
        required: false
        schema:
          type: array
          items:
            type: string
      - name: limit
        in: query
        schema:
          type: integer
          minimum: 1
          maximum: 100
      - name: offset
        in: query
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved the requested goals.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/GoalCompact'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '500':
          description: Internal server error.
    post:
      summary: Asana Create a goal
      description: Creates a new goal in a workspace.
      operationId: createGoal
      tags:
      - Goals
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/GoalRequest'
      responses:
        '201':
          description: Successfully created a new goal.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GoalResponse'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '500':
          description: Internal server error.
  /goals/{goal_gid}:
    parameters:
    - $ref: '#/components/parameters/goal_path_gid'
    - $ref: '#/components/parameters/pretty'
    get:
      summary: Asana Get a goal
      description: Returns the complete goal record for a single goal.
      operationId: getGoal
      tags:
      - Goals
      parameters:
      - name: goal_gid
        in: path
        required: true
        schema:
          type: string
        example: '12345'
      responses:
        '200':
          description: Successfully retrieved the record for a single goal.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GoalResponse'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found.
        '500':
          description: Internal server error.
    put:
      summary: Asana Update a goal
      description: Updates an existing goal.
      operationId: updateGoal
      tags:
      - Goals
      parameters:
      - name: goal_gid
        in: path
        required: true
        schema:
          type: string
        example: '12345'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/GoalRequest'
      responses:
        '200':
          description: Successfully updated the goal.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GoalResponse'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found.
        '500':
          description: Internal server error.
    delete:
      summary: Asana Delete a goal
      description: Deletes a specific, existing goal.
      operationId: deleteGoal
      tags:
      - Goals
      parameters:
      - name: goal_gid
        in: path
        required: true
        schema:
          type: string
        example: '12345'
      responses:
        '200':
          description: Successfully deleted the goal.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found.
        '500':
          description: Internal server error.
  /goals/{goal_gid}/addFollowers:
    parameters:
    - $ref: '#/components/parameters/goal_path_gid'
    - $ref: '#/components/parameters/pretty'
    post:
      summary: Asana Add a collaborator to a goal
      description: Adds followers to a goal.
      operationId: addFollowersForGoal
      tags:
      - Goals
      parameters:
      - name: goal_gid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    followers:
                      type: array
                      items:
                        type: string
      responses:
        '200':
          description: Successfully added followers to the goal.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GoalResponse'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found.
        '500':
          description: Internal server error.
  /goals/{goal_gid}/removeFollowers:
    parameters:
    - $ref: '#/components/parameters/goal_path_gid'
    - $ref: '#/components/parameters/pretty'
    post:
      summary: Asana Remove a collaborator from a goal
      description: Removes followers from a goal.
      operationId: removeFollowersForGoal
      tags:
      - Goals
      parameters:
      - name: goal_gid
        in: path
        required: true
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  type: object
                  properties:
                    followers:
                      type: array
                      items:
                        type: string
      responses:
        '200':
          description: Successfully removed followers from the goal.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GoalResponse'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found.
        '500':
          description: Internal server error.
  /goals/{goal_gid}/parentGoals:
    parameters:
    - $ref: '#/components/parameters/goal_path_gid'
    - $ref: '#/components/parameters/pretty'
    get:
      summary: Asana Get parent goals from a goal
      description: Returns a compact representation of all parent goals of a goal.
      operationId: getParentGoalsForGoal
      tags:
      - Goals
      parameters:
      - name: goal_gid
        in: path
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Successfully retrieved the parent goals.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      $ref: '#/components/schemas/GoalCompact'
        '400':
          description: Bad request.
        '401':
          description: Unauthorized.
        '403':
          description: Forbidden.
        '404':
          description: Not found.
        '500':
          description: Internal server error.
  /goals/{goal_gid}/setMetric:
    parameters:
    - $ref: '#/components/parameters/goal_path_gid'
    - $ref: '#/components/parameters/pretty'
    post:
      summary: Asana Create a goal metric
      description: Creates and adds a goal metric to a specified goal. Note that this replaces an existing goal metric if one already exists.
      tags:
      - Goals
      operationId: createGoalMetric
      parameters:
      - name: opt_fields
        in: query
        description: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
        required: false
        example:
        - current_status_update
        - current_status_update.resource_subtype
        - current_status_update.title
        - due_on
        - followers
        - followers.name
        - html_notes
        - is_workspace_level
        - liked
        - likes
        - likes.user
        - likes.user.name
        - metric
        - metric.can_manage
        - metric.currency_code
        - metric.current_display_value
        - metric.current_number_value
        - metric.initial_number_value
        - metric.is_custom_weight
        - metric.precision
        - metric.progress_source
        - metric.resource_subtype
        - metric.target_number_value
        - metric.unit
        - name
        - notes
        - num_likes
        - owner
        - owner.name
        - start_on
        - status
        - team
        - team.name
        - time_period
        - time_period.display_name
        - time_period.end_on
        - time_period.period
        - time_period.start_on
        - workspace
        - workspace.name
        schema:
          type: array
          items:
            type: string
            enum:
            - current_status_update
            - current_status_update.resource_subtype
            - current_status_update.title
            - due_on
            - followers
            - followers.name
            - html_notes
            - is_workspace_level
            - liked
            - likes
            - likes.user
            - likes.user.name
            - metric
            - metric.can_manage
            - metric.currency_code
            - metric.current_display_value
            - metric.current_number_value
            - metric.initial_number_value
            - metric.is_custom_weight
            - metric.precision
            - metric.progress_source
            - metric.resource_subtype
            - metric.target_number_value
            - metric.unit
            - name
            - notes
            - num_likes
            - owner
            - owner.name
            - start_on
            - status
            - team
            - team.name
            - time_period
            - time_period.display_name
            - time_period.end_on
            - time_period.period
            - time_period.start_on
            - workspace
            - workspace.name
        style: form
        explode: false
      requestBody:
        description: The goal metric to create.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/GoalMetricRequest'
      responses:
        200:
          description: Successfully created a new goal metric.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GoalResponse_2'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        402:
          $ref: '#/components/responses/PaymentRequired'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      x-readme:
        code-samples:
        - language: java
          install: <dependency><groupId>com.asana</groupId><artifactId>asana</artifactId><version>1.0.0</version></dependency>
          code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nJsonElement result = client.goals.createGoalMetric(goalGid)\n    .data(\"field\", \"value\")\n    .data(\"field\", \"value\")\n    .option(\"pretty\", true)\n    .execute();"
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet goalsApiInstance = new Asana.GoalsApi();\nlet body = {\"data\": {\"<PARAM_1>\": \"<VALUE_1>\", \"<PARAM_2>\": \"<VALUE_2>\",}}; // Object | The goal metric to create.\nlet goal_gid = \"12345\"; // String | Globally unique identifier for the goal.\nlet opts = { \n    'opt_fields': \"current_status_update,current_status_update.resource_subtype,current_status_update.title,due_on,followers,followers.name,html_notes,is_workspace_level,liked,likes,likes.user,likes.user.name,metric,metric.can_manage,metric.currency_code,metric.current_display_value,metric.current_number_value,metric.initial_number_value,metric.is_custom_weight,metric.precision,metric.progress_source,metric.resource_subtype,metric.target_number_value,metric.unit,name,notes,num_likes,owner,owner.name,start_on,status,team,team.name,time_period,time_period.display_name,time_period.end_on,time_period.period,time_period.start_on,workspace,workspace.name\"\n};\ngoalsApiInstance.createGoalMetric(body, goal_gid, opts).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.goals.createGoalMetric(goalGid, {field: \"value\", field: \"value\", pretty: true})\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\ngoals_api_instance = asana.GoalsApi(api_client)\nbody = {\"data\": {\"<PARAM_1>\": \"<VALUE_1>\", \"<PARAM_2>\": \"<VALUE_2>\",}} # dict | The goal metric to create.\ngoal_gid = \"12345\" # str | Globally unique identifier for the goal.\nopts = {\n    'opt_fields': \"current_status_update,current_status_update.resource_subtype,current_status_update.title,due_on,followers,followers.name,html_notes,is_workspace_level,liked,likes,likes.user,likes.user.name,metric,metric.can_manage,metric.currency_code,metric.current_display_value,metric.current_number_value,metric.initial_number_value,metric.is_custom_weight,metric.precision,metric.progress_source,metric.resource_subtype,metric.target_number_value,metric.unit,name,notes,num_likes,owner,owner.name,start_on,status,team,team.name,time_period,time_period.display_name,time_period.end_on,time_period.period,time_period.start_on,workspace,workspace.name\", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.\n}\n\ntry:\n    # Create a goal metric\n    api_response = goals_api_instance.create_goal_metric(body, goal_gid, opts)\n    pprint(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling GoalsApi->create_goal_metric: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.goals.create_goal_metric(goal_gid, {''field'': ''value'', ''field'': ''value''}, opt_pretty=True)'
          name: python-sdk-v3
        - language: php
          install: composer require asana/asana
          code: '<?php

            require ''vendor/autoload.php'';


            $client = Asana\Client::accessToken(''PERSONAL_ACCESS_TOKEN'');


            $result = $client->goals->createGoalMetric($goal_gid, array(''field'' => ''value'', ''field'' => ''value''), array(''opt_pretty'' => ''true''))'
        - language: ruby
          install: gem install asana
          code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n    c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.goals.create_goal_metric(goal_gid: 'goal_gid', field: \"value\", field: \"value\", options: {pretty: true})"
  /goals/{goal_gid}/setMetricCurrentValue:
    parameters:
    - $ref: '#/components/parameters/goal_path_gid'
    - $ref: '#/components/parameters/pretty'
    post:
      summary: Asana Update a goal metric
      description: 'Updates a goal''s existing metric''s `current_number_value` if one exists,

        otherwise responds with a 400 status code.


        Returns the complete updated goal metric record.'
      tags:
      - Goals
      operationId: updateGoalMetric
      parameters:
      - name: opt_fields
        in: query
        description: This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.
        required: false
        example:
        - current_status_update
        - current_status_update.resource_subtype
        - current_status_update.title
        - due_on
        - followers
        - followers.name
        - html_notes
        - is_workspace_level
        - liked
        - likes
        - likes.user
        - likes.user.name
        - metric
        - metric.can_manage
        - metric.currency_code
        - metric.current_display_value
        - metric.current_number_value
        - metric.initial_number_value
        - metric.is_custom_weight
        - metric.precision
        - metric.progress_source
        - metric.resource_subtype
        - metric.target_number_value
        - metric.unit
        - name
        - notes
        - num_likes
        - owner
        - owner.name
        - start_on
        - status
        - team
        - team.name
        - time_period
        - time_period.display_name
        - time_period.end_on
        - time_period.period
        - time_period.start_on
        - workspace
        - workspace.name
        schema:
          type: array
          items:
            type: string
            enum:
            - current_status_update
            - current_status_update.resource_subtype
            - current_status_update.title
            - due_on
            - followers
            - followers.name
            - html_notes
            - is_workspace_level
            - liked
            - likes
            - likes.user
            - likes.user.name
            - metric
            - metric.can_manage
            - metric.currency_code
            - metric.current_display_value
            - metric.current_number_value
            - metric.initial_number_value
            - metric.is_custom_weight
            - metric.precision
            - metric.progress_source
            - metric.resource_subtype
            - metric.target_number_value
            - metric.unit
            - name
            - notes
            - num_likes
            - owner
            - owner.name
            - start_on
            - status
            - team
            - team.name
            - time_period
            - time_period.display_name
            - time_period.end_on
            - time_period.period
            - time_period.start_on
            - workspace
            - workspace.name
        style: form
        explode: false
      requestBody:
        description: The updated fields for the goal metric.
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                data:
                  $ref: '#/components/schemas/GoalMetricCurrentValueRequest'
      responses:
        200:
          description: Successfully updated the goal metric.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/GoalResponse_2'
        400:
          $ref: '#/components/responses/BadRequest'
        401:
          $ref: '#/components/responses/Unauthorized'
        402:
          $ref: '#/components/responses/PaymentRequired'
        403:
          $ref: '#/components/responses/Forbidden'
        404:
          $ref: '#/components/responses/NotFound'
        500:
          $ref: '#/components/responses/InternalServerError'
      x-readme:
        code-samples:
        - language: java
          install: <dependency><groupId>com.asana</groupId><artifactId>asana</artifactId><version>1.0.0</version></dependency>
          code: "import com.asana.Client;\n\nClient client = Client.accessToken(\"PERSONAL_ACCESS_TOKEN\");\n\nJsonElement result = client.goals.updateGoalMetric(goalGid)\n    .data(\"field\", \"value\")\n    .data(\"field\", \"value\")\n    .option(\"pretty\", true)\n    .execute();"
        - language: node
          install: npm install asana
          code: "const Asana = require('asana');\n\nlet client = Asana.ApiClient.instance;\nlet token = client.authentications['token'];\ntoken.accessToken = '<YOUR_ACCESS_TOKEN>';\n\nlet goalsApiInstance = new Asana.GoalsApi();\nlet body = {\"data\": {\"<PARAM_1>\": \"<VALUE_1>\", \"<PARAM_2>\": \"<VALUE_2>\",}}; // Object | The updated fields for the goal metric.\nlet goal_gid = \"12345\"; // String | Globally unique identifier for the goal.\nlet opts = { \n    'opt_fields': \"current_status_update,current_status_update.resource_subtype,current_status_update.title,due_on,followers,followers.name,html_notes,is_workspace_level,liked,likes,likes.user,likes.user.name,metric,metric.can_manage,metric.currency_code,metric.current_display_value,metric.current_number_value,metric.initial_number_value,metric.is_custom_weight,metric.precision,metric.progress_source,metric.resource_subtype,metric.target_number_value,metric.unit,name,notes,num_likes,owner,owner.name,start_on,status,team,team.name,time_period,time_period.display_name,time_period.end_on,time_period.period,time_period.start_on,workspace,workspace.name\"\n};\ngoalsApiInstance.updateGoalMetric(body, goal_gid, opts).then((result) => {\n    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));\n}, (error) => {\n    console.error(error.response.body);\n});"
          name: node-sdk-v3
        - language: node
          install: npm install asana@1.0.5
          code: "const asana = require('asana');\n\nconst client = asana.Client.create().useAccessToken('PERSONAL_ACCESS_TOKEN');\n\nclient.goals.updateGoalMetric(goalGid, {field: \"value\", field: \"value\", pretty: true})\n    .then((result) => {\n        console.log(result);\n    });"
          name: node-sdk-v1
        - language: python
          install: pip install asana
          code: "import asana\nfrom asana.rest import ApiException\nfrom pprint import pprint\n\nconfiguration = asana.Configuration()\nconfiguration.access_token = '<YOUR_ACCESS_TOKEN>'\napi_client = asana.ApiClient(configuration)\n\n# create an instance of the API class\ngoals_api_instance = asana.GoalsApi(api_client)\nbody = {\"data\": {\"<PARAM_1>\": \"<VALUE_1>\", \"<PARAM_2>\": \"<VALUE_2>\",}} # dict | The updated fields for the goal metric.\ngoal_gid = \"12345\" # str | Globally unique identifier for the goal.\nopts = {\n    'opt_fields': \"current_status_update,current_status_update.resource_subtype,current_status_update.title,due_on,followers,followers.name,html_notes,is_workspace_level,liked,likes,likes.user,likes.user.name,metric,metric.can_manage,metric.currency_code,metric.current_display_value,metric.current_number_value,metric.initial_number_value,metric.is_custom_weight,metric.precision,metric.progress_source,metric.resource_subtype,metric.target_number_value,metric.unit,name,notes,num_likes,owner,owner.name,start_on,status,team,team.name,time_period,time_period.display_name,time_period.end_on,time_period.period,time_period.start_on,workspace,workspace.name\", # list[str] | This endpoint returns a compact resource, which excludes some properties by default. To include those optional properties, set this query parameter to a comma-separated list of the properties you wish to include.\n}\n\ntry:\n    # Update a goal metric\n    api_response = goals_api_instance.update_goal_metric(body, goal_gid, opts)\n    pprint(api_response)\nexcept ApiException as e:\n    print(\"Exception when calling GoalsApi->update_goal_metric: %s\\n\" % e)"
          name: python-sdk-v5
        - language: python
          install: pip install asana==3.2.3
          code: 'import asana


            client = asana.Client.access_token(''PERSONAL_ACCESS_TOKEN'')


            result = client.goals.update_goal_metric(goal_gid, {''field'': ''value'', ''field'': ''value''}, opt_pretty=True)'
          name: python-sdk-v3
        - language: php
          install: composer require asana/asana
          code: '<?php

            require ''vendor/autoload.php'';


            $client = Asana\Client::accessToken(''PERSONAL_ACCESS_TOKEN'');


            $result = $client->goals->updateGoalMetric($goal_gid, array(''field'' => ''value'', ''field'' => ''value''), array(''opt_pretty'' => ''true''))'
        - language: ruby
          install: gem install asana
          code: "require 'asana'\n\nclient = Asana::Client.new do |c|\n    c.authentication :access_token, 'PERSONAL_ACCESS_TOKEN'\nend\n\nresult = client.goals.update_goal_metric(goal_gid: 'goal_gid', field: \"value\", field: \"value\", options: {pretty: true})"
components:
  responses:
    PaymentRequired:
      description: The request was valid, but the queried object or object mutation specified in the request is above your current premium level.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Unauthorized:
      description: A valid authentication token was not provided with the request, so the API could not associate a user with the request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    NotFound:
      description: Either the request method and path supplied do not specify a known action in the API, or the object specified by the request does not exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    InternalServerError:
      description: There was a problem on Asana’s end. In the event of a server error the response body should contain an error phrase. These phrases can be used by Asana support to quickly look up the incident that caused the server error. Some errors are due to server load, and will not supply an error phrase.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    Forbidden:
      description: The authentication and request syntax was valid but the server is refusing to complete the request. This can happen if you try to read or write to objects or properties that the user does not have access to.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    BadRequest:
      description: This usually occurs because of a missing or malformed parameter. Check the documentation and the syntax of your request and try again.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
  schemas:
    GoalBase:
      description: A generic Asana Resource, containing a globally unique identifier.
      type: object
      properties:
        gid:
          description: Globally unique identifier of the resource, as a string.
          type: string
          readOnly: true
          example: '12345'
          x-insert-after: false
        resource_type:
          description: The base type of this resource.
          type: string
          readOnly: true
          example: goal
          x-insert-after: gid
        name:
          type: string
          description: The name of the goal.
          example: Grow web traffic by 30%
        html_notes:
          type: string
          description: The notes of the goal with formatting as HTML.
          example: <body>Start building brand awareness.</body>
        notes:
          type: string
          description: Free-form textual information associated with the goal (i.e. its description).
          example: Start building brand awareness.
        due_on:
          type: string
          description: The localized day on which this goal is due. This takes a date with format `YYYY-MM-DD`.
          example: '2019-09-15'
          nullable: true
        start_on:
          type: string
          description: The day on which work for this goal begins, or null if the goal has no start date. This takes a date with `YYYY-MM-DD` format, and cannot be set unless there is an accompanying due date.
          example: '2019-09-14'
          nullable: true
        is_workspace_level:
          type: boolean
          description: '*Conditional*. This property is only present when the `workspace` provided is an organization. Whether the goal belongs to the `workspace` (and is listed as part of the workspace’s goals) or not. If it isn’t a workspace-level goal, it is a team-level goal, and is associated with the goal’s team.'
          example: true
        liked:
          type: boolean
          description: True if the goal is liked by the autho

# --- truncated at 32 KB (50 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/asana/refs/heads/main/openapi/asana-goals-api-openapi.yml