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

# Create contact

POST https://<provided-by-saturn>/partner/contacts
Content-Type: application/json

Creates a contact. `first_name`, `last_name`, `email` and `gender` are required. Names are title-cased (names already carrying capitals, like McDonald or O'Brien, are preserved as sent), email is lower-cased, and `ni_number` must match the UK format e.g. QQ123456C.

Your organisation is derived from your API key. There is no field for naming an organisation or a CRM, and any unrecognised field in the body returns 400 rather than being ignored — so a misunderstanding surfaces immediately instead of silently doing nothing.

Reference: https://developer.saturnos.com/partner/contacts/create-contact

## Authentication

- `Authorization` header (required) — API Key authentication via header

## Request

### Body (application/json)

This endpoint expects an object.

- `email` (string, required)
- `gender` (string, required)
- `last_name` (string, required)
- `ni_number` (string, required)
- `first_name` (string, required)
- `phone_number` (string, required)
- `middle_name` (any, optional)

## Response

### 200

Successful response

## Examples

**Request**

```json
{
  "email": "harry.jacobs@example.com",
  "gender": "MALE",
  "last_name": "Jacobs",
  "ni_number": "QQ123456C",
  "first_name": "Harry",
  "phone_number": "+447700900123"
}
```

**Response**

```json
{}
```

**SDK Code**

```python Contacts_Create contact_example
import requests

url = "https://api.example.com/partner/contacts"

payload = {
    "email": "harry.jacobs@example.com",
    "gender": "MALE",
    "last_name": "Jacobs",
    "ni_number": "QQ123456C",
    "first_name": "Harry",
    "phone_number": "+447700900123"
}
headers = {
    "Authorization": "<apiKey>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript Contacts_Create contact_example
const url = 'https://api.example.com/partner/contacts';
const options = {
  method: 'POST',
  headers: {Authorization: '<apiKey>', 'Content-Type': 'application/json'},
  body: '{"email":"harry.jacobs@example.com","gender":"MALE","last_name":"Jacobs","ni_number":"QQ123456C","first_name":"Harry","phone_number":"+447700900123"}'
};

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

```go Contacts_Create contact_example
package main

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

func main() {

	url := "https://api.example.com/partner/contacts"

	payload := strings.NewReader("{\n  \"email\": \"harry.jacobs@example.com\",\n  \"gender\": \"MALE\",\n  \"last_name\": \"Jacobs\",\n  \"ni_number\": \"QQ123456C\",\n  \"first_name\": \"Harry\",\n  \"phone_number\": \"+447700900123\"\n}")

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

	req.Header.Add("Authorization", "<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 Contacts_Create contact_example
require 'uri'
require 'net/http'

url = URI("https://api.example.com/partner/contacts")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = '<apiKey>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"email\": \"harry.jacobs@example.com\",\n  \"gender\": \"MALE\",\n  \"last_name\": \"Jacobs\",\n  \"ni_number\": \"QQ123456C\",\n  \"first_name\": \"Harry\",\n  \"phone_number\": \"+447700900123\"\n}"

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

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

HttpResponse<String> response = Unirest.post("https://api.example.com/partner/contacts")
  .header("Authorization", "<apiKey>")
  .header("Content-Type", "application/json")
  .body("{\n  \"email\": \"harry.jacobs@example.com\",\n  \"gender\": \"MALE\",\n  \"last_name\": \"Jacobs\",\n  \"ni_number\": \"QQ123456C\",\n  \"first_name\": \"Harry\",\n  \"phone_number\": \"+447700900123\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.example.com/partner/contacts', [
  'body' => '{
  "email": "harry.jacobs@example.com",
  "gender": "MALE",
  "last_name": "Jacobs",
  "ni_number": "QQ123456C",
  "first_name": "Harry",
  "phone_number": "+447700900123"
}',
  'headers' => [
    'Authorization' => '<apiKey>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp Contacts_Create contact_example
using RestSharp;

var client = new RestClient("https://api.example.com/partner/contacts");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "<apiKey>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"email\": \"harry.jacobs@example.com\",\n  \"gender\": \"MALE\",\n  \"last_name\": \"Jacobs\",\n  \"ni_number\": \"QQ123456C\",\n  \"first_name\": \"Harry\",\n  \"phone_number\": \"+447700900123\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift Contacts_Create contact_example
import Foundation

let headers = [
  "Authorization": "<apiKey>",
  "Content-Type": "application/json"
]
let parameters = [
  "email": "harry.jacobs@example.com",
  "gender": "MALE",
  "last_name": "Jacobs",
  "ni_number": "QQ123456C",
  "first_name": "Harry",
  "phone_number": "+447700900123"
] as [String : Any]

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

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