# Janela recorrente em dias úteis
curl -X POST "https://app.talkover.ai/api/v1/calendars/calendar-uuid-1/availability-rules" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00"
}'
# Exceção de feriado (bloquear 25 de dezembro)
curl -X POST "https://app.talkover.ai/api/v1/calendars/calendar-uuid-1/availability-rules" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{ "type": "exception", "date": "2024-12-25", "available": false }'
{
"success": true,
"data": {
"id": "rule-uuid-1",
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00"
}
}
Disponibilidade
Criar Regra de Disponibilidade
Adicionar uma regra de disponibilidade recorrente ou de exceção
POST
/
api
/
v1
/
calendars
/
{calendar_id}
/
availability-rules
# Janela recorrente em dias úteis
curl -X POST "https://app.talkover.ai/api/v1/calendars/calendar-uuid-1/availability-rules" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00"
}'
# Exceção de feriado (bloquear 25 de dezembro)
curl -X POST "https://app.talkover.ai/api/v1/calendars/calendar-uuid-1/availability-rules" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{ "type": "exception", "date": "2024-12-25", "available": false }'
{
"success": true,
"data": {
"id": "rule-uuid-1",
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00"
}
}
Criar Regra de Disponibilidade
Adicionar uma regra de disponibilidade (janela recorrente ou data de exceção) a um calendário.Endpoint
POST /api/v1/calendars/{calendar_id}/availability-rules
Parâmetros de caminho
Cabeçalhos da requisição
Corpo da requisição
Quando type: "recurring"
Quando type: "exception"
Indica se essa data está disponível (sobrescreve regras recorrentes) ou bloqueada.
Exemplos
# Janela recorrente em dias úteis
curl -X POST "https://app.talkover.ai/api/v1/calendars/calendar-uuid-1/availability-rules" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00"
}'
# Exceção de feriado (bloquear 25 de dezembro)
curl -X POST "https://app.talkover.ai/api/v1/calendars/calendar-uuid-1/availability-rules" \
-H "Authorization: Bearer talq_your_environment_token_here" \
-H "Content-Type: application/json" \
-d '{ "type": "exception", "date": "2024-12-25", "available": false }'
Resposta
{
"success": true,
"data": {
"id": "rule-uuid-1",
"type": "recurring",
"days_of_week": [1, 2, 3, 4, 5],
"start_time": "09:00",
"end_time": "17:00"
}
}
Esta página foi útil?