Python (SDK)
from meetkai_mka1 import SDK, models
with SDK() as sdk:
res = sdk.auth.orgs.update_inbound_rules(security=models.UpdateOrgInboundRulesSecurity(
session_cookie="<YOUR_API_KEY_HERE>",
), org_id="<id>", enabled=False, rules=[
{
"cidr": "<value>",
},
])
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK();
async function run() {
const result = await sdk.auth.orgs.updateInboundRules({
sessionCookie: "<YOUR_API_KEY_HERE>",
}, {
orgId: "<id>",
requestBody: {
enabled: false,
rules: [
{
cidr: "<value>",
},
],
},
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New()
res, err := s.Auth.Orgs.UpdateInboundRules(ctx, operations.UpdateOrgInboundRulesSecurity{
SessionCookie: "<YOUR_API_KEY_HERE>",
}, "<id>", operations.UpdateOrgInboundRulesRequestBody{
Enabled: false,
Rules: []operations.RuleRequest{
operations.RuleRequest{
Cidr: "<value>",
},
},
}, nil)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Requests;
using System.Collections.Generic;
var sdk = new SDK();
var res = await sdk.Auth.Orgs.UpdateInboundRulesAsync(
security: new UpdateOrgInboundRulesSecurity() {
SessionCookie = "<YOUR_API_KEY_HERE>",
},
orgId: "<id>",
body: new UpdateOrgInboundRulesRequestBody() {
Enabled = false,
Rules = new List<RuleRequest>() {
new RuleRequest() {
Cidr = "<value>",
},
},
}
);
// handle responsecurl --request PUT \
--url https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules \
--header 'Content-Type: application/json' \
--cookie __Secure-mka1-auth-v2.session_token= \
--data '
{
"enabled": true,
"rules": [
{
"cidr": "<string>",
"description": "<string>"
}
]
}
'const options = {
method: 'PUT',
headers: {
cookie: '__Secure-mka1-auth-v2.session_token=',
'Content-Type': 'application/json'
},
body: JSON.stringify({enabled: true, rules: [{cidr: '<string>', description: '<string>'}]})
};
fetch('https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules', 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://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'rules' => [
[
'cidr' => '<string>',
'description' => '<string>'
]
]
]),
CURLOPT_COOKIE => "__Secure-mka1-auth-v2.session_token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules")
.header("cookie", "__Secure-mka1-auth-v2.session_token=")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"rules\": [\n {\n \"cidr\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = '__Secure-mka1-auth-v2.session_token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"rules\": [\n {\n \"cidr\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"available": true,
"enabled": true,
"rules": [
{
"id": "<string>",
"cidr": "<string>",
"description": "<string>",
"createdAt": "<string>"
}
],
"updatedAt": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Organization
Replace an org's inbound IP rules (org owner/admin, browser session)
Replaces the whole policy atomically. Each cidr is normalized (bare 0.0.0.0 / :: mean /0, other bare addresses are /32 or /128, host bits are cleared); duplicates after normalization are a 400. A request carrying an Authorization header is refused with 403.
PUT
/
api
/
v1
/
authentication
/
orgs
/
{orgId}
/
inbound-rules
Python (SDK)
from meetkai_mka1 import SDK, models
with SDK() as sdk:
res = sdk.auth.orgs.update_inbound_rules(security=models.UpdateOrgInboundRulesSecurity(
session_cookie="<YOUR_API_KEY_HERE>",
), org_id="<id>", enabled=False, rules=[
{
"cidr": "<value>",
},
])
# Handle response
print(res)import { SDK } from "@meetkai/mka1";
const sdk = new SDK();
async function run() {
const result = await sdk.auth.orgs.updateInboundRules({
sessionCookie: "<YOUR_API_KEY_HERE>",
}, {
orgId: "<id>",
requestBody: {
enabled: false,
rules: [
{
cidr: "<value>",
},
],
},
});
console.log(result);
}
run();package main
import(
"context"
mka1 "github.com/MeetKai/mka1-sdks/go"
"github.com/MeetKai/mka1-sdks/go/models/operations"
"log"
)
func main() {
ctx := context.Background()
s := mka1.New()
res, err := s.Auth.Orgs.UpdateInboundRules(ctx, operations.UpdateOrgInboundRulesSecurity{
SessionCookie: "<YOUR_API_KEY_HERE>",
}, "<id>", operations.UpdateOrgInboundRulesRequestBody{
Enabled: false,
Rules: []operations.RuleRequest{
operations.RuleRequest{
Cidr: "<value>",
},
},
}, nil)
if err != nil {
log.Fatal(err)
}
if res.Object != nil {
// handle response
}
}using MeetKai.MKA1;
using MeetKai.MKA1.Types.Requests;
using System.Collections.Generic;
var sdk = new SDK();
var res = await sdk.Auth.Orgs.UpdateInboundRulesAsync(
security: new UpdateOrgInboundRulesSecurity() {
SessionCookie = "<YOUR_API_KEY_HERE>",
},
orgId: "<id>",
body: new UpdateOrgInboundRulesRequestBody() {
Enabled = false,
Rules = new List<RuleRequest>() {
new RuleRequest() {
Cidr = "<value>",
},
},
}
);
// handle responsecurl --request PUT \
--url https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules \
--header 'Content-Type: application/json' \
--cookie __Secure-mka1-auth-v2.session_token= \
--data '
{
"enabled": true,
"rules": [
{
"cidr": "<string>",
"description": "<string>"
}
]
}
'const options = {
method: 'PUT',
headers: {
cookie: '__Secure-mka1-auth-v2.session_token=',
'Content-Type': 'application/json'
},
body: JSON.stringify({enabled: true, rules: [{cidr: '<string>', description: '<string>'}]})
};
fetch('https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules', 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://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'rules' => [
[
'cidr' => '<string>',
'description' => '<string>'
]
]
]),
CURLOPT_COOKIE => "__Secure-mka1-auth-v2.session_token=",
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.put("https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules")
.header("cookie", "__Secure-mka1-auth-v2.session_token=")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"rules\": [\n {\n \"cidr\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://apigw.mka1.com/api/v1/authentication/orgs/{orgId}/inbound-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["cookie"] = '__Secure-mka1-auth-v2.session_token='
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"rules\": [\n {\n \"cidr\": \"<string>\",\n \"description\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"available": true,
"enabled": true,
"rules": [
{
"id": "<string>",
"cidr": "<string>",
"description": "<string>",
"createdAt": "<string>"
}
],
"updatedAt": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}{
"message": "<string>",
"code": "<string>"
}{
"message": "<string>"
}{
"message": "<string>"
}Authorizations
Current Better Auth browser or device-login session
Headers
Optional external end-user identifier forwarded by the API gateway.
Path Parameters
Body
application/json
Was this page helpful?
⌘I