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

# Update a goal

> This endpoint updates a specific goal. This endpoint accepts the optional `MX-Skip-Webhook` header and `skip_webhook parameter`.



## OpenAPI

````yaml openapi/nexus/v1.yaml PUT /goals/{goal_guid}
openapi: 3.0.0
info:
  contact:
    name: Nexus API
    url: https://www.mx.com
  version: 1.0.0
  title: Nexus API
  description: >-
    Legacy clients can use Nexus API for all their connectivity needs. If you
    are a new client refer to our Platform API. Review our [Nexus API
    Guides](/nexus) for more information.
servers:
  - url: https://int-data.moneydesktop.com/
  - url: https://data.moneydesktop.com/
security:
  - sessionToken: []
tags:
  - name: accounts
  - name: beats
  - name: budgets
  - name: categories
  - name: extended transaction history
  - name: goals
  - name: holdings
  - name: identity
  - name: insights
  - name: institutions
  - name: jobs
  - name: member credentials
  - name: members
  - name: merchants
  - name: microdeposits
  - name: monthly cash flow profile
  - name: notifications
  - name: scheduled payments
  - name: sessions
  - name: spending plan
  - name: taggings
  - name: tags
  - name: transaction rules
  - name: transactions
  - name: user
  - name: verification
paths:
  /goals/{goal_guid}:
    put:
      tags:
        - goals
      summary: Update a goal
      description: >-
        This endpoint updates a specific goal. This endpoint accepts the
        optional `MX-Skip-Webhook` header and `skip_webhook parameter`.
      operationId: updateGoal
      parameters:
        - name: goal_guid
          description: The unique identifier for a goal. Defined by MX.
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/vnd.mx.nexus.v1+json:
            schema:
              $ref: '#/components/schemas/UpdateGoalRequestBody'
      responses:
        '200':
          description: OK
          content:
            application/vnd.mx.nexus.v1+json:
              schema:
                $ref: '#/components/schemas/GoalResponseBody'
components:
  schemas:
    UpdateGoalRequestBody:
      properties:
        goal:
          $ref: '#/components/schemas/UpdateGoalRequest'
      type: object
    GoalResponseBody:
      properties:
        goal:
          $ref: '#/components/schemas/GoalResponse'
      type: object
    UpdateGoalRequest:
      properties:
        account_guid:
          type: string
          description: Unique identifier for the goal. Defined by MX.
        amount:
          description: The amount of the goal.
          example: 4500
          type: number
        name:
          description: >-
            The name of the goal that is visible to the user (i.e., "Europe
            Trip", "Savings", "Toyota Tacoma", etc).
          example: Save for Europe.
          type: string
        completed_at:
          description: >-
            Date and time the goal was completed, represented in ISO 8601 format
            with timestamp (e.g. 2015-04-13T12:01:23-00:00).
          example: '2015-06-19T10:37:04-06:00'
          type: string
        has_been_spent:
          description: >-
            If the goal has been spent, this field will be true. Otherwise, this
            field will be false.
          example: false
          type: boolean
        is_complete:
          description: >-
            If the goal is complete, this field will be true. Otherwise, this
            field will be false.
          example: false
          type: boolean
        metadata:
          description: Additional information a partner can store on the goal.
          example: Additional information
          type: string
        position:
          description: The priority of the goal in relation to multiple goals.
          example: 3
          type: integer
        skip_webhook:
          example: true
          description: >-
            When set to true, this parameter will prevent a webhook from being
            triggered by the request.
          type: boolean
        targeted_to_complete_at:
          type: string
          description: >-
            Date and time the goal is to complete, represented in ISO 8601
            format with timestamp (e.g. 2015-04-13T12:01:23-00:00). Intended for
            users to set their own goal completion dates.
    GoalResponse:
      properties:
        account_guid:
          description: Unique identifier for the goal. Defined by MX.
          example: ACT-4e431124-4a29-abf9-f059-ab232ac14dbf
          type: string
        amount:
          description: The amount of the goal.
          example: 4500
          type: number
        goal_type_name:
          description: The type of goal. Can be SAVE_AMOUNT or PAYOFF.
          example: string
          type: string
        meta_type_name:
          description: The category of the goal; see Goal Meta Type for more information.
          example: VACATION
          type: string
        name:
          description: >-
            The name of the goal that is visible to the user (i.e., "Europe
            Trip", "Savings", "Toyota Tacoma", etc).
          example: Save for Europe.
          type: string
        completed_at:
          description: >-
            Date and time the goal was completed, represented in ISO 8601 format
            with timestamp (e.g. 2015-04-13T12:01:23-00:00).
          example: '2015-06-19T10:37:04-06:00'
          type: string
        has_been_spent:
          description: >-
            If the goal has been spent, this field will be true. Otherwise, this
            field will be false.
          example: false
          type: boolean
        is_complete:
          description: >-
            If the goal is complete, this field will be true. Otherwise, this
            field will be false.
          example: false
          type: boolean
        metadata:
          description: Additional information a partner can store on the goal.
          example: Additional information
          type: string
        position:
          description: The priority of the goal in relation to multiple goals.
          example: 3
          type: integer
        track_type_name:
          description: >-
            The track of the goal. Can be `DEBT_TRACK`, `SAVINGS_TRACK`,
            `RETIREMENT_TRACK`, or `EMERGENCY_FUND_TRACK`.
          example: SAVINGS_TRACK
          type: string
  securitySchemes:
    sessionToken:
      description: >
        ### MX Session Token 

        - Request an API token using the read API token endpoint in the MX SSO
        API.

        - Exchange an API token for a session token. 
          - A session token is obtained by sending a POST request to /sessions
          - The session token will be used in each request made for the user. It should be passed in an `MD-SESSION-TOKEN` HTTP header as shown below.
          - This session token is valid for 30 minutes from the time it was created. The 30 minute expiration counter is refreshed with each call.
          - If you send a request with an expired session token you'll receive an error code of `4011`.

        ```

        curl -i https://int-data.moneydesktop.com/accounts \

        -H 'MD-SESSION-TOKEN:
        CWforZl1Vn2vC_v6H4rnQRT1DoWpDouJAV-_5TBmiQRAtA8rsOG_BoajTiOSsL0A3bd-bmHXlA-eQzc9ywItKg'
        \

        -H 'Content-Type: application/vnd.mx.nexus.v1+json' \

        -H 'Accept: application/vnd.mx.nexus.v1+json'

        ```


        In documentation code examples, replace `<API_KEY_VALUE>` with the
        session token.
      type: apiKey
      name: MD-SESSION-TOKEN
      in: header

````