# 브랜드 소식 이미지 등록

## Request

## 소식에 사용되는 이미지 파일을 등록합니다.<br>

> 소식에 사용되는 이미지 파일을 등록합니다. slide인 경우 정사각형 비율만 허용됩니다.<br>

```json
{"openapi":"3.0.0","info":{"title":"RCS Biz Center 브랜드 소식 API 규격","version":"1.0.0"},"servers":[{"url":"https://api-qa.rcsbizcenter.com/bfapi/1.0","description":"RCS Biz Center API for Staging"},{"url":"https://api.rcsbizcenter.com/bfapi/1.0","description":"RCS Biz Center API for Production"}],"security":[{"jwtAuth":[]}],"components":{"securitySchemes":{"jwtAuth":{"type":"http","description":"인증방식은 JWT인증을 사용합니다. 토큰의 갱신은 없으며 토큰 만료 시 항상 재발급 받아야 합니다.\n","scheme":"bearer","bearerFormat":"JWT"}}},"paths":{"/brand/{brandId}/feed/file":{"post":{"summary":"소식에 사용되는 이미지 파일을 등록합니다.\n","description":"소식에 사용되는 이미지 파일을 등록합니다. slide인 경우 정사각형 비율만 허용됩니다.\n","parameters":[{"name":"X-RCS-Brandkey","in":"header","description":"maxLength: 36 - RCS Biz Center에서 브랜드 등록 시 자동 생성되는 Key 입니다. 대행사가 브랜드 소식 API 연동 시 Header에 반드시 설정하여야 합니다.","required":false,"schema":{"type":"string"}},{"name":"brandId","in":"path","description":"브랜드 내 정보 접근시 사용되는 브랜드ID Path Parameter 입니다.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","description":"브랜드 소식에 사용할 이미지 파일입니다.","format":"binary"},"type":{"type":"string","description":"이미지가 사용될 브랜드 소식 카드 유형","enum":["gallery","slide"]}}}}}},"responses":{"200":{"description":"페이지 내 Response 섹션 참조"}}}}}}
```

## Response

<table data-full-width="true"><thead><tr><th width="124">필드명</th><th width="186">타입</th><th width="78" align="center">길이</th><th width="89" align="center">필수여부</th><th width="120">기본값</th><th>설명</th></tr></thead><tbody><tr><td><a href="#result-array-less-than-feedfileinfo-greater-than"><mark style="color:blue;"><strong><code>result</code></strong></mark></a></td><td>array&#x3C;FeedFileInfo></td><td align="center"></td><td align="center">O</td><td></td><td>브랜드 소식 파일 등록 정보입니다.</td></tr><tr><td><strong><code>code</code></strong></td><td>string</td><td align="center">5</td><td align="center">O</td><td>20000000</td><td>리턴코드값</td></tr><tr><td><strong><code>status</code></strong></td><td>integer</td><td align="center">3</td><td align="center">O</td><td>200</td><td>상태값</td></tr><tr><td><strong><code>desc</code></strong></td><td>string</td><td align="center"></td><td align="center">O</td><td></td><td>처리메시지</td></tr></tbody></table>

### <mark style="color:blue;">result</mark> - array\<FeedFileInfo>

<table data-full-width="true"><thead><tr><th width="125">필드명</th><th width="187">타입</th><th width="78" align="center">길이</th><th width="89" align="center">필수여부</th><th width="88">기본값</th><th>설명</th></tr></thead><tbody><tr><td><strong><code>fileId</code></strong></td><td>string</td><td align="center"></td><td align="center"></td><td></td><td>등록된 파일의 ID 입니다.</td></tr><tr><td><strong><code>url</code></strong></td><td>string</td><td align="center">128</td><td align="center"></td><td></td><td>등록된 파일의 URL 정보 입니다.</td></tr><tr><td><strong><code>fileName</code></strong></td><td>string</td><td align="center">256</td><td align="center"></td><td></td><td>등록한 파일의 이름입니다.</td></tr><tr><td><strong><code>type</code></strong></td><td>string</td><td align="center"></td><td align="center"></td><td></td><td>이미지가 사용될 브랜드 소식 카드 유형(gallery, slide)</td></tr></tbody></table>

### ❖ response body sample

{% tabs %}
{% tab title="200" %}

```
{
    "code": "20000000",
    "desc": null,
    "result": {
        "fileName": "900x900-2.jpg",
        "type": "gallery",
        "url": "https://biz-dev.chatplus.co.kr/brand/BR.61hBmMP164/feed/20240704/BR.61hBmMP164-FDcoZeqOY0W7.jpg",
        "fileId": "BR.61hBmMP164-FDcoZeqOY0W7"
    },
    "status": 200
}
```

{% endtab %}

{% tab title="400" %}

```
{
    "error": {
        "code": "64708",
        "message": "File size not allowed"
    },
    "status": 400
}
```

{% endtab %}

{% tab title="401" %}

```
{
  "status": "401",
  "error": {
    "code": "61001",
    "message": "Missing Authorization header"
  }
}

{
    "error": {
        "code": "63001",
        "message": "No Brand Permission"
    },
    "status": 401
}
```

{% endtab %}

{% tab title="705" %}

```
{
    "error": {
        "code": "60000705",
        "message": "파일을 읽을 수 없습니다."
    },
    "status": 705
}
```

{% endtab %}
{% endtabs %}

{% hint style="warning" %}
error code는 [브랜드소식 - Response body error code](/feed-api/error_code.md#response-body-error-code) 참조
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.rcsbizcenter.com/feed-api/feed/post_feed_img.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
