Update user status
curl --request PATCH \
--url https://api-fundflow.venly.io/v1/company/users/{userId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api-fundflow.venly.io/v1/company/users/{userId}/status"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api-fundflow.venly.io/v1/company/users/{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-fundflow.venly.io/v1/company/users/{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([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api-fundflow.venly.io/v1/company/users/{userId}/status"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-fundflow.venly.io/v1/company/users/{userId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-fundflow.venly.io/v1/company/users/{userId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"id": "<string>",
"username": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"enabled": true,
"invitationUrl": "<string>"
}
}{
"success": false,
"errors": [
{
"code": "validation-error",
"message": "A descriptive error message"
}
]
}{
"success": false,
"errors": [
{
"code": "UNAUTHORIZED",
"message": "Access is denied."
}
]
}{
"success": false,
"errors": [
{
"code": "FORBIDDEN",
"message": "User doesn't have proper authority to access this resource"
}
]
}{
"success": false,
"errors": [
{
"code": "NOT_FOUND"
}
]
}{
"success": false,
"errors": [
{
"code": "METHOD_NOT_SUPPORTED",
"message": "HttpMethod is not supported. Supported methods are [..]"
}
]
}{
"success": false,
"errors": [
{
"code": "INVALID_MEDIA_TYPE"
}
]
}{
"success": false,
"errors": [
{
"code": "INTERNAL_SERVER_ERROR",
"message": "A description of the error (optional)"
}
]
}Users
Update user status
Enable or disable a company user account.
PATCH
/
v1
/
company
/
users
/
{userId}
/
status
Update user status
curl --request PATCH \
--url https://api-fundflow.venly.io/v1/company/users/{userId}/status \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true
}
'import requests
url = "https://api-fundflow.venly.io/v1/company/users/{userId}/status"
payload = { "enabled": True }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({enabled: true})
};
fetch('https://api-fundflow.venly.io/v1/company/users/{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-fundflow.venly.io/v1/company/users/{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([
'enabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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://api-fundflow.venly.io/v1/company/users/{userId}/status"
payload := strings.NewReader("{\n \"enabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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-fundflow.venly.io/v1/company/users/{userId}/status")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-fundflow.venly.io/v1/company/users/{userId}/status")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"result": {
"id": "<string>",
"username": "<string>",
"email": "<string>",
"firstName": "<string>",
"lastName": "<string>",
"enabled": true,
"invitationUrl": "<string>"
}
}{
"success": false,
"errors": [
{
"code": "validation-error",
"message": "A descriptive error message"
}
]
}{
"success": false,
"errors": [
{
"code": "UNAUTHORIZED",
"message": "Access is denied."
}
]
}{
"success": false,
"errors": [
{
"code": "FORBIDDEN",
"message": "User doesn't have proper authority to access this resource"
}
]
}{
"success": false,
"errors": [
{
"code": "NOT_FOUND"
}
]
}{
"success": false,
"errors": [
{
"code": "METHOD_NOT_SUPPORTED",
"message": "HttpMethod is not supported. Supported methods are [..]"
}
]
}{
"success": false,
"errors": [
{
"code": "INVALID_MEDIA_TYPE"
}
]
}{
"success": false,
"errors": [
{
"code": "INTERNAL_SERVER_ERROR",
"message": "A description of the error (optional)"
}
]
}Enables or disables a user account. Disabled users cannot access the system.
Concept guide: Getting started with Fundflow
Requires the
COMPANY_ADMIN role (the manage:company-users scope).Authorizations
OAuth2 authentication via Venly Identity Platform
Path Parameters
Unique identifier of the user
Body
application/json
Request to enable or disable a company user account
Whether the user account should be enabled (true) or disabled (false)
Was this page helpful?
⌘I

