POST to https://api.agora.io/v1/apps/{appId}/cloud_recording/acquire with Basic Auth (Customer ID:Customer Secret, Base64-encoded) and a JSON body containing cname (channel name), uid (recording bot UID), and clientRequest; save the resourceId from the response — it expires in 5 minutes.
Within 5 minutes, POST to https://api.agora.io/v1/apps/{appId}/cloud_recording/resourceid/{resourceId}/mode/{mode}/start supplying cname, uid, clientRequest, and a storageConfig block with your S3 bucket, accessKey, secretKey, and region; save the sid from the response.
While recording is active, query status via GET on the query endpoint with the resourceId and sid to confirm the recording state and retrieve any sliceStartTime.
When done, POST to the stop endpoint with resourceId, sid, cname, uid, and clientRequest to end the recording; the response includes the list of recorded file names in S3.
Verify the MP4 or HLS files appear in your S3 bucket using the prefix pattern Agora writes; files are available immediately after the stop response.
Known gotchas
The resourceId is valid for only a fixed window after acquire — you must call start before it expires; acquire and start should be called in immediate succession in production code.
Authentication uses HTTP Basic Auth with your Agora Customer ID and Customer Secret (not the App ID/App Certificate) — using the wrong credentials returns a 401 that looks identical to a permissions error.
The recording bot UID must not match any real participant UID in the channel; collisions cause the bot to be evicted and recording fails silently.
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp