Bot DMs
Enable direct messaging between users and your integration
Bot DMs allow users to have private, one-on-one conversations with your integration. When enabled, users can start direct message threads with your integration, which appear in their sidebar with your integration’s name and avatar.
Enabling Bot DMs
To enable direct messaging for your integration:
- Set up a webhook that listens for the
message.dm
event (see Webhooks) - Ensure your webhook is active and responding to events
- Your integration will automatically appear in the “New Thread” UI with an “app” badge next to its name
Users will only see your integration in the “New Thread” UI if your webhook is actively listening for the message.dm
event.
Receiving messages from users
When a user sends a message to your integration, Campsite will send a webhook event with the message.dm
event type. Here’s an example payload:
Sending messages to users
To send a direct message to a user, use the Create DM endpoint. This endpoint uses member IDs instead of thread IDs so you can message users without keeping track of a thread ID for each user.
Bot DM guidelines
- Respond to user messages promptly (within a few seconds when possible)
- Provide feedback when processing longer operations
- Handle errors gracefully with clear error messages