Turn a seat on or off, or change a role
curl --request PATCH \
--url https://www.cubic.dev/api/v1/organizations/{org}/members/{githubUserId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"seat": true,
"expectedSeat": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({seat: true, expectedSeat: true})
};
fetch('https://www.cubic.dev/api/v1/organizations/{org}/members/{githubUserId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.cubic.dev/api/v1/organizations/{org}/members/{githubUserId}"
payload = {
"seat": True,
"expectedSeat": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"githubUserId": "<string>",
"before": {
"seat": true,
"role": "member"
},
"after": {
"seat": true,
"role": "member"
},
"changed": true,
"availableSeats": 123,
"purchasedQuantityChanged": false
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Members
Update a member
Needs an organization admin or an organization API key with Admin access, and an active paid subscription. It never buys seats. Turning a seat off does not remove access to cubic. To remove someone, remove them from the GitHub organization.
PATCH
/
api
/
v1
/
organizations
/
{org}
/
members
/
{githubUserId}
Turn a seat on or off, or change a role
curl --request PATCH \
--url https://www.cubic.dev/api/v1/organizations/{org}/members/{githubUserId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"seat": true,
"expectedSeat": true
}
'const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({seat: true, expectedSeat: true})
};
fetch('https://www.cubic.dev/api/v1/organizations/{org}/members/{githubUserId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://www.cubic.dev/api/v1/organizations/{org}/members/{githubUserId}"
payload = {
"seat": True,
"expectedSeat": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text){
"githubUserId": "<string>",
"before": {
"seat": true,
"role": "member"
},
"after": {
"seat": true,
"role": "member"
},
"changed": true,
"availableSeats": 123,
"purchasedQuantityChanged": false
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retriable": true,
"correlationId": "<string>",
"details": [
{
"path": "<string>",
"message": "<string>"
}
]
}
}Updates need an organization admin or an organization API key with admin access, and an active
Team, Pro, or Max subscription billed through cubic.
Requests in the playground change the member in your organization. See the
Members API guide for expected values and seat capacity rules.
Authorizations
Path Parameters
Body
application/json
Was this page helpful?