Admin Update Space
curl --request PATCH \
--url https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"attributes": {
"color": "<string>",
"description": "<string>",
"icon": "<string>",
"is_default": true,
"is_pinned": true,
"name": "<string>",
"position": 1073741823,
"segment_id": "<string>",
"slug": "<string>"
},
"type": "<string>"
}
}
'import requests
url = "https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id}"
payload = { "data": {
"attributes": {
"color": "<string>",
"description": "<string>",
"icon": "<string>",
"is_default": True,
"is_pinned": True,
"name": "<string>",
"position": 1073741823,
"segment_id": "<string>",
"slug": "<string>"
},
"type": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
attributes: {
color: '<string>',
description: '<string>',
icon: '<string>',
is_default: true,
is_pinned: true,
name: '<string>',
position: 1073741823,
segment_id: '<string>',
slug: '<string>'
},
type: '<string>'
}
})
};
fetch('https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id}', 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/{space_id}",
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([
'data' => [
'attributes' => [
'color' => '<string>',
'description' => '<string>',
'icon' => '<string>',
'is_default' => true,
'is_pinned' => true,
'name' => '<string>',
'position' => 1073741823,
'segment_id' => '<string>',
'slug' => '<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/{space_id}"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"icon\": \"<string>\",\n \"is_default\": true,\n \"is_pinned\": true,\n \"name\": \"<string>\",\n \"position\": 1073741823,\n \"segment_id\": \"<string>\",\n \"slug\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"attributes\": {\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"icon\": \"<string>\",\n \"is_default\": true,\n \"is_pinned\": true,\n \"name\": \"<string>\",\n \"position\": 1073741823,\n \"segment_id\": \"<string>\",\n \"slug\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id}")
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/vnd.api+json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"icon\": \"<string>\",\n \"is_default\": true,\n \"is_pinned\": true,\n \"name\": \"<string>\",\n \"position\": 1073741823,\n \"segment_id\": \"<string>\",\n \"slug\": \"<string>\"\n },\n \"type\": \"<string>\"\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": {
"self": "<string>"
},
"meta": {}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}community-spaces-admin
Admin Update Space
Partial update of a space. Only supplied attributes are modified.
PATCH
/
api
/
v1
/
admin
/
teams
/
{team_id}
/
hubs
/
{hub_id}
/
spaces
/
{space_id}
Admin Update Space
curl --request PATCH \
--url https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/vnd.api+json' \
--data '
{
"data": {
"attributes": {
"color": "<string>",
"description": "<string>",
"icon": "<string>",
"is_default": true,
"is_pinned": true,
"name": "<string>",
"position": 1073741823,
"segment_id": "<string>",
"slug": "<string>"
},
"type": "<string>"
}
}
'import requests
url = "https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id}"
payload = { "data": {
"attributes": {
"color": "<string>",
"description": "<string>",
"icon": "<string>",
"is_default": True,
"is_pinned": True,
"name": "<string>",
"position": 1073741823,
"segment_id": "<string>",
"slug": "<string>"
},
"type": "<string>"
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/vnd.api+json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/vnd.api+json'},
body: JSON.stringify({
data: {
attributes: {
color: '<string>',
description: '<string>',
icon: '<string>',
is_default: true,
is_pinned: true,
name: '<string>',
position: 1073741823,
segment_id: '<string>',
slug: '<string>'
},
type: '<string>'
}
})
};
fetch('https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id}', 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/{space_id}",
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([
'data' => [
'attributes' => [
'color' => '<string>',
'description' => '<string>',
'icon' => '<string>',
'is_default' => true,
'is_pinned' => true,
'name' => '<string>',
'position' => 1073741823,
'segment_id' => '<string>',
'slug' => '<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/{space_id}"
payload := strings.NewReader("{\n \"data\": {\n \"attributes\": {\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"icon\": \"<string>\",\n \"is_default\": true,\n \"is_pinned\": true,\n \"name\": \"<string>\",\n \"position\": 1073741823,\n \"segment_id\": \"<string>\",\n \"slug\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/vnd.api+json")
.body("{\n \"data\": {\n \"attributes\": {\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"icon\": \"<string>\",\n \"is_default\": true,\n \"is_pinned\": true,\n \"name\": \"<string>\",\n \"position\": 1073741823,\n \"segment_id\": \"<string>\",\n \"slug\": \"<string>\"\n },\n \"type\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.member.dev/api/v1/admin/teams/{team_id}/hubs/{hub_id}/spaces/{space_id}")
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/vnd.api+json'
request.body = "{\n \"data\": {\n \"attributes\": {\n \"color\": \"<string>\",\n \"description\": \"<string>\",\n \"icon\": \"<string>\",\n \"is_default\": true,\n \"is_pinned\": true,\n \"name\": \"<string>\",\n \"position\": 1073741823,\n \"segment_id\": \"<string>\",\n \"slug\": \"<string>\"\n },\n \"type\": \"<string>\"\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": {
"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 update envelope: {data: {type, attributes}}.
Show child attributes
Show child attributes
⌘I