curl
curl -X POST 'https://api.velan.app/v1/developer/member-access/extend' \
-H 'Authorization: Bearer $VELAN_KEY' \
-H 'Idempotency-Key: renovacao-8841-2027' \
-H 'Content-Type: application/json' \
-d '{"days": 30, "email": "ana@exemplo.com", "product_code": "b672d16c-b400-4a06-82ce-a68b7f5a071e"}'import requests
url = "https://api.velan.app/v1/developer/member-access/extend"
payload = {
"days": 30,
"email": "ana@exemplo.com",
"product_code": "b672d16c-b400-4a06-82ce-a68b7f5a071e"
}
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({
days: 30,
email: 'ana@exemplo.com',
product_code: 'b672d16c-b400-4a06-82ce-a68b7f5a071e'
})
};
fetch('https://api.velan.app/v1/developer/member-access/extend', 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.velan.app/v1/developer/member-access/extend",
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([
'days' => 30,
'email' => 'ana@exemplo.com',
'product_code' => 'b672d16c-b400-4a06-82ce-a68b7f5a071e'
]),
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.velan.app/v1/developer/member-access/extend"
payload := strings.NewReader("{\n \"days\": 30,\n \"email\": \"ana@exemplo.com\",\n \"product_code\": \"b672d16c-b400-4a06-82ce-a68b7f5a071e\"\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.velan.app/v1/developer/member-access/extend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"days\": 30,\n \"email\": \"ana@exemplo.com\",\n \"product_code\": \"b672d16c-b400-4a06-82ce-a68b7f5a071e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velan.app/v1/developer/member-access/extend")
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 \"days\": 30,\n \"email\": \"ana@exemplo.com\",\n \"product_code\": \"b672d16c-b400-4a06-82ce-a68b7f5a071e\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"days": 30,
"extended": true,
"grants": [
{
"code": "230ba726-1bb5-4383-b15d-280c65c7420a",
"email": "ana@exemplo.com",
"expired_at": "2027-12-22T03:14:41.967595+00:00",
"granted_at": "2026-11-22T03:14:41.970811+00:00",
"name": "Ana Souza",
"order_code": null,
"product": {
"code": "b672d16c-b400-4a06-82ce-a68b7f5a071e",
"name": "Curso Guitarra"
},
"revoked_at": null,
"status": "active"
}
]
}
}{
"error": {
"type": "validation_error",
"message": "Campos não aceitos nesta rota.",
"fields": {
"confirmm": "Campo desconhecido."
}
}
}{
"error": {
"type": "authentication_error",
"message": "Envie Authorization: Bearer <chave de API>."
}
}{
"error": {
"type": "permission_error",
"message": "Esta chave não tem permissão de escrita em 'webhooks'. Crie uma chave com essa permissão."
}
}{
"error": {
"type": "not_found",
"message": "Assinatura não encontrada."
}
}{
"error": {
"type": "conflict",
"message": "Idempotency-Key já usada com outra requisição. Gere uma chave nova para uma operação nova."
}
}{
"error": {
"type": "unprocessable",
"message": "Descreva o motivo com pelo menos 5 caracteres."
}
}{
"error": {
"type": "rate_limited",
"message": "Limite de 30 alterações por minuto atingido."
}
}Acesso de aluno
Estender o prazo de acesso
Soma days à validade do acesso (a partir do vencimento atual, ou de hoje se já venceu) e reativa se estava revogado. O e-mail precisa já ter acesso ao produto; senão responde 422 e você deve usar POST /member-access/grant. Não envia e-mail.
Permissão: write:members ou write. Idempotency-Key: obrigatório. Prévia: não tem; a chamada executa.
POST
/
member-access
/
extend
curl
curl -X POST 'https://api.velan.app/v1/developer/member-access/extend' \
-H 'Authorization: Bearer $VELAN_KEY' \
-H 'Idempotency-Key: renovacao-8841-2027' \
-H 'Content-Type: application/json' \
-d '{"days": 30, "email": "ana@exemplo.com", "product_code": "b672d16c-b400-4a06-82ce-a68b7f5a071e"}'import requests
url = "https://api.velan.app/v1/developer/member-access/extend"
payload = {
"days": 30,
"email": "ana@exemplo.com",
"product_code": "b672d16c-b400-4a06-82ce-a68b7f5a071e"
}
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({
days: 30,
email: 'ana@exemplo.com',
product_code: 'b672d16c-b400-4a06-82ce-a68b7f5a071e'
})
};
fetch('https://api.velan.app/v1/developer/member-access/extend', 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.velan.app/v1/developer/member-access/extend",
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([
'days' => 30,
'email' => 'ana@exemplo.com',
'product_code' => 'b672d16c-b400-4a06-82ce-a68b7f5a071e'
]),
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.velan.app/v1/developer/member-access/extend"
payload := strings.NewReader("{\n \"days\": 30,\n \"email\": \"ana@exemplo.com\",\n \"product_code\": \"b672d16c-b400-4a06-82ce-a68b7f5a071e\"\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.velan.app/v1/developer/member-access/extend")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"days\": 30,\n \"email\": \"ana@exemplo.com\",\n \"product_code\": \"b672d16c-b400-4a06-82ce-a68b7f5a071e\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.velan.app/v1/developer/member-access/extend")
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 \"days\": 30,\n \"email\": \"ana@exemplo.com\",\n \"product_code\": \"b672d16c-b400-4a06-82ce-a68b7f5a071e\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"days": 30,
"extended": true,
"grants": [
{
"code": "230ba726-1bb5-4383-b15d-280c65c7420a",
"email": "ana@exemplo.com",
"expired_at": "2027-12-22T03:14:41.967595+00:00",
"granted_at": "2026-11-22T03:14:41.970811+00:00",
"name": "Ana Souza",
"order_code": null,
"product": {
"code": "b672d16c-b400-4a06-82ce-a68b7f5a071e",
"name": "Curso Guitarra"
},
"revoked_at": null,
"status": "active"
}
]
}
}{
"error": {
"type": "validation_error",
"message": "Campos não aceitos nesta rota.",
"fields": {
"confirmm": "Campo desconhecido."
}
}
}{
"error": {
"type": "authentication_error",
"message": "Envie Authorization: Bearer <chave de API>."
}
}{
"error": {
"type": "permission_error",
"message": "Esta chave não tem permissão de escrita em 'webhooks'. Crie uma chave com essa permissão."
}
}{
"error": {
"type": "not_found",
"message": "Assinatura não encontrada."
}
}{
"error": {
"type": "conflict",
"message": "Idempotency-Key já usada com outra requisição. Gere uma chave nova para uma operação nova."
}
}{
"error": {
"type": "unprocessable",
"message": "Descreva o motivo com pelo menos 5 caracteres."
}
}{
"error": {
"type": "rate_limited",
"message": "Limite de 30 alterações por minuto atingido."
}
}Authorizations
Headers
Body
application/json
