Set your injection plan
curl --request PUT \
--url https://api.hi-doctor.ai/v1/users/journal/injection-plan/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"medication": "semaglutide",
"anchor_weekday": 0,
"preferred_time": "morning",
"starts_on": "2026-05-25",
"active": true
}
'import requests
url = "https://api.hi-doctor.ai/v1/users/journal/injection-plan/"
payload = {
"medication": "semaglutide",
"anchor_weekday": 0,
"preferred_time": "morning",
"starts_on": "2026-05-25",
"active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
medication: 'semaglutide',
anchor_weekday: 0,
preferred_time: 'morning',
starts_on: '2026-05-25',
active: true
})
};
fetch('https://api.hi-doctor.ai/v1/users/journal/injection-plan/', 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.hi-doctor.ai/v1/users/journal/injection-plan/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'medication' => 'semaglutide',
'anchor_weekday' => 0,
'preferred_time' => 'morning',
'starts_on' => '2026-05-25',
'active' => true
]),
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://api.hi-doctor.ai/v1/users/journal/injection-plan/"
payload := strings.NewReader("{\n \"medication\": \"semaglutide\",\n \"anchor_weekday\": 0,\n \"preferred_time\": \"morning\",\n \"starts_on\": \"2026-05-25\",\n \"active\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.hi-doctor.ai/v1/users/journal/injection-plan/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"medication\": \"semaglutide\",\n \"anchor_weekday\": 0,\n \"preferred_time\": \"morning\",\n \"starts_on\": \"2026-05-25\",\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hi-doctor.ai/v1/users/journal/injection-plan/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"medication\": \"semaglutide\",\n \"anchor_weekday\": 0,\n \"preferred_time\": \"morning\",\n \"starts_on\": \"2026-05-25\",\n \"active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "0a1b2c3d-4e5f-4a6b-8c9d-000000000007",
"created_at": "2026-08-02T06:57:53.529496Z",
"updated_at": "2026-08-02T11:43:49.841591Z",
"medication": "semaglutide",
"anchor_weekday": 0,
"preferred_time": "morning",
"starts_on": "2026-05-25",
"active": true
}{
"weight_kg": [
"A valid number is required."
]
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid"
}
]
}Progress
Set your injection plan
Full replace. Read and merge before writing, or omitted fields are cleared.
PUT
/
v1
/
users
/
journal
/
injection-plan
/
Set your injection plan
curl --request PUT \
--url https://api.hi-doctor.ai/v1/users/journal/injection-plan/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"medication": "semaglutide",
"anchor_weekday": 0,
"preferred_time": "morning",
"starts_on": "2026-05-25",
"active": true
}
'import requests
url = "https://api.hi-doctor.ai/v1/users/journal/injection-plan/"
payload = {
"medication": "semaglutide",
"anchor_weekday": 0,
"preferred_time": "morning",
"starts_on": "2026-05-25",
"active": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
medication: 'semaglutide',
anchor_weekday: 0,
preferred_time: 'morning',
starts_on: '2026-05-25',
active: true
})
};
fetch('https://api.hi-doctor.ai/v1/users/journal/injection-plan/', 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.hi-doctor.ai/v1/users/journal/injection-plan/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'medication' => 'semaglutide',
'anchor_weekday' => 0,
'preferred_time' => 'morning',
'starts_on' => '2026-05-25',
'active' => true
]),
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://api.hi-doctor.ai/v1/users/journal/injection-plan/"
payload := strings.NewReader("{\n \"medication\": \"semaglutide\",\n \"anchor_weekday\": 0,\n \"preferred_time\": \"morning\",\n \"starts_on\": \"2026-05-25\",\n \"active\": true\n}")
req, _ := http.NewRequest("PUT", 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.put("https://api.hi-doctor.ai/v1/users/journal/injection-plan/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"medication\": \"semaglutide\",\n \"anchor_weekday\": 0,\n \"preferred_time\": \"morning\",\n \"starts_on\": \"2026-05-25\",\n \"active\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hi-doctor.ai/v1/users/journal/injection-plan/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"medication\": \"semaglutide\",\n \"anchor_weekday\": 0,\n \"preferred_time\": \"morning\",\n \"starts_on\": \"2026-05-25\",\n \"active\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "0a1b2c3d-4e5f-4a6b-8c9d-000000000007",
"created_at": "2026-08-02T06:57:53.529496Z",
"updated_at": "2026-08-02T11:43:49.841591Z",
"medication": "semaglutide",
"anchor_weekday": 0,
"preferred_time": "morning",
"starts_on": "2026-05-25",
"active": true
}{
"weight_kg": [
"A valid number is required."
]
}{
"detail": "Given token not valid for any token type",
"code": "token_not_valid",
"messages": [
{
"token_class": "AccessToken",
"token_type": "access",
"message": "Token is invalid"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Maximum string length:
64Available options:
morning, afternoon, evening Required range:
0 <= x <= 6⌘I