API Documentation
Integrate DM Dad into your applications with our RESTful API. Automate DMs, manage tasks, and track account activity programmatically.
Quick Start
All API requests should be made to: https://dmdad.com/api/v1
You'll need an access key to authenticate requests. Get your access key from your account dashboard.
// Example: Send a DM
const response = await fetch('https://dmdad.com/api/v1/sendDM', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
body: JSON.stringify({
key: 'your-access-key',
message: 'Hello!',
username: 'target_username',
platform: 'reddit' // or 'x'
})
});Authentication
All API requests require an access key. Include your access key in the request body for each endpoint.
Note: Keep your access keys secure. Never expose them in client-side code or public repositories.
/api/v1/ping
Ping the server to update your connection status and retrieve pending tasks. This endpoint is automatically called periodically to maintain connection status and receive new tasks when your DM Dad extension is in API mode. You can use it too to test api connection and recieve the latest tasks you have for a connection key.
Request
PUT /api/v1/ping
Content-Type: application/json
{
"key": "your-access-key"
}Response
{
"success": true,
"message": "Ping successful",
"task": {
"id": "task-id",
"action": {
"type": "sendDM",
"platform": "reddit",
"username": "target_username",
"message": "Hello!"
},
"key": "your-access-key",
"created_at": "2024-01-01T00:00:00Z",
"complete": false
}
}If there are no pending tasks, task will be null.
/api/v1/sendDM
Create a task to send a direct message to a specific user on Reddit or X (Twitter).
Request
POST /api/v1/sendDM
Content-Type: application/json
{
"key": "your-access-key",
"message": "Hello! I'd like to connect.",
"username": "target_username",
"platform": "reddit" // or "x"
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Your access key |
| message | string | Yes | The message content to send |
| username | string | Yes | Target username on the platform |
| platform | string | Yes | Either "reddit" or "x" (for Twitter) |
Response
{
"success": true,
"message": "Action created successfully"
}Update Task Status
After DMing the user DM Dad automatically updates the status with a message using this PUT endpoint. You can set complete to true to cancel DMing the user.
PUT /api/v1/sendDM
Content-Type: application/json
{
"task": {
"id": "task-id",
"key": "your-access-key",
"message": "Task completed successfully",
"complete": true
}
}/api/v1/dmCommenters
Create a task to send DMs to commenters and/or the author of a specific post on Reddit or X (Twitter).
Request
POST /api/v1/dmCommenters
Content-Type: application/json
{
"key": "your-access-key",
"message": "Thanks for your comment!",
"postUrl": "https://reddit.com/r/subreddit/comments/...",
"platform": "reddit", // or "x"
"dmAuthor": false, // optional, default: false
"dmCommenters": true // optional, default: true
}Parameters
| Field | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Your access key |
| message | string | Yes | The message content to send |
| postUrl | string | Yes | URL of the post |
| platform | string | Yes | Either "reddit" or "x" (for Twitter) |
| dmAuthor | boolean | No | Whether to DM the post author (default: false) |
| dmCommenters | boolean | No | Whether to DM commenters (default: true) |
Response
{
"success": true,
"message": "Action created successfully"
}Update Task Status
After DMing all the commenters DM Dad automatically updates the status using this PUT endpoint. Cancel task by setting complete to true:
PUT /api/v1/dmCommenters
Content-Type: application/json
{
"task": {
"id": "task-id",
"key": "your-access-key",
"message": "Task completed successfully",
"complete": true
}
}Error Handling
All errors return a JSON response with a success field set to false and a message field describing the
error.
{
"success": false,
"message": "Invalid request data must include key, message, username, and platform"
}| Status Code | Description |
|---|---|
| 400 | Bad Request - Invalid parameters |
| 404 | Not Found - Invalid access key |
| 500 | Internal Server Error |
Rate Limiting
API requests are subject to rate limiting based on your plan. Contact us at help@dmdad.com for information about rate limits and upgrading your plan.
Need Help?
Have questions about the API or need assistance with integration? We're here to help!