Preparing your workspace...

assistant-chat.tsx2.5k
utils.ts850
button.tsx720
Quick Actions
codmirDevelopers
MarketplaceMy Apps
Go to codmirSign In

Webhooks

Receive real-time notifications when events happen in codmir.

Real-time
Events delivered instantly when they occur.
Secure
HMAC signatures to verify authenticity.
Reliable
Automatic retries with exponential backoff.

Setting Up Webhooks

1
Create a Webhook Endpoint

Create an endpoint in your application to receive webhook events. The endpoint must accept POST requests and return a 2xx status code.

app.post('/webhooks/codmir', (req, res) => {
  const event = req.body;
  
  switch (event.type) {
    case 'ticket.created':
      // Handle new ticket
      break;
    case 'ticket.updated':
      // Handle ticket update
      break;
  }
  
  res.status(200).send('OK');
});
2
Register Your Webhook

Register your webhook endpoint via the API or dashboard.

curl -X POST "https://api.codmir.com/v1/webhooks" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/codmir",
    "events": ["ticket.created", "ticket.updated"],
    "secret": "your-webhook-secret"
  }'
3
Verify Signatures

Always verify webhook signatures to ensure requests are from codmir.

import crypto from 'crypto';

function verifySignature(payload: string, signature: string, secret: string) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
    
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(`sha256=${expected}`)
  );
}

Available Events

EventDescription
ticket.createdA new ticket was created
ticket.updatedA ticket was updated
ticket.deletedA ticket was deleted
ticket.status_changedA ticket status was changed
ticket.assignedA ticket was assigned
comment.createdA comment was added to a ticket
project.createdA new project was created
member.addedA member was added to a project

Payload Structure

{
  "id": "evt_abc123",
  "type": "ticket.created",
  "timestamp": "2024-01-15T10:30:00Z",
  "data": {
    "ticket": {
      "id": "tkt_xyz789",
      "title": "Bug in login flow",
      "status": "open",
      "priority": "high",
      // ... more fields
    },
    "project": {
      "id": "proj_def456",
      "name": "Main App"
    },
    "user": {
      "id": "usr_ghi012",
      "name": "John Doe"
    }
  }
}

Next Steps

Webhook API Reference
Full API documentation for managing webhooks.
Best Practices
Learn how to build reliable webhook integrations.

Documentation

  • Getting Started
  • API Reference
  • SDK & CLI
  • Webhooks
  • Guides

Marketplace

  • Browse Apps
  • Featured Apps
  • Official Apps
  • Submit Your App

Resources

  • Community
  • Discord
  • GitHub
  • Blog

Company

  • About codmir
  • Careers
  • Status
  • Contact
codmirDevelopers
TermsPrivacyAPI TermsCodmir™ 2026. All rights reserved.