DropAphi v1 API

Developer reference for email, newsletter, OTP, and files

These endpoints are documented from the live route implementations in the app. Each card includes an example request, a response shape, and a one-click copy action for the snippet.

Authentication
Include your API key in the DROP-API-Key header.

Email

Send transactional and marketing emails, inspect templates, and check delivery status.

POST/v1/email/send

Send email

Send one or many emails with HTML, text, templates, attachments, and tracking.

Requires X-API-Key
Sample request
{
  "to": "recipient@example.com",
  "subject": "Welcome to DropAphi",
  "html": "<h1>Hello there</h1>",
  "text": "Hello there",
  "template": "welcome",
  "templateData": {
    "name": "Ada"
  },
  "fromName": "DropAphi",
  "tracking": {
    "opens": true,
    "clicks": true
  }
}
Expected response
{
  "success": true,
  "data": {
    "id": "eml_123",
    "status": "PENDING",
    "message": "Email queued successfully"
  }
}
  • Each recipient counts as one email unit.
  • You can pass cc, bcc, attachments, and custom headers.
GET/v1/email/templates

List templates

Fetch the built-in templates and the variables each template supports.

Requires X-API-Key
Sample request
{}
Expected response
{
  "success": true,
  "data": {
    "templates": [
      {
        "id": "welcome",
        "name": "Welcome",
        "variables": [
          "name",
          "company",
          "actionUrl"
        ]
      }
    ]
  }
}
GET/v1/email/{id}

Get email status

Retrieve delivery details, timestamps, and engagement counts for a sent email.

Requires X-API-Key
Sample request
{}
Expected response
{
  "success": true,
  "data": {
    "id": "eml_123",
    "status": "DELIVERED",
    "deliveredAt": "2026-07-11T10:00:00.000Z",
    "openCount": 2,
    "clickCount": 1
  }
}

Newsletter

Subscribe contacts, view subscriber lists, and trigger welcome emails.

POST/v1/newsletter/subscribe

Subscribe contact

Create or reactivate a subscribed contact and optionally send a welcome email.

Requires X-API-Key
Sample request
{
  "email": "subscriber@example.com",
  "name": "Jane Doe",
  "source": "landing_page",
  "templateId": "tmpl_123"
}
Expected response
{
  "success": true,
  "message": "Subscription created",
  "subscriber": {
    "id": "sub_123",
    "email": "subscriber@example.com",
    "status": "ACTIVE"
  }
}
  • Existing unsubscribed contacts are reactivated automatically.
  • Each subscription consumes one subscriber unit.
GET/v1/newsletter/subscribers

List subscribers

Paginate through subscribers and filter by status or segment.

Requires X-API-Key
Sample request
{}
Expected response
{
  "success": true,
  "data": {
    "subscribers": [
      {
        "id": "sub_123",
        "email": "subscriber@example.com",
        "status": "ACTIVE"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 50,
      "total": 1,
      "pages": 1
    }
  }
}

OTP

Create one-time passcodes, verify them, and resend codes with rate limiting protection.

POST/v1/otp/send

Send OTP

Generate and send a verification code to a recipient email address.

Requires X-API-Key
Sample request
{
  "email": "user@example.com",
  "length": 6,
  "expiry": 10,
  "brandName": "DropAphi"
}
Expected response
{
  "success": true,
  "data": {
    "id": "otp_123",
    "message": "OTP sent successfully to user@example.com",
    "expiresAt": "2026-07-11T10:10:00.000Z"
  }
}
  • The API blocks repeat requests within 60 seconds for the same email.
  • A pending OTP can only be verified while it is still valid.
POST/v1/otp/verify

Verify OTP

Verify a submitted code against the latest pending OTP for the recipient.

Requires X-API-Key
Sample request
{
  "email": "user@example.com",
  "code": "123456"
}
Expected response
{
  "success": true,
  "data": {
    "verified": true,
    "message": "OTP verified successfully",
    "id": "otp_123"
  }
}
POST/v1/otp/resend

Resend OTP

Invalidate the previous pending OTP and send a fresh verification code.

Requires X-API-Key
Sample request
{
  "email": "user@example.com",
  "reason": "not_received",
  "length": 6,
  "expiry": 10
}
Expected response
{
  "success": true,
  "data": {
    "id": "otp_456",
    "message": "New verification code sent to user@example.com",
    "regenerated": true
  }
}

Files

Upload files, list workspace assets, and fetch metadata for private or public files.

POST/v1/files/upload

Upload file

Upload a file as multipart form data and store it with metadata.

Requires X-API-Key
Sample request
multipart/form-data with a file field and optional metadata JSON
Expected response
{
  "success": true,
  "data": {
    "id": "fil_123",
    "name": "invoice.pdf",
    "size": 2.4,
    "mimeType": "application/pdf",
    "url": "https://dropaphi.xyz/api/files/fil_123"
  }
}
  • The upload route accepts a file field named file.
  • Metadata can include folder, visibility, tags, and description.
GET/v1/files

List files

List files in the current workspace with pagination and folder filtering.

Requires X-API-Key
Sample request
{}
Expected response
{
  "success": true,
  "data": {
    "files": [
      {
        "id": "fil_123",
        "originalName": "invoice.pdf",
        "visibility": "PUBLIC"
      }
    ],
    "pagination": {
      "page": 1,
      "limit": 50,
      "total": 1,
      "pages": 1
    }
  }
}
GET/v1/files/{fileId}

Get file details

Fetch the metadata and access URL for a specific file.

Requires X-API-Key
Sample request
{}
Expected response
{
  "success": true,
  "data": {
    "id": "fil_123",
    "name": "invoice.pdf",
    "mimeType": "application/pdf",
    "visibility": "PRIVATE",
    "size": 2457600
  }
}