Skip to main content
PUT
https://example.com
/
api
/
settings
/
auth
/
github
/
allowed-orgs
Set GitHub allowed organizations
curl --request PUT \
  --url https://example.com/api/settings/auth/github/allowed-orgs \
  --header 'Content-Type: application/json' \
  --cookie better-auth.session_token= \
  --data '
{
  "allowedOrgs": [
    "<string>"
  ]
}
'
{
  "error": {
    "code": "<string>",
    "message": "<string>",
    "requestId": "<string>",
    "statusCode": 123,
    "details": [
      {
        "message": "<string>",
        "path": "<string>"
      }
    ]
  }
}

Authorizations

better-auth.session_token
string
cookie
required

Body

application/json
allowedOrgs
string[]
required
Minimum array length: 1
Pattern: ^[a-zA-Z0-9](?:[a-zA-Z0-9]|-(?=[a-zA-Z0-9])){0,38}$

Response

Allowed orgs saved