---
title: "Block a contact by phone number"
method: POST
path: "/api/v2/contacts/block"
tags: ["Contacts"]
---

# Block a contact by phone number

`POST /api/v2/contacts/block`

<a class="try-sandbox-link" href="https://sandbox.textmagic.com/#/Contacts/blockContact" target="_blank">Try in sandbox</a><br>Block a contact from inbound and outbound communication by phone number.

## Request body

- object
  - `phone` string — Contact phone number.

## Response `201`

Returned when updated with success.

- ResourceLinkResponse — Response contains paginated list of data items.
  - `id` integer, required — Resource ID.
  - `href` string, required — A link to this resource. If you want to fetch it, just **GET** this address.

## Other responses

- `400` — Bad request.
- `401` — Unauthorized request.
- `404` — Request data not found.

---

[API](https://skmtc.net/textmagic/apis/textmagic-api.md) · [All operations](https://skmtc.net/textmagic/apis/textmagic-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/textmagic/textmagic-api/revisions/3e4029d19684/schema)
