Update App

Update app configuration

Update App

Update one or more fields of an existing app. All fields are optional - only include the fields you want to modify.

Endpoint

text
PATCH /v1/apps/{id}

Authentication

text
X-API-Key: apps_your_api_key

Path Parameters

Parameter Type Description
id string The app ID

Request Body

All fields are optional. Only include fields you want to update.

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

Response

Success (200 OK)

json
{
  "success": true,
  "app": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "organization_id": "cf2701f8-fc4d-4002-8d52-92dd0d1e82a7",
    "name": "Updated App Name",
    "description": "Updated description",
    "app_store_url": null,
    "play_store_url": null,
    "website_url": "https://updated-example.com",
    "engagement_platform": "none",
    "engagement_credentials": null,
    "api_key": "ak_abc123...",
    "api_secret": "as_...",
    "created_at": "2026-05-16T20:14:48.939Z",
    "updated_at": "2026-05-16T20:45:00.000Z",
    "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 (404 Not Found)

json
{
  "error": "App not found"
}

Examples

Update Single Field (cURL)

bash
curl -X PATCH https://api.appizer.com/v1/apps/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: apps_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "timezone": "America/Los_Angeles"
  }'

Update Multiple Fields (cURL)

bash
curl -X PATCH https://api.appizer.com/v1/apps/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: apps_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated App Name",
    "description": "New description",
    "data_retention_days": 365,
    "timezone": "Europe/London"
  }'

Enable Webhook (cURL)

bash
curl -X PATCH https://api.appizer.com/v1/apps/550e8400-e29b-41d4-a716-446655440000 \
  -H "X-API-Key: apps_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "webhook_enabled": true,
    "webhook_url": "https://webhook.example.com/events"
  }'

Update App with JavaScript/Node.js

javascript
const apiKey = 'apps_your_api_key';
const appId = '550e8400-e29b-41d4-a716-446655440000';

const updates = {
  name: 'My Updated App',
  timezone: 'America/New_York',
  data_retention_days: 180,
  context_info: 'Updated context for AI generation'
};

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

const result = await response.json();

if (result.success) {
  console.log(`App updated successfully`);
  console.log(`New timezone: ${result.app.timezone}`);
} else {
  console.error(`Error: ${result.error}`);
}

Update App Configuration with Python

python

api_key = 'apps_your_api_key'
app_id = '550e8400-e29b-41d4-a716-446655440000'

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

# Update with WonderPush configuration
update_data = {
    'engagement_platform': 'wonderpush',
    'engagement_credentials': {
        'access_token': 'wp_token_...',
        'application_id': 'app_id_...'
    }
}

response = requests.patch(
    f'https://api.appizer.com/v1/apps/{app_id}',
    headers=headers,
    json=update_data
)

result = response.json()

if result.get('success'):
    app = result['app']
    print(f"App updated: {app['name']}")
    print(f"Engagement platform: {app['engagement_platform']}")
else:
    print(f"Error: {result.get('error')}")

Partial Updates

The PATCH endpoint supports partial updates. You only need to send the fields you want to change:

json
{
  "timezone": "UTC"
}

This will update only the timezone field while leaving all other fields unchanged.

Validation

  • name: 1-100 characters if provided
  • description: max 500 characters if provided
  • data_retention_days: 30-2555 if provided
  • website_url: must be valid URL if provided

Next Steps

  1. Get app details
  2. Delete the app
  3. List all your apps
On this page