Skip to main content
Copy the block below and paste it into your AI agent (Claude, GPT, Cursor, etc.) to give it everything it needs to use the Nautilus API.
Replace YOUR_API_KEY with your actual API key before pasting.
## Nautilus API

Base URL: https://app.nautilus.co/api

### Authentication

All requests require a Bearer token in the Authorization header.

Authorization: Bearer YOUR_API_KEY

### Send SMS — POST /v1/message

Send an SMS (or MMS) to one or more phone numbers.

**Request body (JSON):**

| Field       | Type                  | Required | Description                                      |
|-------------|-----------------------|----------|--------------------------------------------------|
| to          | string or string[]    | Yes      | One phone number or an array of phone numbers.   |
| body        | string                | Yes      | The text content of the message.                 |
| attachments | { url: string }[]     | No       | Media URLs to attach (sends as MMS).             |

Phone numbers can be E.164 (+15551234567), 10-digit (5551234567), or dashed (555-123-4567). All are normalized to E.164 before sending.

**Example — single recipient:**

POST https://app.nautilus.co/api/v1/message
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "to": "+15551234567",
  "body": "Your wash is ready!"
}

**Example — multiple recipients with attachment:**

POST https://app.nautilus.co/api/v1/message
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "to": ["+15551234567", "+15559876543"],
  "body": "Flash sale: 50% off unlimited plans today!",
  "attachments": [{ "url": "https://example.com/promo.png" }]
}

**Responses:**

- 200: All messages sent. Body: { "success": true, "results": [{ "to": "+1...", "success": true }] }
- 207: Partial success. Body: { "success": false, "results": [{ "to": "+1...", "success": true }, { "to": "+1...", "success": false, "error": "Invalid phone number" }] }
- 400: Invalid request body. Body: { "error": "Invalid request format", "details": [...] }
- 401: Bad or missing token. Body: { "error": "Unauthorized" }
- 500: Server error. Body: { "error": "..." }

When sending to multiple recipients, each is processed independently. A failure for one does not block others.

### Send email — POST /v1/email

Send an email to one or more recipients.

**Request body (JSON):**

| Field   | Type               | Required | Description                                                                                   |
|---------|--------------------|----------|-----------------------------------------------------------------------------------------------|
| to      | string or string[] | Yes      | One email address or an array of email addresses.                                             |
| subject | string             | Yes      | The email subject line.                                                                       |
| html    | string             | Yes      | The email body as HTML.                                                                       |
| from        | string             | No       | Sender address. Must use @mail.nautilus.co domain. Defaults to Nautilus <contact@mail.nautilus.co>. |
| replyTo     | string             | No       | Reply-to email address.                                                                       |
| attachments | object[]           | No       | File attachments. Each needs filename + either path (URL) or content (base64).                |

Each attachment object: { "filename": "file.pdf", "path": "https://..." } or { "filename": "file.pdf", "content": "<base64>" }

**Example — single recipient:**

POST https://app.nautilus.co/api/v1/email
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "to": "customer@example.com",
  "subject": "Your monthly wash summary",
  "html": "<h1>Hi!</h1><p>You washed 12 times this month.</p>"
}

**Example — custom sender with reply-to:**

POST https://app.nautilus.co/api/v1/email
Content-Type: application/json
Authorization: Bearer YOUR_API_KEY

{
  "to": ["customer@example.com", "other@example.com"],
  "subject": "Welcome to Squeaky Clean",
  "html": "<p>Thanks for joining!</p>",
  "from": "Squeaky Clean <squeaky@mail.nautilus.co>",
  "replyTo": "support@squeakyclean.com"
}

**Responses:**

- 200: All emails sent. Body: { "success": true, "results": [{ "to": "...", "success": true, "id": "abc123" }] }
- 207: Partial success. Body: { "success": false, "results": [{ "to": "...", "success": true, "id": "abc123" }, { "to": "...", "success": false, "error": "..." }] }
- 400: Invalid request body. Body: { "error": "Invalid request format", "details": [...] }
- 401: Bad or missing token. Body: { "error": "Unauthorized" }
- 500: Server error. Body: { "error": "..." }

When sending to multiple recipients, each is processed independently. A failure for one does not block others.