Save
curl --request POST \
--url https://api-staging.genuka.com/2023-11/admin/availabilities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"availabilities": [
{
"day_of_week": 1,
"end_time": "12:00",
"start_time": "08:00"
},
{
"day_of_week": 1,
"end_time": "18:00",
"start_time": "14:00"
}
],
"user_id": "01k7ee7anat9j4bn5v71v70qck"
}
'import requests
url = "https://api-staging.genuka.com/2023-11/admin/availabilities"
payload = {
"availabilities": [
{
"day_of_week": 1,
"end_time": "12:00",
"start_time": "08:00"
},
{
"day_of_week": 1,
"end_time": "18:00",
"start_time": "14:00"
}
],
"user_id": "01k7ee7anat9j4bn5v71v70qck"
}
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({
availabilities: [
{day_of_week: 1, end_time: '12:00', start_time: '08:00'},
{day_of_week: 1, end_time: '18:00', start_time: '14:00'}
],
user_id: '01k7ee7anat9j4bn5v71v70qck'
})
};
fetch('https://api-staging.genuka.com/2023-11/admin/availabilities', 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-staging.genuka.com/2023-11/admin/availabilities",
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([
'availabilities' => [
[
'day_of_week' => 1,
'end_time' => '12:00',
'start_time' => '08:00'
],
[
'day_of_week' => 1,
'end_time' => '18:00',
'start_time' => '14:00'
]
],
'user_id' => '01k7ee7anat9j4bn5v71v70qck'
]),
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-staging.genuka.com/2023-11/admin/availabilities"
payload := strings.NewReader("{\n \"availabilities\": [\n {\n \"day_of_week\": 1,\n \"end_time\": \"12:00\",\n \"start_time\": \"08:00\"\n },\n {\n \"day_of_week\": 1,\n \"end_time\": \"18:00\",\n \"start_time\": \"14:00\"\n }\n ],\n \"user_id\": \"01k7ee7anat9j4bn5v71v70qck\"\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://api-staging.genuka.com/2023-11/admin/availabilities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"availabilities\": [\n {\n \"day_of_week\": 1,\n \"end_time\": \"12:00\",\n \"start_time\": \"08:00\"\n },\n {\n \"day_of_week\": 1,\n \"end_time\": \"18:00\",\n \"start_time\": \"14:00\"\n }\n ],\n \"user_id\": \"01k7ee7anat9j4bn5v71v70qck\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.genuka.com/2023-11/admin/availabilities")
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 \"availabilities\": [\n {\n \"day_of_week\": 1,\n \"end_time\": \"12:00\",\n \"start_time\": \"08:00\"\n },\n {\n \"day_of_week\": 1,\n \"end_time\": \"18:00\",\n \"start_time\": \"14:00\"\n }\n ],\n \"user_id\": \"01k7ee7anat9j4bn5v71v70qck\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-13T09:34:03.000000Z",
"day_of_week": 1,
"end_time": "12:00:00",
"id": "01k7eepy93kbjx5wq2rdp1sxgm",
"metadata": null,
"start_time": "08:00:00",
"timezone": "UTC",
"updated_at": "2025-10-13T09:34:03.000000Z",
"user_id": "01k7ee7anat9j4bn5v71v70qck"
},
{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-13T09:34:03.000000Z",
"day_of_week": 1,
"end_time": "18:00:00",
"id": "01k7eepy9a7rxjt1vkebybhr33",
"metadata": null,
"start_time": "14:00:00",
"timezone": "UTC",
"updated_at": "2025-10-13T09:34:03.000000Z",
"user_id": "01k7ee7anat9j4bn5v71v70qck"
}
],
"message": "Availabilities created successfully",
"status": true
}Availabilities
Create user availabilities
Creates new availability slots for a user. By default, when a user is created, availabilities from Monday to Friday, 08:00–16:00 UTC are automatically added. This endpoint allows adding or customizing additional availability periods for the user.
POST
/
2023-11
/
admin
/
availabilities
Save
curl --request POST \
--url https://api-staging.genuka.com/2023-11/admin/availabilities \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"availabilities": [
{
"day_of_week": 1,
"end_time": "12:00",
"start_time": "08:00"
},
{
"day_of_week": 1,
"end_time": "18:00",
"start_time": "14:00"
}
],
"user_id": "01k7ee7anat9j4bn5v71v70qck"
}
'import requests
url = "https://api-staging.genuka.com/2023-11/admin/availabilities"
payload = {
"availabilities": [
{
"day_of_week": 1,
"end_time": "12:00",
"start_time": "08:00"
},
{
"day_of_week": 1,
"end_time": "18:00",
"start_time": "14:00"
}
],
"user_id": "01k7ee7anat9j4bn5v71v70qck"
}
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({
availabilities: [
{day_of_week: 1, end_time: '12:00', start_time: '08:00'},
{day_of_week: 1, end_time: '18:00', start_time: '14:00'}
],
user_id: '01k7ee7anat9j4bn5v71v70qck'
})
};
fetch('https://api-staging.genuka.com/2023-11/admin/availabilities', 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-staging.genuka.com/2023-11/admin/availabilities",
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([
'availabilities' => [
[
'day_of_week' => 1,
'end_time' => '12:00',
'start_time' => '08:00'
],
[
'day_of_week' => 1,
'end_time' => '18:00',
'start_time' => '14:00'
]
],
'user_id' => '01k7ee7anat9j4bn5v71v70qck'
]),
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-staging.genuka.com/2023-11/admin/availabilities"
payload := strings.NewReader("{\n \"availabilities\": [\n {\n \"day_of_week\": 1,\n \"end_time\": \"12:00\",\n \"start_time\": \"08:00\"\n },\n {\n \"day_of_week\": 1,\n \"end_time\": \"18:00\",\n \"start_time\": \"14:00\"\n }\n ],\n \"user_id\": \"01k7ee7anat9j4bn5v71v70qck\"\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://api-staging.genuka.com/2023-11/admin/availabilities")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"availabilities\": [\n {\n \"day_of_week\": 1,\n \"end_time\": \"12:00\",\n \"start_time\": \"08:00\"\n },\n {\n \"day_of_week\": 1,\n \"end_time\": \"18:00\",\n \"start_time\": \"14:00\"\n }\n ],\n \"user_id\": \"01k7ee7anat9j4bn5v71v70qck\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.genuka.com/2023-11/admin/availabilities")
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 \"availabilities\": [\n {\n \"day_of_week\": 1,\n \"end_time\": \"12:00\",\n \"start_time\": \"08:00\"\n },\n {\n \"day_of_week\": 1,\n \"end_time\": \"18:00\",\n \"start_time\": \"14:00\"\n }\n ],\n \"user_id\": \"01k7ee7anat9j4bn5v71v70qck\"\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-13T09:34:03.000000Z",
"day_of_week": 1,
"end_time": "12:00:00",
"id": "01k7eepy93kbjx5wq2rdp1sxgm",
"metadata": null,
"start_time": "08:00:00",
"timezone": "UTC",
"updated_at": "2025-10-13T09:34:03.000000Z",
"user_id": "01k7ee7anat9j4bn5v71v70qck"
},
{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-13T09:34:03.000000Z",
"day_of_week": 1,
"end_time": "18:00:00",
"id": "01k7eepy9a7rxjt1vkebybhr33",
"metadata": null,
"start_time": "14:00:00",
"timezone": "UTC",
"updated_at": "2025-10-13T09:34:03.000000Z",
"user_id": "01k7ee7anat9j4bn5v71v70qck"
}
],
"message": "Availabilities created successfully",
"status": true
}With Genuka sdk
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Example:
"{{companyId}}"
Body
application/json
Response
201 - application/json
200
Show child attributes
Show child attributes
Example:
[
{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-13T09:34:03.000000Z",
"day_of_week": 1,
"end_time": "12:00:00",
"id": "01k7eepy93kbjx5wq2rdp1sxgm",
"metadata": null,
"start_time": "08:00:00",
"timezone": "UTC",
"updated_at": "2025-10-13T09:34:03.000000Z",
"user_id": "01k7ee7anat9j4bn5v71v70qck"
},
{
"company_id": "01hqydxwtxdj3kmzp3bz7jk73g",
"created_at": "2025-10-13T09:34:03.000000Z",
"day_of_week": 1,
"end_time": "18:00:00",
"id": "01k7eepy9a7rxjt1vkebybhr33",
"metadata": null,
"start_time": "14:00:00",
"timezone": "UTC",
"updated_at": "2025-10-13T09:34:03.000000Z",
"user_id": "01k7ee7anat9j4bn5v71v70qck"
}
]
Example:
"Availabilities created successfully"
Example:
true
⌘I
