Pular para o conteúdo principal
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,
      "course_id": 123,
      "classroom_id": 123,
      "expire_date": "2023-12-25"
    }
  ],
  "memberships": [
    {
      "id": 123,
      "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:
ModalidadeParâmetroParâmetro de controle
Cursos individuaisclassroom_idsstatus
Assinaturasmembership_level_idstatus
Acesso ilimitadounlimitedstatus

🚨 Importante

  1. Escolha apenas uma modalidade em sua requisição.
  2. Use o parâmetro status para controle de acesso.
  3. Use o parâmetro blocked apenas para banimento permanente.

Autorizações

api_key
string
query
obrigatório

Corpo

application/json
full_name
string
obrigatório

Nome completo.

email
string<email>
obrigatório

Endereço de email.

status
enum<string>
obrigatório
Opções disponíveis:
inactive,
pending,
active,
expired
blocked
boolean

Status de banimento.

unlimited
boolean

Acesso ilimitado.

classroom_ids
integer[]

IDs de turmas.

membership_level_id
integer

ID do nível de assinatura.

expires_at
string<date-time>

Data de expiração.

cpf_cnpj
string

CPF/CNPJ.

phone_local_code
string

DDD do telefone ou código do país.

phone_number
string

Número do telefone.

Resposta

201 - application/json
id
integer
obrigatório
full_name
string
obrigatório
email
string<email>
obrigatório
bio
string | null
obrigatório
profile_image_url
string | null
obrigatório
blocked
boolean
obrigatório
unlimited
boolean
obrigatório
sign_in_count
integer
obrigatório
current_sign_in_at
string<date-time> | null
obrigatório
created_at
string<date-time>
obrigatório
updated_at
string<date-time>
obrigatório
metadata
object
enrollments
object[]
memberships
object[]