---
title: Create a contact
slug: create-a-contact
createdAt: 2026-02-20T22:11:51.747Z
---

Every payment in Jetpay starts with a contact. Creating a contact is a foundational part of using the platform. It’s how you organize your customers and associate their payment methods, making all subsequent flows possible.

***

## Prerequisites

- [Jetpay API Key](docId:_zgmIm7QKrrAoX9JjaQrL)

***

## Flow

Adding a contact is done via a single call to the  [Create Contact endpoint](https://extapi.jetpay.baselinepayments.com/docs#tag/Contacts-\(v0\)/operation/create_contact_contact_put).

This will respond back with the new contact information including it's UUID.

```mermaid
sequenceDiagram
    participant partner as Platform
    participant api as Jetpay

    partner->>+api: Create new contact.
    Note right of api: PUT /contact

    api-->>-partner: R: Contact created.
    Note right of api: 200 OK
   
```

***

## Implementation details

### Create a Contact

Endpoint: [`PUT /contact`](https://extapi.jetpay.baselinepayments.com/docs#tag/Contacts-\(v0\)/operation/create_contact_contact_put)

:::CodeblockTabs
```curl
curl https://extapi.demo.jetpay.baselinepayments.com/contact \
  -X PUT \
  -H "Authorization: Bearer <YOUR_API_TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "johnsmith@mail.com",
    "name": "John Smith",
    "tags": [],
    "language": "en"
  }'
```

```python
import requests

url = "https://extapi.demo.jetpay.baselinepayments.com/contact"

headers = {
    "Authorization": "Bearer <YOUR_API_TOKEN>",
    "Content-Type": "application/json"
}

payload = {
    "email": "johnsmith@mail.com",
    "name": "John Smith",
    "tags": [],
    "language": "en"
}

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

print("Status Code:", response.status_code)
print("Response Body:", response.text)
```

```nodejs
const url = "https://extapi.demo.jetpay.baselinepayments.com/contact";

const payload = {
  email: "johnsmith@mail.com",
  name: "John Smith",
  tags: [],
  language: "en"
};

fetch(url, {
  method: "PUT",
  headers: {
    "Authorization": "Bearer <YOUR_API_TOKEN>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify(payload)
})
  .then(response => {
    console.log("Status Code:", response.status);
    return response.text();
  })
  .then(data => {
    console.log("Response Body:", data);
  })
  .catch(error => {
    console.error("Error:", error);
  });
```
:::

The `tags` field is for you to use to help you sort your contacts into certain categories. The default `tags` that Jetpay supports are `customer` and `supplier`, however, you can create any custom tag. For example, you can use a tag to specify what region your contact is created for, like `North America`.

The `language` field determines what language we will send communication emails to the customer in. For most API integrations, you will likely want emails disabled, and handle your own communications with customers. The options are `en` for English or `fr` for French. If no language is specified, the default value will be `en`.

### Handle the response

If a Contact is successfully created, a response will be returned with an HTTP status code of 200, and a response body of:

```json
{
  "identifier": "contact_123",
  "email": "johnsmith@mail.com",
  "name": "John Smith",
  "tags": [],
  "contact_type": "customer",
  "language": "en"
}
```

The default `contact_type` is `customer`. It is only if you specify the `supplier` tag in the `tags` list that the type will be set to `supplier`. Functionally, `contact_type` will not affect API behaviour.

***

## Common errors

If you try to create a contact with the same email as an existing contact, we will return an HTTP status code of 409, and a response body of:

```json
{"message":"A contact with the same email address has already been created."}
```

