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

# Create a Contact Import that will be processed for changes and duplicates

POST https://api.virtuoussoftware.com/api/Contact/Batch
Content-Type: application/json

Reference: https://virtuous.ferndocs.com/reference/crm-plus/contacts-and-individuals/create-a-contact-import-that-will-be-processed-for-changes-and-duplicates

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Servers

- `https://api.virtuoussoftware.com` (https://api.virtuoussoftware.com, default)
- `{{baseUrl}}api` ({{baseUrl}}api)

## Request

### Body (application/json)

This endpoint expects an object.

- `referenceSource` (string, optional)
- `contacts` (list of ApiContactBatchPostRequestBodyContentApplicationJsonSchemaContactsItems, optional)

## Response

### 200

OK

## Types

### ApiContactBatchPostRequestBodyContentApplicationJsonSchemaContactsItems

- `referenceId` (string, optional)
- `contactType` (string, optional)
- `name` (string, optional)
- `title` (string, optional)
- `firstName` (string, optional)
- `middleName` (string, optional)
- `lastName` (string, optional)
- `suffix` (string, optional)
- `emailType` (string, optional)
- `email` (string, optional)
- `phoneType` (string, optional)
- `phone` (string, optional)
- `address1` (string, optional)
- `address2` (string, optional)
- `city` (string, optional)
- `state` (string, optional)
- `postal` (string, optional)
- `country` (string, optional)
- `eventId` (string, optional)
- `eventName` (string, optional)
- `invited` (string, optional)
- `rsvp` (string, optional)
- `rsvpResponse` (string, optional)
- `attended` (string, optional)
- `tags` (string, optional)
- `originSegmentCode` (string, optional)
- `emailLists` (list of string, optional)
- `customFields` (string, optional)
- `volunteerAttendances` (list of ApiContactBatchPostRequestBodyContentApplicationJsonSchemaContactsItemsVolunteerAttendancesItems, optional)

### ApiContactBatchPostRequestBodyContentApplicationJsonSchemaContactsItemsVolunteerAttendancesItems

- `volunteerOpportunityId` (string, optional)
- `volunteerOpportunityName` (string, optional)
- `date` (string, optional)
- `hours` (string, optional)

## Examples

**Request**

```json
{
  "referenceSource": "<string>",
  "contacts": [
    {
      "referenceId": "<string>",
      "contactType": "<string>",
      "name": "<string>",
      "title": "<string>",
      "firstName": "<string>",
      "middleName": "<string>",
      "lastName": "<string>",
      "suffix": "<string>",
      "emailType": "<string>",
      "email": "<string>",
      "phoneType": "<string>",
      "phone": "<string>",
      "address1": "<string>",
      "address2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal": "<string>",
      "country": "<string>",
      "eventId": "<integer>",
      "eventName": "<string>",
      "invited": "<boolean>",
      "rsvp": "<boolean>",
      "rsvpResponse": "<boolean>",
      "attended": "<boolean>",
      "tags": "<string>",
      "originSegmentCode": "<string>",
      "emailLists": [
        "<string>",
        "<string>"
      ],
      "customFields": "<object>",
      "volunteerAttendances": [
        {
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        },
        {
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        }
      ]
    },
    {
      "referenceId": "<string>",
      "contactType": "<string>",
      "name": "<string>",
      "title": "<string>",
      "firstName": "<string>",
      "middleName": "<string>",
      "lastName": "<string>",
      "suffix": "<string>",
      "emailType": "<string>",
      "email": "<string>",
      "phoneType": "<string>",
      "phone": "<string>",
      "address1": "<string>",
      "address2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal": "<string>",
      "country": "<string>",
      "eventId": "<integer>",
      "eventName": "<string>",
      "invited": "<boolean>",
      "rsvp": "<boolean>",
      "rsvpResponse": "<boolean>",
      "attended": "<boolean>",
      "tags": "<string>",
      "originSegmentCode": "<string>",
      "emailLists": [
        "<string>",
        "<string>"
      ],
      "customFields": "<object>",
      "volunteerAttendances": [
        {
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        },
        {
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        }
      ]
    }
  ]
}
```

**Response**

```json
{}
```

**SDK Code**

```python
import requests

url = "https://api.virtuoussoftware.com/api/Contact/Batch"

payload = {
    "referenceSource": "<string>",
    "contacts": [
        {
            "referenceId": "<string>",
            "contactType": "<string>",
            "name": "<string>",
            "title": "<string>",
            "firstName": "<string>",
            "middleName": "<string>",
            "lastName": "<string>",
            "suffix": "<string>",
            "emailType": "<string>",
            "email": "<string>",
            "phoneType": "<string>",
            "phone": "<string>",
            "address1": "<string>",
            "address2": "<string>",
            "city": "<string>",
            "state": "<string>",
            "postal": "<string>",
            "country": "<string>",
            "eventId": "<integer>",
            "eventName": "<string>",
            "invited": "<boolean>",
            "rsvp": "<boolean>",
            "rsvpResponse": "<boolean>",
            "attended": "<boolean>",
            "tags": "<string>",
            "originSegmentCode": "<string>",
            "emailLists": ["<string>", "<string>"],
            "customFields": "<object>",
            "volunteerAttendances": [
                {
                    "volunteerOpportunityId": "<integer>",
                    "volunteerOpportunityName": "<string>",
                    "date": "<string>",
                    "hours": "<string>"
                },
                {
                    "volunteerOpportunityId": "<integer>",
                    "volunteerOpportunityName": "<string>",
                    "date": "<string>",
                    "hours": "<string>"
                }
            ]
        },
        {
            "referenceId": "<string>",
            "contactType": "<string>",
            "name": "<string>",
            "title": "<string>",
            "firstName": "<string>",
            "middleName": "<string>",
            "lastName": "<string>",
            "suffix": "<string>",
            "emailType": "<string>",
            "email": "<string>",
            "phoneType": "<string>",
            "phone": "<string>",
            "address1": "<string>",
            "address2": "<string>",
            "city": "<string>",
            "state": "<string>",
            "postal": "<string>",
            "country": "<string>",
            "eventId": "<integer>",
            "eventName": "<string>",
            "invited": "<boolean>",
            "rsvp": "<boolean>",
            "rsvpResponse": "<boolean>",
            "attended": "<boolean>",
            "tags": "<string>",
            "originSegmentCode": "<string>",
            "emailLists": ["<string>", "<string>"],
            "customFields": "<object>",
            "volunteerAttendances": [
                {
                    "volunteerOpportunityId": "<integer>",
                    "volunteerOpportunityName": "<string>",
                    "date": "<string>",
                    "hours": "<string>"
                },
                {
                    "volunteerOpportunityId": "<integer>",
                    "volunteerOpportunityName": "<string>",
                    "date": "<string>",
                    "hours": "<string>"
                }
            ]
        }
    ]
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript
const url = 'https://api.virtuoussoftware.com/api/Contact/Batch';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"referenceSource":"<string>","contacts":[{"referenceId":"<string>","contactType":"<string>","name":"<string>","title":"<string>","firstName":"<string>","middleName":"<string>","lastName":"<string>","suffix":"<string>","emailType":"<string>","email":"<string>","phoneType":"<string>","phone":"<string>","address1":"<string>","address2":"<string>","city":"<string>","state":"<string>","postal":"<string>","country":"<string>","eventId":"<integer>","eventName":"<string>","invited":"<boolean>","rsvp":"<boolean>","rsvpResponse":"<boolean>","attended":"<boolean>","tags":"<string>","originSegmentCode":"<string>","emailLists":["<string>","<string>"],"customFields":"<object>","volunteerAttendances":[{"volunteerOpportunityId":"<integer>","volunteerOpportunityName":"<string>","date":"<string>","hours":"<string>"},{"volunteerOpportunityId":"<integer>","volunteerOpportunityName":"<string>","date":"<string>","hours":"<string>"}]},{"referenceId":"<string>","contactType":"<string>","name":"<string>","title":"<string>","firstName":"<string>","middleName":"<string>","lastName":"<string>","suffix":"<string>","emailType":"<string>","email":"<string>","phoneType":"<string>","phone":"<string>","address1":"<string>","address2":"<string>","city":"<string>","state":"<string>","postal":"<string>","country":"<string>","eventId":"<integer>","eventName":"<string>","invited":"<boolean>","rsvp":"<boolean>","rsvpResponse":"<boolean>","attended":"<boolean>","tags":"<string>","originSegmentCode":"<string>","emailLists":["<string>","<string>"],"customFields":"<object>","volunteerAttendances":[{"volunteerOpportunityId":"<integer>","volunteerOpportunityName":"<string>","date":"<string>","hours":"<string>"},{"volunteerOpportunityId":"<integer>","volunteerOpportunityName":"<string>","date":"<string>","hours":"<string>"}]}]}'
};

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.virtuoussoftware.com/api/Contact/Batch"

	payload := strings.NewReader("{\n  \"referenceSource\": \"<string>\",\n  \"contacts\": [\n    {\n      \"referenceId\": \"<string>\",\n      \"contactType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"title\": \"<string>\",\n      \"firstName\": \"<string>\",\n      \"middleName\": \"<string>\",\n      \"lastName\": \"<string>\",\n      \"suffix\": \"<string>\",\n      \"emailType\": \"<string>\",\n      \"email\": \"<string>\",\n      \"phoneType\": \"<string>\",\n      \"phone\": \"<string>\",\n      \"address1\": \"<string>\",\n      \"address2\": \"<string>\",\n      \"city\": \"<string>\",\n      \"state\": \"<string>\",\n      \"postal\": \"<string>\",\n      \"country\": \"<string>\",\n      \"eventId\": \"<integer>\",\n      \"eventName\": \"<string>\",\n      \"invited\": \"<boolean>\",\n      \"rsvp\": \"<boolean>\",\n      \"rsvpResponse\": \"<boolean>\",\n      \"attended\": \"<boolean>\",\n      \"tags\": \"<string>\",\n      \"originSegmentCode\": \"<string>\",\n      \"emailLists\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"customFields\": \"<object>\",\n      \"volunteerAttendances\": [\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        },\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        }\n      ]\n    },\n    {\n      \"referenceId\": \"<string>\",\n      \"contactType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"title\": \"<string>\",\n      \"firstName\": \"<string>\",\n      \"middleName\": \"<string>\",\n      \"lastName\": \"<string>\",\n      \"suffix\": \"<string>\",\n      \"emailType\": \"<string>\",\n      \"email\": \"<string>\",\n      \"phoneType\": \"<string>\",\n      \"phone\": \"<string>\",\n      \"address1\": \"<string>\",\n      \"address2\": \"<string>\",\n      \"city\": \"<string>\",\n      \"state\": \"<string>\",\n      \"postal\": \"<string>\",\n      \"country\": \"<string>\",\n      \"eventId\": \"<integer>\",\n      \"eventName\": \"<string>\",\n      \"invited\": \"<boolean>\",\n      \"rsvp\": \"<boolean>\",\n      \"rsvpResponse\": \"<boolean>\",\n      \"attended\": \"<boolean>\",\n      \"tags\": \"<string>\",\n      \"originSegmentCode\": \"<string>\",\n      \"emailLists\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"customFields\": \"<object>\",\n      \"volunteerAttendances\": [\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        },\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        }\n      ]\n    }\n  ]\n}")

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

	req.Header.Add("Authorization", "Bearer <token>")
	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.virtuoussoftware.com/api/Contact/Batch")

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

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"referenceSource\": \"<string>\",\n  \"contacts\": [\n    {\n      \"referenceId\": \"<string>\",\n      \"contactType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"title\": \"<string>\",\n      \"firstName\": \"<string>\",\n      \"middleName\": \"<string>\",\n      \"lastName\": \"<string>\",\n      \"suffix\": \"<string>\",\n      \"emailType\": \"<string>\",\n      \"email\": \"<string>\",\n      \"phoneType\": \"<string>\",\n      \"phone\": \"<string>\",\n      \"address1\": \"<string>\",\n      \"address2\": \"<string>\",\n      \"city\": \"<string>\",\n      \"state\": \"<string>\",\n      \"postal\": \"<string>\",\n      \"country\": \"<string>\",\n      \"eventId\": \"<integer>\",\n      \"eventName\": \"<string>\",\n      \"invited\": \"<boolean>\",\n      \"rsvp\": \"<boolean>\",\n      \"rsvpResponse\": \"<boolean>\",\n      \"attended\": \"<boolean>\",\n      \"tags\": \"<string>\",\n      \"originSegmentCode\": \"<string>\",\n      \"emailLists\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"customFields\": \"<object>\",\n      \"volunteerAttendances\": [\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        },\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        }\n      ]\n    },\n    {\n      \"referenceId\": \"<string>\",\n      \"contactType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"title\": \"<string>\",\n      \"firstName\": \"<string>\",\n      \"middleName\": \"<string>\",\n      \"lastName\": \"<string>\",\n      \"suffix\": \"<string>\",\n      \"emailType\": \"<string>\",\n      \"email\": \"<string>\",\n      \"phoneType\": \"<string>\",\n      \"phone\": \"<string>\",\n      \"address1\": \"<string>\",\n      \"address2\": \"<string>\",\n      \"city\": \"<string>\",\n      \"state\": \"<string>\",\n      \"postal\": \"<string>\",\n      \"country\": \"<string>\",\n      \"eventId\": \"<integer>\",\n      \"eventName\": \"<string>\",\n      \"invited\": \"<boolean>\",\n      \"rsvp\": \"<boolean>\",\n      \"rsvpResponse\": \"<boolean>\",\n      \"attended\": \"<boolean>\",\n      \"tags\": \"<string>\",\n      \"originSegmentCode\": \"<string>\",\n      \"emailLists\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"customFields\": \"<object>\",\n      \"volunteerAttendances\": [\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        },\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        }\n      ]\n    }\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.virtuoussoftware.com/api/Contact/Batch")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"referenceSource\": \"<string>\",\n  \"contacts\": [\n    {\n      \"referenceId\": \"<string>\",\n      \"contactType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"title\": \"<string>\",\n      \"firstName\": \"<string>\",\n      \"middleName\": \"<string>\",\n      \"lastName\": \"<string>\",\n      \"suffix\": \"<string>\",\n      \"emailType\": \"<string>\",\n      \"email\": \"<string>\",\n      \"phoneType\": \"<string>\",\n      \"phone\": \"<string>\",\n      \"address1\": \"<string>\",\n      \"address2\": \"<string>\",\n      \"city\": \"<string>\",\n      \"state\": \"<string>\",\n      \"postal\": \"<string>\",\n      \"country\": \"<string>\",\n      \"eventId\": \"<integer>\",\n      \"eventName\": \"<string>\",\n      \"invited\": \"<boolean>\",\n      \"rsvp\": \"<boolean>\",\n      \"rsvpResponse\": \"<boolean>\",\n      \"attended\": \"<boolean>\",\n      \"tags\": \"<string>\",\n      \"originSegmentCode\": \"<string>\",\n      \"emailLists\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"customFields\": \"<object>\",\n      \"volunteerAttendances\": [\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        },\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        }\n      ]\n    },\n    {\n      \"referenceId\": \"<string>\",\n      \"contactType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"title\": \"<string>\",\n      \"firstName\": \"<string>\",\n      \"middleName\": \"<string>\",\n      \"lastName\": \"<string>\",\n      \"suffix\": \"<string>\",\n      \"emailType\": \"<string>\",\n      \"email\": \"<string>\",\n      \"phoneType\": \"<string>\",\n      \"phone\": \"<string>\",\n      \"address1\": \"<string>\",\n      \"address2\": \"<string>\",\n      \"city\": \"<string>\",\n      \"state\": \"<string>\",\n      \"postal\": \"<string>\",\n      \"country\": \"<string>\",\n      \"eventId\": \"<integer>\",\n      \"eventName\": \"<string>\",\n      \"invited\": \"<boolean>\",\n      \"rsvp\": \"<boolean>\",\n      \"rsvpResponse\": \"<boolean>\",\n      \"attended\": \"<boolean>\",\n      \"tags\": \"<string>\",\n      \"originSegmentCode\": \"<string>\",\n      \"emailLists\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"customFields\": \"<object>\",\n      \"volunteerAttendances\": [\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        },\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        }\n      ]\n    }\n  ]\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.virtuoussoftware.com/api/Contact/Batch', [
  'body' => '{
  "referenceSource": "<string>",
  "contacts": [
    {
      "referenceId": "<string>",
      "contactType": "<string>",
      "name": "<string>",
      "title": "<string>",
      "firstName": "<string>",
      "middleName": "<string>",
      "lastName": "<string>",
      "suffix": "<string>",
      "emailType": "<string>",
      "email": "<string>",
      "phoneType": "<string>",
      "phone": "<string>",
      "address1": "<string>",
      "address2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal": "<string>",
      "country": "<string>",
      "eventId": "<integer>",
      "eventName": "<string>",
      "invited": "<boolean>",
      "rsvp": "<boolean>",
      "rsvpResponse": "<boolean>",
      "attended": "<boolean>",
      "tags": "<string>",
      "originSegmentCode": "<string>",
      "emailLists": [
        "<string>",
        "<string>"
      ],
      "customFields": "<object>",
      "volunteerAttendances": [
        {
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        },
        {
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        }
      ]
    },
    {
      "referenceId": "<string>",
      "contactType": "<string>",
      "name": "<string>",
      "title": "<string>",
      "firstName": "<string>",
      "middleName": "<string>",
      "lastName": "<string>",
      "suffix": "<string>",
      "emailType": "<string>",
      "email": "<string>",
      "phoneType": "<string>",
      "phone": "<string>",
      "address1": "<string>",
      "address2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal": "<string>",
      "country": "<string>",
      "eventId": "<integer>",
      "eventName": "<string>",
      "invited": "<boolean>",
      "rsvp": "<boolean>",
      "rsvpResponse": "<boolean>",
      "attended": "<boolean>",
      "tags": "<string>",
      "originSegmentCode": "<string>",
      "emailLists": [
        "<string>",
        "<string>"
      ],
      "customFields": "<object>",
      "volunteerAttendances": [
        {
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        },
        {
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        }
      ]
    }
  ]
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp
using RestSharp;

var client = new RestClient("https://api.virtuoussoftware.com/api/Contact/Batch");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"referenceSource\": \"<string>\",\n  \"contacts\": [\n    {\n      \"referenceId\": \"<string>\",\n      \"contactType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"title\": \"<string>\",\n      \"firstName\": \"<string>\",\n      \"middleName\": \"<string>\",\n      \"lastName\": \"<string>\",\n      \"suffix\": \"<string>\",\n      \"emailType\": \"<string>\",\n      \"email\": \"<string>\",\n      \"phoneType\": \"<string>\",\n      \"phone\": \"<string>\",\n      \"address1\": \"<string>\",\n      \"address2\": \"<string>\",\n      \"city\": \"<string>\",\n      \"state\": \"<string>\",\n      \"postal\": \"<string>\",\n      \"country\": \"<string>\",\n      \"eventId\": \"<integer>\",\n      \"eventName\": \"<string>\",\n      \"invited\": \"<boolean>\",\n      \"rsvp\": \"<boolean>\",\n      \"rsvpResponse\": \"<boolean>\",\n      \"attended\": \"<boolean>\",\n      \"tags\": \"<string>\",\n      \"originSegmentCode\": \"<string>\",\n      \"emailLists\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"customFields\": \"<object>\",\n      \"volunteerAttendances\": [\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        },\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        }\n      ]\n    },\n    {\n      \"referenceId\": \"<string>\",\n      \"contactType\": \"<string>\",\n      \"name\": \"<string>\",\n      \"title\": \"<string>\",\n      \"firstName\": \"<string>\",\n      \"middleName\": \"<string>\",\n      \"lastName\": \"<string>\",\n      \"suffix\": \"<string>\",\n      \"emailType\": \"<string>\",\n      \"email\": \"<string>\",\n      \"phoneType\": \"<string>\",\n      \"phone\": \"<string>\",\n      \"address1\": \"<string>\",\n      \"address2\": \"<string>\",\n      \"city\": \"<string>\",\n      \"state\": \"<string>\",\n      \"postal\": \"<string>\",\n      \"country\": \"<string>\",\n      \"eventId\": \"<integer>\",\n      \"eventName\": \"<string>\",\n      \"invited\": \"<boolean>\",\n      \"rsvp\": \"<boolean>\",\n      \"rsvpResponse\": \"<boolean>\",\n      \"attended\": \"<boolean>\",\n      \"tags\": \"<string>\",\n      \"originSegmentCode\": \"<string>\",\n      \"emailLists\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"customFields\": \"<object>\",\n      \"volunteerAttendances\": [\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        },\n        {\n          \"volunteerOpportunityId\": \"<integer>\",\n          \"volunteerOpportunityName\": \"<string>\",\n          \"date\": \"<string>\",\n          \"hours\": \"<string>\"\n        }\n      ]\n    }\n  ]\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "referenceSource": "<string>",
  "contacts": [
    [
      "referenceId": "<string>",
      "contactType": "<string>",
      "name": "<string>",
      "title": "<string>",
      "firstName": "<string>",
      "middleName": "<string>",
      "lastName": "<string>",
      "suffix": "<string>",
      "emailType": "<string>",
      "email": "<string>",
      "phoneType": "<string>",
      "phone": "<string>",
      "address1": "<string>",
      "address2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal": "<string>",
      "country": "<string>",
      "eventId": "<integer>",
      "eventName": "<string>",
      "invited": "<boolean>",
      "rsvp": "<boolean>",
      "rsvpResponse": "<boolean>",
      "attended": "<boolean>",
      "tags": "<string>",
      "originSegmentCode": "<string>",
      "emailLists": ["<string>", "<string>"],
      "customFields": "<object>",
      "volunteerAttendances": [
        [
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        ],
        [
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        ]
      ]
    ],
    [
      "referenceId": "<string>",
      "contactType": "<string>",
      "name": "<string>",
      "title": "<string>",
      "firstName": "<string>",
      "middleName": "<string>",
      "lastName": "<string>",
      "suffix": "<string>",
      "emailType": "<string>",
      "email": "<string>",
      "phoneType": "<string>",
      "phone": "<string>",
      "address1": "<string>",
      "address2": "<string>",
      "city": "<string>",
      "state": "<string>",
      "postal": "<string>",
      "country": "<string>",
      "eventId": "<integer>",
      "eventName": "<string>",
      "invited": "<boolean>",
      "rsvp": "<boolean>",
      "rsvpResponse": "<boolean>",
      "attended": "<boolean>",
      "tags": "<string>",
      "originSegmentCode": "<string>",
      "emailLists": ["<string>", "<string>"],
      "customFields": "<object>",
      "volunteerAttendances": [
        [
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        ],
        [
          "volunteerOpportunityId": "<integer>",
          "volunteerOpportunityName": "<string>",
          "date": "<string>",
          "hours": "<string>"
        ]
      ]
    ]
  ]
] as [String : Any]

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

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