API Overview

Review API groups, base URLs, authentication methods, and shared response formats.

The API Reference documents the backend APIs used to integrate the ASC Editor Plugin.

Base URL

Send API requests to:

https://api.aurorasendcloud.com/editor-plugin

Append the paths shown below directly to this base URL.

API groups

Access API

The Access API authenticates an Application and creates a short-lived, one-time code for an End User editor session.

MethodPathDescription
POST/access/tokenCreate an Application access token. This endpoint has no request body and does not create an End User.
POST/access/codeCreate a one-time editor code for the supplied userId, with optional End User profile fields.

Email Resource API

An Email is the editable template record opened by the editor, not a final sent email. Every Email Resource request explicitly carries the End User userId.

MethodPathDescription
POST/resource/emailCreate an Email.
GET/resource/emailList Emails.
GET/resource/email/{emailId}Get Email details.
PUT/resource/email/{emailId}Update an Email.
DELETE/resource/email/{emailId}Delete an Email.
POST/resource/email/{emailId}/copyCopy an Email.

The browser editor URL and the configured Push URL are part of the editor workflow, but they are not backend API endpoints defined by these reference specifications. See the integration guides for launch and callback examples.

AI Resource API

The AI Resource API exposes AI credit quota, balance, bill, and usage query capabilities for the current Application. It does not expose AI invocation or user-level credit allocation. All endpoints require the Application to have the AI capability enabled.

MethodPathDescription
GET/resource/ai/quotaGet AI credit quota. Returns the application-level AI credit pool summary.
GET/resource/ai/balancesList AI credit balance records. Paginated purchase and balance records.
GET/resource/ai/billsList AI monthly bills. Monthly consumption and expiry summary.
GET/resource/ai/usageList AI usage records. Paginated AI message consumption records, optionally filtered by userId.
PUT/resource/ai/end-user-quota-limitSet End User AI quota limit. Sets a periodic AI credit ceiling for an End User.

Identity and scope

  • Client ID and Client Secret identify one Application.
  • The token returned by POST /access/token is Application-scoped and does not represent an End User.
  • POST /access/code finds or creates the End User identified by (Application, userId) and can update non-blank name, email, and phone values.
  • POST /resource/email can create a previously unknown End User. Other Email operations require the userId to exist under the Application.
  • Email responses return a public slug in id. Use that value as {emailId}; do not use an internal database ID.
  • AI Resource API endpoints operate at the Application level. userId is an optional query filter on /resource/ai/usage and a required field on /resource/ai/end-user-quota-limit.

Response format

Successful responses return business data directly. For example, POST /access/token returns:

{
  "access_token": "example_access_token",
  "expires_in": 604800,
  "token_type": "Bearer"
}

Errors use the actual HTTP status and a common body:

{
  "error": "invalidParameter",
  "message": "One or more parameters are invalid."
}

See Error Codes for the supported error values.

Authentication summary

API areaAuthentication
POST /access/tokenAuthorization: Basic <base64(clientId:clientSecret)>
POST /access/codeAuthorization: Bearer <application_access_token>
/resource/email endpointsAuthorization: Bearer <application_access_token>
/resource/ai endpointsAuthorization: Bearer <application_access_token>

Keep the Client Secret and Application access token on your backend. Pass only the one-time editor code and public Email slug to the browser.