> This page is for Developers.

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

# Create a contact

POST https://rest.test.zuora.com/v1/contacts
Content-Type: application/json

Creates a contact for a specified account. Each account must have at least one contact before it can be saved. You can add a maximum of 2000 contacts to an account.


Reference: https://zuora.ferndocs.com/developers/api-reference/zuora-api/customer-accounts/contacts/post-create-contact

## Authentication

- `Authorization` header (bearer token, required) — Use `Bearer {{token}}` in the `Authorization` header for authentication.

## Servers

- `https://rest.test.zuora.com` (US Developer & Central Sandbox (incl. Test Drive), default)
- `https://rest.sandbox.na.zuora.com` (US API Sandbox Cloud 1)
- `https://rest.apisandbox.zuora.com` (US API Sandbox Cloud 2)
- `https://rest.na.zuora.com` (US Production Cloud 1)
- `https://rest.zuora.com` (US Production Cloud 2)
- `https://rest.test.eu.zuora.com` (EU Developer & Central Sandbox)
- `https://rest.sandbox.eu.zuora.com` (EU API Sandbox)
- `https://rest.eu.zuora.com` (EU Production)
- `https://rest.test.ap.zuora.com` (APAC Developer & Central Sandbox)
- `https://rest.ap.zuora.com` (APAC Production)

## Request

### Headers

- `Idempotency-Key` (string, optional) — Specify a unique idempotency key if you want to perform an idempotent POST or PATCH request. Do not use this header in other request types. With this header specified, the Zuora server can identify subsequent retries of the same request using this value, which prevents the same operation from being performed multiple times by accident.
- `Accept-Encoding` (string, optional) — Include the `Accept-Encoding: gzip` header to compress responses as a gzipped file. It can significantly reduce the bandwidth required for a response. If specified, Zuora automatically compresses responses that contain over 1000 bytes of data, and the response contains a `Content-Encoding` header with the compression algorithm so that your client can decompress it.
- `Content-Encoding` (string, optional) — Include the `Content-Encoding: gzip` header to compress a request. With this header specified, you should upload a gzipped file for the request payload instead of sending the JSON payload.
- `Zuora-Entity-Ids` (string, optional) — An entity ID. If you have [Zuora Multi-entity](https://knowledgecenter.zuora.com/BB_Introducing_Z_Business/Multi-entity) enabled and the OAuth token is valid for more than one entity, you must use this header to specify which entity to perform the operation in. If the OAuth token is only valid for a single entity, or you do not have Zuora Multi-entity enabled, you should not set this header.
- `Zuora-Org-Ids` (string, optional) — Comma separated IDs. If you have Zuora Multi-Org enabled, you can use this header to specify which orgs to perform the operation in. If you do not have Zuora Multi-Org enabled, you should not set this header. The IDs must be a sub-set of the user's accessible orgs. If you specify an org that the user does not have access to, the operation fails. This header is important in Multi-Org (MO) setups because it defines the organization context under which the API should operate—mainly used for read access or data visibility filtering. If the header is not set, the operation is performed in scope of the user's accessible orgs.
- `Zuora-Track-Id` (string, optional) — A custom identifier for tracing the API call. If you set a value for this header, Zuora returns the same value in the response headers. This header enables you to associate your system process identifiers with Zuora API calls, to assist with troubleshooting in the event of an issue. The value of this field must use the US-ASCII character set and must not include any of the following characters: colon (`:`), semicolon (`;`), double quote (`"`), and quote (`'`).
- `Zuora-Version` (string, optional) — The minor API version. For a list of available minor versions, see [API upgrades](https://developer.zuora.com/v1-api-reference/api-upgrades/).

### Body (application/json)

This endpoint expects a POSTContactType.

- `firstName` (string, required) — The contact's first name.
- `lastName` (string, required) — The contact's last name.
- `accountId` (string, optional) — The ID of the account associated with the contact. **Note**: When creating a contact, you must specify `accountNumber`, `accountId`, or both in the request body. If both fields are specified, they must correspond to the same account.
- `accountNumber` (string, optional) — The number of the customer account associated with the contact. **Note**: When creating a contact, you must specify `accountNumber`, `accountId`, or both in the request body. If both fields are specified, they must correspond to the same account.
- `address1` (string, optional) — The first line of the contact's address, which is often a street address or business name.
- `address2` (string, optional) — The second line of the contact's address.
- `asBillTo` (boolean, optional) — Indicates whether the contact can be specified as a bill-to contact. This field is available only if you have turned on the Ship To Contact feature. You can turn on the feature through the self-service interface for Feature Management.
- `asShipTo` (boolean, optional) — Indicates whether the contact can be specified as a ship-to contact. This field is available only if you have turned on the Ship To Contact feature. You can turn on the feature through the self-service interface for Feature Management.
- `asSoldTo` (boolean, optional) — Indicates whether the contact can be specified as a sold-to contact. This field is available only if you have turned on the Ship To Contact feature. You can turn on the feature through the self-service interface for Feature Management.
- `city` (string, optional) — The city of the contact's address.
- `contactDescription` (string, optional) — A description for the contact.
- `country` (string, optional) — The country of the contact's address. Either a full name or an ISO code is supported.
- `county` (string, optional) — The county. May optionally be used by Zuora Tax to calculate county tax.
- `fax` (string, optional) — The contact's fax number.
- `homePhone` (string, optional) — The contact's home phone number.
- `mobilePhone` (string, optional) — The mobile phone number of the contact.
- `nickname` (string, optional) — A nickname for the contact.
- `otherPhone` (string, optional) — An additional phone number for the contact.
- `otherPhoneType` (enum, optional) — The type of the additional phone number.
  - Allowed values: `Work`, `Mobile`, `Home`, `Other`
- `personalEmail` (string, optional) — The contact's personal email address.
- `state` (string, optional) — The state or province of the contact's address. Either a full name or an abbreviation code is supported.
- `taxRegion` (string, optional) — If using Zuora Tax, a region string as optionally defined in your tax rules. Not required.
- `workEmail` (string, optional) — The contact's business email address.
- `workPhone` (string, optional) — The contact's business phone number.
- `zipCode` (string, optional) — The zip code for the contact's address.

## Response

### 200

OK

- `accountId` (string, optional) — The ID of the account associated with the contact.
- `accountNumber` (string, optional) — The number of the customer account associated with the contact.
- `address1` (string, optional) — The first line of the contact's address, which is often a street address or business name.
- `address2` (string, optional) — The second line of the contact's address.
- `asBillTo` (boolean, optional) — Indicates whether the contact can be specified as a bill-to contact. This field is available only if you have turned on the Ship To Contact feature. You can turn on the feature through the self-service interface for Feature Management.
- `asShipTo` (boolean, optional) — Indicates whether the contact can be specified as a ship-to contact. This field is available only if you have turned on the Ship To Contact feature. You can turn on the feature through the self-service interface for Feature Management.
- `asSoldTo` (boolean, optional) — Indicates whether the contact can be specified as a sold-to contact. This field is available only if you have turned on the Ship To Contact feature. You can turn on the feature through the self-service interface for Feature Management.
- `city` (string, optional) — The city of the contact's address.
- `contactDescription` (string, optional) — A description for the contact.
- `country` (string, optional) — The full country name of the contact's address.
- `county` (string, optional) — The county. May optionally be used by Zuora Tax to calculate county tax.
- `fax` (string, optional) — The contact's fax number.
- `firstName` (string, optional) — The contact's first name.
- `homePhone` (string, optional) — The contact's home phone number.
- `lastName` (string, optional) — The contact's last name.
- `mobilePhone` (string, optional) — The mobile phone number of the contact.
- `nickname` (string, optional) — A nickname for the contact.
- `otherPhone` (string, optional) — An additional phone number for the contact.
- `otherPhoneType` (enum, optional) — The type of the additional phone number.
  - Allowed values: `Work`, `Mobile`, `Home`, `Other`
- `personalEmail` (string, optional) — The contact's personal email address.
- `state` (string, optional) — The full state or province name of the contact's address.
- `success` (boolean, optional) — Returns `true` if the request was processed successfully.
- `taxRegion` (string, optional) — If using Zuora Tax, a region string as optionally defined in your tax rules. Not required.
- `workEmail` (string, optional) — The contact's business email address.
- `workPhone` (string, optional) — The contact's business phone number.
- `zipCode` (string, optional) — The zip code for the contact's address.

## Errors

### 500 Internal Server Error

Internal Server Error

- `reasons` (list of ErrorResponseReasonsItems, optional)

### 400 Client Request Error

Request Errors

- `processId` (string, optional) — The ID of the process that handles the operation.
- `reasons` (list of CommonResponseReasonsItems, optional) — The container of the error code and message. This field is available only if the `success` field is `false`.
- `requestId` (string, optional) — Unique identifier of the request.
- `success` (boolean, optional) — Indicates whether the call succeeded.

## Types

### ErrorResponseReasonsItems

- `code` (string, optional) — The error code of response.
- `message` (string, optional) — The detail information of the error response

### CommonResponseReasonsItems

- `code` (string, optional) — The error code of response.
- `message` (string, optional) — The detail information of the error response

## Examples

**Request**

```json
{
  "firstName": "Kuhi",
  "lastName": "Das",
  "accountId": "6e767220676e6e61206776652075207570",
  "accountNumber": "A00000001",
  "address1": "314, Bongora",
  "address2": "near Tech City",
  "city": "GHY",
  "contactDescription": "This is a description for the contact",
  "country": "India",
  "fax": "6174",
  "homePhone": "1234123",
  "mobilePhone": "123213",
  "nickname": "Dorimi",
  "otherPhone": "2314213",
  "otherPhoneType": "Work",
  "personalEmail": "kuhiroll@example.com",
  "state": "Assam",
  "zipCode": "123456"
}
```

**Response**

```json
{
  "accountId": "6e767220676e6e61206776652075207570",
  "accountNumber": "A00000001",
  "address1": "314, Bongora",
  "address2": "near Tech City",
  "city": "GHY",
  "contactDescription": "This is a description for the contact",
  "country": "India",
  "county": null,
  "fax": "6174",
  "firstName": "Kuhi",
  "homePhone": "1234123",
  "lastName": "Das",
  "mobilePhone": "123213",
  "nickname": "Dorimi",
  "otherPhone": "2314213",
  "otherPhoneType": "Work",
  "personalEmail": "kuhiroll@example.com",
  "state": "Assam",
  "success": true,
  "taxRegion": "California",
  "workEmail": "amy.lawrence@zuora.com",
  "workPhone": "(888) 976-9056",
  "zipCode": "123456",
  "id": "6b65657020726f6c6c696e672021"
}
```

**SDK Code**

```python response
import requests

url = "https://rest.test.zuora.com/v1/contacts"

payload = {
    "firstName": "Kuhi",
    "lastName": "Das",
    "accountId": "6e767220676e6e61206776652075207570",
    "accountNumber": "A00000001",
    "address1": "314, Bongora",
    "address2": "near Tech City",
    "city": "GHY",
    "contactDescription": "This is a description for the contact",
    "country": "India",
    "fax": "6174",
    "homePhone": "1234123",
    "mobilePhone": "123213",
    "nickname": "Dorimi",
    "otherPhone": "2314213",
    "otherPhoneType": "Work",
    "personalEmail": "kuhiroll@example.com",
    "state": "Assam",
    "zipCode": "123456"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

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

print(response.json())
```

```javascript response
const url = 'https://rest.test.zuora.com/v1/contacts';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"firstName":"Kuhi","lastName":"Das","accountId":"6e767220676e6e61206776652075207570","accountNumber":"A00000001","address1":"314, Bongora","address2":"near Tech City","city":"GHY","contactDescription":"This is a description for the contact","country":"India","fax":"6174","homePhone":"1234123","mobilePhone":"123213","nickname":"Dorimi","otherPhone":"2314213","otherPhoneType":"Work","personalEmail":"kuhiroll@example.com","state":"Assam","zipCode":"123456"}'
};

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

```go response
package main

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

func main() {

	url := "https://rest.test.zuora.com/v1/contacts"

	payload := strings.NewReader("{\n  \"firstName\": \"Kuhi\",\n  \"lastName\": \"Das\",\n  \"accountId\": \"6e767220676e6e61206776652075207570\",\n  \"accountNumber\": \"A00000001\",\n  \"address1\": \"314, Bongora\",\n  \"address2\": \"near Tech City\",\n  \"city\": \"GHY\",\n  \"contactDescription\": \"This is a description for the contact\",\n  \"country\": \"India\",\n  \"fax\": \"6174\",\n  \"homePhone\": \"1234123\",\n  \"mobilePhone\": \"123213\",\n  \"nickname\": \"Dorimi\",\n  \"otherPhone\": \"2314213\",\n  \"otherPhoneType\": \"Work\",\n  \"personalEmail\": \"kuhiroll@example.com\",\n  \"state\": \"Assam\",\n  \"zipCode\": \"123456\"\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 response
require 'uri'
require 'net/http'

url = URI("https://rest.test.zuora.com/v1/contacts")

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  \"firstName\": \"Kuhi\",\n  \"lastName\": \"Das\",\n  \"accountId\": \"6e767220676e6e61206776652075207570\",\n  \"accountNumber\": \"A00000001\",\n  \"address1\": \"314, Bongora\",\n  \"address2\": \"near Tech City\",\n  \"city\": \"GHY\",\n  \"contactDescription\": \"This is a description for the contact\",\n  \"country\": \"India\",\n  \"fax\": \"6174\",\n  \"homePhone\": \"1234123\",\n  \"mobilePhone\": \"123213\",\n  \"nickname\": \"Dorimi\",\n  \"otherPhone\": \"2314213\",\n  \"otherPhoneType\": \"Work\",\n  \"personalEmail\": \"kuhiroll@example.com\",\n  \"state\": \"Assam\",\n  \"zipCode\": \"123456\"\n}"

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

```java response
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://rest.test.zuora.com/v1/contacts")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"firstName\": \"Kuhi\",\n  \"lastName\": \"Das\",\n  \"accountId\": \"6e767220676e6e61206776652075207570\",\n  \"accountNumber\": \"A00000001\",\n  \"address1\": \"314, Bongora\",\n  \"address2\": \"near Tech City\",\n  \"city\": \"GHY\",\n  \"contactDescription\": \"This is a description for the contact\",\n  \"country\": \"India\",\n  \"fax\": \"6174\",\n  \"homePhone\": \"1234123\",\n  \"mobilePhone\": \"123213\",\n  \"nickname\": \"Dorimi\",\n  \"otherPhone\": \"2314213\",\n  \"otherPhoneType\": \"Work\",\n  \"personalEmail\": \"kuhiroll@example.com\",\n  \"state\": \"Assam\",\n  \"zipCode\": \"123456\"\n}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://rest.test.zuora.com/v1/contacts', [
  'body' => '{
  "firstName": "Kuhi",
  "lastName": "Das",
  "accountId": "6e767220676e6e61206776652075207570",
  "accountNumber": "A00000001",
  "address1": "314, Bongora",
  "address2": "near Tech City",
  "city": "GHY",
  "contactDescription": "This is a description for the contact",
  "country": "India",
  "fax": "6174",
  "homePhone": "1234123",
  "mobilePhone": "123213",
  "nickname": "Dorimi",
  "otherPhone": "2314213",
  "otherPhoneType": "Work",
  "personalEmail": "kuhiroll@example.com",
  "state": "Assam",
  "zipCode": "123456"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

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

```csharp response
using RestSharp;

var client = new RestClient("https://rest.test.zuora.com/v1/contacts");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"firstName\": \"Kuhi\",\n  \"lastName\": \"Das\",\n  \"accountId\": \"6e767220676e6e61206776652075207570\",\n  \"accountNumber\": \"A00000001\",\n  \"address1\": \"314, Bongora\",\n  \"address2\": \"near Tech City\",\n  \"city\": \"GHY\",\n  \"contactDescription\": \"This is a description for the contact\",\n  \"country\": \"India\",\n  \"fax\": \"6174\",\n  \"homePhone\": \"1234123\",\n  \"mobilePhone\": \"123213\",\n  \"nickname\": \"Dorimi\",\n  \"otherPhone\": \"2314213\",\n  \"otherPhoneType\": \"Work\",\n  \"personalEmail\": \"kuhiroll@example.com\",\n  \"state\": \"Assam\",\n  \"zipCode\": \"123456\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift response
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "firstName": "Kuhi",
  "lastName": "Das",
  "accountId": "6e767220676e6e61206776652075207570",
  "accountNumber": "A00000001",
  "address1": "314, Bongora",
  "address2": "near Tech City",
  "city": "GHY",
  "contactDescription": "This is a description for the contact",
  "country": "India",
  "fax": "6174",
  "homePhone": "1234123",
  "mobilePhone": "123213",
  "nickname": "Dorimi",
  "otherPhone": "2314213",
  "otherPhoneType": "Work",
  "personalEmail": "kuhiroll@example.com",
  "state": "Assam",
  "zipCode": "123456"
] as [String : Any]

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

let request = NSMutableURLRequest(url: NSURL(string: "https://rest.test.zuora.com/v1/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()
```