Skip to main content
POST
/
v1
/
console
/
access
/
rules
Create Rule
curl --request POST \
  --url http://localhost:8000/v1/console/access/rules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "expires_at": "2023-11-07T05:31:56Z",
  "reason": "",
  "scope": "all",
  "value": ""
}
'
{
  "data": {
    "created_at": "2023-11-07T05:31:56Z",
    "created_by": "<string>",
    "expires_at": "2023-11-07T05:31:56Z",
    "id": "<string>",
    "is_expired": true,
    "reason": "<string>",
    "value": "<string>"
  },
  "message": "<string>",
  "success": true
}

Authorizations

Authorization
string
header
required

Enter your JWT access token

Body

application/json
rule_type
enum<string>
required
Available options:
global,
domain,
email
expires_at
string<date-time> | null
reason
string
default:""
scope
enum<string>
default:all
Available options:
all,
content_only
value
string
default:""

Response

Successful Response

data
BlockRuleResponse · object
message
string | null
success
boolean
default:true