---
title: "Creates a Reactor rule"
method: POST
path: "/apps/{app_id}/rules"
tags: ["rules"]
---

# Creates a Reactor rule

`POST /apps/{app_id}/rules`

Creates a rule for the application with the specified application ID.

## Path parameters

- `app_id` string, required

## Request body

- union
  - HttpRulePost
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http', required — The type of rule. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` 'json' | 'msgpack', required — JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
      - `url` string, required — The URL of the endpoint that is invoked when events occur on Ably.
  - IftttRulePost
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'http/ifttt', required — The type of rule. In this case IFTTT. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `eventName` string, required
      - `webhookKey` string, required
  - ZapierRulePost
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http/zapier', required — The type of rule. In this case Zapier. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
      - `url` string, required
  - CloudflareWorkerRulePost
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http/cloudflare-worker', required — The type of rule. In this case Cloudflare Worker. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
      - `url` string, required
  - AzureFunctionRulePost
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http/azure-function', required — The type of rule. In this case Microsoft Azure Function. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `azureAppId` string, required — The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this <a href="https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID">article</a>.
      - `azureFunctionName` string, required — The name of your Microsoft Azure Function.
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` 'json' — JSON provides a text-based encoding.
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
  - GoogleCloudFunctionRulePost
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http/google-cloud-function', required — The type of rule. In this case Google Cloud Function. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `target` object, required
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` 'json' — JSON provides a text-based encoding.
      - `functionName` string, required — The name of your Google Cloud Function.
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `projectId` string, required — The project ID for your Google Cloud Project that was generated when you created your project.
      - `region` string, required — The region in which your Google Cloud Function is hosted. See the <a href="https://cloud.google.com/compute/docs/regions-zones/">Google documentation</a> for more details.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
  - AwsLambdaRulePost
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'aws/lambda', required — The type of rule. In this case AWS Lambda. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `authentication` union, required
        - AwsAccessKeys
          - `accessKeyId` string, required — The AWS key ID for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'credentials' — Authentication method is using AWS credentials (AWS key ID and secret key).
          - `secretAccessKey` string, required — The AWS secret key for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
        - AwsAssumeRole
          - `assumeRoleArn` string, required — If you are using the "ARN of an assumable role" authentication method, this is your Assume Role ARN. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'assumeRole' — Authentication method is using the ARN of an assumable role. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `functionName` string, required — The name of your AWS Lambda Function.
      - `region` string, required — The region is which your AWS Lambda Function is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
  - AwsKinesisRulePost
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'aws/kinesis', required — The type of rule. In this case AWS Kinesis. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `authentication` union, required
        - AwsAccessKeys
          - `accessKeyId` string, required — The AWS key ID for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'credentials' — Authentication method is using AWS credentials (AWS key ID and secret key).
          - `secretAccessKey` string, required — The AWS secret key for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
        - AwsAssumeRole
          - `assumeRoleArn` string, required — If you are using the "ARN of an assumable role" authentication method, this is your Assume Role ARN. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'assumeRole' — Authentication method is using the ARN of an assumable role. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` 'json', required — JSON provides a text-based encoding.
      - `partitionKey` string, required — The AWS Kinesis partition key. See this <a href="https://knowledge.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably knowledge base article</a> for details.
      - `region` string, required — The region is which AWS Kinesis is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
      - `streamName` string, required — The name of your AWS Kinesis Stream.
  - AwsSqsRulePost
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'aws/sqs', required — The type of rule. In this case AWS SQS. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `authentication` union, required
        - AwsAccessKeys
          - `accessKeyId` string, required — The AWS key ID for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'credentials' — Authentication method is using AWS credentials (AWS key ID and secret key).
          - `secretAccessKey` string, required — The AWS secret key for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
        - AwsAssumeRole
          - `assumeRoleArn` string, required — If you are using the "ARN of an assumable role" authentication method, this is your Assume Role ARN. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'assumeRole' — Authentication method is using the ARN of an assumable role. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
      - `awsAccountId` string, required — Your AWS account ID.
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` string
      - `queueName` string, required — The AWS SQS queue name.
      - `region` string, required — The region is which AWS SQS is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
  - AmqpRulePost
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'amqp', required — The type of rule. In this case AMQP. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` string
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `queueId` string, required
  - AmqpExternalRulePost
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'amqp/external', required — The type of rule. In this case AMQP external (using Firehose). See the <a href="https://ably.com/documentation/general/firehose">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `target` object, required
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` string
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `mandatoryRoute` boolean, required — Reject delivery of the message if the route does not exist, otherwise fail silently.
      - `messageTtl` integer — You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.
      - `persistentMessages` boolean, required — Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.
      - `routingKey` string, required — The AMQP routing key. See this <a href="https://knowledge.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably knowledge base article</a> for details.
      - `url` string, required
  - UnsupportedRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'unsupported', required — This rule type is currently unsupported.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `url` string, required
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.

## Response `201`

Reactor rule created

- union
  - HttpRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http', required — The type of rule. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` 'json' | 'msgpack', required — JSON provides a simpler text-based encoding, whereas MsgPack provides a more efficient binary encoding.
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
      - `url` string, required
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - IftttRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'http/ifttt', required — The type of rule. In this case IFTTT. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `eventName` string, required
      - `webhookKey` string, required
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - ZapierRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http/zapier', required — The type of rule. In this case Zapier. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
      - `url` string, required
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - CloudflareWorkerRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http/cloudflare-worker', required — The type of rule. In this case Cloudflare Worker. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
      - `url` string, required
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - AzureFunctionRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http/azure-function', required — The type of rule. In this case Microsoft Azure Function. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `azureAppId` string, required — The Microsoft Azure Application ID. You can find your Microsoft Azure Application ID as shown in this <a href="https://dev.applicationinsights.io/documentation/Authorization/API-key-and-App-ID">article</a>.
      - `azureFunctionName` string, required — The name of your Microsoft Azure Function.
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` 'json' — JSON provides a text-based encoding.
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - GoogleCloudFunctionRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single' | 'batch', required — This is Single Request mode or Batch Request mode. Single Request mode sends each event separately to the endpoint specified by the rule. Batch Request mode rolls up multiple events into the same request. You can read more about the difference between single and batched events in the Ably <a href="https://ably.com/documentation/general/events#batching">documentation</a>.
    - `ruleType` 'http/google-cloud-function', required — The type of rule. In this case Google Cloud Function. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` 'json' — JSON provides a text-based encoding.
      - `functionName` string, required — The name of your Google Cloud Function.
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `projectId` string, required — The project ID for your Google Cloud Project that was generated when you created your project.
      - `region` string, required — The region in which your Google Cloud Function is hosted. See the <a href="https://cloud.google.com/compute/docs/regions-zones/">Google documentation</a> for more details.
      - `signingKeyId` string, nullable — The signing key ID for use in `batch` mode. Ably will optionally sign the payload using an API key ensuring your servers can validate the payload using the private API key. See the <a href="https://ably.com/documentation/general/events#security">webhook security docs</a> for more information.
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - AwsLambdaRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'aws/lambda', required — The type of rule. In this case AWS Lambda. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `authentication` union, required
        - AwsAccessKeysResponse
          - `accessKeyId` string — The AWS key ID for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'credentials' — Authentication method is using AWS credentials (AWS key ID and secret key).
        - AwsAssumeRole
          - `assumeRoleArn` string, required — If you are using the "ARN of an assumable role" authentication method, this is your Assume Role ARN. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'assumeRole' — Authentication method is using the ARN of an assumable role. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` string
      - `functionName` string, required — The name of your AWS Lambda Function.
      - `region` string, required — The region is which your AWS Lambda Function is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - AwsKinesisRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'aws/kinesis', required — The type of rule. In this case AWS Kinesis. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `authentication` union, required
        - AwsAccessKeysResponse
          - `accessKeyId` string — The AWS key ID for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'credentials' — Authentication method is using AWS credentials (AWS key ID and secret key).
        - AwsAssumeRole
          - `assumeRoleArn` string, required — If you are using the "ARN of an assumable role" authentication method, this is your Assume Role ARN. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'assumeRole' — Authentication method is using the ARN of an assumable role. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` 'json', required — JSON provides a text-based encoding.
      - `partitionKey` string, required — The AWS Kinesis partition key. See this <a href="https://knowledge.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably knowledge base article</a> for details.
      - `region` string, required — The region is which AWS Kinesis is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
      - `streamName` string, required — The name of your AWS Kinesis Stream.
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - AwsSqsRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'aws/sqs', required — The type of rule. In this case AWS SQS. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `authentication` union, required
        - AwsAccessKeysResponse
          - `accessKeyId` string — The AWS key ID for the AWS IAM user. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'credentials' — Authentication method is using AWS credentials (AWS key ID and secret key).
        - AwsAssumeRole
          - `assumeRoleArn` string, required — If you are using the "ARN of an assumable role" authentication method, this is your Assume Role ARN. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
          - `authenticationMode` 'assumeRole' — Authentication method is using the ARN of an assumable role. See this <a href="https://knowledge.ably.com/authentication-for-reactor-rules-for-aws-reactor-events-for-lambda-functions-reactor-firehose-for-aws-sqs-and-kinesis">Ably knowledge base article</a> for details.
      - `awsAccountId` string, required — Your AWS account ID.
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` string
      - `queueName` string, required — The AWS SQS queue name.
      - `region` string, required — The region is which AWS SQS is hosted. See the <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html#lambda_region">AWS documentation</a> for more detail.
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - AmqpRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'amqp', required — The type of rule. In this case AMQP. See the <a href="https://ably.com/integrations">documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` string
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `queueId` string, required
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.
  - AmqpExternalRuleResponse
    - `_links` object, nullable
    - `appId` string — The Ably application ID.
    - `created` number — Unix timestamp representing the date and time of creation of the rule.
    - `id` string — The rule ID.
    - `modified` number — Unix timestamp representing the date and time of last modification of the rule.
    - `requestMode` 'single', required — Single request mode sends each event separately to the endpoint specified by the rule. You can read more about single request mode events in the <a href="https://ably.com/documentation/general/events#batching">Ably documentation</a>.
    - `ruleType` 'amqp/external', required — The type of rule. In this case AMQP external (using Firehose). See the <a href="https://ably.com/documentation/general/firehose">Ably documentation</a> for further information.
    - `source` RuleSource, required
      - `channelFilter` string, required — This field allows you to filter your rule based on a regular expression that is matched against the complete channel name. Leave this empty if you want the rule to apply to all channels.
      - `type` 'channel.message' | 'channel.presence' | 'channel.lifecycle' | 'channel.occupancy', required — The type `channel.message` delivers all messages published on a channel. The type `channel.presence` delivers all enter, update and leave events for members present on a channel. The type `channel.lifecycle` events for this rule type are currently not supported. Get in touch (https://ably.com/contact) if you need this feature. The type `channel.occupancy` delivers all occupancy events for the channel.
    - `status` 'enabled' | 'disabled' — The status of the rule. Rules can be enabled or disabled.
    - `target` object, required
      - `enveloped` boolean, nullable — Messages delivered through Reactor are wrapped in an Ably envelope by default that contains metadata about the message and its payload. The form of the envelope depends on whether it is part of a Webhook/Function or a Queue/Firehose rule. For everything besides Webhooks, you can ensure you only get the raw payload by unchecking "Enveloped" when setting up the rule.
      - `format` string
      - `headers` object[] — If you have additional information to send, you'll need to include the relevant headers.
        - `name` string — The name of the header.
        - `value` string — The value of the header.
      - `mandatoryRoute` boolean, required — Reject delivery of the message if the route does not exist, otherwise fail silently.
      - `messageTtl` integer — You can optionally override the default TTL on a queue and specify a TTL in minutes for messages to be persisted. It is unusual to change the default TTL, so if this field is left empty, the default TTL for the queue will be used.
      - `persistentMessages` boolean, required — Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.
      - `routingKey` string, required — The AMQP routing key. See this <a href="https://knowledge.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule">Ably knowledge base article</a> for details.
      - `url` string, required
    - `version` string — API version. Events and the format of their payloads are versioned. Please see the <a href="https://ably.com/documentation/general/events">Events documentation</a>.

## Other responses

- `400` — Bad request
- `401` — Authentication failed
- `404` — App not found
- `422` — Invalid request
- `500` — Internal server error
- `504` — Gateway timeout

---

[API](https://skmtc.net/ably/apis/control.md) · [All operations](https://skmtc.net/ably/apis/control/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ably/control/versions/85e2f4b0deb6/schema)
