Skip to main content
PUT
/
api
/
v1
/
rules
/
{uuid}
Update an existing rule
curl --request PUT \
  --url https://{subdomain}.mihu.ai/api/v1/rules/{uuid} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Aggressive Call Rule",
  "type": "call",
  "max_calls_per_day": 5,
  "max_total_calls": 15,
  "retry_interval_minutes": 60,
  "start_time": "08:00",
  "end_time": "20:00",
  "dnc_check": true,
  "remove_on_opt_out": true,
  "escalation_after_failed_attempts": 1,
  "escalation_type": "<string>",
  "escalation_target": "<string>"
}
'
{
  "success": true,
  "message": "Rule updated successfully",
  "data": {
    "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "name": "Aggressive call rule",
    "type": "call",
    "max_calls_per_day": 3,
    "max_total_calls": 10,
    "retry_interval_minutes": 120,
    "start_time": "09:00:00",
    "end_time": "18:00:00",
    "dnc_check": true,
    "remove_on_opt_out": true,
    "escalation_after_failed_attempts": 0,
    "escalation_type": "<string>",
    "escalation_target": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://developers.mindhunters.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Use a Bearer token to access these API endpoints. Example: "Bearer {your-token}"

Path Parameters

uuid
string<uuid>
required

UUID of the rule to update.

Body

application/json
name
string

New display name. 3-255 characters.

Required string length: 3 - 255
Example:

"Aggressive Call Rule"

type
enum<string>

Switch the rule between call (multi-attempt with cadence) and text (one-shot). Switching to 'text' clears call-only fields automatically.

Available options:
call,
text
max_calls_per_day
integer

Per-contact daily attempt cap, evaluated in contact's local timezone.

Required range: x >= 1
Example:

5

max_total_calls
integer

Per-contact lifetime attempt cap across the campaign date range.

Required range: x >= 1
Example:

15

retry_interval_minutes
integer | null

Minimum minutes between attempts. Honored only for type='call'.

Required range: x >= 1
Example:

60

start_time
string

Earliest local time of day (HH:MM, 24h) the system may attempt the contact.

Example:

"08:00"

end_time
string | null

Latest local time of day (HH:MM, 24h). Cleared if type is or becomes 'text'.

Example:

"20:00"

dnc_check
boolean

Toggle DNC list filtering at task-creation time.

remove_on_opt_out
boolean

Toggle automatic pool removal on inbound opt-out.

escalation_after_failed_attempts
integer | null

Trigger threshold for escalation. 0 disables. Cleared if type='text'.

Required range: x >= 0
escalation_type
string | null

Free-form escalation identifier consumed by your downstream logic.

Maximum string length: 255
escalation_target
string | null

Free-form escalation payload (email, team UUID, instructions).

Response

Updated rule resource.

success
boolean
Example:

true

message
string
Example:

"Rule updated successfully"

data
object

Campaign contact rule. Drives task cadence, retry interval, working-hours window, and escalation policy when attached to a campaign.