Skip to main content

API Documentation

v1.5

Complete API reference for integrating AI agents with Vibez.now. Rate limit: 60 requests/minute per API key.

Rate Limiting
Idempotency Keys
Sandbox Mode
Webhook Delivery
Batch Submission
API Logging
Health Checks
Discord Notifications
Auto-Expiry
Email Digests
MFA
Offline Queue
Interactive Swagger UI

Endpoints

POST
/submit-request
v1

Submit a single request for user approval. Supports idempotency keys and sandbox mode.

Headers

  • • x-api-key (required)
  • • x-idempotency-key (optional)
  • • x-sandbox: true (optional)

Request Body

{
  "title": "Deploy to production",
  "description": "Ready to ship v2.0",
  "code_snippet": "git push origin main",
  "metadata": { "branch": "main" },
  "source": "my-agent",
  "expires_in_minutes": 60
}

Response

{
  "success": true,
  "request_id": "uuid",
  "message": "Request submitted successfully"
}
GET
/check-status
v1

Check status of a specific request or list all requests with pagination and filtering.

Headers

  • • x-api-key (required)
  • • x-sandbox: true (optional)

Query Params

?request_id=uuid OR ?status=pending&limit=20&offset=0

Response

{
  "id": "uuid",
  "title": "Deploy to production",
  "status": "approved",
  "created_at": "2026-02-21T00:00:00Z",
  "approved_at": "2026-02-21T00:01:00Z"
}
POST
/batch-submit
v1

Submit up to 50 requests in a single API call with structured logging.

Headers

  • • x-api-key (required)
  • • x-idempotency-key (optional)
  • • x-sandbox: true (optional)

Request Body

{
  "requests": [
    { "title": "Deploy frontend", "source": "ci" },
    { "title": "Deploy backend", "source": "ci" }
  ]
}

Response

{
  "success": true,
  "results": [
    { "index": 0, "success": true, "request_id": "uuid" },
    { "index": 1, "success": true, "request_id": "uuid" }
  ],
  "count": 2
}
POST
/validate-api-key
v1

Validate an API key and check its scope

Headers

  • • x-api-key (required)

Response

{
  "valid": true,
  "user_id": "uuid",
  "scope": "full"
}
GET
/health-check
system

Check service health status for database and auth. No API key required.

Headers

  • • (none — public endpoint)

Response

{
  "status": "healthy",
  "timestamp": "2026-02-21T00:00:00Z",
  "uptime_ms": 42,
  "services": {
    "database": { "status": "up" },
    "auth": { "status": "up" }
  },
  "version": "1.0.0"
}
POST
/webhook-deliver
notifications

Deliver event notifications to webhook URLs and Discord with exponential backoff retry.

Headers

  • • authorization (service role)

Request Body

{
  "user_id": "uuid",
  "request_id": "uuid",
  "event": "request.approved",
  "data": { "title": "Deploy to prod" }
}

Response

{
  "success": true,
  "deliveries": [
    { "type": "webhook", "success": true, "attempts": 1 },
    { "type": "discord", "success": true, "attempts": 1 }
  ]
}
POST
/expire-requests
system

Auto-reject pending requests past their expiration time. Designed for scheduled invocation.

Headers

  • • authorization (service role)

Response

{
  "success": true,
  "expired_count": 3
}

SDKs & CLI

Shell
# Install via npm (coming soon)
# npm install -g vibez-cli

# Or use curl directly:

# Submit a request
curl -X POST "https://vibez.now/api/submit-request" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"title": "Deploy to prod", "description": "Ship it!"}'

# Check status
curl "https://vibez.now/api/check-status?request_id=REQUEST_ID" \
  -H "x-api-key: YOUR_API_KEY"

# Batch submit
curl -X POST "https://vibez.now/api/batch-submit" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-idempotency-key: unique-key-123" \
  -d '{"requests": [{"title": "Task 1"}, {"title": "Task 2"}]}'

# Sandbox mode (no side effects)
curl -X POST "https://vibez.now/api/submit-request" \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "x-sandbox: true" \
  -d '{"title": "Test request"}'

Platform Features

🔒 Rate Limiting

60 requests/minute per API key. Returns 429 with Retry-After header when exceeded.

🔑 Idempotency Keys

Set x-idempotency-key header to prevent duplicate submissions.

🧪 Sandbox Mode

Set x-sandbox: true header to test without creating real requests.

📦 Batch Submission

Submit up to 50 requests in one API call via /batch-submit.

🔔 Webhooks & Discord

Real-time notifications via custom webhooks and Discord rich embeds with exponential backoff retry.

📊 API Logging

All API requests are logged with timing, status codes, and request/response bodies via structured JSON logging.

💚 Health Checks

Public /health-check endpoint monitors database and auth service status.

⏰ Auto-Expiry

Requests with expires_in_minutes are auto-rejected when they expire.

📧 Email Digests

Daily activity summaries delivered to your inbox at 8 AM UTC.

🛡️ MFA & Security

TOTP-based multi-factor auth, session management, login history, and encrypted GitHub tokens.

📱 Mobile & Offline

Swipe gestures on mobile, keyboard shortcuts, and offline approval queue with automatic sync.

🤖 Auto-Approve Rules

Define rules to automatically approve requests from trusted agents by name or source pattern.