# 080 수신거부

## **연동 방식**

https 프로토콜을 이용한 Rest API

***

## **필수값**

| 이름      | 내용                     |
| ------- | ---------------------- |
| API Key | 설정 페이지에서 발급한 API Key 값 |

***

<br>

## **요청 주소**

[https://api.groobee.io](https://api.groobee.io/)

***

<br>

## **공통 사항**

### **요청 방법**

Rest API 요청 시 Header에 x-api-key 키로 API Key를 값으로 포함해야 합니다.

```
curl --location --request GET 'https://api.groobee.io/<요청주소>' \
--header 'x-api-key: <발급 받은 API Key 값>'
```

* **API key 확인 방법**
  * <https://app.groobee.io/> 접속하여 계정 로그인
  * [설정 > 사이트 > 사이트 설정 > Key 관리](https://app.groobee.io/setting/main)에서 key 생성 후 확인 가능

### **응답 결과**

JSON으로 응답하며 형태는 아래를 참고해 주세요.

```
{
    "httpStatus": {
        "code": <http status code>,
        "reasonPhrase": <http status 내용>
    },
    "processCode": <성공여부>,
    "processValue": <요청한 엔드포인트의 응답값>
}
```

### **processCode 코드값**

| 코드 값  | 상태 | 설명                                             |
| ----- | -- | ---------------------------------------------- |
| 0     | 성공 | -                                              |
| -1000 | 실패 | 요청 시 Header에 x-api-key 미존재                     |
| -1001 | 실패 | 고객사 미존재                                        |
| -1002 | 실패 | 고객사 미승인 상태 (승인 필요)                             |
| -1003 | 실패 | 고객사 계약기간 만료                                    |
| -1004 | 실패 | 데이터 초과                                         |
| -1008 | 실패 | 회원 수신거부 번호와 일치하지 않음                            |
| -6000 | 실패 | 수신거부 기능을 사용하지 않음                               |
| -9997 | 실패 | <p>· 데이터가 올바르지 않음<br>· 등록된 수신 거부 번호가 없는 경우</p> |
| -9998 | 실패 | http 관련 에러                                     |
| -9999 | 실패 | 요청 API 서버 에러                                   |

***

## **엔드 포인트**

### **080 수신거부 조회**

080 수신거부한 회원을 조회하는 API

* **요청 형태**

| Method | URI                                  | 요청/응답 형식 |
| ------ | ------------------------------------ | -------- |
| GET    | /v1/users/sms/blockrecipients{param} | JSON     |

* **매개변수**

| Parameter | Parameter Name        | Description                       |
| --------- | --------------------- | --------------------------------- |
| param     | unsubscribeNo (필수)    | 080 수신 거부 번호                      |
|           | recipientNo           | 수신 거부 대상자 번호                      |
|           | startDate             | 수신 거부 요청 시작값(yyyy-MM-dd HH:mm:ss) |
|           | endDate               | 수신 거부 요청 종료값(yyyy-MM-dd HH:mm:ss) |
|           | pageNum               | 페이지 번호(기본값 : 1)                   |
|           | pageSize (max : 1000) | 검색 수(기본값 : 15)                    |

* **응답** **데이터**

```
{ 
    "httpStatus": { 
        "code": <http staus code>,
        "reasonphrase": <http status 내용>
    },
    "processCode": <성공여부>,
    "processValue": {
        "result": {
            "pageNum": <페이지 번호>,
            "pageSize": <페이지 수>,
            "totalCount": <전체 수>,
            "data": [
                {
                    "unsubscribeno": <080 수신 거부 번호>,
                    "recipientNo": <회원 전화번호>,
                    "requestDate": <수신거부 날짜>
                } ...
               ]
            }
       }
}
```

### **080 수신거부 대상자 저장**

080 수신거부한 회원을 저장하는 API

* **요청 형태**

| Method | URI                                  | 요청/응답 형식 |
| ------ | ------------------------------------ | -------- |
| POST   | /v1/users/sms/blockrecipients{param} | JSON     |

* **매개변수**

| Parameter | Parameter Name | Description |
| --------- | -------------- | ----------- |
| param     | unsubscribeNo  | 수신거부 대상자 번호 |

* **Request body**

저장할 수신거부 번호들을 배열로 요청한다.(단 최대 10개까지만 가능)

```
[
    <수신거부 번호>,
    ...
]
```

* **응답 데이터**

```
{
    "httpStatus": {
        "code": <http status code>,
        "reasonPhrase": <http status 내용>
},
"processCode": <성공여부>,
"processValue": {
    "result": ""
    }
}
```

<br>

### **080 수신거부 대상자 삭제**

080 수신거부한 회원을 삭제하는 API

* **요청 형태**

| Method | URI                                  | 요청/응답 형식 |
| ------ | ------------------------------------ | -------- |
| DELETE | /v1/users/sms/blockrecipients{param} | JSON     |

* **매개변수**

| Parameter | Parameter Name     | Description  |
| --------- | ------------------ | ------------ |
| param     | unsubscribeNo (필수) | 080 수신 거부 번호 |
|           | updateUser (필수)    | 삭제시 남길 메모    |

* **Request body**

삭제할 수신거부 번호들을 배열로 요청한다.(단 최대 10개까지만 가능)

```
[
    <수신거부 번호>,
    ...
]
```

* **응답 데이터**

```
{
    "httpStatus": {
        "code": <http status code>,
        "reasonPhrase": <http status 내용>
},
    "processCode": <성공여부>,
    "processValue": {
        "result": ""
    }
}
```

<br>


---

# 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://docs.groobee.ai/developer-guide/api-guide/ban.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.
