Skip to content

PUT /applications/ ​

Description ​

Update an existing application. This is a partial update: only the fields you include in the request body are validated and applied; all other fields of the application are left unchanged.

The {id} path parameter is the application id (identical to its client_id).

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.

Path Parameters ​

  • id: string (Required)
    The application id (identical to its client_id). For example: 6ae0971a404343165f14396d.

Body Parameters ​

  • application: object (Required)
    Any subset of the application fields documented for POST may be provided. Only the provided fields are updated. Common fields:
    • app_name: string (Optional)
      The name of the application.
    • scopes: array (Optional)
      The API scopes to grant to the application. Must be a subset of your subscription's scopes for the product.
    • cname: string (Optional)
      A custom CNAME (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)
    • app_url: string (Optional)
    • redirect_uri: string (Optional)
    • auto_backtraces: string (Optional)
      Values: on, off
    • antifraud_settings: object (Optional)
      The anti-fraud configuration. See POST body parameters for the full nested structure, or the anti-fraud tutorial for a walkthrough.

Example Request (Rename) ​

bash
curl -X PUT -H "Content-Type: application/json" -d '{
  "application": {
    "app_name": "My Renamed Application"
  }
}' "https://api.xvid.com/v1/applications/6ae0971a404343165f14396d?access_token=YOUR_AUTH_TOKEN&human=true"

Example Request (Configure Anti-Fraud) ​

bash
curl -X PUT -H "Content-Type: application/json" -d '{
  "application": {
    "antifraud_settings": {
      "callback_url": "https://yourdomain.com/member_info.php?username=",
      "alert_threshold": 0.5,
      "extended_auth": {
        "enabled": true,
        "passive_mode": false,
        "enabled_tags": "testuser1, testuser2"
      }
    }
  }
}' "https://api.xvid.com/v1/applications/6ae0971a404343165f14396d?access_token=YOUR_AUTH_TOKEN&human=true"

Example Response ​

Success (200 OK) ​

The response returns the updated application:

json
{
  "application": {
    "app_name": "My Renamed Application",
    "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": 1793103668533,
    "id": "6ae0971a404343165f14396d",
    "href": "https://api.xvid.com/v1/applications/6ae0971a404343165f14396d"
  }
}

Error Responses ​

400 Bad Request ​

Returned e.g. when the requested scopes are not allowed, the cname is already in use, or 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": "0x0220001",
    "error_message": "Application does not exist"
  }
}

500 Internal Server Error ​

json
{
  "error": {
    "error_code": "0x0000001",
    "error_message": "Internal Error"
  }
}