Create policy draft
curl --request POST \
--url https://trylimitless.ai/v1/organization/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"rule": "<string>"
}
'import requests
url = "https://trylimitless.ai/v1/organization/policies"
payload = {
"name": "<string>",
"rule": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', rule: '<string>'})
};
fetch('https://trylimitless.ai/v1/organization/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"state": "draft",
"revision": 123,
"has_unpublished_changes": true,
"created_at": 123,
"updated_at": 123,
"draft": {
"rule": "<string>",
"direction": "request",
"mode": "monitoring",
"scope": "organization",
"project_ids": [
"<string>"
],
"match_threshold_basis_points": 123,
"base_version": 123
},
"object": "organization.policy",
"current_version": 123,
"published": {
"id": "<string>",
"version": 123,
"direction": "request",
"mode": "monitoring",
"scope": "organization",
"project_ids": [
"<string>"
],
"published_at": 123,
"current": true,
"rule": "<string>",
"object": "organization.policy.version",
"match_threshold_basis_points": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}Policies
Create policy draft
Create a yes-or-no policy rule without activating it. Requires policies:write and an Idempotency-Key.
POST
/
v1
/
organization
/
policies
Create policy draft
curl --request POST \
--url https://trylimitless.ai/v1/organization/policies \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"name": "<string>",
"rule": "<string>"
}
'import requests
url = "https://trylimitless.ai/v1/organization/policies"
payload = {
"name": "<string>",
"rule": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({name: '<string>', rule: '<string>'})
};
fetch('https://trylimitless.ai/v1/organization/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"state": "draft",
"revision": 123,
"has_unpublished_changes": true,
"created_at": 123,
"updated_at": 123,
"draft": {
"rule": "<string>",
"direction": "request",
"mode": "monitoring",
"scope": "organization",
"project_ids": [
"<string>"
],
"match_threshold_basis_points": 123,
"base_version": 123
},
"object": "organization.policy",
"current_version": 123,
"published": {
"id": "<string>",
"version": 123,
"direction": "request",
"mode": "monitoring",
"scope": "organization",
"project_ids": [
"<string>"
],
"published_at": 123,
"current": true,
"rule": "<string>",
"object": "organization.policy.version",
"match_threshold_basis_points": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"type": "<string>",
"param": "<string>",
"request_id": "<string>",
"doc_url": "<string>"
}
}Authorizations
Organization Admin API key with an appropriate scope. Customer keys cannot call organization routes.
Headers
Stable identifier of 8–200 printable characters. Reuse it only for an identical operation.
Required string length:
8 - 200Body
application/json
Required string length:
1 - 80A yes-or-no question ending with ?.
Required string length:
1 - 20000Available options:
request, response, both Available options:
organization, projects, unattached Maximum string length:
240Available options:
monitoring, enforcing Maximum array length:
1000Optional match threshold from 1 to 9,999; null restores the backend default.
Required range:
1 <= x <= 9999Response
Resource created or exact idempotent creation replayed.
Available options:
draft, monitoring, enforcing, paused Current edit revision. Mutations must send the latest value.
Show child attributes
Show child attributes
Allowed value:
"organization.policy"Active published version number, or null before first publication.
Show child attributes
Show child attributes