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
}
'import requests
url = "https://app.msportal.ai/api/public/v1/goals"
payload = {
"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
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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
})
};
fetch('https://app.msportal.ai/api/public/v1/goals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.msportal.ai/api/public/v1/goals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.msportal.ai/api/public/v1/goals"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"statusId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priorityId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"progressPercentage\": 50,\n \"quarter\": \"<string>\",\n \"year\": 2050\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.msportal.ai/api/public/v1/goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"statusId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priorityId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"progressPercentage\": 50,\n \"quarter\": \"<string>\",\n \"year\": 2050\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.msportal.ai/api/public/v1/goals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"statusId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priorityId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"progressPercentage\": 50,\n \"quarter\": \"<string>\",\n \"year\": 2050\n}"
response = http.request(request)
puts response.read_body{
"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"
}
]
}
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}Goals
Create goal
Create a new goal. The goal will be associated with the specified company.
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
}
'import requests
url = "https://app.msportal.ai/api/public/v1/goals"
payload = {
"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
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
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
})
};
fetch('https://app.msportal.ai/api/public/v1/goals', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.msportal.ai/api/public/v1/goals",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'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
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.msportal.ai/api/public/v1/goals"
payload := strings.NewReader("{\n \"title\": \"<string>\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"statusId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priorityId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"progressPercentage\": 50,\n \"quarter\": \"<string>\",\n \"year\": 2050\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.msportal.ai/api/public/v1/goals")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"statusId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priorityId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"progressPercentage\": 50,\n \"quarter\": \"<string>\",\n \"year\": 2050\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.msportal.ai/api/public/v1/goals")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"<string>\",\n \"companyId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"description\": \"<string>\",\n \"statusId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"priorityId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"categoryId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"dueDate\": \"2023-11-07T05:31:56Z\",\n \"progressPercentage\": 50,\n \"quarter\": \"<string>\",\n \"year\": 2050\n}"
response = http.request(request)
puts response.read_body{
"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"
}
]
}
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}{
"error": "<string>",
"requestId": "<string>",
"details": "<unknown>",
"code": "<string>"
}Authorizations
Use your API key as a Bearer token. API keys can be generated in Settings → Integrations → API Access.
Body
application/json
Goal title (required)
Required string length:
1 - 200Company ID (required)
Goal description
Maximum string length:
5000Status ID
Priority ID
Category ID
Due date (ISO 8601)
Initial progress (0-100)
Required range:
0 <= x <= 100Quarter (e.g., Q1)
Maximum string length:
2Year
Required range:
2000 <= x <= 2100Response
Goal created successfully
Show child attributes
Show child attributes
Was this page helpful?
⌘I