Create App

Create a new app in your organization

Create App

Create a new app in your Appizer organization.

Endpoint

text
POST /v1/apps

Authentication

text
X-API-Key: apps_your_api_key

Request Body

Field Type Required Description
name string Yes App name (1-100 characters)
description string No App description (max 500 characters)
website_url string No Valid URL to your app's website
authorized_domains array No Array of domain strings allowed to use the SDK
data_retention_days number No Days to retain event data (30-2555, default: 365)
timezone string No Timezone for the app (default: UTC)
engagement_platform string No Either 'none' or 'wonderpush' (default: none)
engagement_credentials object No Credentials for engagement platform
email_platform string No Either 'none' or 'brevo' (default: none)
email_credentials object No Credentials for email platform
webhook_enabled boolean No Enable webhook passthrough (default: false)
webhook_url string No URL to receive webhook events
webhook_use_query_params boolean No Send event data as query parameters (default: false)
context_info string No Context for AI-generated content (max 2000 characters)

Response

Success (201 Created)

json
{
  "success": true,
  "app": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "organization_id": "cf2701f8-fc4d-4002-8d52-92dd0d1e82a7",
    "name": "My New App",
    "description": "My awesome application",
    "app_store_url": null,
    "play_store_url": null,
    "website_url": null,
    "engagement_platform": "none",
    "engagement_credentials": null,
    "api_key": "ak_ba4c94d06b2118997db91bb75448dd55",
    "api_secret": "as_16de6819e8cc900583a9ef409ed2b7b26592d3fa29a7812026610c27",
    "created_at": "2026-05-16T20:14:48.939Z",
    "updated_at": "2026-05-16T20:14:48.939Z",
    "platform": "web",
    "bundle_id": null,
    "environment": "production",
    "data_retention_days": 365,
    "timezone": "UTC",
    "features": {
      "push": true,
      "analytics": true,
      "audiences": true,
      "ai_insights": true
    },
    "status": "active",
    "context_info": null,
    "url_context": null,
    "email_platform": "none",
    "email_credentials": null,
    "cached_user_count": 0,
    "cached_event_count": 0,
    "cached_last_event": null,
    "stats_last_updated": "2026-05-16T20:14:50.519Z",
    "webhook_url": null,
    "webhook_enabled": false,
    "webhook_use_query_params": false,
    "authorized_domains": []
  }
}

Error (400 Bad Request)

json
{
  "error": "Validation failed",
  "details": [
    {
      "msg": "App name is required and must be 1-100 characters",
      "param": "name"
    }
  ]
}

Examples

Basic Request (cURL)

bash
curl -X POST https://api.appizer.com/v1/apps \
  -H "X-API-Key: apps_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My New App"
  }'

Full Request with All Fields (cURL)

bash
curl -X POST https://api.appizer.com/v1/apps \
  -H "X-API-Key: apps_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "E-Commerce Platform",
    "description": "Our main e-commerce application",
    "website_url": "https://shop.example.com",
    "authorized_domains": [
      "shop.example.com",
      "www.shop.example.com",
      "api.shop.example.com"
    ],
    "data_retention_days": 365,
    "timezone": "America/New_York",
    "engagement_platform": "wonderpush",
    "engagement_credentials": {
      "access_token": "wp_token_...",
      "application_id": "app_id_..."
    },
    "email_platform": "brevo",
    "email_credentials": {
      "api_key": "brevo_key_..."
    },
    "webhook_enabled": true,
    "webhook_url": "https://webhook.example.com/events",
    "webhook_use_query_params": false,
    "context_info": "E-commerce platform with product catalog, shopping cart, and checkout flow"
  }'

Create with JavaScript/Node.js

javascript
const apiKey = 'apps_your_api_key';

const newApp = {
  name: 'Mobile Game',
  description: 'Our new mobile game',
  timezone: 'UTC',
  data_retention_days: 180,
  context_info: 'Multiplayer mobile game with in-app purchases'
};

const response = await fetch('https://api.appizer.com/v1/apps', {
  method: 'POST',
  headers: {
    'X-API-Key': apiKey,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(newApp)
});

const result = await response.json();

if (result.success) {
  console.log(`App created with ID: ${result.app.id}`);
  console.log(`Your tracking API key: ${result.app.api_key}`);
} else {
  console.error(`Error: ${result.error}`);
}

Create with Python

python


api_key = 'apps_your_api_key'
headers = {
    'X-API-Key': api_key,
    'Content-Type': 'application/json'
}

app_data = {
    'name': 'Analytics Dashboard',
    'description': 'Internal analytics dashboard',
    'timezone': 'Europe/London',
    'data_retention_days': 90
}

response = requests.post(
  'https://api.appizer.com/v1/apps',
    headers=headers,
    json=app_data
)

result = response.json()

if result.get('success'):
    app = result['app']
    print(f"App created: {app['name']}")
    print(f"App ID: {app['id']}")
    print(f"API Key: {app['api_key']}")
else:
    print(f"Error: {result.get('error')}")

Validation Rules

  • name: Required, 1-100 characters
  • description: Optional, max 500 characters
  • website_url: Optional, must be valid URL format
  • authorized_domains: Optional, array of strings
  • data_retention_days: Optional, 30 to 2555 (roughly 7 years)
  • timezone: Optional, standard timezone identifiers (e.g., UTC, America/New_York)
  • engagement_platform: Optional, must be 'none' or 'wonderpush'
  • email_platform: Optional, must be 'none' or 'brevo'

Next Steps

After creating an app, you can:

  1. List all your apps
  2. Get app details
  3. Update app configuration
  4. Start tracking events with the app's API key
On this page