Crear programación
curl --request POST \
--url https://api.linahealthcareplatform.com/api/v1/form-schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formId": "<string>",
"patientId": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"message": "<string>"
}
'import requests
url = "https://api.linahealthcareplatform.com/api/v1/form-schedules"
payload = {
"formId": "<string>",
"patientId": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"message": "<string>"
}
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({
formId: '<string>',
patientId: '<string>',
scheduledAt: '2023-11-07T05:31:56Z',
message: '<string>'
})
};
fetch('https://api.linahealthcareplatform.com/api/v1/form-schedules', 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.linahealthcareplatform.com/api/v1/form-schedules",
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([
'formId' => '<string>',
'patientId' => '<string>',
'scheduledAt' => '2023-11-07T05:31:56Z',
'message' => '<string>'
]),
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.linahealthcareplatform.com/api/v1/form-schedules"
payload := strings.NewReader("{\n \"formId\": \"<string>\",\n \"patientId\": \"<string>\",\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\"\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.linahealthcareplatform.com/api/v1/form-schedules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"formId\": \"<string>\",\n \"patientId\": \"<string>\",\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linahealthcareplatform.com/api/v1/form-schedules")
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 \"formId\": \"<string>\",\n \"patientId\": \"<string>\",\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "sch_def456",
"formId": "form_abc123",
"patientId": "pat_xyz789",
"channel": "whatsapp",
"status": "pending",
"scheduledAt": "2026-05-15T09:00:00Z",
"message": "Hola María, te enviamos tu cuestionario de seguimiento semanal.",
"creditsConsumed": 3,
"createdAt": "2026-05-14T10:00:00Z"
}
Programaciones
Crear programación
Programa el envío de un formulario a un paciente por el canal especificado.
POST
/
form-schedules
Crear programación
curl --request POST \
--url https://api.linahealthcareplatform.com/api/v1/form-schedules \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"formId": "<string>",
"patientId": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"message": "<string>"
}
'import requests
url = "https://api.linahealthcareplatform.com/api/v1/form-schedules"
payload = {
"formId": "<string>",
"patientId": "<string>",
"scheduledAt": "2023-11-07T05:31:56Z",
"message": "<string>"
}
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({
formId: '<string>',
patientId: '<string>',
scheduledAt: '2023-11-07T05:31:56Z',
message: '<string>'
})
};
fetch('https://api.linahealthcareplatform.com/api/v1/form-schedules', 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.linahealthcareplatform.com/api/v1/form-schedules",
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([
'formId' => '<string>',
'patientId' => '<string>',
'scheduledAt' => '2023-11-07T05:31:56Z',
'message' => '<string>'
]),
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.linahealthcareplatform.com/api/v1/form-schedules"
payload := strings.NewReader("{\n \"formId\": \"<string>\",\n \"patientId\": \"<string>\",\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\"\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.linahealthcareplatform.com/api/v1/form-schedules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"formId\": \"<string>\",\n \"patientId\": \"<string>\",\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linahealthcareplatform.com/api/v1/form-schedules")
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 \"formId\": \"<string>\",\n \"patientId\": \"<string>\",\n \"scheduledAt\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "sch_def456",
"formId": "form_abc123",
"patientId": "pat_xyz789",
"channel": "whatsapp",
"status": "pending",
"scheduledAt": "2026-05-15T09:00:00Z",
"message": "Hola María, te enviamos tu cuestionario de seguimiento semanal.",
"creditsConsumed": 3,
"createdAt": "2026-05-14T10:00:00Z"
}
Body
string
required
ID del formulario a enviar.
string
required
ID del paciente destinatario.
string
required
Canal de envío. Valores:
email, sms, whatsapp, app.string
Fecha y hora de envío en formato ISO 8601. Si se omite, se envía inmediatamente.
string
Mensaje personalizado que acompaña al formulario. Si se omite, se usa el mensaje por defecto.
Coste por canal
| Canal | Créditos |
|---|---|
email | 1 |
sms | 2 |
whatsapp | 3 |
app | 0 |
{
"id": "sch_def456",
"formId": "form_abc123",
"patientId": "pat_xyz789",
"channel": "whatsapp",
"status": "pending",
"scheduledAt": "2026-05-15T09:00:00Z",
"message": "Hola María, te enviamos tu cuestionario de seguimiento semanal.",
"creditsConsumed": 3,
"createdAt": "2026-05-14T10:00:00Z"
}
string
Identificador único de la programación con prefijo
sch_.string
Estado de la programación:
pending, sent, failed.integer
Créditos consumidos según el canal seleccionado.
Authorizations
Token JWT obtenido via POST /auth/token
Body
application/json

