> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itspropel.com/llms.txt.
> For full documentation content, see https://docs.itspropel.com/llms-full.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itspropel.com/_mcp/server.

# Create Escalation Rule

POST https://dispatch/escalation-rules
Content-Type: multipart/form-data

Create a new escalation rule that triggers when dispatch assignments meet certain conditions (e.g., not accepted within threshold).

Reference: https://docs.itspropel.com/propel-biz/24-dispatcher/escalation-rules/create-escalation-rule

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: PropelBiz
  version: 1.0.0
paths:
  /dispatch/escalation-rules:
    post:
      operationId: create-escalation-rule
      summary: Create Escalation Rule
      description: >-
        Create a new escalation rule that triggers when dispatch assignments
        meet certain conditions (e.g., not accepted within threshold).
      tags:
        - subpackage_24Dispatcher.subpackage_24Dispatcher/escalationRules
      parameters:
        - name: '{{tenant_key_name}}'
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/24 Dispatcher_Escalation Rules_Create
                  Escalation Rule_Response_200
      requestBody:
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: >-
                    Required: Rule name - max 255 chars - "Unaccepted Emergency
                    Escalation"
                action_type:
                  type: string
                  description: >-
                    Required: Action to take -
                    reassign|notify_manager|auto_dispatch|create_alert -
                    "reassign"
                trigger_type:
                  type: string
                  description: >-
                    Required: Trigger type -
                    unaccepted|no_response|sla_breach|idle_technician -
                    "unaccepted"
                action_config:
                  type: string
                  description: >-
                    Required: JSON action configuration - array - {"notify":
                    ["manager"]}
                trigger_threshold_minutes:
                  type: string
                  description: >-
                    Required: Minutes before escalation triggers - integer, min
                    1 - "10"
              required:
                - name
                - action_type
                - trigger_type
                - action_config
                - trigger_threshold_minutes
servers:
  - url: https:/
components:
  schemas:
    24 Dispatcher_Escalation Rules_Create Escalation Rule_Response_200:
      type: object
      properties: {}
      description: Empty response body
      title: 24 Dispatcher_Escalation Rules_Create Escalation Rule_Response_200

```

## SDK Code Examples

```python
import requests

url = "https://https/dispatch/escalation-rules"

payload = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nUnaccepted Emergency Escalation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_type\"\r\n\r\nreassign\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_type\"\r\n\r\nunaccepted\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_config\"\r\n\r\n{\"notify\": [\"manager\"]}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_threshold_minutes\"\r\n\r\n10\r\n-----011000010111000001101001--\r\n"
headers = {
    "{{tenant_key_name}}": "{{tenant_key_value1}}|{{tenant_key_value2}}",
    "Content-Type": "multipart/form-data; boundary=---011000010111000001101001"
}

response = requests.post(url, data=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://https/dispatch/escalation-rules';
const form = new FormData();
form.append('name', 'Unaccepted Emergency Escalation');
form.append('action_type', 'reassign');
form.append('trigger_type', 'unaccepted');
form.append('action_config', '{"notify": ["manager"]}');
form.append('trigger_threshold_minutes', '10');

const options = {
  method: 'POST',
  headers: {'{{tenant_key_name}}': '{{tenant_key_value1}}|{{tenant_key_value2}}'}
};

options.body = form;

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://https/dispatch/escalation-rules"

	payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nUnaccepted Emergency Escalation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_type\"\r\n\r\nreassign\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_type\"\r\n\r\nunaccepted\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_config\"\r\n\r\n{\"notify\": [\"manager\"]}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_threshold_minutes\"\r\n\r\n10\r\n-----011000010111000001101001--\r\n")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://https/dispatch/escalation-rules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["{{tenant_key_name}}"] = '{{tenant_key_value1}}|{{tenant_key_value2}}'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nUnaccepted Emergency Escalation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_type\"\r\n\r\nreassign\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_type\"\r\n\r\nunaccepted\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_config\"\r\n\r\n{\"notify\": [\"manager\"]}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_threshold_minutes\"\r\n\r\n10\r\n-----011000010111000001101001--\r\n"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://https/dispatch/escalation-rules")
  .header("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}")
  .body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nUnaccepted Emergency Escalation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_type\"\r\n\r\nreassign\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_type\"\r\n\r\nunaccepted\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_config\"\r\n\r\n{\"notify\": [\"manager\"]}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_threshold_minutes\"\r\n\r\n10\r\n-----011000010111000001101001--\r\n")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://https/dispatch/escalation-rules', [
  'multipart' => [
    [
        'name' => 'name',
        'contents' => 'Unaccepted Emergency Escalation'
    ],
    [
        'name' => 'action_type',
        'contents' => 'reassign'
    ],
    [
        'name' => 'trigger_type',
        'contents' => 'unaccepted'
    ],
    [
        'name' => 'action_config',
        'contents' => '{"notify": ["manager"]}'
    ],
    [
        'name' => 'trigger_threshold_minutes',
        'contents' => '10'
    ]
  ]
  'headers' => [
    '{{tenant_key_name}}' => '{{tenant_key_value1}}|{{tenant_key_value2}}',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://https/dispatch/escalation-rules");
var request = new RestRequest(Method.POST);
request.AddHeader("{{tenant_key_name}}", "{{tenant_key_value1}}|{{tenant_key_value2}}");
request.AddParameter("undefined", "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"name\"\r\n\r\nUnaccepted Emergency Escalation\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_type\"\r\n\r\nreassign\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_type\"\r\n\r\nunaccepted\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"action_config\"\r\n\r\n{\"notify\": [\"manager\"]}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"trigger_threshold_minutes\"\r\n\r\n10\r\n-----011000010111000001101001--\r\n", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = ["{{tenant_key_name}}": "{{tenant_key_value1}}|{{tenant_key_value2}}"]
let parameters = [
  [
    "name": "name",
    "value": "Unaccepted Emergency Escalation"
  ],
  [
    "name": "action_type",
    "value": "reassign"
  ],
  [
    "name": "trigger_type",
    "value": "unaccepted"
  ],
  [
    "name": "action_config",
    "value": "{\"notify\": [\"manager\"]}"
  ],
  [
    "name": "trigger_threshold_minutes",
    "value": "10"
  ]
]

let boundary = "---011000010111000001101001"

var body = ""
var error: NSError? = nil
for param in parameters {
  let paramName = param["name"]!
  body += "--\(boundary)\r\n"
  body += "Content-Disposition:form-data; name=\"\(paramName)\""
  if let filename = param["fileName"] {
    let contentType = param["content-type"]!
    let fileContent = String(contentsOfFile: filename, encoding: String.Encoding.utf8)
    if (error != nil) {
      print(error as Any)
    }
    body += "; filename=\"\(filename)\"\r\n"
    body += "Content-Type: \(contentType)\r\n\r\n"
    body += fileContent
  } else if let paramValue = param["value"] {
    body += "\r\n\r\n\(paramValue)"
  }
}

let request = NSMutableURLRequest(url: NSURL(string: "https://https/dispatch/escalation-rules")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```