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-pluginAppend 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.
| Method | Path | Description |
|---|---|---|
| POST | /access/token | Create an Application access token. This endpoint has no request body and does not create an End User. |
| POST | /access/code | Create 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.
| Method | Path | Description |
|---|---|---|
| POST | /resource/email | Create an Email. |
| GET | /resource/email | List 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}/copy | Copy 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.
| Method | Path | Description |
|---|---|---|
| GET | /resource/ai/quota | Get AI credit quota. Returns the application-level AI credit pool summary. |
| GET | /resource/ai/balances | List AI credit balance records. Paginated purchase and balance records. |
| GET | /resource/ai/bills | List AI monthly bills. Monthly consumption and expiry summary. |
| GET | /resource/ai/usage | List AI usage records. Paginated AI message consumption records, optionally filtered by userId. |
| PUT | /resource/ai/end-user-quota-limit | Set 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/tokenis Application-scoped and does not represent an End User. POST /access/codefinds or creates the End User identified by(Application, userId)and can update non-blankname,email, andphonevalues.POST /resource/emailcan create a previously unknown End User. Other Email operations require theuserIdto 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.
userIdis an optional query filter on/resource/ai/usageand 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 area | Authentication |
|---|---|
POST /access/token | Authorization: Basic <base64(clientId:clientSecret)> |
POST /access/code | Authorization: Bearer <application_access_token> |
/resource/email endpoints | Authorization: Bearer <application_access_token> |
/resource/ai endpoints | Authorization: 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.
