Update list
curl --request PATCH \
--url https://api.ofauth.com/v3/access/lists/:listId \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-linked-account-id: <api-key>' \
--data '
{
"name": "<string>",
"isPinnedToChat": true,
"isPinnedToFeed": true
}
'import requests
url = "https://api.ofauth.com/v3/access/lists/:listId"
payload = {
"name": "<string>",
"isPinnedToChat": True,
"isPinnedToFeed": True
}
headers = {
"x-linked-account-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-linked-account-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', isPinnedToChat: true, isPinnedToFeed: true})
};
fetch('https://api.ofauth.com/v3/access/lists/:listId', 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.ofauth.com/v3/access/lists/:listId",
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([
'name' => '<string>',
'isPinnedToChat' => true,
'isPinnedToFeed' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-linked-account-id: <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.ofauth.com/v3/access/lists/:listId"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"isPinnedToChat\": true,\n \"isPinnedToFeed\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-linked-account-id", "<api-key>")
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.ofauth.com/v3/access/lists/:listId")
.header("x-linked-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isPinnedToChat\": true,\n \"isPinnedToFeed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ofauth.com/v3/access/lists/:listId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-linked-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"isPinnedToChat\": true,\n \"isPinnedToFeed\": true\n}"
response = http.request(request)
puts response.read_body{
"canAddUsers": true,
"canDelete": true,
"canManageUsers": true,
"canPinnedToChat": true,
"canPinnedToFeed": true,
"canUpdate": true,
"direction": "<string>",
"id": "<string>",
"isPinnedToChat": true,
"isPinnedToFeed": true,
"name": "<string>",
"order": "<string>",
"postsCount": 123,
"sortList": {
"direction": "<string>",
"order": "<string>"
},
"type": "<string>",
"users": [
{
"avatar": "<string>",
"avatarThumbs": {
"c144": "<string>",
"c50": "<string>"
},
"id": 123,
"isActive": true,
"isDeleted": true,
"isVerified": true,
"name": "<string>",
"username": "<string>"
}
],
"usersCount": 123
}User Lists
Update list
Update a list by id.
Required scope: lists:write
PATCH
/
v3
/
access
/
lists
/
:listId
Update list
curl --request PATCH \
--url https://api.ofauth.com/v3/access/lists/:listId \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'x-linked-account-id: <api-key>' \
--data '
{
"name": "<string>",
"isPinnedToChat": true,
"isPinnedToFeed": true
}
'import requests
url = "https://api.ofauth.com/v3/access/lists/:listId"
payload = {
"name": "<string>",
"isPinnedToChat": True,
"isPinnedToFeed": True
}
headers = {
"x-linked-account-id": "<api-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {
'x-linked-account-id': '<api-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', isPinnedToChat: true, isPinnedToFeed: true})
};
fetch('https://api.ofauth.com/v3/access/lists/:listId', 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.ofauth.com/v3/access/lists/:listId",
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([
'name' => '<string>',
'isPinnedToChat' => true,
'isPinnedToFeed' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"x-linked-account-id: <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.ofauth.com/v3/access/lists/:listId"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"isPinnedToChat\": true,\n \"isPinnedToFeed\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("x-linked-account-id", "<api-key>")
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.ofauth.com/v3/access/lists/:listId")
.header("x-linked-account-id", "<api-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"isPinnedToChat\": true,\n \"isPinnedToFeed\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.ofauth.com/v3/access/lists/:listId")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["x-linked-account-id"] = '<api-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"isPinnedToChat\": true,\n \"isPinnedToFeed\": true\n}"
response = http.request(request)
puts response.read_body{
"canAddUsers": true,
"canDelete": true,
"canManageUsers": true,
"canPinnedToChat": true,
"canPinnedToFeed": true,
"canUpdate": true,
"direction": "<string>",
"id": "<string>",
"isPinnedToChat": true,
"isPinnedToFeed": true,
"name": "<string>",
"order": "<string>",
"postsCount": 123,
"sortList": {
"direction": "<string>",
"order": "<string>"
},
"type": "<string>",
"users": [
{
"avatar": "<string>",
"avatarThumbs": {
"c144": "<string>",
"c50": "<string>"
},
"id": 123,
"isActive": true,
"isDeleted": true,
"isVerified": true,
"name": "<string>",
"username": "<string>"
}
],
"usersCount": 123
}Authorizations
Headers
Response
Successful response
Was this page helpful?