Skip to Content

Apps

Stable

Create and manage applications that use your AI agents.

List Apps

GET/api/v1/apps

Get all your applications.

Response

{ "apps": [ { "id": "app_abc123", "name": "Customer Portal", "description": "AI-powered customer support", "agentId": "char_xyz789", "apiKey": "ak_...", "createdAt": "2024-01-15T10:30:00Z" } ] }

Create App

POST/api/v1/apps

Create a new application.

Request

{ "name": "My App", "app_url": "https://myapp.example.com", "description": "Customer support chatbot", "website_url": "https://example.com", "contact_email": "support@example.com" }

Response

{ "success": true, "app": { "id": "uuid-abc123", "name": "My App", "app_url": "https://myapp.example.com", "api_key": "ek_xxx...", "created_at": "2024-01-15T10:30:00Z" } }

Get App

GET/api/v1/apps/{id}

Get application details.


Update App

PUT/api/v1/apps/{id}

Update an application.


Delete App

DELETE/api/v1/apps/{id}

Delete an application.


App Analytics

GET/api/v1/apps/{id}/analytics

Get usage analytics for an app.

Response

{ "requests": 15000, "uniqueUsers": 500, "tokensUsed": 1250000, "costUsd": 12.5, "period": "30d" }

Regenerate API Key

POST/api/v1/apps/{id}/regenerate-api-key

Generate a new API key for the app.

This invalidates the previous API key immediately.


App Monetization

GET/api/v1/apps/{id}/monetization

Get monetization settings and earnings.


Domain Management

Manage custom domains for your multi-tenant applications. See the App Domains guide for detailed configuration instructions.

List Domains

GET/api/v1/apps/{id}/domains

Get all domains for an app including subdomain and custom domain status.

Response

{ "success": true, "domains": [ { "id": "dom_abc123", "subdomain": "myapp", "subdomainUrl": "https://myapp.apps.cloud.milady.ai", "customDomain": "myapp.example.com", "customDomainUrl": "https://myapp.example.com", "customDomainVerified": true, "sslStatus": "active", "isPrimary": true, "verificationRecords": [], "createdAt": "2024-01-15T10:30:00Z", "verifiedAt": "2024-01-15T11:00:00Z" } ], "sandboxUrl": null }

Add Custom Domain

POST/api/v1/apps/{id}/domains

Add a custom domain to your app. Requires DNS configuration.

Request

{ "domain": "myapp.example.com" }

Response

{ "success": true, "domain": "myapp.example.com", "verified": false, "verificationRecords": [ { "type": "TXT", "name": "_vercel.myapp.example.com", "value": "vc-domain-verify=abc123..." } ], "dnsInstructions": [ { "type": "CNAME", "name": "myapp", "value": "cname.vercel-dns.com" } ], "isApexDomain": false }

For apex domains (e.g., example.com), use an A record pointing to 76.76.21.21 instead of a CNAME.


Remove Custom Domain

DELETE/api/v1/apps/{id}/domains

Remove a custom domain from your app.

Request

{ "domain": "myapp.example.com" }

Response

{ "success": true, "message": "Domain removed successfully" }

Verify Domain

POST/api/v1/apps/{id}/domains/verify

Trigger manual verification of domain ownership after configuring DNS records.

Request

{ "domain": "myapp.example.com" }

Response

{ "success": true, "verified": true, "status": { "domain": "myapp.example.com", "status": "valid", "configured": true, "verified": true, "sslStatus": "provisioning", "configuredBy": "CNAME", "isApexDomain": false, "dnsInstructions": [] } }

Check Domain Status

POST/api/v1/apps/{id}/domains/status

Check the current DNS and SSL status of a domain.

Request

{ "domain": "myapp.example.com" }

Response

{ "success": true, "domain": "myapp.example.com", "status": "valid", "configured": true, "verified": true, "sslStatus": "active", "sslExpiresAt": "2025-04-15T00:00:00Z", "configuredBy": "CNAME", "records": [], "isApexDomain": false, "dnsInstructions": [ { "type": "CNAME", "name": "myapp", "value": "cname.vercel-dns.com" } ] }

Sync Domain Status

POST/api/v1/apps/{id}/domains/sync

Refresh all domain statuses from Vercel to the database.

Response

{ "success": true, "domains": [...], "syncedAt": "2024-01-15T12:00:00Z" }