---
title: "POST /sip-rules"
method: POST
path: "/sip-rules"
---

# POST /sip-rules

`POST /sip-rules`

Creates a SIP rule which can be used to run a SIP media application as a target for a specific trigger type.

## Request body

- object
  - `Name` string, required — The name of the SIP rule.
  - `TriggerType` 'ToPhoneNumber' | 'RequestUriHostname', required — The type of trigger assigned to the SIP rule in <code>TriggerValue</code>, currently <code>RequestUriHostname</code> or <code>ToPhoneNumber</code>.
  - `TriggerValue` string, required — If <code>TriggerType</code> is <code>RequestUriHostname</code>, the value can be the outbound host name of an Amazon Chime Voice Connector. If <code>TriggerType</code> is <code>ToPhoneNumber</code>, the value can be a customer-owned phone number in the E164 format. The <code>SipMediaApplication</code> specified in the <code>SipRule</code> is triggered if the request URI in an incoming SIP request matches the <code>RequestUriHostname</code>, or if the <code>To</code> header in the incoming SIP request matches the <code>ToPhoneNumber</code> value.
  - `Disabled` boolean — Enables or disables a rule. You must disable rules before you can delete them.
  - `TargetApplications` SipRuleTargetApplication[], required — List of SIP media applications with priority and AWS Region. Only one SIP application per AWS Region can be used.
    - `SipMediaApplicationId` string — The SIP media application ID.
    - `Priority` integer — Priority of the SIP media application in the target list.
    - `AwsRegion` string — The AWS Region of the target application.

## Response `201`

Success

- CreateSipRuleResponse
  - `SipRule` object — Returns the SIP rule information, including the rule ID, triggers, and target applications.
    - `SipRuleId` string — The SIP rule ID.
    - `Name` string — The name of the SIP rule.
    - `Disabled` boolean — Indicates whether the SIP rule is enabled or disabled. You must disable a rule before you can delete it.
    - `TriggerType` 'ToPhoneNumber' | 'RequestUriHostname' — The type of trigger assigned to the SIP rule in <code>TriggerValue</code>, currently <code>RequestUriHostname</code> or <code>ToPhoneNumber</code>.
    - `TriggerValue` string — If <code>TriggerType</code> is <code>RequestUriHostname</code>, then the value can be the outbound host name of the Amazon Chime Voice Connector. If <code>TriggerType</code> is <code>ToPhoneNumber</code>, then the value can be a customer-owned phone number in E164 format. <code>SipRule</code> is triggered when a SIP rule requests host name or <code>ToPhoneNumber</code> matches in the incoming SIP request.
    - `TargetApplications` SipRuleTargetApplication[] — Target SIP media application and other details, such as priority and AWS Region, to be specified in the SIP rule. Only one SIP rule per AWS Region can be provided.
      - `SipMediaApplicationId` string — The SIP media application ID.
      - `Priority` integer — Priority of the SIP media application in the target list.
      - `AwsRegion` string — The AWS Region of the target application.
    - `CreatedTimestamp` string, date-time — The time at which the SIP rule was created, in ISO 8601 format.
    - `UpdatedTimestamp` string, date-time — The time at which the SIP rule was last updated, in ISO 8601 format.

## Other responses

- `480` — BadRequestException
- `481` — ForbiddenException
- `482` — AccessDeniedException
- `483` — UnauthorizedClientException
- `484` — ThrottledClientException
- `485` — ResourceLimitExceededException
- `486` — ConflictException
- `487` — ServiceUnavailableException
- `488` — ServiceFailureException

---

[API](https://skmtc.net/aws/apis/chime.md) · [All operations](https://skmtc.net/aws/apis/chime/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/chime/versions/40da18840201/schema)
