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

# Submit a new referral

POST https://api.currenciesdirect.com/v1/referrals
Content-Type: application/json

Submit a new customer referral for property-related currency services.


Reference: https://docs.redpincompany.com/api-reference/affiliates/create-referral

## Authentication

- `apikey` header (required) — API key for authenticating requests

## Servers

- `https://api.currenciesdirect.com/v1` (Production, default)
- `https://sandbox.currenciesdirect.com/v1` (Sandbox)

## Request

### Body (application/json)

This endpoint expects a ReferralRequest.

- `customer_type` (enum, required) — Type of customer
  - Allowed values: `Personal`, `Corporate`
- `contact` (ReferralRequestContact, required) — Contact details for the referral
- `company` (ReferralRequestCompany, optional) — Company details (required if customer_type is Corporate)
- `additional_details` (ReferralRequestAdditionalDetails, optional) — Additional details about the referral's requirements

## Response

### 202

Referral received

- `referral_id` (string, required) — Unique identifier for the referral
- `client_reference_id` (string, optional) — Partner's internal reference ID for this referral

## Errors

### 400 Bad Request Error

Bad request - invalid parameters

- `status` (integer, required) — Status code (0 = error)
- `error_code` (string, required) — Specific error code
- `message` (string, required) — Human-readable error message
- `correlation_id` (string, optional) — Correlation ID for troubleshooting

### 401 Unauthorized Error

Unauthorized - invalid API key

- `status` (integer, required) — Status code (0 = error)
- `error_code` (string, required) — Specific error code
- `message` (string, required) — Human-readable error message
- `correlation_id` (string, optional) — Correlation ID for troubleshooting

### 500 Internal Server Error

Internal server error

- `status` (integer, required) — Status code (0 = error)
- `error_code` (string, required) — Specific error code
- `message` (string, required) — Human-readable error message
- `correlation_id` (string, optional) — Correlation ID for troubleshooting

## Types

### ReferralRequestContact

Contact details for the referral

- `last_name` (string, required) — Last name of the contact
- `email` (string, required) — Email address of the contact
- `phone_number` (string, required) — Main phone number including country code
- `first_name` (string, optional) — First name of the contact
- `date_of_birth` (date, optional) — Date of birth in ISO 8601 format (YYYY-MM-DD)
- `mobile_number` (string, optional) — Mobile phone number including country code
- `address` (ReferralRequestContactAddress, optional)

### ReferralRequestCompany

Company details (required if customer_type is Corporate)

- `name` (string, required) — Company name
- `registration_number` (string, optional) — Company registration number

### ReferralRequestAdditionalDetails

Additional details about the referral's requirements

- `partner_id` (string, optional) — Partner ID of the partner referring the customer (not required unless using multiple partner accounts)
- `client_reference_id` (string, optional) — Partner's internal reference ID for this referral
- `enquiry_notes` (string, optional) — Field to contain any additional information which might help the Redpin onboarding team
- `service_required` (enum, optional) — Type of service the referral is interested in
  - Allowed values: `Property Purchase`, `Property Sale`, `Regular Payments`, `Other`
- `country_moving_to` (string, optional) — Destination country if the referral is relocating
- `ccy_pair` (string, optional) — Currency pair for the transaction (e.g., GBPEUR)
- `etv` (enum, optional) — Estimated transaction value range
  - Allowed values: `Under 2,000`, `2,000 - 5,000`, `2,000 - 10,000`, `5,000 - 10,000`, `10,000 - 25,000`, `25,000 - 50,000`, `50,000 - 100,000`, `100,000 - 250,000`, `Over 250,000`

### ReferralRequestContactAddress

- `street` (string, required) — Street address
- `city` (string, required) — City
- `country` (string, required) — Country name
- `state` (string, optional) — State, province, or region
- `post_code` (string, optional) — Postal code

## Examples

**Request**

```json
{
  "customer_type": "Personal",
  "contact": {
    "last_name": "Davies",
    "email": "string",
    "phone_number": "+614455666544"
  }
}
```

**Response**

```json
{
  "referral_id": "6d23072a-ac3e-4146-9b83-7ad384d65707",
  "client_reference_id": "REF120532"
}
```

**SDK Code**

```python
import requests

url = "https://api.currenciesdirect.com/v1/referrals"

payload = {
    "customer_type": "Personal",
    "contact": {
        "last_name": "Davies",
        "email": "string",
        "phone_number": "+614455666544"
    }
}
headers = {
    "apikey": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.currenciesdirect.com/v1/referrals';
const options = {
  method: 'POST',
  headers: {apikey: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"customer_type":"Personal","contact":{"last_name":"Davies","email":"string","phone_number":"+614455666544"}}'
};

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.currenciesdirect.com/v1/referrals"

	payload := strings.NewReader("{\n  \"customer_type\": \"Personal\",\n  \"contact\": {\n    \"last_name\": \"Davies\",\n    \"email\": \"string\",\n    \"phone_number\": \"+614455666544\"\n  }\n}")

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

	req.Header.Add("apikey", "<apiKey>")
	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.currenciesdirect.com/v1/referrals")

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

request = Net::HTTP::Post.new(url)
request["apikey"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"customer_type\": \"Personal\",\n  \"contact\": {\n    \"last_name\": \"Davies\",\n    \"email\": \"string\",\n    \"phone_number\": \"+614455666544\"\n  }\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.currenciesdirect.com/v1/referrals")
  .header("apikey", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"customer_type\": \"Personal\",\n  \"contact\": {\n    \"last_name\": \"Davies\",\n    \"email\": \"string\",\n    \"phone_number\": \"+614455666544\"\n  }\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.currenciesdirect.com/v1/referrals', [
  'body' => '{
  "customer_type": "Personal",
  "contact": {
    "last_name": "Davies",
    "email": "string",
    "phone_number": "+614455666544"
  }
}',
  'headers' => [
    'Content-Type' => 'application/json',
    'apikey' => '<apiKey>',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.currenciesdirect.com/v1/referrals");
var request = new RestRequest(Method.POST);
request.AddHeader("apikey", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"customer_type\": \"Personal\",\n  \"contact\": {\n    \"last_name\": \"Davies\",\n    \"email\": \"string\",\n    \"phone_number\": \"+614455666544\"\n  }\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "apikey": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "customer_type": "Personal",
  "contact": [
    "last_name": "Davies",
    "email": "string",
    "phone_number": "+614455666544"
  ]
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.currenciesdirect.com/v1/referrals")! 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()
```