Skip to main content
PATCH
/
api
/
public
/
v1
/
goals
/
{id}
Update goal
curl --request PATCH \
  --url https://app.msportal.ai/api/public/v1/goals/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "description": "<string>",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "statusId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "priorityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "categoryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "dueDate": "2023-11-07T05:31:56Z",
  "progressPercentage": 50,
  "quarter": "<string>",
  "year": 2050
}
'
{
  "data": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "title": "<string>",
    "description": "<string>",
    "dueDate": "2023-11-07T05:31:56Z",
    "progressPercentage": 50,
    "quarter": "<string>",
    "year": 123,
    "company": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "status": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "priority": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "category": {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>"
    },
    "createdAt": "2023-11-07T05:31:56Z",
    "updatedAt": "2023-11-07T05:31:56Z",
    "tasks": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "title": "<string>",
        "description": "<string>",
        "isCompleted": true,
        "dueDate": "2023-11-07T05:31:56Z",
        "createdAt": "2023-11-07T05:31:56Z"
      }
    ],
    "updates": [
      {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "updateText": "<string>",
        "progressPercentage": 123,
        "createdAt": "2023-11-07T05:31:56Z"
      }
    ]
  }
}

Authorizations

Authorization
string
header
required

Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.

Path Parameters

id
string<uuid>
required

Goal ID

Body

application/json
title
string

Goal title

Required string length: 1 - 200
description
string | null

Goal description

Maximum string length: 5000
companyId
string<uuid>

Company ID

statusId
string<uuid> | null

Status ID (null to clear)

priorityId
string<uuid> | null

Priority ID (null to clear)

categoryId
string<uuid> | null

Category ID (null to clear)

dueDate
string<date-time> | null

Due date (null to clear)

progressPercentage
number

Progress (0-100)

Required range: 0 <= x <= 100
quarter
string | null

Quarter (null to clear)

Maximum string length: 2
year
number | null

Year (null to clear)

Required range: 2000 <= x <= 2100

Response

Goal updated successfully

data
object
required