Obtener perfil de un usuario
curl --request GET \
--url https://api.pruff.com/api/clients/user/profile/{email} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/user/profile/{email}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.pruff.com/api/clients/user/profile/{email}', 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.pruff.com/api/clients/user/profile/{email}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pruff.com/api/clients/user/profile/{email}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pruff.com/api/clients/user/profile/{email}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/user/profile/{email}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "Ana Pérez",
"email": "ana.perez@example.com",
"roles": [
{
"id": 2,
"name": "Gerente Comercial"
},
{
"id": 6,
"name": "Operaciones"
}
],
"encryptedId": "0a1b2c3d4e5f6a7b8c9d0e1f:5f4e3d2c1b0a99887766554433221100aabbccddeeff:00112233445566778899aabbccddeeff",
"enrollmentLink": "https://app.example.com/s/0a1b2c3d4e5f60718293"
}{
"message": "Unauthorized: Invalid API Key"
}{
"message": "User not found"
}{
"message": "Rate limit exceeded: 501 requests in the current 60s window, limit is 500. Retry in 12s.",
"displayMessage": "Superaste el límite de 500 solicitudes cada 60 segundos. Vuelve a intentarlo en 12 segundos.",
"data": {
"code": "RATE_LIMIT_EXCEEDED",
"scope": "All API keys of your company share this budget.",
"limit": 500,
"used": 501,
"windowSeconds": 60,
"retryAfterSeconds": 12,
"resetAt": "2026-11-04T15:00:12.000Z",
"hint": "Wait until resetAt (or honor the Retry-After header) before retrying. Avoid repeating identical requests: reuse responses you already fetched, use filters and larger pageSize values instead of one request per item, and cap your client concurrency."
}
}{
"message": "Internal server error"
}{
"message": "request_timeout",
"displayMessage": "La solicitud excedió el tiempo máximo permitido"
}Usuarios
Obtener perfil de un usuario
Devuelve el nombre, el email y los roles de un usuario de tu empresa, junto con su link de enrolamiento y un token cifrado. El link de enrolamiento es una URL personal que el usuario usa para ingresar las credenciales de sus cuentas en Pruff. Tanto el link como el token funcionan como credenciales: no los compartas con terceros ni los guardes.
GET
/
user
/
profile
/
{email}
Obtener perfil de un usuario
curl --request GET \
--url https://api.pruff.com/api/clients/user/profile/{email} \
--header 'x-api-key: <api-key>'import requests
url = "https://api.pruff.com/api/clients/user/profile/{email}"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.pruff.com/api/clients/user/profile/{email}', 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.pruff.com/api/clients/user/profile/{email}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.pruff.com/api/clients/user/profile/{email}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.pruff.com/api/clients/user/profile/{email}")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pruff.com/api/clients/user/profile/{email}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"name": "Ana Pérez",
"email": "ana.perez@example.com",
"roles": [
{
"id": 2,
"name": "Gerente Comercial"
},
{
"id": 6,
"name": "Operaciones"
}
],
"encryptedId": "0a1b2c3d4e5f6a7b8c9d0e1f:5f4e3d2c1b0a99887766554433221100aabbccddeeff:00112233445566778899aabbccddeeff",
"enrollmentLink": "https://app.example.com/s/0a1b2c3d4e5f60718293"
}{
"message": "Unauthorized: Invalid API Key"
}{
"message": "User not found"
}{
"message": "Rate limit exceeded: 501 requests in the current 60s window, limit is 500. Retry in 12s.",
"displayMessage": "Superaste el límite de 500 solicitudes cada 60 segundos. Vuelve a intentarlo en 12 segundos.",
"data": {
"code": "RATE_LIMIT_EXCEEDED",
"scope": "All API keys of your company share this budget.",
"limit": 500,
"used": 501,
"windowSeconds": 60,
"retryAfterSeconds": 12,
"resetAt": "2026-11-04T15:00:12.000Z",
"hint": "Wait until resetAt (or honor the Retry-After header) before retrying. Avoid repeating identical requests: reuse responses you already fetched, use filters and larger pageSize values instead of one request per item, and cap your client concurrency."
}
}{
"message": "Internal server error"
}{
"message": "request_timeout",
"displayMessage": "La solicitud excedió el tiempo máximo permitido"
}Parámetros de ruta
Respuesta
Perfil del usuario.
Token cifrado que identifica al usuario en las páginas públicas de Pruff. Se genera uno nuevo en cada llamada, por lo que su valor cambia aunque el usuario sea el mismo. Funciona como una credencial: no lo compartas ni lo guardes. Es un valor opaco.
Ejemplo:
"0a1b2c3d4e5f6a7b8c9d0e1f:5f4e3d2c1b0a99887766554433221100aabbccddeeff:00112233445566778899aabbccddeeff"