Developer API Documentation
Integrate with Hephaestus CRM using our secure external API. All endpoints require Bearer token authentication.
Authentication
Include your API token in the Authorization header for all requests:
Authorization: Bearer YOUR_API_TOKEN
Endpoints
Create Customer
POST /api/external/customers Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN { "name": "Jane Doe", "email": "jane@example.com", "phone": "123-456-7890", "company": "Acme Inc." }
Response
{ "id": "cus_abc123", "name": "Jane Doe", "email": "jane@example.com", ... }
Update Customer
PUT /api/external/customers/{id} Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN { "name": "Jane Doe Updated" }
Create Deal
POST /api/external/deals Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN { "title": "Big Opportunity", "value": 10000, "status": "OPEN", "customerId": "cus_abc123", "closeDate": "2024-07-01" }
Response
{ "id": "deal_xyz789", "title": "Big Opportunity", ... }
Update Deal
PUT /api/external/deals/{id} Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN { "status": "WON" }
Create Activity
POST /api/external/activities Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN { "type": "CALL", "description": "Follow up call", "customerId": "cus_abc123", "dealId": "deal_xyz789", "dueDate": "2024-07-02T10:00:00Z" }
Response
{ "id": "act_123456", "type": "CALL", ... }
Update Activity
PUT /api/external/activities/{id} Content-Type: application/json Authorization: Bearer YOUR_API_TOKEN { "description": "Updated description" }
Error Responses
- 401 Unauthorized: Missing or invalid API token.
- 409 Conflict: Duplicate resource (e.g., customer with same email).
- 400 Bad Request: Invalid payload or missing required fields.