> ## Documentation Index
> Fetch the complete documentation index at: /docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Deactivate a Contact 

> GET /api/v1/contacts/{contact_id}/deactivate — Mark a beneficiary contact as inactive. Deactivated contacts cannot receive new payout requests.

Use this endpoint to mark a beneficiary contact as inactive when you no longer need to send payouts to them — for example, when an employee leaves, a vendor relationship ends, or a bank account is closed. Deactivated contacts retain their `contact_id` in your records but cannot receive new payout requests. If you need to reactivate a contact in the future, reach out to bluSwap support.

**x-api-key** `string` *required*

Your secret API key.

**Content-Type** `string` *required*

Must be `application/json`.

**X-Real-IP** `string` *required*

Your whitelisted server IP address.

## Path parameter

**contact\_id** `string` *required*

The unique identifier of the contact you want to deactivate. You received this in the response when the contact was created.

> [!WARNING]
>
> Deactivating a contact is immediate and cannot be self-reversed. Any payout requests submitted for an `INACTIVE` contact will be rejected. Ensure there are no pending payouts before deactivating.

## Sample Request

```bash Shell theme={"dark"}
curl --location --request GET 'https://api.bluswap.co/api/v1/contacts/YOUR_CONTACT_ID/deactivate' \
  --header 'x-api-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --header 'X-Real-IP: YOUR_WHITELISTED_IP'
```

```javascript Node.js theme={"dark"}
const response = await fetch(
  'https://api.bluswap.co/api/v1/contacts/YOUR_CONTACT_ID/deactivate',
  {
    headers: {
      'x-api-key': '<YOUR_API_KEY>',
      'Content-Type': 'application/json',
      'X-Real-IP': '<YOUR_WHITELISTED_IP>'
    }
  }
);
console.log(await response.json());
```

```python Python theme={"dark"}
import requests

response = requests.get(
    "https://api.bluswap.co/api/v1/contacts/YOUR_CONTACT_ID/deactivate",
    headers={"x-api-key": "<YOUR_API_KEY>", "X-Real-IP": "<YOUR_WHITELISTED_IP>"},
)
print(response.json())
```

```java Java theme={"dark"}
var request = java.net.http.HttpRequest.newBuilder(
    java.net.URI.create("https://api.bluswap.co/api/v1/contacts/YOUR_CONTACT_ID/deactivate"))
  .headers(
    "x-api-key", "<YOUR_API_KEY>",
    "Content-Type", "application/json",
    "X-Real-IP", "<YOUR_WHITELISTED_IP>")
  .GET()
  .build();
var response = java.net.http.HttpClient.newHttpClient()
  .send(request, java.net.http.HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

```go Go theme={"dark"}
package main

import "net/http"

func main() {
  request, _ := http.NewRequest(
    http.MethodGet,
    "https://api.bluswap.co/api/v1/contacts/YOUR_CONTACT_ID/deactivate",
    nil,
  )
  request.Header.Set("x-api-key", "<YOUR_API_KEY>")
  request.Header.Set("Content-Type", "application/json")
  request.Header.Set("X-Real-IP", "<YOUR_WHITELISTED_IP>")
  response, _ := http.DefaultClient.Do(request)
  defer response.Body.Close()
}
```

```php PHP theme={"dark"}
<?php
$curl = curl_init('https://api.bluswap.co/api/v1/contacts/YOUR_CONTACT_ID/deactivate');
curl_setopt_array($curl, [
  CURLOPT_HTTPHEADER => [
    'x-api-key: <YOUR_API_KEY>',
    'Content-Type: application/json',
    'X-Real-IP: <YOUR_WHITELISTED_IP>'
  ],
  CURLOPT_RETURNTRANSFER => true
]);
echo curl_exec($curl);
curl_close($curl);
```

```ruby Ruby theme={"dark"}
require "net/http"

uri = URI("https://api.bluswap.co/api/v1/contacts/YOUR_CONTACT_ID/deactivate")
request = Net::HTTP::Get.new(uri, {
  "x-api-key" => "<YOUR_API_KEY>",
  "Content-Type" => "application/json",
  "X-Real-IP" => "<YOUR_WHITELISTED_IP>"
})
puts Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(request).body }
```

## Sample Response

```json theme={"dark"}
{
  "status": "SUCCESS",
  "status_code": 200,
  "message": "Contact marked as inactive",
  "detail": null,
  "data": {
    "contact_id": "b3ebxxxx-xxxx-xxxx-xxxx-xx98756877",
    "status": "INACTIVE"
  }
}
```

## Response fields

**contact\_id** `string`

The unique identifier of the contact that was deactivated.

**status** `string`

The updated status of the contact. Returns `INACTIVE` on success.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.