WorkspaceOnboarding
Create a company's onboarding from its draft
Show the company its Setup: the draft onboarding becomes the one the company’s admins see, with its tasks computed from the facts, and Primo’s weekly Setup email starts. Fill the facts with updateCompanyOnboardingFacts first: the company sees its Setup at once, and it cannot go back to a draft. Answers 409 when the onboarding was already created, or for a company that is not activated yet. Only accessible with a Workspace API key or through the Workspace MCP.
POST
/
workspace
/
companies
/
{companyId}
/
onboarding
/
create
Create a company's onboarding from its draft
curl --request POST \
--url https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create', 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://api.getprimo.com/workspace/companies/{companyId}/onboarding/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"started": true,
"draft": true,
"completedAt": "2023-11-07T05:31:56Z",
"facts": {
"devices": {
"value": {
"platforms": [
{
"platform": "MACOS",
"count": 4503599627370495,
"managedByPrimo": true
}
],
"totalCount": 4503599627370495
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"currentMdm": {
"value": {
"entries": [
{
"platform": "MACOS",
"vendor": "NONE",
"otherName": "<string>"
}
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"hris": {
"value": {
"entries": [
{
"name": "<string>",
"komboToolId": "<string>",
"countryCode": "<string>"
}
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"emailProviders": {
"value": {
"entries": [
{
"provider": "GOOGLE_WORKSPACE",
"countryCode": "<string>"
}
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"chat": {
"value": {
"tool": "SLACK",
"otherName": "<string>"
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"edr": {
"value": {
"vendor": "NONE",
"otherName": "<string>",
"managedBy": "PRIMO"
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"currentEdr": {
"value": {
"vendor": "NONE",
"otherName": "<string>",
"managedBy": "IT_TEAM"
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"buysDevices": {
"value": {
"throughPrimo": true,
"countryCodes": [
"<string>"
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"admins": {
"value": {
"people": [
{
"name": "<string>",
"email": "<string>"
}
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
}
},
"sections": [
{
"product": "CORE_PLATFORM",
"done": 0,
"total": 0
}
],
"upNext": [
{
"key": "<string>",
"item": "<string>",
"status": "TODO"
}
]
}Key: Write
Scope: Workspace
Authorizations
Response
default - application/json
When every Setup task was done or skipped; null while one is open
Pattern:
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$⌘I
Create a company's onboarding from its draft
curl --request POST \
--url https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create', 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://api.getprimo.com/workspace/companies/{companyId}/onboarding/create",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getprimo.com/workspace/companies/{companyId}/onboarding/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"started": true,
"draft": true,
"completedAt": "2023-11-07T05:31:56Z",
"facts": {
"devices": {
"value": {
"platforms": [
{
"platform": "MACOS",
"count": 4503599627370495,
"managedByPrimo": true
}
],
"totalCount": 4503599627370495
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"currentMdm": {
"value": {
"entries": [
{
"platform": "MACOS",
"vendor": "NONE",
"otherName": "<string>"
}
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"hris": {
"value": {
"entries": [
{
"name": "<string>",
"komboToolId": "<string>",
"countryCode": "<string>"
}
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"emailProviders": {
"value": {
"entries": [
{
"provider": "GOOGLE_WORKSPACE",
"countryCode": "<string>"
}
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"chat": {
"value": {
"tool": "SLACK",
"otherName": "<string>"
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"edr": {
"value": {
"vendor": "NONE",
"otherName": "<string>",
"managedBy": "PRIMO"
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"currentEdr": {
"value": {
"vendor": "NONE",
"otherName": "<string>",
"managedBy": "IT_TEAM"
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"buysDevices": {
"value": {
"throughPrimo": true,
"countryCodes": [
"<string>"
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
},
"admins": {
"value": {
"people": [
{
"name": "<string>",
"email": "<string>"
}
]
},
"known": true,
"source": "DEAL",
"updatedAt": "2023-11-07T05:31:56Z",
"updatedBy": "<string>"
}
},
"sections": [
{
"product": "CORE_PLATFORM",
"done": 0,
"total": 0
}
],
"upNext": [
{
"key": "<string>",
"item": "<string>",
"status": "TODO"
}
]
}