curl examples
curl examples
Replace the placeholders with the API key copied from the client and your own resource IDs before running these.
Service health
curl http://127.0.0.1:45536/health
List teams
Take data[].id first: it is the teamId other endpoints need.
curl -H "Authorization: Bearer <API_KEY>" http://127.0.0.1:45536/team/list
List windows
The window ID is data.data[].id; runtimeState is local_running when the window is running on this machine and occupied_by_other when another user holds it.
curl "http://127.0.0.1:45536/browser/list?page=1&size=20" \
-H "Authorization: Bearer <API_KEY>"
Filter proxies by state
Array parameters are expressed by repeating the key; the request below means "purchased proxies that are available or pending check".
curl -H "Authorization: Bearer <API_KEY>" \
"http://127.0.0.1:45536/proxy/list?source=BUY&state=1&state=0&page=1&size=20"
Batch check proxies
Checks saved proxies on this machine and writes the results back to the proxy records; up to 50 per request.
curl -X POST http://127.0.0.1:45536/proxy/detect \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"proxyIds":[6001,6002]}'
Open a window and read its CDP connection
curl -X POST http://127.0.0.1:45536/browser/open \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"teamId":"<TEAM_ID>","ids":["<WINDOW_ID>"]}'
curl -H "Authorization: Bearer <API_KEY>" \
"http://127.0.0.1:45536/browser/connection_info?windowId=<WINDOW_ID>"
Minimal automation loop
Create a session → open a tab → run an action → release the session. All four calls must send the same X-Nex-Client-Id.
# 1. Create a session; returns data.sessionId
curl -X POST http://127.0.0.1:45536/automation/sessions \
-H "Authorization: Bearer <API_KEY>" \
-H "X-Nex-Client-Id: nex-doc-client-01" \
-H "Content-Type: application/json" \
-d '{"teamId":"<TEAM_ID>","windowId":"<WINDOW_ID>","startIfNeeded":true}'
# 2. Open a tab; returns data[].pageId
curl -X POST http://127.0.0.1:45536/automation/sessions/<SESSION_ID>/tabs \
-H "Authorization: Bearer <API_KEY>" \
-H "X-Nex-Client-Id: nex-doc-client-01" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com"}'
# 3. Run an allowlisted action
curl -X POST http://127.0.0.1:45536/automation/sessions/<SESSION_ID>/actions \
-H "Authorization: Bearer <API_KEY>" \
-H "X-Nex-Client-Id: nex-doc-client-01" \
-H "Content-Type: application/json" \
-d '{"action":"click","params":{"target":"a","timeout":5000}}'
# 4. Release every session of this client (browser windows stay open)
curl -X DELETE http://127.0.0.1:45536/automation/sessions \
-H "Authorization: Bearer <API_KEY>" \
-H "X-Nex-Client-Id: nex-doc-client-01"
Buy a phone number and read the code
Once the country, project, and quantity needed for the task are selected, buy directly. The server checks stock and charges the current price. The project query selects business parameters; it is not a quotation or stock pre-check required before purchasing.
# 1. List the projects, unit prices, and stock of a country
curl -H "Authorization: Bearer <API_KEY>" \
"http://127.0.0.1:45536/sms/stocks?countryId=1"
# 2. Buy 1 number directly and charge the current server price
curl -X POST http://127.0.0.1:45536/sms/buy \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"countryId":1,"projectId":1001,"quantity":1}'
# 3. List purchased numbers and take data.data[].tel
curl -H "Authorization: Bearer <API_KEY>" \
"http://127.0.0.1:45536/sms/records?page=1&size=20"
# 4. Pull SMS; the code is in code after parsing data.message
curl -X POST http://127.0.0.1:45536/sms/pull \
-H "Authorization: Bearer <API_KEY>" \
-H "Content-Type: application/json" \
-d '{"tel":"<TEL>"}'