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
- Sandbox:
Request Header
Header Name | Value |
---|---|
Authorization | A valid bearer token (see Token API) |
Content-Type | Must 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:
Field | Description | Type |
---|---|---|
overrideDefaultCSS | Determines 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 |
file | Required. Link to the CSS file you are uploading. The file name can only contain alphanumeric, period, dash, and underscore characters. | String |
appId | Required. The ID of the application for which the CSS is modified. | String |
credentialsId | Required. 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 Name | Value |
---|---|
Content-Type | application/json |
Response Body
The JSON object in the body has the following structure:
Field Name | Description | Type |
---|---|---|
status | Indicates call success or failure . | String |
error | Object 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 Code | Response Code | Description |
---|---|---|
400 | N/A | Invalid request structure. |
400 | request validation failed | A required request parameter was missing. |
400 | overrideDeafultCSS_wrong_value | The overrideDefaultCSS was not a boolean value ('true' or 'false' ). |
400 | empty_file | An empty CSS file was uploaded. |
400 | app_not_found | The application ID (appId ) was not found. |
400 | invalid_file_format | The uploaded file was not a CSS file. |
400 | css_validation_failed | The uploaded file was not a valid CSS file. |
400 | invalid_file_name | The CSS file name contained unsupported characters. |
500 | server_error | Server failed to validate the uploaded CSS file. |