2020-10-26 17:08:22 -04:00
---
2020-11-17 10:09:28 -05:00
stage: Manage
2022-01-26 22:14:06 -05:00
group: Authentication and Authorization
2022-09-21 17:13:33 -04:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
2020-10-26 17:08:22 -04:00
---
2021-01-28 01:08:59 -05:00
# Appearance API **(FREE SELF)**
2020-01-09 01:07:57 -05:00
2020-05-21 02:08:25 -04:00
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/16647) in GitLab 12.7.
2020-01-09 01:07:57 -05:00
2020-12-09 22:09:53 -05:00
The appearance API allows you to maintain the appearance of GitLab as if
you're using the GitLab UI at `/admin/appearance` . The API requires
administrator privileges.
2020-01-09 01:07:57 -05:00
## Get current appearance configuration
List the current appearance configuration of the GitLab instance.
2020-02-27 04:09:01 -05:00
```plaintext
2020-01-09 01:07:57 -05:00
GET /application/appearance
```
2020-01-30 10:09:15 -05:00
```shell
2020-05-27 20:08:37 -04:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/application/appearance"
2020-01-09 01:07:57 -05:00
```
Example response:
```json
{
"title": "GitLab Test Instance",
"description": "gitlab-test.example.com",
"logo": "/uploads/-/system/appearance/logo/1/logo.png",
"header_logo": "/uploads/-/system/appearance/header_logo/1/header.png",
"favicon": "/uploads/-/system/appearance/favicon/1/favicon.png",
"new_project_guidelines": "Please read the FAQs for help.",
2020-04-28 11:09:29 -04:00
"profile_image_guidelines": "Custom profile image guidelines",
2020-01-09 01:07:57 -05:00
"header_message": "",
"footer_message": "",
"message_background_color": "#e75e40",
"message_font_color": "#ffffff",
"email_header_and_footer_enabled": false
}
```
## Change appearance configuration
Use an API call to modify GitLab instance appearance configuration.
2020-02-27 04:09:01 -05:00
```plaintext
2020-01-09 01:07:57 -05:00
PUT /application/appearance
```
| Attribute | Type | Required | Description |
| --------------------------------- | ------- | -------- | ----------- |
| `title` | string | no | Instance title on the sign in / sign up page
| `description` | string | no | Markdown text shown on the sign in / sign up page
2020-11-19 13:09:13 -05:00
| `logo` | mixed | no | Instance image used on the sign in / sign up page. See [Change logo ](#change-logo )
2020-01-09 01:07:57 -05:00
| `header_logo` | mixed | no | Instance image used for the main navigation bar
2020-06-02 14:08:32 -04:00
| `favicon` | mixed | no | Instance favicon in `.ico` or `.png` format
2020-01-09 01:07:57 -05:00
| `new_project_guidelines` | string | no | Markdown text shown on the new project page
2020-04-28 11:09:29 -04:00
| `profile_image_guidelines` | string | no | Markdown text shown on the profile page below Public Avatar
2021-01-07 16:10:18 -05:00
| `header_message` | string | no | Message in the system header bar
| `footer_message` | string | no | Message in the system footer bar
2020-01-09 01:07:57 -05:00
| `message_background_color` | string | no | Background color for the system header / footer bar
| `message_font_color` | string | no | Font color for the system header / footer bar
| `email_header_and_footer_enabled` | boolean | no | Add header and footer to all outgoing emails if enabled
2020-01-30 10:09:15 -05:00
```shell
2020-05-27 20:08:37 -04:00
curl --request PUT --header "PRIVATE-TOKEN: < your_access_token > " "https://gitlab.example.com/api/v4/application/appearance?email_header_and_footer_enabled=true& header_message=test"
2020-01-09 01:07:57 -05:00
```
Example response:
```json
{
"title": "GitLab Test Instance",
"description": "gitlab-test.example.com",
"logo": "/uploads/-/system/appearance/logo/1/logo.png",
"header_logo": "/uploads/-/system/appearance/header_logo/1/header.png",
"favicon": "/uploads/-/system/appearance/favicon/1/favicon.png",
"new_project_guidelines": "Please read the FAQs for help.",
2020-04-28 11:09:29 -04:00
"profile_image_guidelines": "Custom profile image guidelines",
2020-01-09 01:07:57 -05:00
"header_message": "test",
"footer_message": "",
"message_background_color": "#e75e40",
"message_font_color": "#ffffff",
"email_header_and_footer_enabled": true
}
```
2020-11-19 13:09:13 -05:00
## Change logo
Upload a logo to your GitLab instance.
To upload an avatar from your file system, use the `--form` argument. This causes
cURL to post data using the header `Content-Type: multipart/form-data` . The
2020-12-03 16:09:35 -05:00
`file=` parameter must point to an image file on your file system and be
2020-11-19 13:09:13 -05:00
preceded by `@` .
```plaintext
PUT /application/appearance
```
| Attribute | Type | Required | Description |
| --------- | ------ | -------- | -------------- |
2022-08-16 17:12:07 -04:00
| `logo` | mixed | Yes | File to upload |
2020-11-19 13:09:13 -05:00
Example request:
```shell
curl --location --request PUT "https://gitlab.example.com/api/v4/application/appearance?data=image/png" \
--header "Content-Type: multipart/form-data" \
--header "PRIVATE-TOKEN: < your_access_token > " \
--form "logo=@/path/to/logo.png"
```
Returned object:
```json
{
"logo":"/uploads/-/system/appearance/logo/1/logo.png"
```