Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/data/nav/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ export default {
name: 'AWS Lambda',
link: '/docs/chat/moderation/custom/lambda',
},
{
name: 'Webhook',
link: '/docs/chat/moderation/custom/webhook',
},
],
},
],
Expand Down
6 changes: 3 additions & 3 deletions src/pages/docs/chat/moderation/custom/lambda.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ title: AWS Lambda
meta_description: "Detect and remove unwanted content in a Chat Room using AWS Lambda."
---

The AWS Lambda rule is a powerful way to custom moderation solution to Ably Chat. It enables you to run custom moderation logic or integrate with your preferred moderation provider by configuring an AWS Lambda function that will be invoked before messages are published to a chat room.
The AWS Lambda integration is a powerful way to add a custom moderation solution to Ably Chat. It enables you to run custom moderation logic or integrate with your preferred moderation provider by configuring an AWS Lambda function that will be invoked before messages are published to a chat room.

This rule is particularly useful when you want to:
This integration is particularly useful when you want to:

* Integrate with a custom moderation service
* Implement your own moderation logic
* Use a moderation provider that isn't directly supported by Ably

## Integration setup <a id="setup"/>

Configure the integration rule in your [Ably dashboard](https://ably.com/accounts/any/apps/any/integrations) or using the [Control API](/docs/platform/account/control-api).
Configure the integration in your [Ably dashboard](https://ably.com/accounts/any/apps/any/integrations) or using the [Control API](/docs/platform/account/control-api).

The following fields are specific to the Lambda transport. You can also configure the [general fields](/docs/chat/moderation/custom#configuration).

Expand Down
40 changes: 40 additions & 0 deletions src/pages/docs/chat/moderation/custom/webhook.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
title: Webhook
meta_description: "Detect and remove unwanted content in a Chat Room using a custom webhook endpoint."
---
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add a meta_keywords please?


The webhook integration enables you to implement custom moderation by configuring an HTTP endpoint that Ably will invoke before messages are published to a chat room.

This integration is useful when you want to:

* Integrate with a custom moderation service hosted on your own infrastructure
* Implement your own moderation logic using any web server or serverless platform
* Use a moderation provider that isn't directly supported by Ably
Comment on lines +10 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Integrate with a custom moderation service hosted on your own infrastructure
* Implement your own moderation logic using any web server or serverless platform
* Use a moderation provider that isn't directly supported by Ably
* Integrate with a custom moderation service hosted on your own infrastructure.
* Implement your own moderation logic using any web server or serverless platform.
* Use a moderation provider that isn't directly supported by Ably.


## Integration setup <a id="setup"/>

Configure the integration in your [Ably dashboard](https://ably.com/accounts/any/apps/any/integrations) or using the [Control API](/docs/platform/account/control-api).

The following fields are specific to the webhook transport. You can also configure the [general fields](/docs/chat/moderation/custom#configuration).

| Field | Description |
| ----- | ----------- |
| URL | The endpoint URL that Ably will send moderation requests to. |
| Headers | Optional HTTP headers to include with requests. Use this to provide authorization credentials or other required headers. |

## Request and response <a id="request-response"/>

The webhook transport uses the standard [request](/docs/chat/moderation/custom#request) and [response](/docs/chat/moderation/custom#response) formats for custom moderation.

The HTTP status code is returned directly from your endpoint's response.

## Best practice <a id="best-practice"/>

When implementing your webhook endpoint, consider the following:

* Keep your endpoint response time as low as possible to minimize latency
* Implement proper error handling and logging
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we mention about how to view errors from our side?

* Consider implementing rate limiting if you're using a third-party moderation service
* Use HTTPS to encrypt data in transit
* Authenticate requests using the headers field to prevent unauthorized access to your endpoint
* Consider implementing caching for frequently occurring content
Comment on lines +35 to +40
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Keep your endpoint response time as low as possible to minimize latency
* Implement proper error handling and logging
* Consider implementing rate limiting if you're using a third-party moderation service
* Use HTTPS to encrypt data in transit
* Authenticate requests using the headers field to prevent unauthorized access to your endpoint
* Consider implementing caching for frequently occurring content
* Keep your endpoint response time as low as possible to minimize latency.
* Implement proper error handling and logging.
* Consider implementing rate limiting if you're using a third-party moderation service.
* Use HTTPS to encrypt data in transit.
* Authenticate requests using the headers field to prevent unauthorized access to your endpoint.
* Consider implementing caching for frequently occurring content.

Comment on lines +35 to +40
Copy link
Contributor

@m-hulbert m-hulbert Feb 6, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is 'frequently occurring content' a thing in moderation OOI?

I think 'reoccurring' might read better if so.