1. TopUpsList
Cosmic Agency Ad Accounts API
  • Auth
    • 获取 tenant_access_token
      POST
    • Bearer probe
      GET
  • AdAccounts
    • List ad accounts (token-bound client only)
      GET
  • TopUpsList
    • List top-ups for token-bound client
      GET
    • Get one top-up (404 if other tenant)
      GET
  • FundTransfersList
    • List clear/deduct tickets for token-bound client
      GET
    • Get one fund transfer (404 if other tenant)
      GET
  • Insights
    • Daily spend for Meta ad accounts
      GET
    • Daily spend by country for Meta ad accounts
      GET
  • TopupAndBalance
    • Submit topup (aligns with New Top-up modal)
      POST
    • Balance clear → wallet (pending approval)
      POST
    • Partial deduct → wallet (pending approval)
      POST
  1. TopUpsList

List top-ups for token-bound client

GET
/api/v1/top-ups
Tenancy
Resolved only from the Bearer token (api_clients.bound_business_client_uuid).
Do not pass business client_id / client_number in query or body — returns 400 CLIENT_ID_NOT_ALLOWED.
Open-platform client_id (caa_ck_...) is only for exchanging a tenant_access_token.
If api_clients.allowed_meta_ids is set: lists only those Meta accounts; writes elsewhere → 403 FORBIDDEN_ACCOUNT; detail GETs → 404.
Scope: topups:read. No client_id filter param.
Hard rate limit: 10 requests / second per API client for this path. Over limit → 429 RATE_LIMITED + Retry-After.

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Query 参数

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location 'https://www.cosmicads.app/api/v1/top-ups?page=1&per_page=10&sort_by=created_at&sort_ascending=false&start_date=&end_date=&search=&search_by=ad_account_name&currency_code=' \
--header 'Authorization: Bearer <token>'

返回响应

🟢200
application/json
Paged top-ups
Bodyapplication/json

示例
{
    "code": 0,
    "msg": "ok",
    "data": {
        "items": [
            {
                "id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                "invoice_number": 10001,
                "status": "complete",
                "ad_account_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "ad_account_name": "Demo Ad Account",
                "ad_account_meta_id": "123456789012345",
                "amount": 100,
                "amount_paid": 100,
                "currency_code": "USD",
                "converted_from_code": "USD",
                "client_number": "C0001",
                "created_at": "2026-10-01T00:00:00.000Z",
                "updated_at": "2026-10-02T00:00:00.000Z"
            }
        ],
        "total": 1
    },
    "request_id": "string"
}
🟠429
修改于 2026-10-28 06:35:53
上一页
List ad accounts (token-bound client only)
下一页
Get one top-up (404 if other tenant)
Built with