Sub-users API
Team members that share your main account and billing. Parent-role sub-users can manage some of their own settings.
Endpoint: https://mediasfu.com/v1/subusers
Authenticate with Authorization: Bearer <api-username>:<api-key> from your server. Try every action and copy the request in the API Sandbox.
Add a sub-user
POST https://mediasfu.com/v1/subusers with action: "create"
Create a team member under your account.
Required fields
| Field | Type | Description | Default |
|---|---|---|---|
email | text | ||
phone | text | Phone | |
username | text | Username. 6–32 characters, unique. | |
password | text | Password. You enter this — it is sent over HTTPS to create the login. | |
role | child, parent | Role | "child" |
curl -X POST https://mediasfu.com/v1/subusers \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"create","email":"member@company.com","phone":"+15551234567","username":"jsmith","password":"your-password","role":"child"}'
Update a sub-user
POST https://mediasfu.com/v1/subusers with action: "update"
Change a sub-user, identified by email.
Required fields
| Field | Type | Description | Default |
|---|---|---|---|
email | text |
Optional: Changes
The fields you want to change.
| Field | Type | Description | Default |
|---|---|---|---|
username | text | Username. 6–32 characters, unique. | |
phone | text | Phone | |
role | child, parent | Role | "child" |
curl -X POST https://mediasfu.com/v1/subusers \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"update","email":"member@company.com"}'
Remove a sub-user
POST https://mediasfu.com/v1/subusers with action: "delete"
Delete a sub-user by email.
Required fields
| Field | Type | Description | Default |
|---|---|---|---|
email | text |
curl -X POST https://mediasfu.com/v1/subusers \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY" \
-d '{"action":"delete","email":"member@company.com"}'
List / get
GET https://mediasfu.com/v1/subusers 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/subusers?action=get" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY"
Example response:
{
"success": true,
"subusers": [
{
"username": "jsmith",
"email": "member@company.com",
"role": "child",
"active": true
}
],
"total": 1
}
See errors and response format for failure handling.