> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

# GetBlogSettings

# Package: blog

# Namespace: BlogSettingsV3Service

# Method link: https://dev.wix.com/docs/api-reference/business-solutions/blog/blog-settings/get-blog-settings.md

## Permission Scopes:
Read Blog : SCOPE.DC-BLOG.READ-BLOGS

## Introduction

Retrieves the site's blog settings.

A site has one blog settings object. If the site has none yet, this method creates the default blog settings and returns them.

Specify `language` to retrieve `allPostsFeedLabel` in that language. Comments are not translated.

---

## REST API

### Schema

```
 Method: getBlogSettings
 Description: Retrieves the site's blog settings.  A site has one blog settings object. If the site has none yet, this method creates the default blog settings and returns them.  Specify `language` to retrieve `allPostsFeedLabel` in that language. Comments are not translated.
 URL: https://www.wixapis.com/v3/blog-settings/v3/blog-settings
 Method: GET
 Method parameters:
   query param name: language | type: language | description: Language of `allPostsFeedLabel` to retrieve, in IETF BCP 47 language tag format. Typically, this is a lowercase 2-letter language code, followed by a hyphen, followed by an uppercase 2-letter country code. For example, `en-US` for U.S. English, and `de-DE` for Germany German.  When omitted, the language of the current request is used when the request includes one. Otherwise the primary language is used. If that language has no translation, the primary label is returned.  | validation: format LANGUAGE_TAG
 Return type: GetBlogSettingsResponse
  - name: blogSettings | type: BlogSettings | description: Retrieved blog settings.  
     - name: revision | type: string | description: Revision number, which increments by 1 each time the blog settings are updated. To prevent conflicting changes, the current revision must be passed when updating the blog settings.  | read-only: true | validation: format int64
     - name: allPostsFeedLabel | type: string | description: Label of the feed that lists all posts.  Translatable. Specify `language` on Get Blog Settings or Update Blog Settings to read or write this label in a specific language.  Default: `All posts` when the site has no saved blog settings.  | validation: minLength 1, maxLength 35
     - name: comments | type: Comments | description: Comment settings for the blog.  When updating comments, include `enabled`, `anonymousEnabled`, `ratingsEnabled`, and `ratingsMandatory` together. A partial comments object is rejected.  
        - name: enabled | type: boolean | description: Whether comments are turned on for the blog.  Default: `true` when the site has no saved blog settings.  
        - name: anonymousEnabled | type: boolean | description: Whether visitors can comment without signing in.  Default: `false` when the site has no saved blog settings.  
        - name: ratingsEnabled | type: boolean | description: Whether visitors can rate a post when they comment.  Default: `false` when the site has no saved blog settings.  
        - name: ratingsMandatory | type: boolean | description: Whether a rating is required when a visitor leaves a comment.  Default: `false` when the site has no saved blog settings.  


```

### Examples

### Get the site's blog settings in a specific language
Retrieves blog settings and the all-posts feed label for en-US.

```curl
curl -X GET \
'https://www.wixapis.com/v3/blog-settings?language=en-US' \
-H 'Authorization: <AUTH>'
```

---

## JavaScript SDK

### Schema

```
 Method: wixClientAdmin.blog.blogSettings.getBlogSettings(options)
 Description: Retrieves the site's blog settings.  A site has one blog settings object. If the site has none yet, this method creates the default blog settings and returns them.  Specify `language` to retrieve `allPostsFeedLabel` in that language. Comments are not translated.
 Method parameters:
   param name: options | type: GetBlogSettingsOptions  none  
        - name: language | type: string | description: Language of `allPostsFeedLabel` to retrieve, in IETF BCP 47 language tag format. Typically, this is a lowercase 2-letter language code, followed by a hyphen, followed by an uppercase 2-letter country code. For example, `en-US` for U.S. English, and `de-DE` for Germany German.  When omitted, the language of the current request is used when the request includes one. Otherwise the primary language is used. If that language has no translation, the primary label is returned.  | validation: format LANGUAGE_TAG
 Return type: PROMISE<BlogSettings>
  - name: revision | type: string | description: Revision number, which increments by 1 each time the blog settings are updated. To prevent conflicting changes, the current revision must be passed when updating the blog settings.  | read-only: true | validation: format int64
  - name: allPostsFeedLabel | type: string | description: Label of the feed that lists all posts.  Translatable. Specify `language` on Get Blog Settings or Update Blog Settings to read or write this label in a specific language.  Default: `All posts` when the site has no saved blog settings.  | validation: minLength 1, maxLength 35
  - name: comments | type: Comments | description: Comment settings for the blog.  When updating comments, include `enabled`, `anonymousEnabled`, `ratingsEnabled`, and `ratingsMandatory` together. A partial comments object is rejected.  
     - name: enabled | type: boolean | description: Whether comments are turned on for the blog.  Default: `true` when the site has no saved blog settings.  
     - name: anonymousEnabled | type: boolean | description: Whether visitors can comment without signing in.  Default: `false` when the site has no saved blog settings.  
     - name: ratingsEnabled | type: boolean | description: Whether visitors can rate a post when they comment.  Default: `false` when the site has no saved blog settings.  
     - name: ratingsMandatory | type: boolean | description: Whether a rating is required when a visitor leaves a comment.  Default: `false` when the site has no saved blog settings.  


```

### Examples

### Get the site's blog settings in a specific language
Retrieves blog settings and the all-posts feed label for en-US.

```javascript
import { blogSettings } from "@wix/blog";

async function getBlogSettings() {
  const response = await blogSettings.getBlogSettings({
    language: "en-US",
  });
}

/* Promise resolves to:
 * {
 *   "revision": "1",
 *   "allPostsFeedLabel": "All posts",
 *   "comments": {
 *     "enabled": true,
 *     "anonymousEnabled": false,
 *     "ratingsEnabled": false,
 *     "ratingsMandatory": false
 *   }
 * }
 */

```

### getBlogSettings (self-hosted)
Self-hosted SDK calls require you to [create a client](https://dev.wix.com/docs/sdk/articles/work-with-the-sdk/about-the-wix-client.md).

```javascript
import { createClient } from '@wix/sdk';
import { blogSettings } from '@wix/blog';
// Import the auth strategy for the relevant access type
// Import the relevant host module if needed

const myWixClient = createClient ({
  modules: { blogSettings },
  // Include the auth strategy and host as relevant
});


async function getBlogSettings(options) {
  const response = await myWixClient.blogSettings.getBlogSettings(options);
};
```

---