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 and an active paid subscription, and 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 and an active Team or Pro 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
Your personal cubic API key from Settings > Integrations > cubic API. It starts with cbk_.
Path Parameters
GitHub organization login, such as acme.
Required string length:
1 - 255Numeric GitHub user ID of the member.
Pattern:
^\d{1,20}$Body
application/json
Desired seat state. Send with expectedSeat.
Desired role. Send with expectedRole.
Available options:
member, admin, viewer Current seat state from your latest read; send only with seat.
Current role from your latest read; send only with role.
Available options:
member, admin, viewer Was this page helpful?