Skip to main content
POST
/
api
/
public
/
v1
/
goals
Create goal
curl --request POST \
  --url https://app.msportal.ai/api/public/v1/goals \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "description": "<string>",
  "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.

Body

application/json
title
string
required

Goal title (required)

Required string length: 1 - 200
companyId
string<uuid>
required

Company ID (required)

description
string

Goal description

Maximum string length: 5000
statusId
string<uuid>

Status ID

priorityId
string<uuid>

Priority ID

categoryId
string<uuid>

Category ID

dueDate
string<date-time>

Due date (ISO 8601)

progressPercentage
number

Initial progress (0-100)

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

Quarter (e.g., Q1)

Maximum string length: 2
year
number

Year

Required range: 2000 <= x <= 2100

Response

Goal created successfully

data
object
required