Create an AceDataCloud Platform Service Application

This endpoint creates a dedicated application (Application) for a service under the current account and can issue service-specific API credentials for it. To call business APIs enabled for the account, you can directly use the API Key of the general-purpose application in the application list, without creating an Application for each service. When applying for a service for the first time, the Application receives the service's currently configured free_amount; this value may be 0.

ℹ️ This endpoint belongs to the AceDataCloud Platform Management API, with the common prefix https://platform.acedata.cloud/api/v1/. For the complete endpoint index, see Get the AceDataCloud Platform Documentation List.

Complete Integration Process

When you need to create a service-specific application and issue credentials for it through the Management API, follow these 5 steps:

  1. Obtain an account token → Manage AceDataCloud Platform Account Tokens
  2. Select a service → Get the AceDataCloud Platform Service List
  3. Create an application (this document) → Receive an initial quota according to the service configuration
  4. Create API credentials → Create AceDataCloud Platform API Credentials
  5. Call a business endpoint → Use the 32-character Token obtained to call https://api.acedata.cloud/<path>

Endpoint Overview

Item Details
Method POST
URL https://platform.acedata.cloud/api/v1/applications/
Authentication ✅ Account token required
Content-Type application/json

Authentication (How to Obtain an Account Token)

Request header:

Authorization: Bearer ${PLATFORM_TOKEN}

An account token (Account Token) is an "account-level key" that developers use to manage their own account resources through the API. Ways to obtain one:

  1. One-click creation in the console (recommended): Log in to the AceDataCloud platform → Account Token console → Click "Create" to obtain a token beginning with platform-v1-.
  2. API creation: Call POST /api/v1/platform-tokens/ using an existing account token or a browser login session JWT. For details, see Manage AceDataCloud Platform Account Tokens.

⚠️ Account tokens are as sensitive as passwords and must not be written into frontend code or public repositories. If one is leaked, delete and recreate it immediately in the console.

Request Body

Parameter Type Required Description
service_id UUID ✅ ID of the service to apply for. Can be obtained from items[].id in the service list

Request Examples

cURL

curl -X POST 'https://platform.acedata.cloud/api/v1/applications/' \
  -H 'accept: application/json' \
  -H "authorization: Bearer ${PLATFORM_TOKEN}" \
  -H 'content-type: application/json' \
  -d '{"service_id": "38ecf158-36f2-42f2-8e7f-6786cdfc2452"}'

Python

import os
import requests

PLATFORM_TOKEN = os.environ["PLATFORM_TOKEN"]
SERVICE_ID = "38ecf158-36f2-42f2-8e7f-6786cdfc2452"

resp = requests.post(
    "https://platform.acedata.cloud/api/v1/applications/",
    headers={
        "accept": "application/json",
        "authorization": f"Bearer {PLATFORM_TOKEN}",
        "content-type": "application/json",
    },
    json={"service_id": SERVICE_ID},
    timeout=10,
)

if resp.status_code == 201:
    app = resp.json()
    print(f"申请成功!application_id={app['id']}")
    print(f"初始额度:{app['remaining_amount']} {app.get('service', {}).get('unit', '')}")
elif resp.status_code == 400 and resp.json().get("code") == "duplication":
    print("⚠️ 已经申请过此服务,请到 /applications/ 列表里找到现成的 application_id")
else:
    print(f"申请失败:HTTP {resp.status_code} - {resp.text}")

Node.js

const PLATFORM_TOKEN = process.env.PLATFORM_TOKEN
const SERVICE_ID = '38ecf158-36f2-42f2-8e7f-6786cdfc2452'

const resp = await fetch('https://platform.acedata.cloud/api/v1/applications/', {
  method: 'POST',
  headers: {
    accept: 'application/json',
    authorization: `Bearer ${PLATFORM_TOKEN}`,
    'content-type': 'application/json',
  },
  body: JSON.stringify({ service_id: SERVICE_ID }),
})

if (resp.status === 201) {
  const app = await resp.json()
  console.log('application_id =', app.id)
} else {
  console.error(await resp.text())
}

Response Examples

Success (HTTP 201)

{
  "id": "82f57141-2323-4453-8730-60f7d833a2da",
  "service_id": "38ecf158-36f2-42f2-8e7f-6786cdfc2452",
  "remaining_amount": 1.0,
  "used_amount": 0.0,
  "paid": false,
  "user_id": "89518d07-5560-4b05-92c1-667f3ddf6a4b",
  "disabled": false,
  "allow_consume_global": false,
  "allow_overdraft": false,
  "scope": "Individual",
  "type": "Usage",
  "expired_at": null,
  "tags": null,
  "metadata": null,
  "client_ip": null,
  "client_fingerprint": null,
  "created_at": "2026-04-26T07:52:27.462400Z",
  "updated_at": "2026-04-26T07:52:27.462400Z"
}

The returned field structure is consistent with Get AceDataCloud Platform Service Application Details.

Already Applied (HTTP 400)

{
  "detail": "Item already exists.",
  "code": "duplication",
  "trace_id": "1a87524f8cbba0b790b2951e2e43117e"
}

This is a hard limit by design: each user can have only one Application per service. If one already exists, find it through Get the AceDataCloud Platform Service Application List.

Service Not Found (HTTP 404)

{
  "detail": "Service not found.",
  "code": "not_found",
  "trace_id": "..."
}

Service Requires Verification (HTTP 403)

{
  "detail": "This service requires manual verification.",
  "code": "need_verify",
  "trace_id": "..."
}

If the service has need_verify=true (this field can be seen in the service list), you need to apply for allowlisting through the support ticket process.

Error Handling

HTTP code Meaning
400 duplication The current account has already applied for this service
400 invalid service_id is missing or incorrectly formatted
401 not_authenticated The account token is missing or has been deleted
403 need_verify The service requires review; please use the ticket process
404 not_found The service does not exist or is no longer available

Standard error response format:

{
  "detail": "...",
  "code": "...",
  "trace_id": "..."
}

Practical Tips

  • Creation itself does not incur a charge: On initial creation, the initial quota is set according to the service's current free_amount; this value may be 0, and creating another Application of the same type does not guarantee another free grant.
  • Check the paid field to see whether payment is required: When first requested, paid=false; it changes to true after payment is completed using Create an AceDataCloud Platform Top-Up Order.
  • disabled=true means temporarily disabled—for example, due to a risk control trigger or an outstanding balance. Business API endpoints return 403 when disabled.
  • Do not create with unbounded concurrency: First obtain the target service_id from the paginated service list, then apply for services individually as needed; when encountering duplication, reuse the existing Application.

allow_overdraft is disabled by default and is authorized separately by an administrator; it cannot be enabled through request parameters when creating an Application.