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"}'
Example response:
{
"success": true,
"domain": {
"domainName": "app.company.com",
"institutionLogin": false,
"institutionDisplayName": "My Company",
"addedOn": 1793025000000,
"activeOn": null,
"status": "pending"
}
}
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"}'
Example response:
{
"success": true,
"domain": {
"domainName": "app.company.com",
"institutionLogin": false,
"institutionDisplayName": "My Company Ltd",
"addedOn": 1793025000000,
"activeOn": 1793026000000,
"status": "active"
}
}
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"}'
Example response:
{
"success": true,
"message": "Domain deleted successfully"
}
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 (10–50) | Page size. Between 10 and 50. | 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",
"institutionLogin": false,
"institutionDisplayName": "My Company",
"addedOn": 1793025000000,
"activeOn": 1793026000000,
"status": "active"
}
],
"total": 1,
"totalCount": 1,
"startIndex": 0,
"pageSize": 20
}
See errors and response format for failure handling.