Queue a Procare message
curl --request POST \
--url https://{host}/primula/api/v3/procare_messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "office_chat",
"username": "example.user",
"password": "<procare-password>",
"students_ids": [
"33333333-3333-4333-8333-333333333333"
],
"message": "Example reminder."
}
'import requests
url = "https://{host}/primula/api/v3/procare_messages"
payload = {
"type": "office_chat",
"username": "example.user",
"password": "<procare-password>",
"students_ids": ["33333333-3333-4333-8333-333333333333"],
"message": "Example reminder."
}
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({
type: 'office_chat',
username: 'example.user',
password: '<procare-password>',
students_ids: ['33333333-3333-4333-8333-333333333333'],
message: 'Example reminder.'
})
};
fetch('https://{host}/primula/api/v3/procare_messages', 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://{host}/primula/api/v3/procare_messages",
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([
'type' => 'office_chat',
'username' => 'example.user',
'password' => '<procare-password>',
'students_ids' => [
'33333333-3333-4333-8333-333333333333'
],
'message' => 'Example reminder.'
]),
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://{host}/primula/api/v3/procare_messages"
payload := strings.NewReader("{\n \"type\": \"office_chat\",\n \"username\": \"example.user\",\n \"password\": \"<procare-password>\",\n \"students_ids\": [\n \"33333333-3333-4333-8333-333333333333\"\n ],\n \"message\": \"Example reminder.\"\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://{host}/primula/api/v3/procare_messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"office_chat\",\n \"username\": \"example.user\",\n \"password\": \"<procare-password>\",\n \"students_ids\": [\n \"33333333-3333-4333-8333-333333333333\"\n ],\n \"message\": \"Example reminder.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/procare_messages")
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 \"type\": \"office_chat\",\n \"username\": \"example.user\",\n \"password\": \"<procare-password>\",\n \"students_ids\": [\n \"33333333-3333-4333-8333-333333333333\"\n ],\n \"message\": \"Example reminder.\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "example-task-id"
}Procare messages
Queue a Procare message
Queues office_chat or classroom_chat delivery through the configured message service. Requires authentication but does not take company_id or enforce a company/school scope here. HTTP 202 means the task was accepted, not that delivery has finished. Poll the relative URL in Location for status. Non-2xx upstream responses other than 404 become 502.
POST
/
procare_messages
Queue a Procare message
curl --request POST \
--url https://{host}/primula/api/v3/procare_messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"type": "office_chat",
"username": "example.user",
"password": "<procare-password>",
"students_ids": [
"33333333-3333-4333-8333-333333333333"
],
"message": "Example reminder."
}
'import requests
url = "https://{host}/primula/api/v3/procare_messages"
payload = {
"type": "office_chat",
"username": "example.user",
"password": "<procare-password>",
"students_ids": ["33333333-3333-4333-8333-333333333333"],
"message": "Example reminder."
}
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({
type: 'office_chat',
username: 'example.user',
password: '<procare-password>',
students_ids: ['33333333-3333-4333-8333-333333333333'],
message: 'Example reminder.'
})
};
fetch('https://{host}/primula/api/v3/procare_messages', 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://{host}/primula/api/v3/procare_messages",
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([
'type' => 'office_chat',
'username' => 'example.user',
'password' => '<procare-password>',
'students_ids' => [
'33333333-3333-4333-8333-333333333333'
],
'message' => 'Example reminder.'
]),
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://{host}/primula/api/v3/procare_messages"
payload := strings.NewReader("{\n \"type\": \"office_chat\",\n \"username\": \"example.user\",\n \"password\": \"<procare-password>\",\n \"students_ids\": [\n \"33333333-3333-4333-8333-333333333333\"\n ],\n \"message\": \"Example reminder.\"\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://{host}/primula/api/v3/procare_messages")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"type\": \"office_chat\",\n \"username\": \"example.user\",\n \"password\": \"<procare-password>\",\n \"students_ids\": [\n \"33333333-3333-4333-8333-333333333333\"\n ],\n \"message\": \"Example reminder.\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/primula/api/v3/procare_messages")
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 \"type\": \"office_chat\",\n \"username\": \"example.user\",\n \"password\": \"<procare-password>\",\n \"students_ids\": [\n \"33333333-3333-4333-8333-333333333333\"\n ],\n \"message\": \"Example reminder.\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "example-task-id"
}Authorizations
Access token issued by POST /sessions and associated with a valid server-side session.
Body
application/json
Create Procare Message Request.
Case-insensitive; surrounding whitespace is ignored.
Available options:
office_chat, classroom_chat Minimum array length:
1Lead id.
Minimum string length:
1Procare username forwarded to the message service; not required by the V3 handler.
Procare password forwarded to the message service; not required by the V3 handler.
Response
Successful response.
Procare Message Created.