Reenviar una invitación
Rota el token (el enlace anterior deja de servir) y, salvo que sendEmail sea false, vuelve a encolar el e-mail. La respuesta es { member, emailSent, inviteUrl? }, con inviteUrl solo con sendEmail: false.
Esto es lo que hace recuperable sendEmail: false: como solo se guarda el hash, sin esta ruta quien perdiera la respuesta no tendría forma de volver atrás.
Un usuario por la API. Solo un token OAuth/MCP o una clave de cuenta (ps_account_) llega aquí. Una clave ps_ de workspace o de número se rechaza con 403 MACHINE_CREDENTIAL_CANNOT_MANAGE_MEMBERS: una solicitud x-api-key con esa clave no tiene un usuario detrás, y permitir escrituras en la lista de miembros convertiría cualquier clave del workspace en una vía para tomar el control de la cuenta. El usuario debe ser ADMIN u OWNER (members:invite).
Límite de frecuencia (solo cuando se envía un e-mail): 3 reenvíos por hora por invitación, más los límites de la invitación por workspace (30/h) e IP (60/h); 429 RATE_LIMITED.
curl --request POST \
--url https://pilotstatus.com.br/v1/workspace/members/{id}/resend \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"sendEmail": true
}
'import requests
url = "https://pilotstatus.com.br/v1/workspace/members/{id}/resend"
payload = { "sendEmail": True }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sendEmail: true})
};
fetch('https://pilotstatus.com.br/v1/workspace/members/{id}/resend', 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://pilotstatus.com.br/v1/workspace/members/{id}/resend",
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([
'sendEmail' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/workspace/members/{id}/resend"
payload := strings.NewReader("{\n \"sendEmail\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://pilotstatus.com.br/v1/workspace/members/{id}/resend")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sendEmail\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspace/members/{id}/resend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sendEmail\": true\n}"
response = http.request(request)
puts response.read_body¿Esta página le ayudó?
curl --request POST \
--url https://pilotstatus.com.br/v1/workspace/members/{id}/resend \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"sendEmail": true
}
'import requests
url = "https://pilotstatus.com.br/v1/workspace/members/{id}/resend"
payload = { "sendEmail": True }
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({sendEmail: true})
};
fetch('https://pilotstatus.com.br/v1/workspace/members/{id}/resend', 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://pilotstatus.com.br/v1/workspace/members/{id}/resend",
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([
'sendEmail' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://pilotstatus.com.br/v1/workspace/members/{id}/resend"
payload := strings.NewReader("{\n \"sendEmail\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-key", "<api-key>")
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://pilotstatus.com.br/v1/workspace/members/{id}/resend")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sendEmail\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://pilotstatus.com.br/v1/workspace/members/{id}/resend")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"sendEmail\": true\n}"
response = http.request(request)
puts response.read_body