Developers & Integrations

API Documentation

Build seamless, high-performance integrations with Omnyra's reliable REST API. Manage campaigns, automations, and senders programmatically.

Current Version: v1.0 (Latest)
Base URL: https://omnyra.marketing/api/v1
Find your Team ID in your Dashboard under Settings > API

Authentication

The Omnyra API requires an API key for authentication. You must include your key in the header of all HTTP requests. Requests without a valid token will be rejected with a 403 Forbidden or 401 Unauthorized error.

HTTP Request Header Structure
X-AUTHORIZATION: YOUR_API_TOKEN_HERE

Never hardcode your API tokens into frontend applications or publicly accessible repositories. Always proxy requests through your own secure backend.

REST Capabilities

All modules natively support full RESTful interactions. Use standard HTTP verbs on the resource base URLs to achieve bidirectional sync.

GET Read Resources

Fetch collections of resources. Can include query parameters (e.g., ?startDate for filtering arrays).

POST Create Resource

Generates a new UUID entity and provisions it securely within your team's workspace.

PUT / PATCH Update Resource

Targets a specific {id} to update properties securely. You only need to send fields you wish to mutate.

DELETE Remove Resource

Permanently removes a specific {id} and cascading elements from the ecosystem.

Live API Tester Interactive

Test your API integrations dynamically straight from the browser. Enter your credentials below to orchestrate a dummy GET request and observe the native JSON response.

Campaigns

/teams/{teamId}/campaigns

Create, list, adapt, or remove email campaigns for your teams dynamically. Supports ?startDate=Y-m-d on GET lists.

Payload Reference

  • name Required
    String label for the campaign.
  • niche Optional
    String for segmentation categorisation.
  • templateId Optional
    UUID binding. Must be a template bound to the same team.
JSON Object POST / PUT
{
  "name": "Black Friday Mega Deal",
  "niche": "e-commerce",
  "sender": "noreply@myshop.com",
  "templateId": "8f9a2e-4b2c..."
}

Importing Contacts into Campaign

/teams/{teamId}/campaigns/{campaignId}/contacts
Bulk-import a segment of contacts/subscribers and link them directly to a specific campaign. The system performs automatic deduplication (upsert) matching the provided email addresses against the current team database:
  • If a contact email already exists, it updates their name, url, and merges any custom JSON metadata fields.
  • Maximum batch limit is securely set at 500 contacts per request.

Payload Elements

  • contacts Required
    Array of objects. Each object must contain an email string. Optional keys: name, url, metadata.
  • overwrite Boolean
    If true, unlinks and removes all active contacts mapped to this campaign boundary before iterating the payload payload. Fallback behavior is false (appends).
JSON Object POST
{
  "overwrite": false,
  "contacts": [
    {
      "email": "anna@example.com",
      "name": "Anna Smith",
      "metadata": {
        "source": "api_import"
      }
    }
  ]
}

Automations

/teams/{teamId}/automations

Scaffold structural logic trees. Define the automation bundle limits, descriptions, and operational capacity before filling them with scheduled phases.

Payload Reference

  • name Required
    String title.
  • campaignId Required
    UUID of the bound campaign.
  • description Optional
    Internal description of the pipeline.
  • isActive Boolean
    Whether the automation logic is actually checking and evaluating subscribers. Default stringual false.
JSON Object POST / PUT
{
  "name": "B2B Outreach 2026",
  "campaignId": "8f9a2e-4b2c...",
  "description": "Cold lead activation.",
  "isActive": true,
  "useAI": false
}

Automation Phases (Scheduling)

/teams/{teamId}/automations/{automationId}/phases

Attach scheduled emails directly into previously generated automations. Complex timezone calculus is abstracted automatically based on payload entries.

Payload Specifics

  • templateId Required
    Target Email Framework (UUID).
  • triggerType Enum
    Must be immediate, delayed, or scheduled.
  • delayMinutes Trigger Dependent
    Mandatory if type involves 'delayed'. Represents physical delay offset in integer.
  • executionTime Trigger Dependent
    Mandatory if type involves 'scheduled'. Syntax HH:MM. Use alongside timezone string (e.g. Europe/Bucharest).
JSON Object POST / PUT
{
  "name": "After 2 days chaser",
  "templateId": "2bfd2c...",
  "triggerType": "delayed",
  "delayMinutes": 2880,
  "sortOrder": 2
}

Templates

/teams/{teamId}/templates

Programmatically generate custom Email Templates inside your team workspace prior to linking them into targeted Automations or Campaigns.

Payload Details

  • name Required
    Internal label for the template identifier.
  • subject Required
    The email's title block or subject line.
  • content Optional
    HTML structure or raw text content string.
  • category Optional
    Grouping string tag.
  • isPublic Boolean
    False by default. Flag to establish workspace availability.
JSON Object POST / PUT
{
  "name": "B2B Outreach Intro",
  "subject": "Hi {{ name }} - Quick Question",
  "content": "

Hey.

", "category": "outbound", "isPublic": true }

SMTP Senders

/teams/{teamId}/senders

Bridge direct connections between your app's custom client accounts and Omnyra through API credential loading. Perfect for reseller structures and agencies setting up their sub-client funnels automatically.

  • user Required
  • password Required
  • host Required
  • port Required (e.g. 587)
  • dailyLimit Integer
JSON Object POST / PUT
{
  "user": "aws_ses_user_id11",
  "password": "aws_ses_password_secret",
  "host": "email-smtp.us-east-1.amazonaws.com",
  "port": 587,
  "name": "Brand A - Amazon SES",
  "username": "Brand A Updates",
  "dailyLimit": 20000
}

Standard Responses

Success (2xx)
{
  "success": true,
  "data": {
    "id": "e9b1...",
    "name": "Resource label",
    "createdAt": "2026-04-04T12:00:00+00:00"
  }
}
Error (4xx - 5xx)
{
  "error": "Campaign name is required"
}