Update user role
curl --request PUT \
--url https://api-fundflow.venly.io/v1/company/users/{userId}/role \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api-fundflow.venly.io/v1/company/users/{userId}/role"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api-fundflow.venly.io/v1/company/users/{userId}/role', 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}/role",
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([
]),
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}/role"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", 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.put("https://api-fundflow.venly.io/v1/company/users/{userId}/role")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-fundflow.venly.io/v1/company/users/{userId}/role")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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 role
Change a company user’s role.
PUT
/
v1
/
company
/
users
/
{userId}
/
role
Update user role
curl --request PUT \
--url https://api-fundflow.venly.io/v1/company/users/{userId}/role \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'import requests
url = "https://api-fundflow.venly.io/v1/company/users/{userId}/role"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api-fundflow.venly.io/v1/company/users/{userId}/role', 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}/role",
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([
]),
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}/role"
payload := strings.NewReader("{}")
req, _ := http.NewRequest("PUT", 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.put("https://api-fundflow.venly.io/v1/company/users/{userId}/role")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-fundflow.venly.io/v1/company/users/{userId}/role")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"
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)"
}
]
}Updates a user’s role —
COMPANY_ADMIN (full access plus user management), COMPANY_MANAGER (create and manage ramp requests), or COMPANY_VIEWER (read-only access).
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 change the role of an existing company user
New role for the user
Available options:
COMPANY_ADMIN, COMPANY_VIEWER, COMPANY_MANAGER Was this page helpful?
⌘I

