Allowed domains API
Domains authorised to send create/join requests with your production API key. Required for any domain proxying those requests — embedding is irrelevant.
Endpoint: https://mediasfu.com/v1/domains
Authenticate with Authorization: Bearer <api-username>:<api-key> from your server. Try every action and copy the request in the API Sandbox.
Register a domain
POST https://mediasfu.com/v1/domains with action: "create"
Authorise a domain for production API requests.
Required fields
| Field | Type | Description | Default |
|---|---|---|---|
domainName | text | Domain. The hostname sending production requests. | |
institutionDisplayName | text | Display name |
curl -X POST https://mediasfu.com/v1/domains \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"create","domainName":"app.mycompany.com","institutionDisplayName":"My Company"}'
Update a domain
POST https://mediasfu.com/v1/domains with action: "update"
Change a registered domain.
Required fields
| Field | Type | Description | Default |
|---|---|---|---|
domainName | text | Domain. The hostname sending production requests. |
Optional: Details
The fields you want to change.
| Field | Type | Description | Default |
|---|---|---|---|
institutionDisplayName | text | Display name |
curl -X POST https://mediasfu.com/v1/domains \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"update","domainName":"app.mycompany.com"}'
Remove a domain
POST https://mediasfu.com/v1/domains with action: "delete"
De-authorise a domain.
Required fields
| Field | Type | Description | Default |
|---|---|---|---|
domainName | text | Domain. The hostname sending production requests. |
curl -X POST https://mediasfu.com/v1/domains \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"delete","domainName":"app.mycompany.com"}'
List / get
GET https://mediasfu.com/v1/domains with action: "get"
Retrieve records. Everything is optional — send as-is to list all.
No fields are required.
Optional: Filters
All optional — narrow or page the results.
| Field | Type | Description | Default |
|---|---|---|---|
startIndex | number | Start index | 0 |
pageSize | number (1–100) | Page size | 20 |
curl "https://mediasfu.com/v1/domains?action=get" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY"
Example response:
{
"success": true,
"domains": [
{
"domainName": "app.company.com",
"status": "verified",
"permissions": [
"createRoom"
]
}
],
"total": 1
}
See errors and response format for failure handling.