Skip to main content

Other API Modules

In addition to the core work and authentication APIs, the Ever Works Platform provides specialized modules for screenshots, deployment providers, subscriptions, and notifications.

Screenshot API

The Screenshot API handles URL captures and image generation. It is provider-agnostic — the active screenshot plugin (ScreenshotOne, URLBox, Scrapfly, etc.) handles the actual capture.

Endpoints

MethodEndpointDescription
GET/api/screenshot/check-availabilityCheck if a screenshot provider is configured
POST/api/screenshot/captureCapture a screenshot of a URL
POST/api/screenshot/get-urlGet a direct screenshot URL without capturing

Request Body

FieldTypeRequiredDescription
urlstringYesURL to capture
viewportWidthnumberNoViewport width
viewportHeightnumberNoViewport height
formatstringNoImage format: png, jpg, webp
fullPagebooleanNoCapture full page
delaynumberNoDelay before capture (ms)
blockAdsbooleanNoBlock ads
blockTrackersbooleanNoBlock trackers
blockCookieBannersbooleanNoHide cookie consent banners

Usage Example

curl -X POST http://localhost:3100/api/screenshot/capture \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"viewportWidth": 1280,
"viewportHeight": 720,
"format": "png"
}'

Git Provider API

The Git Provider API provides access to connected git providers (e.g., GitHub) for repository management. All endpoints require JWT authentication.

Endpoints

MethodEndpointDescription
GET/api/git-providersList available git providers
GET/api/git-providers/:providerId/connectionCheck git provider connection status
GET/api/git-providers/:providerId/organizationsList user's organizations
GET/api/git-providers/:providerId/repositoriesList user's repositories (supports ?page= and ?perPage=)
GET/api/git-providers/:providerId/userGet git provider user info

Plugin OAuth

Plugins that require OAuth connections (e.g., GitHub for repository access) use provider-agnostic OAuth endpoints. All endpoints require JWT authentication.

Endpoints

MethodEndpointDescription
GET/api/oauth/providersList available OAuth providers
GET/api/oauth/:providerId/connectionCheck OAuth provider connection status
GET/api/oauth/:providerId/connect/urlGet OAuth authorization URL
GET/api/oauth/:providerId/callback/pluginsOAuth callback handler
GET/api/oauth/:providerId/userGet OAuth provider user info
DELETE/api/oauth/:providerIdDisconnect OAuth provider

Connect a Provider

# Get the authorization URL
curl "http://localhost:3100/api/oauth/github/connect/url?callbackUrl=http://localhost:3000/callback" \
-H "Authorization: Bearer <token>"

# Returns: { "url": "https://github.com/login/oauth/authorize?..." }

Generator Form Schema

Dynamic form schema endpoints return the configuration form for the active pipeline plugin, including all form fields, groups, and validation rules.

MethodEndpointDescription
GET/api/generator-formGet global generator form schema
GET/api/works/:id/generator-formGet form schema for a specific work

Both endpoints accept an optional ?pipelineId= query parameter to get the form for a specific pipeline plugin.

Subscriptions API

The Subscriptions API manages user plans and billing status.

Endpoints

MethodEndpointDescription
GET/api/subscriptions/planGet current user's subscription plan
POST/api/subscriptions/planUpdate user's subscription plan

Plan Object

{
"code": "pro",
"name": "Pro Plan",
"allowedCadences": ["daily", "weekly"]
}

Notifications API

The Notifications API manages in-app user notifications.

Endpoints

MethodEndpointDescription
GET/api/notificationsGet all notifications (supports filtering)
GET/api/notifications/unread-countGet count of unread notifications
GET/api/notifications/persistentGet critical/persistent notifications
POST/api/notifications/:id/readMark a notification as read
POST/api/notifications/read-allMark all notifications as read
POST/api/notifications/:id/dismissDismiss a notification

Filtering

You can filter notifications by adding query parameters:

  • unreadOnly=true: Show only unread items
  • category=system: Show only system notifications
  • limit=10: Limit results (max 100)
  • offset=0: Pagination offset

Notification Categories

  • ai_credits: AI usage alerts
  • subscription: Billing and plan updates
  • generation: Work generation status
  • system: System-wide announcements
  • security: Security alerts (logins, password changes)