Skip to main content
Creates a new rule for the organization. Rules are surfaced to the AI agent as behavioral guidelines that apply to all conversations across the organization.
This endpoint requires admin privileges.
Authorization
string
required
Bearer token obtained from the authenticate endpoint. The authenticated user must be an admin.
content
string
required
The rule content. Write rules as clear directives — for example: “Always respond in the user’s language” or “Do not reference competitor products.”

Response

Returns the created rule object.
id
string
Unique rule ID (UUID).
organization_id
string
Organization this rule belongs to.
content
string
The rule content.
created_by
string
Member ID of the admin who created this rule.
last_updated_by
string
Member ID of the admin who last updated this rule.
last_updated_by_name
string
Display name of the admin who last updated this rule.
created_at
string
ISO 8601 timestamp when the rule was created.
updated_at
string
ISO 8601 timestamp when the rule was last updated.
curl -X POST https://api.trellis.sh/v1/organization-rules \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"content": "Always cite the data source when presenting figures"}'
{
  "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
  "organization_id": "org_01HX...",
  "content": "Always cite the data source when presenting figures",
  "created_by": "member_01HX...",
  "last_updated_by": "member_01HX...",
  "last_updated_by_name": "Jane Smith",
  "created_at": "2025-02-10T08:00:00+00:00",
  "updated_at": "2025-02-10T08:00:00+00:00"
}