API Reference v1
Get API Key API Key

POST /v1/copy-trade/configs/batch-resume

Resume multiple Copy Trading configs

Per-item If-Match (in the request body, not a header). One failing item does not fail the batch — see the per-item status_code/code in the response. Archived configs return 409 task_read_only; deleted configs keep 409 invalid_state. Requires the copytrade:write scope.

Required scope: copytrade:write

Request body application/json

FieldTypeRequiredConstraintsDescription
itemsarray<object>✓minItems: 1, maxItems: 1001 to 100 configs. One failing item does not fail the rest.
items[].idstring✓minLength: 1, maxLength: 128Config id to pause or resume.
items[].if_matchstring✓minLength: 1Quoted ETag of the version you last read, for example "3". Checked per item, not as a request header.
items[].close_positionbooleandefault: falsebatch-pause: also close positions this config opened. batch-resume: true on any item rejects the whole request. Default false.

Responses

200 — OK (see per-item results)

FieldTypeRequiredDescription
dataobject✓Response payload.
data.resultsarray<object>✓One entry per requested item, in request order.
data.results[].idstring✓Config id this result is for.
data.results[].status_codenumber✓HTTP status for this item: 200 when it changed or was already in the requested state, or an error status.
data.results[].codestringError code when this item failed. Absent on success.
data.results[].versionnumberNew optimistic-concurrency version. Present on success.
data.results[].sync_stateenum ("syncing" | "synced" | "failed")Engine sync state after the change. Present on success.
metaobject✓Request id, plus paging fields when this operation is a list.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

401 — unauthorized (missing/invalid/revoked/expired Bearer token)

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

403 — insufficient_scope / ip_not_allowed

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

429 — rate_limited (Retry-After response header set)

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.

500 — internal_error

FieldTypeRequiredDescription
errorobject✓Why the request failed.
error.codestring✓Stable machine-readable error code.
error.messagestring✓Human-readable explanation of the error.
error.totalnumberNumber of distinct blacklisted wallets the account would have on this chain after saving.
error.limitnumberMaximum distinct blacklisted wallets per account on this chain.
error.detailsarray<object>Only present when at least one field-level validation issue exists.
error.details[].fieldstring✓Request field this issue refers to, or a dotted path such as buy.amount.
error.details[].reasonstring✓Why that field was rejected.
error.details[].codestringStable machine-readable reason for a strategy spec issue, for example unsupported_leaf or pump_callers_required. Present only on strategy spec validation errors; reason may change.
metaobject✓Request id for this failure.
meta.request_idstring✓Id of this request. Also sent as the X-Request-Id response header.
Example request
curl -X POST "https://api.apm.fun/v1/copy-trade/configs/batch-resume" \
  -H "Authorization: Bearer apm_live_<prefix>.<secret>" \
  -H "Content-Type: application/json" \
  -d '{
    "items": [
      {
        "id": "cfg_8f2a1c9b",
        "if_match": "\"3\""
      },
      {
        "id": "cfg_2b7e441d",
        "if_match": "\"1\""
      }
    ]
  }'
Example response 200
{
  "data": {
    "results": [
      {
        "id": "cfg_8f2a1c9b",
        "status_code": 0,
        "code": "string",
        "version": 0,
        "sync_state": "syncing"
      }
    ]
  },
  "meta": {
    "request_id": "cfg_8f2a1c9b"
  }
}