Update Member Status
curl --request PATCH \
--url https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": "inactive"
}
'import requests
url = "https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status"
payload = { "status": "inactive" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'inactive'})
};
fetch('https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status', 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.rolla.xyz/api/v1/external/teams/members/{userId}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'inactive'
]),
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://api.rolla.xyz/api/v1/external/teams/members/{userId}/status"
payload := strings.NewReader("{\n \"status\": \"inactive\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"inactive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"inactive\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Member status updated to inactive successfully",
"success": true,
"data": {
"userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "inactive"
}
}{
"status": 400,
"message": "Only business owners can update member status"
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}Teams
Update Member Status
Activates or deactivates a team member. Only the business owner can call it, the owner’s own status cannot be changed, and a member whose invitation is still pending cannot be activated or deactivated.
PATCH
/
teams
/
members
/
{userId}
/
status
Update Member Status
curl --request PATCH \
--url https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"status": "inactive"
}
'import requests
url = "https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status"
payload = { "status": "inactive" }
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({status: 'inactive'})
};
fetch('https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status', 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.rolla.xyz/api/v1/external/teams/members/{userId}/status",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'status' => 'inactive'
]),
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://api.rolla.xyz/api/v1/external/teams/members/{userId}/status"
payload := strings.NewReader("{\n \"status\": \"inactive\"\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"status\": \"inactive\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.rolla.xyz/api/v1/external/teams/members/{userId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"status\": \"inactive\"\n}"
response = http.request(request)
puts response.read_body{
"status": 200,
"message": "Member status updated to inactive successfully",
"success": true,
"data": {
"userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "inactive"
}
}{
"status": 400,
"message": "Only business owners can update member status"
}{
"status": 400,
"message": "Validation failed",
"code": "ACCOUNT_RESTRICTED",
"errors": [
{
"path": [
"amount"
],
"message": "amount must be a whole number of smallest currency units (e.g. cents)"
}
]
}Activate or deactivate a team member. Only business owners can update member status.
The
Example Request
curl -X PATCH "https://api.rolla.xyz/api/v1/external/teams/members/a1b2c3d4-e5f6-7890-abcd-ef1234567890/status" \
-H "X-API-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"status": "inactive"
}'
Example Response
{
"status": 200,
"message": "Member status updated to inactive successfully",
"success": true,
"data": {
"userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"status": "inactive"
}
}
message echoes the status you sent, so activating a member returns Member status updated to active successfully.
The business owner’s status cannot be changed, and pending invites cannot be activated or deactivated. Only
active and inactive members can have their status updated.Authorizations
Your Rolla API key
Path Parameters
User UUID of the team member
Body
application/json
New status for the team member
Available options:
active, inactive Example:
"inactive"