curl --request PATCH \
--url https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"starts_at": "2023-11-07T05:31:56Z",
"duration_minutes": 247,
"mentor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"capacity": 250,
"meeting_url": "<string>",
"record": true,
"summary": "<string>",
"cancelled": true,
"cancel_reason": "<string>"
}
'import requests
url = "https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}"
payload = {
"starts_at": "2023-11-07T05:31:56Z",
"duration_minutes": 247,
"mentor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"capacity": 250,
"meeting_url": "<string>",
"record": True,
"summary": "<string>",
"cancelled": True,
"cancel_reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
starts_at: '2023-11-07T05:31:56Z',
duration_minutes: 247,
mentor_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
capacity: 250,
meeting_url: '<string>',
record: true,
summary: '<string>',
cancelled: true,
cancel_reason: '<string>'
})
};
fetch('https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}', 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.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'starts_at' => '2023-11-07T05:31:56Z',
'duration_minutes' => 247,
'mentor_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'capacity' => 250,
'meeting_url' => '<string>',
'record' => true,
'summary' => '<string>',
'cancelled' => true,
'cancel_reason' => '<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.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}"
payload := strings.NewReader("{\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"duration_minutes\": 247,\n \"mentor_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"capacity\": 250,\n \"meeting_url\": \"<string>\",\n \"record\": true,\n \"summary\": \"<string>\",\n \"cancelled\": true,\n \"cancel_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"duration_minutes\": 247,\n \"mentor_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"capacity\": 250,\n \"meeting_url\": \"<string>\",\n \"record\": true,\n \"summary\": \"<string>\",\n \"cancelled\": true,\n \"cancel_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"duration_minutes\": 247,\n \"mentor_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"capacity\": 250,\n \"meeting_url\": \"<string>\",\n \"record\": true,\n \"summary\": \"<string>\",\n \"cancelled\": true,\n \"cancel_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"session": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mentorship_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mentorship_name": "<string>",
"format": "individual",
"status": "upcoming",
"capacity": 123,
"attendees_count": 123,
"consumes_credit": true,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"meeting": "room",
"record": true,
"created_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"meeting_url": "<string>",
"summary": "<string>",
"mentor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mentor_name": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"cancel_reason": "<string>"
},
"attendees": [
{
"student_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"student_name": "<string>",
"student_email": "jsmith@example.com",
"anonymized": true,
"attendance": "booked",
"credit": "none",
"booked_by_staff": true,
"rated": true,
"agenda": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"no_show_at": "2023-11-07T05:31:56Z"
}
],
"files": [
{
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"kind": "video",
"ready": true,
"playback": {
"kind": "video",
"provider": "bunny_stream",
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"signed": true,
"thumbnail_url": "<string>",
"duration_seconds": 123,
"title": "<string>"
}
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Remarcar, resumir ou cancelar
A remarcação passa pela agenda de quem conduz e de cada aluno.
curl --request PATCH \
--url https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"starts_at": "2023-11-07T05:31:56Z",
"duration_minutes": 247,
"mentor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"capacity": 250,
"meeting_url": "<string>",
"record": true,
"summary": "<string>",
"cancelled": true,
"cancel_reason": "<string>"
}
'import requests
url = "https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}"
payload = {
"starts_at": "2023-11-07T05:31:56Z",
"duration_minutes": 247,
"mentor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"capacity": 250,
"meeting_url": "<string>",
"record": True,
"summary": "<string>",
"cancelled": True,
"cancel_reason": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
starts_at: '2023-11-07T05:31:56Z',
duration_minutes: 247,
mentor_user_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
title: '<string>',
capacity: 250,
meeting_url: '<string>',
record: true,
summary: '<string>',
cancelled: true,
cancel_reason: '<string>'
})
};
fetch('https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}', 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.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'starts_at' => '2023-11-07T05:31:56Z',
'duration_minutes' => 247,
'mentor_user_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'title' => '<string>',
'capacity' => 250,
'meeting_url' => '<string>',
'record' => true,
'summary' => '<string>',
'cancelled' => true,
'cancel_reason' => '<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.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}"
payload := strings.NewReader("{\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"duration_minutes\": 247,\n \"mentor_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"capacity\": 250,\n \"meeting_url\": \"<string>\",\n \"record\": true,\n \"summary\": \"<string>\",\n \"cancelled\": true,\n \"cancel_reason\": \"<string>\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"duration_minutes\": 247,\n \"mentor_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"capacity\": 250,\n \"meeting_url\": \"<string>\",\n \"record\": true,\n \"summary\": \"<string>\",\n \"cancelled\": true,\n \"cancel_reason\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.weve.cx/v1/clubs/{clubId}/mentorship-sessions/{sessionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"starts_at\": \"2023-11-07T05:31:56Z\",\n \"duration_minutes\": 247,\n \"mentor_user_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"title\": \"<string>\",\n \"capacity\": 250,\n \"meeting_url\": \"<string>\",\n \"record\": true,\n \"summary\": \"<string>\",\n \"cancelled\": true,\n \"cancel_reason\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"session": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mentorship_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mentorship_name": "<string>",
"format": "individual",
"status": "upcoming",
"capacity": 123,
"attendees_count": 123,
"consumes_credit": true,
"starts_at": "2023-11-07T05:31:56Z",
"ends_at": "2023-11-07T05:31:56Z",
"meeting": "room",
"record": true,
"created_at": "2023-11-07T05:31:56Z",
"title": "<string>",
"meeting_url": "<string>",
"summary": "<string>",
"mentor_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"mentor_name": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"cancel_reason": "<string>"
},
"attendees": [
{
"student_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"student_name": "<string>",
"student_email": "jsmith@example.com",
"anonymized": true,
"attendance": "booked",
"credit": "none",
"booked_by_staff": true,
"rated": true,
"agenda": "<string>",
"cancelled_at": "2023-11-07T05:31:56Z",
"no_show_at": "2023-11-07T05:31:56Z"
}
],
"files": [
{
"media_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"kind": "video",
"ready": true,
"playback": {
"kind": "video",
"provider": "bunny_stream",
"url": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"signed": true,
"thumbnail_url": "<string>",
"duration_seconds": 123,
"title": "<string>"
}
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Token OPACO de sessão de quem administra, emitido por
/v1/auth/admin/sign-in e verificado contra a nossa tabela — o mesmo
desenho do studentSession, para a outra identidade.
É o esquema de quem ADMINISTRA — o dashboard. O aluno do classroom usa o
studentSession; uma rota consumida pelos dois declara os dois
esquemas, e o middleware aceita qualquer um deles. As duas credenciais
são opacas e chegam pelo mesmo cabeçalho: quem as separa é a tabela em
que cada uma existe.
O dashboard o guarda em cookie httpOnly, que o BFF troca pelo
Authorization a cada chamada.
Path Parameters
Id público da organização — o mesmo que GET /v1/me devolve em
organization_id.
Na URL o recurso se chama club; no contrato e no domínio, organization.
A divergência é deliberada: clubs é a palavra do produto, e a URL é o que
as pessoas leem.
É o identificador do provedor de autenticação, e é assim de propósito: o cliente precisa nomear a organização ao pedir o token, e o token é o que prova o escopo. Um id só nosso obrigaria a traduzir um no outro antes de ter um token — e a tradução exigiria uma chamada escopada, que é justamente a que ainda não dá para fazer.
O uuid interno da organização não aparece no contrato: ele é o que as chaves estrangeiras do domínio referenciam, e continua sendo nosso.
Body
15 <= x <= 4801 - 1201 <= x <= 500Nulo volta a herdar o padrão do perfil de quem conduz.
room, link 50020000Só true; sessão cancelada não volta.
500Response
A sessão
Show child attributes
Show child attributes