Skip to content

Create Organization ​

Organizations are the top-level containers in Nexus that hold all your notification infrastructure. This guide will walk you through creating your first organization and setting it up for success.

What is an Organization? ​

An organization in Nexus represents your company, project, or team. It contains:

  • API Keys for authentication
  • Environments (development, staging, production)
  • Team Members with different permission levels
  • Billing & Usage information
  • Global Settings and preferences

Step 1: Access the Dashboard ​

bash
# Open your browser and navigate to:
https://app.nexus.dev
bash
# If you're running Nexus locally:
http://localhost:4000

Step 2: Sign Up or Log In ​

If you don't have an account yet:

  1. Click "Sign Up" on the homepage
  2. Enter your email address
  3. Create a secure password
  4. Verify your email address
  5. Complete your profile

If you already have an account, simply log in with your credentials.

Step 3: Create Your Organization ​

Using the Dashboard ​

  1. Click "Create Organization" on your dashboard

  2. Fill in the organization details:

    Organization Name: Acme Corporation
    Company Size: 11-50 employees
    Industry: Technology
    Primary Use Case: Transactional emails
  3. Choose your plan:

    • Free: Up to 10,000 notifications/month
    • Pro: Up to 100,000 notifications/month
    • Enterprise: Unlimited notifications
  4. Click "Create Organization"

Using the API ​

You can also create an organization programmatically:

bash
curl -X POST https://api.nexus.dev/v1/organizations \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_USER_TOKEN" \
  -d '{
    "name": "Acme Corporation",
    "website": "https://acme.com",
    "industry": "technology",
    "companySize": "11-50",
    "primaryUseCase": "transactional"
  }'
javascript
const response = await fetch('https://api.nexus.dev/v1/organizations', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_USER_TOKEN'
  },
  body: JSON.stringify({
    name: 'Acme Corporation',
    website: 'https://acme.com',
    industry: 'technology',
    companySize: '11-50',
    primaryUseCase: 'transactional'
  })
})

const organization = await response.json()
console.log('Organization created:', organization.data)
python
import requests

response = requests.post(
    'https://api.nexus.dev/v1/organizations',
    headers={
        'Content-Type': 'application/json',
        'Authorization': 'Bearer YOUR_USER_TOKEN'
    },
    json={
        'name': 'Acme Corporation',
        'website': 'https://acme.com',
        'industry': 'technology',
        'companySize': '11-50',
        'primaryUseCase': 'transactional'
    }
)

organization = response.json()
print('Organization created:', organization['data'])

Step 4: Get Your API Keys ​

After creating your organization, you'll receive API keys:

Development Key ​

sk_test_1234567890abcdef...
  • Use for testing and development
  • No emails are actually sent
  • Unlimited usage

Production Key ​

sk_live_1234567890abcdef...
  • Use for live notifications
  • Real emails/SMS are sent
  • Usage counts toward your plan limits

Store Your Keys Securely ​

bash
# Add to your .env file
NEXUS_API_KEY_TEST=sk_test_1234567890abcdef...
NEXUS_API_KEY_LIVE=sk_live_1234567890abcdef...

# Use in your application
NODE_ENV=development ? process.env.NEXUS_API_KEY_TEST : process.env.NEXUS_API_KEY_LIVE
bash
# For GitHub Actions
# Go to Settings > Secrets > Actions
# Add these secrets:
NEXUS_API_KEY_TEST
NEXUS_API_KEY_LIVE
bash
# For Docker deployments
echo "sk_live_1234..." | docker secret create nexus_api_key -

Security Note

Never commit API keys to version control or expose them in client-side code. Always use environment variables or secure secret management systems.

Step 5: Set Up Environments ​

Nexus automatically creates three environments for you:

Development Environment ​

  • Purpose: Local development and testing
  • API Key: sk_test_...
  • Notifications: Not actually sent (logged only)
  • Rate Limits: Unlimited

Staging Environment ​

  • Purpose: Pre-production testing
  • API Key: sk_test_... (separate from dev)
  • Notifications: Can be sent to test addresses
  • Rate Limits: Same as production

Production Environment ​

  • Purpose: Live, customer-facing notifications
  • API Key: sk_live_...
  • Notifications: Actually sent to recipients
  • Rate Limits: Based on your plan

Configure Environment Settings ​

bash
1. Navigate to Settings > Environments
2. Select an environment
3. Configure:
   - Default sender information
   - Webhook endpoints
   - Rate limiting
   - Provider settings
javascript
// Update environment settings
const response = await fetch(`https://api.nexus.dev/v1/environments/${envId}`, {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer sk_live_...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    settings: {
      defaultSender: {
        name: 'Acme Corporation',
        email: '[email protected]'
      },
      webhookUrl: 'https://acme.com/webhooks/nexus',
      rateLimit: {
        perMinute: 1000,
        burst: 2000
      }
    }
  })
})

Step 6: Configure Notification Providers ​

Set up the services that will actually deliver your notifications:

Email Providers ​

bash
1. Go to Settings > Providers > Email
2. Select "SendGrid"
3. Enter your SendGrid API key
4. Set default from address
5. Test the connection
bash
1. Go to Settings > Providers > Email  
2. Select "AWS SES"
3. Enter AWS credentials
4. Configure region
5. Verify sender domain
bash
1. Go to Settings > Providers > Email
2. Select "Postmark" 
3. Enter server token
4. Configure sender signature
5. Test connection

SMS Providers ​

bash
1. Go to Settings > Providers > SMS
2. Select "Twilio"
3. Enter Account SID and Auth Token
4. Set default phone number
5. Test with your phone
bash
1. Go to Settings > Providers > SMS
2. Select "AWS SNS"
3. Enter AWS credentials
4. Configure region
5. Test delivery

Push Notification Providers ​

bash
1. Go to Settings > Providers > Push
2. Select "Firebase"
3. Upload service account JSON
4. Configure app settings
5. Test with device token
bash
1. Go to Settings > Providers > Push
2. Select "Apple Push"
3. Upload certificate or enter auth key
4. Configure bundle ID
5. Test with device

Step 7: Invite Team Members ​

Collaborate with your team by inviting members:

Roles and Permissions ​

RolePermissions
OwnerFull access to everything
AdminManage users, settings, billing
DeveloperAccess API keys, create workflows
ViewerRead-only access to dashboards

Invite Process ​

bash
1. Go to Settings > Team
2. Click "Invite Member"
3. Enter email address
4. Select role
5. Add personal message (optional)
6. Click "Send Invitation"
javascript
const response = await fetch('https://api.nexus.dev/v1/organizations/invitations', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_live_...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    email: '[email protected]',
    role: 'developer',
    message: 'Welcome to our notification team!'
  })
})

Step 8: Configure Organization Settings ​

General Settings ​

bash
Settings > General:
- Organization name
- Website URL  
- Logo upload
- Time zone
- Date format
- Default language
javascript
const response = await fetch(`https://api.nexus.dev/v1/organizations/${orgId}`, {
  method: 'PATCH',
  headers: {
    'Authorization': 'Bearer sk_live_...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'Acme Corporation Inc.',
    website: 'https://acme.com',
    timezone: 'America/New_York',
    locale: 'en-US'
  })
})

Billing Settings ​

Set up billing information for paid plans:

  1. Go to Settings > Billing
  2. Add payment method (credit card or ACH)
  3. Set billing address
  4. Choose billing cycle (monthly/annual)
  5. Set usage alerts (optional)

Security Settings ​

Configure security policies:

bash
Settings > Security:
- Two-factor authentication (2FA)
- IP address restrictions
- API key rotation schedule  
- Webhook signing secrets
- Data retention policies
bash
1. Install authenticator app (Google Authenticator, Authy)
2. Scan QR code in Settings > Security
3. Enter verification code
4. Save backup codes securely

Step 9: Test Your Setup ​

Verify everything is working correctly:

1. API Connection Test ​

bash
curl -H "Authorization: Bearer sk_test_..." \
  https://api.nexus.dev/v1/organizations/me

# Should return your organization details
javascript
const response = await fetch('https://api.nexus.dev/v1/organizations/me', {
  headers: {
    'Authorization': 'Bearer sk_test_...'
  }
})

const org = await response.json()
console.log('Organization:', org.data.name)

2. Provider Test ​

Send a test notification through each configured provider:

bash
1. Go to Settings > Providers
2. Select a provider
3. Click "Send Test"
4. Enter test destination
5. Verify delivery
javascript
// Test email delivery
const response = await fetch('https://api.nexus.dev/v1/providers/email/test', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_test_...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    to: '[email protected]',
    subject: 'Nexus Test Email',
    content: 'This is a test email from Nexus!'
  })
})

Step 10: Set Up Monitoring ​

Configure monitoring and alerting:

Webhook Configuration ​

Set up webhooks to receive delivery status updates:

javascript
const express = require('express')
const crypto = require('crypto')

app.post('/webhooks/nexus', express.raw({type: 'application/json'}), (req, res) => {
  const signature = req.headers['nexus-signature']
  const payload = req.body.toString()
  
  // Verify webhook signature
  const expectedSignature = crypto
    .createHmac('sha256', process.env.NEXUS_WEBHOOK_SECRET)
    .update(payload)
    .digest('hex')
  
  if (signature === `sha256=${expectedSignature}`) {
    const event = JSON.parse(payload)
    
    switch (event.type) {
      case 'message.sent':
        console.log(`Message ${event.data.id} sent successfully`)
        break
      case 'message.delivered':
        console.log(`Message ${event.data.id} delivered`)
        break
      case 'message.failed':
        console.error(`Message ${event.data.id} failed:`, event.data.error)
        break
    }
  }
  
  res.status(200).send('OK')
})
python
import hmac
import hashlib
import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt

@csrf_exempt
def nexus_webhook(request):
    if request.method == 'POST':
        signature = request.headers.get('nexus-signature')
        payload = request.body.decode()
        
        # Verify signature
        expected_signature = 'sha256=' + hmac.new(
            settings.NEXUS_WEBHOOK_SECRET.encode(),
            payload.encode(),
            hashlib.sha256
        ).hexdigest()
        
        if signature == expected_signature:
            event = json.loads(payload)
            
            if event['type'] == 'message.delivered':
                print(f"Message {event['data']['id']} delivered")
            elif event['type'] == 'message.failed':
                print(f"Message {event['data']['id']} failed")
        
        return HttpResponse('OK')

Usage Alerts ​

Set up alerts for important metrics:

bash
Settings > Alerts:
- Usage threshold (80% of plan limit)
- Failed delivery rate (>5%)
- High bounce rate (>10%)
- Webhook failures
- API errors
javascript
const response = await fetch('https://api.nexus.dev/v1/alerts', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer sk_live_...',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    name: 'High Failure Rate',
    metric: 'failure_rate',
    threshold: 0.05, // 5%
    period: '1h',
    channels: ['email', 'slack']
  })
})

Organization Best Practices ​

1. Environment Strategy ​

  • Use Development for local testing
  • Use Staging for QA and integration tests
  • Use Production only for live customer notifications
  • Never use production keys in development

2. Team Management ​

  • Give team members minimum required permissions
  • Use Developer role for engineers
  • Limit Admin role to senior team members
  • Regularly audit team access

3. Security ​

  • Rotate API keys regularly (quarterly)
  • Enable two-factor authentication for all users
  • Use IP restrictions if possible
  • Monitor API usage for anomalies

4. Monitoring ​

  • Set up webhook endpoints for delivery tracking
  • Configure usage alerts before hitting limits
  • Monitor bounce and complaint rates
  • Track API error rates

Troubleshooting ​

Common Issues ​

"Invalid API Key" Error ​

bash
# Check your API key format
echo $NEXUS_API_KEY | head -c 20

# Should start with sk_test_ or sk_live_
# If not, regenerate in dashboard

"Organization Not Found" ​

bash
# Verify you're using the correct organization ID
curl -H "Authorization: Bearer sk_test_..." \
  https://api.nexus.dev/v1/organizations/me

Provider Test Failures ​

bash
# Check provider configuration
# Verify credentials are correct
# Ensure domains are verified (for email)
# Check rate limits and quotas

Webhook Not Receiving Events ​

bash
# Verify webhook URL is publicly accessible
curl -X POST https://your-domain.com/webhooks/nexus

# Check webhook secret configuration
# Verify SSL certificate (if using HTTPS)

Next Steps ​

Now that your organization is set up:

  1. Send your first notification
  2. Create your first workflow
  3. Design email templates
  4. Set up the notification widget

Getting Help ​