Trevo API Documentation

Generating Your API Key

To enable automation or remote messaging from IoT devices, bots, or external services, each user can generate their unique API key.

  • Go to the Task Page
  • Click the Settings icon (top-right)
  • Scroll to the bottom to find your API Key section
  • You can Copy or Regenerate the key
[Screenshot: API Key section in Settings]

How It Works

The API key is included in your request header using trevoapi. The backend will:

  1. Use middleware to intercept the request
  2. Validate the key
  3. Identify the username and link the request to the user account

This makes the API ideal for integration in frontend features or external devices (like minibots, home automation, etc.).

Example Request

Send a POST request to create a new message and trigger a task:

POST https://trevo.onrender.com/api/message

Headers:
  Content-Type: application/json
  trevoapi: YOUR_API_KEY_HERE

Body:
{
  "prompt": "Create a message tha will make my friend enjoy his birthday. Send this message later to Name in 1hr in my Msg App. Also, do this task yearly until 2030."
}

Security

  • Each key is unique per user
  • Can be regenerated anytime — old key becomes invalid
  • Stored securely in backend; never exposed in plain text

Use Cases

  • Automate home devices (e.g., send AI prompts based on sensors)
  • Connect external apps to send scheduled tasks
  • Control bots or robotics that interact with the Trevo AI
  • Enable frontend widgets or third-party integrations

More endpoints and usage patterns coming soon. API access is under active development. Contact support for special use cases.