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"}'
Example response:
{
"success": true,
"subUser": {
"email": "member@company.com",
"phone": "+15551234567",
"username": "jsmith01",
"role": "child",
"status": "active"
}
}
Update a sub-user
POST https://mediasfu.com/v1/subusers with action: "update"
Change a sub-user, identified by email and username.
Required fields
| Field | Type | Description | Default |
|---|---|---|---|
email | text | ||
username | text | Username. 6–32 characters, unique. |
Optional: Changes
The fields you want to change.
| Field | Type | Description | Default |
|---|---|---|---|
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","username":"jsmith"}'
Example response:
{
"success": true,
"subUser": {
"email": "member@company.com",
"phone": "+15551234567",
"username": "jsmith01",
"role": "parent",
"status": "active"
}
}
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"}'
Example response:
{
"success": true,
"message": "Subuser deleted successfully"
}
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 (10–50) | Page size. Between 10 and 50. | 20 |
curl "https://mediasfu.com/v1/subusers?action=get" \
-H "Authorization: Bearer $MEDIASFU_API_USERNAME:$MEDIASFU_API_KEY"
Example response:
{
"success": true,
"subUsers": [
{
"email": "member@company.com",
"phone": "+15551234567",
"username": "jsmith01",
"role": "child",
"status": "active"
},
{
"email": "ops@company.com",
"phone": "+15557654321",
"username": "opslead1",
"role": "parent",
"status": "active"
}
],
"total": 2,
"totalCount": 2,
"startIndex": 0,
"pageSize": 20
}
See errors and response format for failure handling.