> ## 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.

# Reposition goals

>  

This endpoint repositions goal priority levels. If one goal is set to a lower priority, then any other goals need to be adjusted accordingly.


## OpenAPI

````yaml openapi/nexus/v1.yaml PUT /goals/reposition
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/reposition:
    put:
      tags:
        - goals
      summary: Reposition goals
      description: >-
        This endpoint repositions goal priority levels. If one goal is set to a
        lower priority, then any other goals need to be adjusted accordingly.
      operationId: repositionGoals
      requestBody:
        required: true
        content:
          application/vnd.mx.nexus.v1+json:
            schema:
              $ref: '#/components/schemas/RepositionRequestBody'
      responses:
        '200':
          description: OK
          content:
            application/vnd.mx.nexus.v1+json:
              schema:
                $ref: '#/components/schemas/RepositionResponseBody'
components:
  schemas:
    RepositionRequestBody:
      properties:
        goals:
          items:
            $ref: '#/components/schemas/RepositionRequest'
          type: array
      type: object
    RepositionResponseBody:
      properties:
        goal:
          $ref: '#/components/schemas/GoalsResponse'
      type: object
    RepositionRequest:
      properties:
        guid:
          description: The unique identifier for the goal. Defined by MX.
          example: GOL-97665947-235c-b213-ca25-8cf0174774f5
          type: string
        position:
          description: The priority of the goal in relation to multiple goals.
          example: 1
          type: integer
      required:
        - guid
        - position
    GoalsResponse:
      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
        current_amount:
          description: The current amount of the goal.
          example: 1651.27
          type: number
        guid:
          description: Unique identifier for the goal. Defined by MX.
          example: GOL-524ca5db-a2d5-44f3-b048-16de16059024
          type: string
        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
        projected_to_complete_at:
          description: >-
            Date and time the goal is projected to be completed, represented in
            ISO 8601 format with timestamp (e.g. 2015-04-13T12:01:23-00:00).
          example: '2022-06-14T16:03:53.000Z'
          type: string
        user_guid:
          description: >-
            Unique identifier for the user the goal is attached to. Defined by
            MX.
          example: USR-11141024-90b3-1bce-cac9-c06ced52ab4c
          type: string
        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

````