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

# Get Contact Status 

> POST /api/v1/get-contact-status — Check a beneficiary's verification status before initiating a payout. Only VERIFIED contacts can receive funds.

After creating a contact, use this endpoint to retrieve the beneficiary's current verification status before initiating a payout. bluSwap verifies both the bank account details and the UPI ID (if provided) in the background after contact creation. Only contacts with status `VERIFIED` are eligible for payout processing — requests to contacts with any other status will be rejected.

**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.

## Request body

You can identify the contact using either a `contact_id` or an `account_number`.

**Using Contact ID:**

```json theme={"dark"}
{
  "contact_id": "xxxxxxxxx"
}
```

**Using Account Number:**

```json theme={"dark"}
{
  "account_number": "XXXXXXXXXX"
}
```

> [!NOTE]
>
> Either `contact_id` or `account_number` must be provided. You do not need to supply both.

## Sample Request

```bash Shell theme={"dark"}
curl --location 'https://api.bluswap.co/api/v1/get-contact-status' \
  --header 'x-api-key: YOUR_SECRET_KEY' \
  --header 'Content-Type: application/json' \
  --header 'X-Real-IP: YOUR_WHITELISTED_IP' \
  --data '{
  "contact_id": "xxxxxxxxx"
}'
```

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

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

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

```java Java theme={"dark"}
var request = java.net.http.HttpRequest.newBuilder(
    java.net.URI.create("https://api.bluswap.co/api/v1/get-contact-status"))
  .headers(
    "x-api-key", "<YOUR_API_KEY>",
    "Content-Type", "application/json",
    "X-Real-IP", "<YOUR_WHITELISTED_IP>")
  .POST(java.net.http.HttpRequest.BodyPublishers.ofString("{\"contact_id\":\"YOUR_CONTACT_ID\"}"))
  .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"
  "strings"
)

func main() {
  payload := strings.NewReader(`{"contact_id":"YOUR_CONTACT_ID"}`)
  request, _ := http.NewRequest(http.MethodPost, "https://api.bluswap.co/api/v1/get-contact-status", payload)
  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/get-contact-status');
curl_setopt_array($curl, [
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => [
    'x-api-key: <YOUR_API_KEY>',
    'Content-Type: application/json',
    'X-Real-IP: <YOUR_WHITELISTED_IP>'
  ],
  CURLOPT_POSTFIELDS => json_encode(['contact_id' => 'YOUR_CONTACT_ID']),
  CURLOPT_RETURNTRANSFER => true
]);
echo curl_exec($curl);
curl_close($curl);
```

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

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

## Request parameters

**contact\_id** `string`

Unique ID of the contact returned when the contact was created. Use this **or** `account_number`.

**account\_number** `string`

Beneficiary bank account number. Use this **or** `contact_id`.

## Sample Response

```json theme={"dark"}
{
  "status": "SUCCESS",
  "status_code": 200,
  "message": "Contact fetched successfully",
  "data": {
    "id": "XXXXXXXXX",
    "beneficiary_name": "XXXXXXXXX",
    "account_number": "XXXXXXXXX",
    "ifsc": "XXXXXXXXX",
    "status": "VERIFIED",
    "upi_id_status": "VERIFIED"
  }
}
```

## Response fields

**id** `string`

Unique identifier of the contact.

**beneficiary\_name** `string`

Registered name of the beneficiary.

**account\_number** `string`

Bank account number associated with the contact.

**ifsc** `string`

IFSC code of the beneficiary's bank branch.

**status** `string`

Verification status of the bank account. See status values below.

**upi\_id\_status** `string`

Verification status of the UPI ID (if one was registered). See UPI status values below.

## Bank account status values

| Status | Description |
| - | - |
| `VERIFIED` | Bank account verified successfully — safe to initiate a payout |
| `UNDER_VERFICATION` | Verification is currently in progress — check again shortly |
| `INVALID_BANK_ACCOUNT` | Bank account details are invalid — update the contact before retrying |

## UPI ID status values

| Status | Description |
| - | - |
| `VERIFIED` | UPI ID verified successfully — safe to initiate a UPI payout |
| `UNDER_VERFICATION` | Verification is currently in progress — check again shortly |
| `INVALID_UPI_ID` | UPI ID is invalid — update the contact before retrying |


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