Cadastra um membro
curl --request POST \
--url 'https://memberkit.com.br/api/v1/users?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "<string>",
"email": "jsmith@example.com",
"blocked": true,
"unlimited": true,
"classroom_ids": [
123
],
"membership_level_id": 123,
"expires_at": "2023-11-07T05:31:56Z",
"cpf_cnpj": "<string>",
"phone_local_code": "<string>",
"phone_number": "<string>"
}
'import requests
url = "https://memberkit.com.br/api/v1/users?api_key="
payload = {
"full_name": "<string>",
"email": "jsmith@example.com",
"blocked": True,
"unlimited": True,
"classroom_ids": [123],
"membership_level_id": 123,
"expires_at": "2023-11-07T05:31:56Z",
"cpf_cnpj": "<string>",
"phone_local_code": "<string>",
"phone_number": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: '<string>',
email: 'jsmith@example.com',
blocked: true,
unlimited: true,
classroom_ids: [123],
membership_level_id: 123,
expires_at: '2023-11-07T05:31:56Z',
cpf_cnpj: '<string>',
phone_local_code: '<string>',
phone_number: '<string>'
})
};
fetch('https://memberkit.com.br/api/v1/users?api_key=', 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://memberkit.com.br/api/v1/users?api_key=",
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([
'full_name' => '<string>',
'email' => 'jsmith@example.com',
'blocked' => true,
'unlimited' => true,
'classroom_ids' => [
123
],
'membership_level_id' => 123,
'expires_at' => '2023-11-07T05:31:56Z',
'cpf_cnpj' => '<string>',
'phone_local_code' => '<string>',
'phone_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://memberkit.com.br/api/v1/users?api_key="
payload := strings.NewReader("{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"blocked\": true,\n \"unlimited\": true,\n \"classroom_ids\": [\n 123\n ],\n \"membership_level_id\": 123,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://memberkit.com.br/api/v1/users?api_key=")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"blocked\": true,\n \"unlimited\": true,\n \"classroom_ids\": [\n 123\n ],\n \"membership_level_id\": 123,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://memberkit.com.br/api/v1/users?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"blocked\": true,\n \"unlimited\": true,\n \"classroom_ids\": [\n 123\n ],\n \"membership_level_id\": 123,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"full_name": "<string>",
"email": "jsmith@example.com",
"bio": "<string>",
"profile_image_url": "<string>",
"blocked": true,
"unlimited": true,
"sign_in_count": 123,
"current_sign_in_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {
"cpf_cnpj": "<string>",
"phone_local_code": "<string>",
"phone_number": "<string>"
},
"enrollments": [
{
"id": 123,
"status": "inactive",
"course_id": 123,
"classroom_id": 123,
"expire_date": "2023-12-25"
}
],
"memberships": [
{
"id": 123,
"status": "inactive",
"membership_level_id": 123,
"expire_date": "2023-11-07T05:31:56Z"
}
]
}Users
Cadastra um membro
Cadastra ou atualiza um membro através do email.
POST
/
api
/
v1
/
users
Cadastra um membro
curl --request POST \
--url 'https://memberkit.com.br/api/v1/users?api_key=' \
--header 'Content-Type: application/json' \
--data '
{
"full_name": "<string>",
"email": "jsmith@example.com",
"blocked": true,
"unlimited": true,
"classroom_ids": [
123
],
"membership_level_id": 123,
"expires_at": "2023-11-07T05:31:56Z",
"cpf_cnpj": "<string>",
"phone_local_code": "<string>",
"phone_number": "<string>"
}
'import requests
url = "https://memberkit.com.br/api/v1/users?api_key="
payload = {
"full_name": "<string>",
"email": "jsmith@example.com",
"blocked": True,
"unlimited": True,
"classroom_ids": [123],
"membership_level_id": 123,
"expires_at": "2023-11-07T05:31:56Z",
"cpf_cnpj": "<string>",
"phone_local_code": "<string>",
"phone_number": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: '<string>',
email: 'jsmith@example.com',
blocked: true,
unlimited: true,
classroom_ids: [123],
membership_level_id: 123,
expires_at: '2023-11-07T05:31:56Z',
cpf_cnpj: '<string>',
phone_local_code: '<string>',
phone_number: '<string>'
})
};
fetch('https://memberkit.com.br/api/v1/users?api_key=', 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://memberkit.com.br/api/v1/users?api_key=",
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([
'full_name' => '<string>',
'email' => 'jsmith@example.com',
'blocked' => true,
'unlimited' => true,
'classroom_ids' => [
123
],
'membership_level_id' => 123,
'expires_at' => '2023-11-07T05:31:56Z',
'cpf_cnpj' => '<string>',
'phone_local_code' => '<string>',
'phone_number' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"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://memberkit.com.br/api/v1/users?api_key="
payload := strings.NewReader("{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"blocked\": true,\n \"unlimited\": true,\n \"classroom_ids\": [\n 123\n ],\n \"membership_level_id\": 123,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
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://memberkit.com.br/api/v1/users?api_key=")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"blocked\": true,\n \"unlimited\": true,\n \"classroom_ids\": [\n 123\n ],\n \"membership_level_id\": 123,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://memberkit.com.br/api/v1/users?api_key=")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"blocked\": true,\n \"unlimited\": true,\n \"classroom_ids\": [\n 123\n ],\n \"membership_level_id\": 123,\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": 123,
"full_name": "<string>",
"email": "jsmith@example.com",
"bio": "<string>",
"profile_image_url": "<string>",
"blocked": true,
"unlimited": true,
"sign_in_count": 123,
"current_sign_in_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"metadata": {
"cpf_cnpj": "<string>",
"phone_local_code": "<string>",
"phone_number": "<string>"
},
"enrollments": [
{
"id": 123,
"status": "inactive",
"course_id": 123,
"classroom_id": 123,
"expire_date": "2023-12-25"
}
],
"memberships": [
{
"id": 123,
"status": "inactive",
"membership_level_id": 123,
"expire_date": "2023-11-07T05:31:56Z"
}
]
}Adiciona ou atualiza um membro na plataforma. Use esta rota para liberar ou desativar acesso a um conteúdo. Não é necessário informar todas as matrículas cadastradas anteriormente.
Existem três modalidades de acesso na Memberkit:
| Modalidade | Parâmetro | Parâmetro de controle |
|---|---|---|
| Cursos individuais | classroom_ids | status |
| Assinaturas | membership_level_id | status |
| Acesso ilimitado | unlimited | status |
🚨 Importante
- Escolha apenas uma modalidade em sua requisição.
- Use o parâmetro
statuspara controle de acesso. - Use o parâmetro
blockedapenas para banimento permanente.
Autorizações
Corpo
application/json
Nome completo.
Endereço de email.
Opções disponíveis:
inactive, pending, active, expired Status de banimento.
Acesso ilimitado.
IDs de turmas.
ID do nível de assinatura.
Data de expiração.
CPF/CNPJ.
DDD do telefone ou código do país.
Número do telefone.
Resposta
201 - application/json
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Esta página foi útil?
⌘I