Appearance
POST /applications/
Description
Create a new application under your account. On success, the response returns the newly created application together with its generated client_id and client_secret, which you use to authenticate API calls on behalf of the application.
Authentication
- Required: Yes
- Method: Bearer token
- Scope:
mediahub_write
Request Headers
- Authorization:
Bearer [AUTH_TOKEN] - Content-Type:
application/json
Parameters
Query Parameters
- format:
string(Optional)
Values:json,xml
Overrides the Request Accept header. - human:
boolean(Optional)
Values:true,false
If set to 'true', the response will be in a structured, more human-readable form.
Body Parameters
- application:
object(Required)- app_name:
string(Required)
The name of the new application. - product:
string(Optional)
The product the application belongs to. Default:mediahub. The requestedscopesmust be a subset of the scopes granted by this product's subscription. - scopes:
array(Optional)
The API scopes to grant to the application. Must be a subset of your subscription's scopes for the product. If omitted, the application is granted your subscription's default scopes (plusme). Example:["mediahub_read", "mediahub_write"]. - cname:
string(Optional)
A custom CNAME to map the AutoGraph API under your own domain (see the custom-domain tutorial). Must be a valid sub-domain of your own site's domain and unique per application. - color_code:
string(Optional)
A hex color code (format:#RRGGBB). - vendor_name:
string(Optional)
The vendor name of the application. - app_url:
string(Optional)
The URL of the application. - redirect_uri:
string(Optional)
The redirect URI of the application. - auto_backtraces:
string(Optional)
Values:on,off
Whether automatic backtracing is enabled for the application. - antifraud_settings:
object(Optional)
The anti-fraud configuration for the application. See the anti-fraud tutorial for a full walkthrough.- callback_url:
string(Optional)
The base URL of your anti-fraud webhook; must start withhttps://. The runtime appendsautograph_tag,timestamp,signature, etc. - alert_threshold:
float(Optional)
A 0..1 decision threshold for ML "risk" alerts. - block_threshold:
float(Optional)
A 0..1 decision threshold for automatically blocking suspected fraud. - notification_email:
string(Optional)
The email address to notify on anti-fraud events. - email_exclude_pattern:
string(Optional)
A pattern for excluding emails from anti-fraud screening. - extended_auth:
object(Optional)
Extended Auth (step-up verification / 2FA) settings.- enabled:
boolean(Optional)
Whether Extended Auth is enabled. Default:false. - passive_mode:
boolean(Optional)
Whether Extended Auth runs in passive (non-blocking) mode. Default:false. - enabled_tags:
string(Optional)
A comma-separated list of tags that are forced through Extended Auth. - email_template:
object(Optional)
The verification email template.- from:
string(Optional)
The sender email (and optional display name) of the verification email. - reply_to:
string(Optional)
The reply-to email of the verification email. - subject:
string(Optional)
The subject of the verification email. - body:
string(Optional)
The body of the verification email.
- from:
- enabled:
- callback_url:
- app_name:
Example Request
bash
curl -X POST -H "Content-Type: application/json" -d '{
"application": {
"app_name": "My Signing Script",
"product": "mediahub",
"scopes": ["mediahub_read", "mediahub_write"]
}
}' "https://api.xvid.com/v1/applications/?access_token=YOUR_AUTH_TOKEN&human=true"Example Response
Success (200 OK)
json
{
"application": {
"app_name": "My Signing Script",
"scopes": [
"mediahub_read",
"mediahub_write"
],
"product": "mediahub",
"client_id": "6ae0971a404343165f14396d",
"client_secret": "************************************************************",
"user": {
"id": "51304d3467b4c3205acd9397",
"href": "https://api.xvid.com/v1/users/51304d3467b4c3205acd9397"
},
"created_at": 1793103642639,
"updated_at": 1793103642639,
"id": "6ae0971a404343165f14396d",
"href": "https://api.xvid.com/v1/applications/6ae0971a404343165f14396d"
}
}Response Fields
- client_id:
string— The generated client ID (identical to the applicationid). - client_secret:
string— The generated client secret. Save it now; it is not returned again on subsequent reads. - Other fields mirror the request body and the GET response fields.
Error Responses
400 Bad Request
Returned e.g. when the requested scopes are not allowed, or when an invalid value is provided.
json
{
"error": {
"error_code": "0x0220002",
"error_message": "Scopes requested are not allowed"
}
}403 Forbidden
json
{
"error": {
"error_code": "0x0000003",
"error_message": "Invalid access token"
}
}404 Not Found
json
{
"error": {
"error_code": "0x0000002",
"error_message": "User does not exist"
}
}500 Internal Server Error
json
{
"error": {
"error_code": "0x0000001",
"error_message": "Internal Error"
}
}