Upload CSS File

Uploads a CSS file for the specified application's BindID authentication pages. For information on which page elements can be customized with a CSS file, see CSS Reference.

If you want to preview the authentication pages before using them, upload the CSS file, set the overrideDefaultCSS field to false, and use preview feature in the Admin Portal.

HTTP Request

The API is invoked as a POST request to the following endpoint:

https://<host-name>/api/v1/mgmt/branding

where:

  • <host-name> has the following value depending on the environment:
    • Sandbox: admin.bindid-sandbox.io
    • Production: admin.bindid.io
    • Production EU: admin.eu.bindid.io

Request Header

Header NameValue
AuthorizationA valid bearer token (see Token API)
Content-TypeMust be multipart/form-data; boundary=<boundary_value>, where <boundary_value> can be any value that does not occur as request data (for example, Boundary7MA4YWxkTrZu0gW).

Request Parameters

The body for this POST request is multipart form data with the following fields:

FieldDescriptionType
overrideDefaultCSSDetermines whether the uploaded file overrides the default CSS, where: true, overrides the default CSS; false, does not override the default CSS. If unspecified, the existing override CSS setting for the application is used (as indicated by the Override the default styling using custom CSS setting on the application's Branding page in the Admin Portal).String
fileRequired. Link to the CSS file you are uploading. The file name can only contain alphanumeric, period, dash, and underscore characters.String
appIdRequired. The ID of the application for which the CSS is modified.String
credentialsIdRequired. API credentials ID used to create the access token that authorizes this request.String

Request Example

POST api/v1/mgmt/branding
Authorization: Bearer q5fDE10-mlM4xEwl_UnhKjhvWOLHEbXqzJOYpGgxuB0
Content-Type: multipart/form-data; boundary="boundary"
--boundary
Content-Disposition: form-data; name="appId"
d2e30f2b
--boundary
Content-Disposition: form-data; name="credentialsId"
bb163f47.management_api_app.tid_f06c7e7a.bindid.io
--boundary
Content-Disposition: form-data; name="file"; filename="bindIdApp.css"
Content-Type: text/css
(css file data)
--boundary
Content-Disposition: form-data; name="overrideDefaultCSS"
true
--boundary--

Response Headers

The response includes this HTTP header:

Header NameValue
Content-Typeapplication/json

Response Body

The JSON object in the body has the following structure:

Field NameDescriptionType
statusIndicates call success or failure.String
errorObject describing the error, only returned when the call failed (see Failures).Object

Response Example

HTTP/2 200
Content-Type: application/json
{
"status": "success"
}

Failures

In addition to the common errors (see Introduction), the following error response codes may be returned as part of a 4xx status response:

Status CodeResponse CodeDescription
400N/AInvalid request structure.
400request validation failedA required request parameter was missing.
400overrideDeafultCSS_wrong_valueThe overrideDefaultCSS was not a boolean value ('true' or 'false').
400empty_fileAn empty CSS file was uploaded.
400app_not_foundThe application ID (appId) was not found.
400invalid_file_formatThe uploaded file was not a CSS file.
400css_validation_failedThe uploaded file was not a valid CSS file.
400invalid_file_nameThe CSS file name contained unsupported characters.
500server_errorServer failed to validate the uploaded CSS file.