Admin Reorder Spaces
curl --request POST \
--url https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
}
'import requests
url = "https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder"
payload = { "data": [
{
"id": "<string>",
"type": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({data: [{id: '<string>', type: '<string>'}]})
};
fetch('https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder', 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.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder",
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([
'data' => [
[
'id' => '<string>',
'type' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder"
payload := strings.NewReader("{\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+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://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"attributes": {
"access_level": "<string>",
"color": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"description": "<string>",
"icon": "<string>",
"is_default": true,
"is_member": true,
"is_muted": true,
"is_pinned": true,
"member_avatar_preview": [
{
"contact_id": "<string>",
"display_name": "<string>",
"photo_thumbnail_url": "<string>",
"photo_thumbnail_url_expires_at": "2023-11-07T05:31:56Z"
}
],
"member_count": 123,
"moderator_count": 123,
"name": "<string>",
"online_count": 123,
"position": 123,
"posting_permission": "<string>",
"segment_id": "<string>",
"slug": "<string>",
"unread_count": 123,
"updated_at": "<string>",
"viewer_can_post": true
},
"id": "<string>",
"type": "<string>",
"links": {
"self": "<string>"
},
"meta": {},
"relationships": {}
}
],
"included": [
"<unknown>"
],
"links": {
"next": "<string>",
"self": "<string>"
},
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}community-spaces-admin
Admin Reorder Spaces
Reorder spaces within a hub.
Accepts an ordered list of space resource identifiers. Position is set to the index of each space_id in the list (0-based).
Returns the full updated list of spaces in the new order via list_all_spaces_for_hub, bounded only by that module’s shared 500-space safety ceiling (logged on cap-hit) — not the 20-row page cap that list_spaces_for_hub would otherwise impose on a reorder confirmation.
POST
/
api
/
v1
/
admin
/
teams
/
{team_id}
/
hubs
/
{hub_id}
/
spaces
/
reorder
Admin Reorder Spaces
curl --request POST \
--url https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": [
{
"id": "<string>",
"type": "<string>"
}
]
}
'import requests
url = "https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder"
payload = { "data": [
{
"id": "<string>",
"type": "<string>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({data: [{id: '<string>', type: '<string>'}]})
};
fetch('https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder', 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.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder",
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([
'data' => [
[
'id' => '<string>',
'type' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/vnd.api+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.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder"
payload := strings.NewReader("{\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/vnd.api+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://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/reorder")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/vnd.api+json'
request.body = "{\n \"data\": [\n {\n \"id\": \"<string>\",\n \"type\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"attributes": {
"access_level": "<string>",
"color": "<string>",
"created_at": "<string>",
"deleted_at": "<string>",
"description": "<string>",
"icon": "<string>",
"is_default": true,
"is_member": true,
"is_muted": true,
"is_pinned": true,
"member_avatar_preview": [
{
"contact_id": "<string>",
"display_name": "<string>",
"photo_thumbnail_url": "<string>",
"photo_thumbnail_url_expires_at": "2023-11-07T05:31:56Z"
}
],
"member_count": 123,
"moderator_count": 123,
"name": "<string>",
"online_count": 123,
"position": 123,
"posting_permission": "<string>",
"segment_id": "<string>",
"slug": "<string>",
"unread_count": 123,
"updated_at": "<string>",
"viewer_can_post": true
},
"id": "<string>",
"type": "<string>",
"links": {
"self": "<string>"
},
"meta": {},
"relationships": {}
}
],
"included": [
"<unknown>"
],
"links": {
"next": "<string>",
"self": "<string>"
},
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/vnd.api+json
JSON:API reorder envelope: {data: [{type, id}, ...]}.
Show child attributes
Show child attributes
⌘I