Update a block
using System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Patch, RequestUri = new Uri("https://api.koibox.cloud/api/bloqueos/1/"), Headers = { { "X-Koibox-Key", "<X-Koibox-Key>" }, }, Content = new StringContent("{ \"user\": 1, \"centro\": 1, \"fecha\": \"2026-04-15\", \"hora_inicio\": \"example\", \"hora_fin\": \"example\", \"titulo\": \"example\", \"recurrencia\": \"none\", \"is_online\": true }") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}HttpRequest request = HttpRequest.newBuilder() .uri(URI.create("https://api.koibox.cloud/api/bloqueos/1/")) .header("X-Koibox-Key", "<X-Koibox-Key>") .header("Content-Type", "application/json") .method("PATCH", HttpRequest.BodyPublishers.ofString("{ \"user\": 1, \"centro\": 1, \"fecha\": \"2026-04-15\", \"hora_inicio\": \"example\", \"hora_fin\": \"example\", \"titulo\": \"example\", \"recurrencia\": \"none\", \"is_online\": true }")) .build();HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());System.out.println(response.body());OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{ \"user\": 1, \"centro\": 1, \"fecha\": \"2026-04-15\", \"hora_inicio\": \"example\", \"hora_fin\": \"example\", \"titulo\": \"example\", \"recurrencia\": \"none\", \"is_online\": true }");Request request = new Request.Builder() .url("https://api.koibox.cloud/api/bloqueos/1/") .patch(body) .addHeader("X-Koibox-Key", "<X-Koibox-Key>") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();import axios from 'axios';
const options = { method: 'PATCH', url: 'https://api.koibox.cloud/api/bloqueos/1/', headers: {'X-Koibox-Key': '<X-Koibox-Key>', 'Content-Type': 'application/json'}, data: { user: 1, centro: 1, fecha: '2026-04-15', hora_inicio: 'example', hora_fin: 'example', titulo: 'example', recurrencia: 'none', is_online: true }};
try { const { data } = await axios.request(options); console.log(data);} catch (error) { console.error(error);}const url = 'https://api.koibox.cloud/api/bloqueos/1/';const options = { method: 'PATCH', headers: {'X-Koibox-Key': '<X-Koibox-Key>', 'Content-Type': 'application/json'}, body: '{"user":1,"centro":1,"fecha":"2026-04-15","hora_inicio":"example","hora_fin":"example","titulo":"example","recurrencia":"none","is_online":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PATCH \ --url https://api.koibox.cloud/api/bloqueos/1/ \ --header 'Content-Type: application/json' \ --header 'X-Koibox-Key: <X-Koibox-Key>' \ --data '{ "user": 1, "centro": 1, "fecha": "2026-04-15", "hora_inicio": "example", "hora_fin": "example", "titulo": "example", "recurrencia": "none", "is_online": true }'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Request Body
Section titled “Request Body”object
Read-only
Read-only
Read-only
ID of the creator user, read-only
ID of the user affected by the block
Date of the block, expected in the center’s time zone
How often the block repeats, day_1___ == every day
Determines if the block affects online reservations. Required if appointment is not null
Online appointment that created the block. Required if is_online is true
Full name of the employee, read-only
Read-only
Responses
Section titled “Responses”The modified block
object
Read-only
Read-only
Read-only
ID of the creator user, read-only
ID of the user affected by the block
Date of the block, expected in the center’s time zone
How often the block repeats, day_1___ == every day
Determines if the block affects online reservations. Required if appointment is not null
Online appointment that created the block. Required if is_online is true
Full name of the employee, read-only
Read-only
The access key has not been provided in the X-Koibox-Key header
Headers
Section titled “Headers”Indicates the required header for authentication
No valid access key has been provided
The resource was not found
