Criar aula
curl --request POST \
--url https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"release_days": 1073741823,
"release_date": "2023-11-07T05:31:56Z",
"is_free": true,
"video_id": "<string>",
"external_video_url": "<string>"
}
'import requests
url = "https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/"
payload = {
"title": "<string>",
"description": "<string>",
"release_days": 1073741823,
"release_date": "2023-11-07T05:31:56Z",
"is_free": True,
"video_id": "<string>",
"external_video_url": "<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({
title: '<string>',
description: '<string>',
release_days: 1073741823,
release_date: '2023-11-07T05:31:56Z',
is_free: true,
video_id: '<string>',
external_video_url: '<string>'
})
};
fetch('https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/', 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.cakto.com.br/public_api/members/modules/{module_id}/lessons/",
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([
'title' => '<string>',
'description' => '<string>',
'release_days' => 1073741823,
'release_date' => '2023-11-07T05:31:56Z',
'is_free' => true,
'video_id' => '<string>',
'external_video_url' => '<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;
}require 'uri'
require 'net/http'
url = URI("https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/")
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 \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"release_days\": 1073741823,\n \"release_date\": \"2023-11-07T05:31:56Z\",\n \"is_free\": true,\n \"video_id\": \"<string>\",\n \"external_video_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"release_days\": 1073741823,\n \"release_date\": \"2023-11-07T05:31:56Z\",\n \"is_free\": true,\n \"video_id\": \"<string>\",\n \"external_video_url\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"release_days\": 1073741823,\n \"release_date\": \"2023-11-07T05:31:56Z\",\n \"is_free\": true,\n \"video_id\": \"<string>\",\n \"external_video_url\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_area_module": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"position": 123,
"thumbnail": "<string>",
"thumbnail_original": "<string>",
"video": {
"id": "<string>",
"thumbnail": "<string>",
"status": "created"
},
"external_video": "<string>",
"extra_files_count": 123,
"published_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"status": "draft",
"release_type": "immediate",
"release_days": 1073741823,
"release_date": "2023-11-07T05:31:56Z",
"is_free": true
}Aulas
Criar aula
A aula entra no fim do módulo.
POST
/
public_api
/
members
/
modules
/
{module_id}
/
lessons
/
Criar aula
curl --request POST \
--url https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "<string>",
"description": "<string>",
"release_days": 1073741823,
"release_date": "2023-11-07T05:31:56Z",
"is_free": true,
"video_id": "<string>",
"external_video_url": "<string>"
}
'import requests
url = "https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/"
payload = {
"title": "<string>",
"description": "<string>",
"release_days": 1073741823,
"release_date": "2023-11-07T05:31:56Z",
"is_free": True,
"video_id": "<string>",
"external_video_url": "<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({
title: '<string>',
description: '<string>',
release_days: 1073741823,
release_date: '2023-11-07T05:31:56Z',
is_free: true,
video_id: '<string>',
external_video_url: '<string>'
})
};
fetch('https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/', 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.cakto.com.br/public_api/members/modules/{module_id}/lessons/",
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([
'title' => '<string>',
'description' => '<string>',
'release_days' => 1073741823,
'release_date' => '2023-11-07T05:31:56Z',
'is_free' => true,
'video_id' => '<string>',
'external_video_url' => '<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;
}require 'uri'
require 'net/http'
url = URI("https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/")
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 \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"release_days\": 1073741823,\n \"release_date\": \"2023-11-07T05:31:56Z\",\n \"is_free\": true,\n \"video_id\": \"<string>\",\n \"external_video_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_bodyHttpResponse<String> response = Unirest.post("https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"release_days\": 1073741823,\n \"release_date\": \"2023-11-07T05:31:56Z\",\n \"is_free\": true,\n \"video_id\": \"<string>\",\n \"external_video_url\": \"<string>\"\n}")
.asString();using RestSharp;
var options = new RestClientOptions("https://api.cakto.com.br/public_api/members/modules/{module_id}/lessons/");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "Bearer <token>");
request.AddJsonBody("{\n \"title\": \"<string>\",\n \"description\": \"<string>\",\n \"release_days\": 1073741823,\n \"release_date\": \"2023-11-07T05:31:56Z\",\n \"is_free\": true,\n \"video_id\": \"<string>\",\n \"external_video_url\": \"<string>\"\n}", false);
var response = await client.PostAsync(request);
Console.WriteLine("{0}", response.Content);
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"member_area_module": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"position": 123,
"thumbnail": "<string>",
"thumbnail_original": "<string>",
"video": {
"id": "<string>",
"thumbnail": "<string>",
"status": "created"
},
"external_video": "<string>",
"extra_files_count": 123,
"published_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"description": "<string>",
"status": "draft",
"release_type": "immediate",
"release_days": 1073741823,
"release_date": "2023-11-07T05:31:56Z",
"is_free": true
}Escopo
write members
Authorizations
Token de autenticação do tipo Bearer {access_token}, onde {access_token} é o token obtido no fluxo de autenticação.
Body
application/json
Response
Was this page helpful?