API Documentation
Complete reference for the Namak API. Build powerful integrations with our event management platform.
Getting Started
Base URL
https://api.namak.me/v1
Authentication
All API requests require authentication using Bearer tokens. Include your API key in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Endpoints
GET
/events
List all events for the authenticated user
Parameters
Name | Type | Required | Description |
---|---|---|---|
page | integer | Optional | Page number for pagination |
limit | integer | Optional | Number of items per page (max 100) |
status | string | Optional | Filter by event status (active, draft, completed) |
Example Response
{
"data": [
{
"id": "evt_123",
"title": "Summer Conference 2024",
"date": "2024-07-15T09:00:00Z",
"status": "active",
"attendees": 150
}
],
"meta": {
"page": 1,
"limit": 20,
"total": 45
}
}
POST
/events
Create a new event
Parameters
Name | Type | Required | Description |
---|---|---|---|
title | string | Required | Event title |
description | string | Optional | Event description |
date | datetime | Required | Event date and time (ISO 8601) |
location | object | Required | Event location details |
Example Response
{
"id": "evt_124",
"title": "New Event",
"created_at": "2024-01-10T10:00:00Z"
}
GET
/events/{id}
Get details of a specific event
Example Response
{
"id": "evt_123",
"title": "Summer Conference 2024",
"description": "Annual technology conference",
"date": "2024-07-15T09:00:00Z",
"location": {
"venue": "Convention Center",
"address": "123 Main St, San Francisco, CA"
},
"attendees": 150,
"capacity": 200,
"status": "active"
}
PUT
/events/{id}
Update an existing event
Parameters
Name | Type | Required | Description |
---|---|---|---|
title | string | Optional | Event title |
description | string | Optional | Event description |
date | datetime | Optional | Event date and time (ISO 8601) |
DELETE
/events/{id}
Cancel an event
GET
/bookings
List all bookings for the authenticated user
Parameters
Name | Type | Required | Description |
---|---|---|---|
event_id | string | Optional | Filter bookings by event ID |
status | string | Optional | Filter by booking status |
POST
/bookings
Create a new booking for an event
Parameters
Name | Type | Required | Description |
---|---|---|---|
event_id | string | Required | ID of the event to book |
attendees | integer | Required | Number of attendees |
attendee_details | array | Optional | Details of each attendee |
Rate Limiting
API requests are limited to prevent abuse and ensure service stability:
- 1000 requests per hour per API key
- Rate limit information is included in response headers
- Exceeding limits returns a 429 status code
Error Codes
Code | Description |
---|---|
200 | Success - Request completed successfully |
201 | Created - Resource created successfully |
400 | Bad Request - Invalid request parameters |
401 | Unauthorized - Invalid or missing API key |
403 | Forbidden - Access denied to resource |
404 | Not Found - Resource not found |
429 | Too Many Requests - Rate limit exceeded |
500 | Internal Server Error - Server error occurred |
SDKs & Libraries
JavaScript/TypeScript
Official SDK for Node.js and browsers
Python
Official SDK for Python applications
Ruby
Official SDK for Ruby applications
PHP
Official SDK for PHP applications
Go
Official SDK for Go applications
Java
Official SDK for Java applications