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

# Create a goal

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



## OpenAPI

````yaml openapi/platform-api/v20111101.yaml POST /users/{user_guid}/goals
openapi: 3.0.0
info:
  contact:
    name: MX Platform API
    url: https://www.mx.com/products/platform-api
  description: >
    The MX Platform API is a powerful, fully-featured API designed to make
    aggregating and enhancing financial data easy and reliable. It can
    seamlessly connect your app or website to tens of thousands of financial
    institutions.
  title: MX Platform API
  version: '20111101'
servers:
  - url: https://int-api.mx.com
  - url: https://api.mx.com
security:
  - basicAuth: []
tags:
  - name: authorization
  - name: widgets
  - name: users
  - name: members
  - name: institutions
  - name: accounts
  - name: transactions
  - name: microdeposits
  - name: managed data
  - name: transaction rules
  - name: statements
  - name: merchants
  - name: categories
  - name: insights
  - name: investment holdings
  - name: spending plan
  - name: goals
  - name: budgets
  - name: monthly cash flow profile
  - name: notifications
  - name: taggings
  - name: tags
  - name: deprecated
  - name: processor token
  - name: verifiable credentials
  - name: rewards
  - name: ach return
paths:
  /users/{user_guid}/goals:
    post:
      tags:
        - goals
      summary: Create a goal
      description: >-
        Create a goal. This endpoint accepts the optional `MX-Skip-Webhook`
        header and `skip_webhook` parameter.
      operationId: createGoal
      parameters:
        - $ref: '#/components/parameters/userGuid'
      requestBody:
        required: true
        content:
          application/vnd.mx.api.v1+json:
            schema:
              $ref: '#/components/schemas/GoalRequestBody'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GoalResponseBody'
components:
  parameters:
    userGuid:
      description: The unique identifier for a `user`, beginning with the prefix `USR-`.
      example: USR-fa7537f3-48aa-a683-a02a-b18940482f54
      in: path
      name: user_guid
      required: true
      schema:
        type: string
  schemas:
    GoalRequestBody:
      properties:
        goal:
          $ref: '#/components/schemas/GoalRequest'
      type: object
    GoalResponseBody:
      properties:
        goal:
          $ref: '#/components/schemas/GoalResponse'
      type: object
    GoalRequest:
      properties:
        account_guid:
          description: Unique identifier of the account for the goal.
          example: ACT-4e431124-4a29-abf9-f059-ab232ac14dbf
          type: string
        amount:
          description: Amount of the goal.
          example: 4500.5
          type: number
        goal_type_name:
          description: The goal type.
          example: PAYOFF
          type: string
        meta_type_name:
          description: The category of the goal.
          example: VACATION
          type: string
        name:
          description: The name of the goal.
          example: Save for Europe
          type: string
        completed_at:
          description: Date and time the goal was completed.
          example: '2015-06-19T10:37:04-06:00'
          type: string
        has_been_spent:
          description: Determines if the goal has been spent.
          example: false
          type: boolean
        is_complete:
          description: Determines if the goal is complete.
          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
        targeted_to_complete_at:
          description: >-
            Date and time the goal is to complete. Intended for users to set
            their own goal completion dates.
          example: '2026-12-08 00:00:00.000000'
          type: string
      required:
        - account_guid
        - amount
        - goal_type_name
        - meta_type_name
        - name
      type: object
    GoalResponse:
      properties:
        account_guid:
          description: Unique identifier of the account for the goal.
          example: ACT-4e431124-4a29-abf9-f059-ab232ac14dbf
          type: string
        amount:
          description: Amount of the goal.
          example: 4500
          type: number
        completed_at:
          description: Date and time the goal was completed.
          example: '2015-06-19T10:37:04-06:00'
          type: string
        current_amount:
          description: The current amount of the goal.
          example: 1651.27
          type: number
        goal_type_name:
          description: The goal type.
          example: PAYOFF
          type: string
        guid:
          description: Unique identifier for the goal. Defined by MX.
          example: GOL-f223463-4355-48d0-rce7-fe2rb345617c
          type: string
        has_been_spent:
          description: Determines if the goal has been spent.
          example: false
          type: boolean
        is_complete:
          description: Determines if the goal is complete.
          example: false
          type: boolean
        metadata:
          description: Additional information a partner can store on the goal.
          example: Additional information
          type: string
        meta_type_name:
          description: The category of the goal.
          example: VACATION
          type: string
        name:
          description: The name of the goal.
          example: Save for Europe
          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.
          example: '2022-06-14T16:03:53-00:00'
          type: string
        targeted_to_complete_at:
          description: >-
            Date and time the goal is to complete. Intended for users to set
            their own goal completion dates.
          example: '2026-12-08 00:00:00.000000'
          type: string
        track_type_name:
          example: Track Type Name
          type: string
        user_guid:
          description: The unique identifier for the the user. Defined by MX.
          example: USR-11141024-90b3-1bce-cac9-c06ced52ab4c
          type: string
  securitySchemes:
    basicAuth:
      scheme: basic
      type: http

````