Docs / API Reference / Overview and conventions
REST API Overview and Conventions
Authentication, envelopes, pagination, errors, idempotency, request tracing and the product endpoint index.
Generated from the public REST API definitions
Version v1.1.0 · Updated 2026-10-26 · revision 1
This page is the entry point to the REST API Reference. Every API table is generated at build time from the public REST API definition : the product groups below, and the methods / paths / parameters / request bodies / responses / curl on each group page, are rendered straight from the interface definition by a script — there is no hand-copied interface list.
Prerequisites and request example#
Base URL : https://api.your-domain.example (an example value; replace it with your control-plane address).Authentication : server-side calls use Authorization: Basic base64(customerId:customerSecret); console calls use Authorization: Bearer <session>.Request headers : write requests must send Content-Type: application/json; include X-Request-Id to simplify troubleshooting.Response : a successful call returns the resource object; a failure returns the unified error envelope { code, message, reason, sdkCode, details? }.
bash Copy curl -s https://api.your-domain .example/v1/tokens \
-u "$CUSTOMER_ID:$CUSTOMER_SECRET" \
-H 'Content-Type: application/json' \
-d '{"channelName":"weekly-sync","uid":10001,"role":"host","ttlSeconds":3600}'
When to use REST and when to use an SDK#
Scenario Use Notes
A client joins, publishes and subscribes Client SDK See the SDK platform overview ; the token is signed by your backend
Server issues or renews a token POST /v1/tokensRequires the project Basic credential (customerId:customerSecret)
Server queries channels / kicks / mutes /v1/channels/*Semantic paths; for the Agora equivalents see Agora-compatible channels
Server starts recording / media push / media pull / transcoding The matching product group All follow the "task" model: create → query → stop/destroy
Retrieving quality and usage data /v1/analytics/*See Analytics for the metric definitions
Used by the console pages themselves /console/*Console BFF, the browser holds a Bearer session
Permission and credential boundaries#
Credential Where it appears Who can see it
appIdClient SDK initialization Public (can be shipped to browsers/apps)
customerId / customerSecretAuthorization: Basic base64(...)Server side only ; rotate immediately if leaked
appCertificateUsed only to sign tokens Server side only , never distributed
Console session Authorization: Bearer <session>The console frontend
Warning
Browsers and mobile clients should only receive { appId, rtcToken, rtcUid }. Bundling customerSecret into a frontend package is the most common source of credential leaks; for rotation see the console guide and POST /console/projects/{projectId}/keys/rotate.
What each group page contains#
The operation index for that group (method / path / summary, clickable); For every operation: a parameter table (name/location/required/type/constraints), request body field table plus example, response table, and a copy-ready curl; The components.schemas used by that group (field tables expanded from the interface definition).
Relationship to other pages#
Error envelope and error codes: full error-code table (generated from the errors interface definition). Callback (webhook) events: callback event reference (generated from the callbacks interface definition). End-to-end runnable scripts: the bundled examples scripts; see Quickstart for how to run them.
Next steps#
Authentication
Credential families Usage Description
projectBasicbasicHeader Authorization: Basic base64(customerId:customerSecret),matches the Agora RESTful API.
consoleBearerbearerHeader Authorization: Bearer <session>,call POST /console/auth/login。
opsTokenbeareroperator token (NIMEET_OPS_TOKEN), required by the /internal/ops/** surface; when the token is unset that surface is closed
sfuWebhookSignatureapiKeySFU webhook signature verified by the media adapter (see verifyAndParseWebhook); a bad or missing signature is rejected with invalid_token
Project credentials(Basic)must stay on the server; browsers/mobile clients only hold { appId, rtcToken, rtcUid }。
Common conventions
write operations(POST/PUT/PATCH)must carry Content-Type: application/json,otherwise returns 415 unsupported_media_type。 list pagination uses page_no(0-based)and page_size(1..500,default 100)。 failure responses use the unified { code, message, reason, sdkCode, details? },for the complete error catalogue see Error codes 。 every response echoes X-Request-Id,include it first when troubleshooting. Agora-compatible paths use the /dev/v1/*、/v1/apps/{appid}/cloud_recording/*、/v1/projects/{appid}/fls/* prefix, the response uses Agora's success/data、{resourceId,sid,serverResponse} envelope. Idempotency: duplicate submissions of create endpoints may return the same resource; query the current state before retrying a failed write (see Error codes 's 409 Description)。
189 operations, 15 product groups, Each group has its own page:
tag (page) Description Operations
tokensToken issuance, renewal, verification and uid mapping (IM integration). 5
channelsChannel and participant queries plus moderation. 7
ban-rulesKicking rules (Agora `kicking-rule` semantics). 4
agora-channelAgora-compatible RTC REST surface (`/dev/v1`). 8
recordingsCloud recording tasks and Agora-compatible cloud_recording flow. 13
streamingBypass RTMP/HLS streaming tasks. 10
webhooksCallback endpoint configuration, delivery log and ingest. 1
analyticsCrystal Ball: real-time monitoring, usage, quality, call search and data insights. 7
consoleConsole BFF: sessions, projects, keys, services, collaborators, audit. 80
media-pushMedia Push: converters that push one RTC channel to a CDN address. 5
media-gatewayMedia Gateway: RTMP ingress streaming keys, flow configuration templates and online streams. 12
media-pullMedia Pull: cloud players that pull an online media stream into an RTC channel. 6
cloud-transcodingCloud Transcoding: builder tokens, transcoding tasks and adaptive-bitrate templates. 7
notificationsMessage-notification service addresses (firewall allow-list). 2
whiteboardInteractive Whiteboard rooms, scenes, content, replay and tokens. 22
Schema dictionary
components.schemas declarations and reference counts:
Referenced by operations: 68 Total declarations (including aliases):58
Each group page also expands the schemas used by that group.
AgoraRecordingFile — object{ fileName, duration, size }
Field Type Required Description
fileNamestringis
durationnumberis seconds; 0 while the file is still being written
sizenumberis bytes; 0 while the file is still being written
AgoraRecordingLayout — object{ resourceId, sid, serverResponse }
Field Type Required Description
resourceIdstringis
sidstringis
serverResponseobject{ taskId, layout }is
AgoraRecordingQuery — object{ resourceId, sid, serverResponse }
Field Type Required Description
resourceIdstringis
sidstringis
serverResponseobject{ taskId, status, fileList, error }is
AgoraRecordingResource — object{ resourceId }
Field Type Required Description
resourceIdstringis single-use marker valid for 30 s; pass it to start
AgoraRecordingStart — object{ resourceId, sid, serverResponse }
Field Type Required Description
resourceIdstringis
sidstringis our recording task id (Agora calls it sid)
serverResponseobject{ taskId, state }is
AgoraRecordingStop — object{ resourceId, sid, serverResponse }
Field Type Required Description
resourceIdstringis
sidstringis
serverResponseobject{ taskId, status, fileList }is
AnalyticsCallEvent — object{ ts, kind, uid, detail }
Field Type Required Description
tsstringis format date-time
kindenum(join | leave | network | video-send | audio-send)is
uidintegeris
detailstring
AnalyticsCallSession — object
Field Type Required Description
projectIdstringis
channelNamestringis
startedAtstringis format date-time
endedAtstring | nullis format date-time
peakUsersintegeris
usersarray<object>is
eventsarray<object{ ts, kind, uid, detail }>is
AnalyticsCallUser — object
Field Type Required Description
uidintegeris
userIdstring | nullis
roleenum(host | audience)is
platformintegeris Agora platform code (0 iOS, 1 Android, 2 Windows, 5 Web, 6 macOS, 7 Linux, 8 Other)
joinedAtstringis format date-time
leftAtstring | nullis format date-time
durationSecondsnumberis
audioFreezeRatenumberis
videoFreezeRatenumberis
networkDelayRatenumberis
AnalyticsDiagnosis — object{ video, audio, network }
Field Type Required Description
videoenum(good | warn | bad)is
audioenum(good | warn | bad)is
networkenum(good | warn | bad)is
AnalyticsQualityBucket — object
Field Type Required Description
bucketStartstringis format date-time
averageLoginTimeMsnumberis
audioFreezeRatenumberis
videoFreezeRatenumberis
networkDelayRatenumberis
inCallUsersintegeris
inCallChannelsintegeris
joinAttemptsintegeris
joinSuccessesintegeris
joinWithin5sintegeris
AnalyticsUsageBucket — object{ bucket, type, minutes, channels, users }
Field Type Required Description
bucketstringis
typeenum(audio | video | recording | streaming | transcoding)is
minutesnumberis
channelsintegeris
usersintegeris
BanRule — object
Field Type Required Description
idinteger
channelNamestring | null
uidinteger | null
ipstring | null
privilegesarray<enum(join_channel | publish_audio | publish_video)>
expireAtstring | nullformat date-time
createdAtstringformat date-time
BillingOverview — object
Field Type Required Description
providerobjectis
plansarray<object>is
subscriptionanyis
invoicesarray<object>is
topUpsarray<object>is
chargesarray<object>is
taxProfileanyis
totalsobject{ outstanding, paid, credit, currency }is
generatedAtstringis format date-time
BillingPlan — object
Field Type Required Description
idstringis
namestringis
pricePerMonthnumberis monthly list price in major units (see x-money-scale)
currencystringISO-4217 currency code;pattern ^[A-Z]{3}$
includedMinutesnumberis metered minutes included before overage
descriptionstringis
featuresarray<string>is
BillingProvider — object
Field Type Required Description
kindenum(sandbox | live)is
livebooleanis
configuredbooleanis
currencystringis ISO-4217 currency code;pattern ^[A-Z]{3}$
taxRatePercentnumberis
disclaimerstringis
capabilitiesobject{ payInvoice, topUp, subscribe }is
BillingTotals — object{ outstanding, paid, credit, currency }
Field Type Required Description
outstandingnumberis invoiced but unpaid amount
paidnumberis settled amount
creditnumberis unconsumed top-up credit
currencystringis ISO-4217 currency code;pattern ^[A-Z]{3}$
ChannelSummary — object{ channelName, userCount, profile, createdAt }
Field Type Required Description
channelNamestring
userCountinteger
profileenum(communication | live)
createdAtstring | nullformat date-time
Error — object{ code, message, reason, sdkCode, details }
Field Type Required Description
codestringis stable machine code, see errors.json
messagestringis
reasonstring
sdkCodeintegerAgora-aligned client error number
detailsobject
FlsEntryPoint — object{ entryPoint, entryPoints }
Field Type Required Description
entryPointstringis
entryPointsarray<string>is
FlsEntryPointDelete — object{ deleted, entryPoint }
Field Type Required Description
deletedbooleanis
entryPointstringis
FlsEntryPointList — object{ entryPoints }
Field Type Required Description
entryPointsarray<string>is
FlsTaskAccepted — object{ streamName, taskId, state, region }
Field Type Required Description
streamNamestringis
taskIdstringis
stateenum(starting | running | stopping | stopped | failed | expired)is
regionstringis
FlsTaskStop — object{ streamName, taskId, state }
Field Type Required Description
streamNamestringis
taskIdstringis
stateenum(starting | running | stopping | stopped | failed | expired)is
Invoice — object
Field Type Required Description
idstringis
projectIdstring | nullis
projectNamestringis
periodstringis billing period label, e.g. 2026-10
currencystringis ISO-4217 currency code;pattern ^[A-Z]{3}$
subtotalnumberis amount before tax
taxnumberis tax amount
totalnumberis amount due
statusenum(open | paid | void)is
issuedAtstringis format date-time
paidAtstring | nullis format date-time
chargeIdstring | nullis
linesarray<object{ type, minutes, amount }>is
InvoiceLine — object{ type, minutes, amount }
Field Type Required Description
typestringis
minutesnumberis
amountnumberis line amount
PaymentCharge — object
Field Type Required Description
idstringis
kindenum(invoice | topup)is
referenceIdstringis
amountnumberis charged amount
currencystringis ISO-4217 currency code;pattern ^[A-Z]{3}$
providerenum(sandbox)is
statusenum(succeeded)is
simulatedbooleanis
createdAtstringis format date-time
Point — object{ x, y }
Field Type Required Description
xnumberis
ynumberis
Project — object
Field Type Required Description
idstringis
appIdstringis
customerIdstringis
namestringis
authModeenum(token | appid)is
statusenum(active | suspended)is
tokenTtlSecondsintegeris
privilegeTtlSecondsintegeris
servicesobject{ recording, streaming, analytics }is
quotasobject{ recordingConcurrent, streamingConcurrent, maxChannels }is
createdAtstringis format date-time
updatedAtstringis format date-time
Quotas — object{ recordingConcurrent, streamingConcurrent, maxChannels }
Field Type Required Description
recordingConcurrentintegeris
streamingConcurrentintegeris
maxChannelsintegeris 0 = unlimited
RecordingTaskBody — object
Field Type Required Description
idstring
channelNamestring
modeenum(composite | individual | web)
stateenum(starting | running | stopping | stopped | failed | expired)
layoutobject{ preset, canvasWidth, canvasHeight, backgroundColor }
filesarray<object{ objectKey, url, format, durationSeconds, sizeBytes }>
usageSecondsnumber
errorstring | null
startedAtstring | null
endedAtstring | null
RecordingTaskList — object{ total, tasks }
Field Type Required Description
totalintegeris
tasksarray<object>is
ScenePpt — object{ src, width, height }
Field Type Required Description
srcstringis Image URL (http(s) or object-storage path).
widthintegeris >= 1
heightintegeris >= 1
Services — object{ recording, streaming, analytics }
Field Type Required Description
recordingbooleanis
streamingbooleanis
analyticsbooleanis
StreamingTask — object
Field Type Required Description
idstring
channelNamestring
entryPointstring
streamNamestring
rtmpUrlstring
hlsUrlstring
stateenum(starting | running | stopping | stopped | failed | expired)
idleTimeoutSecondsinteger
lastActiveAtstringformat date-time
errorstring | null
StreamingTaskList — object{ total, streams }
Field Type Required Description
totalintegeris
streamsarray<object>is
Subscription — object{ planId, status, startedAt, currentPeriodEnd, pricePerMonth, includedMinutes }
Field Type Required Description
planIdstringis
statusenum(active | cancelled)is
startedAtstringis format date-time
currentPeriodEndstringis format date-time
pricePerMonthnumberis subscription price in major units
includedMinutesnumberis
TaxProfile — object{ legalName, country, taxId, address, updatedAt, status }
Field Type Required Description
legalNamestringis
countrystringis ISO-3166 alpha-2
taxIdstringis
addressstringis
updatedAtstringis format date-time
statusenum(unverified)is this deployment never validates the tax id against an authority
TokenIssueResponse — object
Field Type Required Description
appIdstringis
channelNamestringis
rtcTokenstringis
rtcUidintegeris 1..2147483647
roleenum(host | audience)is
privilegesarray<string>is
controlTokenstringOpaque control-plane token for REST diagnostics/renewal. TokenIssueResult.controlToken is optional; toResult() always sets it.
mediaRoomstringSFU room name when the media adapter namespaces by App ID (TokenIssueResult.mediaRoom).
expireAtstringis format date-time
privilegeExpireAtstringis format date-time
TopUp — object
Field Type Required Description
idstringis
amountnumberis credited amount
currencystringis ISO-4217 currency code;pattern ^[A-Z]{3}$
statusenum(succeeded)is
providerenum(sandbox)is
chargeIdstringis
notestringis
createdAtstringis format date-time
UserView — object
Field Type Required Description
uidinteger
userIdstring | null
roleenum(host | audience)
platforminteger
joinedAtstringformat date-time
audioMutedboolean
videoMutedboolean
publishingobject{ audio, video, screen }
WebhookDelivery — object
Field Type Required Description
idstringis
projectIdstringis
envelopeobject{ noticeId, productId, eventType, notifyMs, sid, payload }is
urlstringis
stateenum(pending | delivering | delivered | failed | dropped)is
attemptsintegeris
maxAttemptsintegeris
nextAttemptAtstring | nullis format date-time
lastStatusCodeinteger | nullis
lastErrorstring | nullis
createdAtstringis format date-time
updatedAtstringis format date-time
WhiteboardImage — object
Field Type Required Description
idstringis
scenePathstringis
srcstringis
widthnumberis
heightnumberis
xnumberis
ynumberis
lockedbooleanis
memberIdstringis
createdAtstringis format date-time
WhiteboardMemberState — object
Field Type Required Description
memberIdstringis
roleenum(admin | writer | reader)is
appliancestringis canvas appliance name, e.g. pencil / pencilEraser / rectangle
strokeColorstringis
strokeWidthnumberis
canUndointegeris
canRedointegeris
WhiteboardOperation — object
Field Type Required Description
seqintegeris
typeenum(scene.add | scene.switch | scene.clear | stroke.append | stroke.erase | stroke.undo | stroke.redo | image.insert | viewport.set | room.ban | room.close | member.join | member.leave)is
memberIdstringis
scenePathstring | nullis
strokeIdstring | nullis
roomVersionintegeris
payloadobjectis operation-specific payload, already validated by the service
createdAtstringis format date-time
WhiteboardPpt — object{ src, width, height }
Field Type Required Description
srcstringis
widthnumberis
heightnumberis
WhiteboardReplay — object{ roomUUID, duration, from, to, frames }
Field Type Required Description
roomUUIDstringis
durationnumberis milliseconds between the first and the last frame
fromstring | nullis
tostring | nullis
framesarray<object{ offset, operation }>is
WhiteboardRoom — object
Field Type Required Description
uuidstringis
teamUUIDstringis
appUUIDstringis
isRecordbooleanis
isBanbooleanis
phaseenum(active | banned | closed)is
limitintegeris
versionintegeris
createdAtstringis format date-time
updatedAtstringis format date-time
closedAtstring | nullis format date-time
WhiteboardRoomState — object
Field Type Required Description
roomobjectis
currentScenePathstringis
viewportobject{ x, y, width, height, scale, updatedAt }is
scenesarray<object>is
memberStatesobjectis member id → current drawing state
canUndoStepsintegeris
canRedoStepsintegeris
WhiteboardSceneSummary — object
Field Type Required Description
pathstringis
namestringis
pptanyis
strokeCountintegeris
imageCountintegeris
createdAtstringis format date-time
updatedAtstringis format date-time
WhiteboardSnapshot — object
Field Type Required Description
roomUUIDstringis
appUUIDstringis
roomVersionintegeris
exportedAtstringis format date-time
currentScenePathstringis
viewportobject{ x, y, width, height, scale, updatedAt }is
scenesarray<object{ path, name, ppt, strokes, images }>is
operationsarray<object>
WhiteboardStroke — object
Field Type Required Description
idstringis
scenePathstringis
appliancestringis canvas appliance name, e.g. pencil / pencilEraser / rectangle
colorstringis
widthnumberis
pointsarray<array<number>>is flat [x, y, ...] point list
memberIdstringis
seqintegeris
undonebooleanis
erasedbooleanis
createdAtstringis format date-time
WhiteboardViewport — object{ x, y, width, height, scale, updatedAt }
Field Type Required Description
xnumberis
ynumberis
widthnumberis
heightnumberis
scalenumberis
updatedAtstringis format date-time
XlaMetricSet — object
Field Type Required Description
samplesintegeris
joinAttemptsintegeris
joinSuccessRatenumber | nullis joinSuccess / joinAttempt samples; null when there is no sample
joinWithin5sRatenumber | nullis
videoFreezeRatenumber | nullis
audioFreezeRatenumber | nullis
networkDelayMsnumber | nullis
availabilitynumber | nullis telemetry availability: observed 5-minute buckets / buckets in the month
observedBucketsintegeris
expectedBucketsintegeris
XlaMonthReport — object
Field Type Required Description
monthstringis YYYY-MM
fromstringis format date-time
tostringis format date-time
scopeobject{ kind, projectId, projectName }is
metricsobjectis
projectsarray<any>is
insufficientbooleanis
reasonstring | nullis
notestringis how each metric is computed (no modelled percentages)
generatedAtstringis format date-time
XlaProjectRow — any
No field declarations.