automation-cloud-dedicated
latest
false
UiPath logo, featuring letters U and I in white

Automation Cloud Dedicated API guide

Last updated Mar 5, 2026

Create rule

Creates a new authorization rule within an organization.

Endpoint

POST /api/Rule

Request body

FieldTypeRequiredDescription
nameStringYesName of the rule
descriptionStringNoDescription of the rule's purpose
enabledBooleanYesWhether the rule is active
definitionStringNo

The rule definition, expressed as a JSON-encoded string.

partitionGlobalIdGUIDYes

The global identifier of the organization.

For steps on retrieving partitionGlobalId, refer to Retrieving partitionGlobalId for API use.

Request headers

--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'
--header 'Authorization: Bearer {access_token}'
--header 'Content-Type: application/json'

Responses

Note:
  1. The response returns the created rule as a RuleDto, including the generated id.
  2. partitionGlobalId may be returned as the zero GUID, depending on the environment or rule provider behavior.
  3. definition is persisted and returned as a JSON-encoded string.
  4. assignedGroups is returned as an empty array ([]) when no groups are resolved at creation time.
{
  "id": 3684,
  "partitionGlobalId": "00000000-0000-0000-0000-000000000000",
  "name": "Test",
  "description": "Test",
  "enabled": true,
  "definition": "{\"GroupsToAssign\":[\"4d161738-7204-4794-b839-8f7fed28366c\"],\"Conditions\":[]}",
  "assignedGroups": []
}
{
  "id": 3684,
  "partitionGlobalId": "00000000-0000-0000-0000-000000000000",
  "name": "Test",
  "description": "Test",
  "enabled": true,
  "definition": "{\"GroupsToAssign\":[\"4d161738-7204-4794-b839-8f7fed28366c\"],\"Conditions\":[]}",
  "assignedGroups": []
}

Example request

{
  "name": "Test",
  "description": "Test",
  "partitionGlobalId": "47a714db-cd27-4250-9668-2054e008c448",
  "enabled": true,
  "definition": "{\"GroupsToAssign\":[\"4d161738-7204-4794-b839-8f7fed28366c\"],\"Conditions\":[]}"
}
{
  "name": "Test",
  "description": "Test",
  "partitionGlobalId": "47a714db-cd27-4250-9668-2054e008c448",
  "enabled": true,
  "definition": "{\"GroupsToAssign\":[\"4d161738-7204-4794-b839-8f7fed28366c\"],\"Conditions\":[]}"
}

Error responses

  • 400 Bad Request: Invalid request body or validation errors
  • 401 Unauthorized: Missing or invalid authentication token
  • 403 Forbidden: Insufficient permissions
  • 404 Not Found: Organization does not exist
  • Endpoint
  • Request body
  • Request headers
  • Responses
  • Example request
  • Error responses

Was this page helpful?

Connect

Need help? Support

Want to learn? UiPath Academy

Have questions? UiPath Forum

Stay updated