Pular para o conteúdo principal
PUT
/
api
/
v1
/
users
/
{id}
Atualiza um membro
curl --request PUT \
  --url 'https://memberkit.com.br/api/v1/users/{id}?api_key=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "full_name": "<string>",
  "email": "jsmith@example.com",
  "password": "<string>",
  "bio": "<string>",
  "unlimited": true,
  "blocked": true,
  "time_zone": "<string>",
  "metadata": {
    "cpf_cnpj": "<string>",
    "phone_local_code": "<string>",
    "phone_number": "<string>"
  }
}
'
import requests

url = "https://memberkit.com.br/api/v1/users/{id}?api_key="

payload = {
"full_name": "<string>",
"email": "jsmith@example.com",
"password": "<string>",
"bio": "<string>",
"unlimited": True,
"blocked": True,
"time_zone": "<string>",
"metadata": {
"cpf_cnpj": "<string>",
"phone_local_code": "<string>",
"phone_number": "<string>"
}
}
headers = {"Content-Type": "application/json"}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
full_name: '<string>',
email: 'jsmith@example.com',
password: '<string>',
bio: '<string>',
unlimited: true,
blocked: true,
time_zone: '<string>',
metadata: {cpf_cnpj: '<string>', phone_local_code: '<string>', phone_number: '<string>'}
})
};

fetch('https://memberkit.com.br/api/v1/users/{id}?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/{id}?api_key=",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'full_name' => '<string>',
'email' => 'jsmith@example.com',
'password' => '<string>',
'bio' => '<string>',
'unlimited' => true,
'blocked' => true,
'time_zone' => '<string>',
'metadata' => [
'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/{id}?api_key="

payload := strings.NewReader("{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"bio\": \"<string>\",\n \"unlimited\": true,\n \"blocked\": true,\n \"time_zone\": \"<string>\",\n \"metadata\": {\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n }\n}")

req, _ := http.NewRequest("PUT", 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.put("https://memberkit.com.br/api/v1/users/{id}?api_key=")
.header("Content-Type", "application/json")
.body("{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"bio\": \"<string>\",\n \"unlimited\": true,\n \"blocked\": true,\n \"time_zone\": \"<string>\",\n \"metadata\": {\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n }\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://memberkit.com.br/api/v1/users/{id}?api_key=")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"full_name\": \"<string>\",\n \"email\": \"jsmith@example.com\",\n \"password\": \"<string>\",\n \"bio\": \"<string>\",\n \"unlimited\": true,\n \"blocked\": true,\n \"time_zone\": \"<string>\",\n \"metadata\": {\n \"cpf_cnpj\": \"<string>\",\n \"phone_local_code\": \"<string>\",\n \"phone_number\": \"<string>\"\n }\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"
    }
  ]
}
Atualiza os dados básicos de um membro. Use esta rota para alterar senha, endereço de email, e outros campos básicos do perfil.

🚨 Importante

  1. Esta rota não realiza alteração de matrículas.
  2. Use a rota POST /api/v1/users para gestão de acesso.
  3. Use o parâmetro blocked apenas para banimento permanente.

Autorizações

api_key
string
query
obrigatório

Parâmetros de caminho

id
string
obrigatório

ID do membro.

Corpo

application/json
full_name
string

Nome completo.

email
string<email>

Endereço de email.

password
string

Senha.

Minimum string length: 6
bio
string

Bio.

unlimited
boolean

Acesso ilimitado.

blocked
boolean

Status de banimento.

time_zone
string

Fuso horário.

metadata
object

Metadados.

Resposta

200 - 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[]