> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.claw-ops.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.claw-ops.com/_mcp/server.

# 수신거부 등록

POST https://api.claw-ops.com/v1/accounts/{accountId}/blocked-recipients
Content-Type: application/json

번호를 수신거부 명단에 등록합니다. 대상은 이 계정의 **발신**(전화·문자)이고, 착신은 대상이 아닙니다 —
그 번호에서 걸려오는 전화는 그대로 받습니다.

등록 즉시 **발신이 막힙니다.** 이 계정에서 그 번호로 통화를 걸거나 문자를 보내면 발신 직전에
`422 recipient_blocked` 로 거절되고, 배치 발신(캠페인)도 같은 관문을 지나므로 해당 대상은 자동으로
건너뜁니다. 이미 진행 중인 통화는 끊지 않습니다 — 막는 것은 새 발신입니다.

**멱등입니다.** 이미 차단 중인 (번호, 채널) 조합을 다시 등록하면 에러 없이 기존 항목을 `200` 으로 돌려줍니다.
새로 등록된 경우에만 `201` 입니다. 같은 사람이 수신거부를 두 번 요청하는 것은 정상 상황이기 때문입니다.

전화와 문자를 모두 차단하려면 `channel` 을 바꿔 두 번 호출합니다.

Reference: https://docs.claw-ops.com/api-레퍼런스/claw-ops-api/blocked-recipients/create-blocked-recipient

## Authentication

- `Authorization` header (bearer token, required) — API Key를 Bearer 토큰으로 전달

## Request

### Path parameters

- `accountId` (string, required) — 계정 ID

### Body (application/json)

- `number` (string, required) — 수신거부할 번호. 하이픈·+82 형태 모두 허용되며 국내 표기로 정규화되어 저장됩니다.
- `channel` (enum, required) — 차단할 채널. call=전화, message=문자(SMS/LMS/MMS 공통).
  - Allowed values: `call`, `message`
- `source` (enum, optional, default: api) — 접수 경로. 미지정 시 api. `agent` 는 AI 상담 중 고객이 구두로 요청해 등록한 경우로, 콘솔 수기 등록과 구분해 두면 나중에 "언제 어떻게 거부 의사를 밝혔나"에 답할 수 있습니다.
  - Allowed values: `api`, `console`, `import`, `agent`
- `sourceRef` (string, optional) — 증빙 링크(통화 id 또는 메시지 id). 어떤 통화·문자에서 거부 의사가 나왔는지 되짚는 용도입니다.
- `note` (string, optional) — 자유 메모

## Response

### 200

이미 차단 중 — 기존 항목을 그대로 반환(멱등)

- `id` (string, optional) — 수신거부 항목 id
- `number` (string, optional) — 수신거부한 상대 번호. 하이픈·+82 형태로 보내도 국내 표기로 정규화되어 저장·응답됩니다.
- `channel` (enum, optional) — 차단 채널. call=전화, message=문자(SMS/LMS/MMS 공통). 같은 번호라도 채널마다 별개 항목입니다.
  - Allowed values: `call`, `message`
- `active` (boolean, optional) — 지금 차단 중인지 여부. 해제된 항목도 이력으로 남아 조회되므로 이 값으로 구분합니다.
- `source` (string, optional) — 접수 경로. 공개 API 로 등록하면 api·console·import 중 하나입니다. ARS(수신거부 9번)·문자 회신 등 내부 접수 경로로 등록된 항목은 ars·sms·agent 로 나타납니다.
- `sourceRef` (string, optional, nullable) — 증빙 링크. 어느 통화에서 수신거부를 눌렀는지 / 어느 문자에 회신했는지. 가리키는 대상은 source 가 결정합니다.
- `note` (string, optional, nullable) — 자유 메모
- `createdBy` (string, optional, nullable) — 등록 주체(콘솔 사용자 등). 자동 접수는 null 입니다.
- `createdAt` (datetime, optional) — 수신거부 접수 시각
- `updatedAt` (datetime, optional)
- `unblockedAt` (datetime, optional, nullable) — 해제 시각. null 이면 차단 중입니다. 해제해도 항목은 삭제되지 않고 이력으로 남습니다.
- `unblockedSource` (string, optional, nullable) — 해제 경로
- `unblockedBy` (string, optional, nullable) — 해제 주체. 자동 해제는 null 입니다.
- `unblockedNote` (string, optional, nullable) — 해제 사유 메모

### 201

수신거부 등록 성공

- `id` (string, optional) — 수신거부 항목 id
- `number` (string, optional) — 수신거부한 상대 번호. 하이픈·+82 형태로 보내도 국내 표기로 정규화되어 저장·응답됩니다.
- `channel` (enum, optional) — 차단 채널. call=전화, message=문자(SMS/LMS/MMS 공통). 같은 번호라도 채널마다 별개 항목입니다.
  - Allowed values: `call`, `message`
- `active` (boolean, optional) — 지금 차단 중인지 여부. 해제된 항목도 이력으로 남아 조회되므로 이 값으로 구분합니다.
- `source` (string, optional) — 접수 경로. 공개 API 로 등록하면 api·console·import 중 하나입니다. ARS(수신거부 9번)·문자 회신 등 내부 접수 경로로 등록된 항목은 ars·sms·agent 로 나타납니다.
- `sourceRef` (string, optional, nullable) — 증빙 링크. 어느 통화에서 수신거부를 눌렀는지 / 어느 문자에 회신했는지. 가리키는 대상은 source 가 결정합니다.
- `note` (string, optional, nullable) — 자유 메모
- `createdBy` (string, optional, nullable) — 등록 주체(콘솔 사용자 등). 자동 접수는 null 입니다.
- `createdAt` (datetime, optional) — 수신거부 접수 시각
- `updatedAt` (datetime, optional)
- `unblockedAt` (datetime, optional, nullable) — 해제 시각. null 이면 차단 중입니다. 해제해도 항목은 삭제되지 않고 이력으로 남습니다.
- `unblockedSource` (string, optional, nullable) — 해제 경로
- `unblockedBy` (string, optional, nullable) — 해제 주체. 자동 해제는 null 입니다.
- `unblockedNote` (string, optional, nullable) — 해제 사유 메모

## Examples

### Example 1

**Request**

```json
{
  "number": "010-1234-5678",
  "channel": "call"
}
```

**Response**

```json
{
  "id": "clx9blk00001",
  "number": "01012345678",
  "channel": "call",
  "active": true,
  "source": "api",
  "sourceRef": "CA1a2b3c4d5e",
  "note": "상담 중 재연락 거부 의사 밝힘",
  "createdBy": null,
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "unblockedAt": "2024-01-15T09:30:00Z",
  "unblockedSource": "api",
  "unblockedBy": "string",
  "unblockedNote": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients"

payload = {
    "number": "010-1234-5678",
    "channel": "call"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"number":"010-1234-5678","channel":"call"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients"

	payload := strings.NewReader("{\n  \"number\": \"010-1234-5678\",\n  \"channel\": \"call\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"number\": \"010-1234-5678\",\n  \"channel\": \"call\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"number\": \"010-1234-5678\",\n  \"channel\": \"call\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients', [
  'body' => '{
  "number": "010-1234-5678",
  "channel": "call"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"number\": \"010-1234-5678\",\n  \"channel\": \"call\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "number": "010-1234-5678",
  "channel": "call"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### Example 2

**Request**

```json
{
  "number": "010-1234-5678",
  "channel": "call"
}
```

**Response**

```json
{
  "id": "clx9blk00001",
  "number": "01012345678",
  "channel": "call",
  "active": true,
  "source": "api",
  "sourceRef": "CA1a2b3c4d5e",
  "note": "상담 중 재연락 거부 의사 밝힘",
  "createdBy": null,
  "createdAt": "2024-01-15T09:30:00Z",
  "updatedAt": "2024-01-15T09:30:00Z",
  "unblockedAt": "2024-01-15T09:30:00Z",
  "unblockedSource": "api",
  "unblockedBy": "string",
  "unblockedNote": "string"
}
```

**SDK Code**

```python
import requests

url = "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients"

payload = {
    "number": "010-1234-5678",
    "channel": "call"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"number":"010-1234-5678","channel":"call"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients"

	payload := strings.NewReader("{\n  \"number\": \"010-1234-5678\",\n  \"channel\": \"call\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"number\": \"010-1234-5678\",\n  \"channel\": \"call\"\n}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"number\": \"010-1234-5678\",\n  \"channel\": \"call\"\n}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients', [
  'body' => '{
  "number": "010-1234-5678",
  "channel": "call"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"number\": \"010-1234-5678\",\n  \"channel\": \"call\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "number": "010-1234-5678",
  "channel": "call"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.claw-ops.com/v1/accounts/AC1a2b3c4d/blocked-recipients")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```