Skip to main content
POST
/
customers
Create a customer
curl --request POST \
  --url https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "first_name": "",
  "last_name": "",
  "display_name": "",
  "email": "",
  "phone": "",
  "notes": "",
  "has_different_billing_address": "",
  "status": "",
  "company_name": "",
  "alt_email": "",
  "billing_address_1": "",
  "billing_address_2": "",
  "billing_city": "",
  "billing_state": "",
  "billing_zip_code": "",
  "assigned_to": "",
  "secondary_email": "",
  "secondary_phone": "",
  "service_address_1": "",
  "service_address_2": "",
  "service_address_city": "",
  "service_address_state": "",
  "service_address_zip_code": "",
  "job_notes": "",
  "customfields": [
    {
      "id": "",
      "field_instance_id": "",
      "value": ""
    },
    {
      "id": "",
      "field_instance_id": "",
      "value": ""
    }
  ],
  "locations": [
    {
      "object_type": "",
      "object_id": "",
      "title": "",
      "address_1": "",
      "address_2": "",
      "city": "",
      "state": "",
      "zip_code": "",
      "is_main_location": ""
    },
    {
      "object_type": "",
      "object_id": "",
      "title": "",
      "address_1": "",
      "address_2": "",
      "city": "",
      "state": "",
      "zip_code": "",
      "is_main_location": ""
    }
  ],
  "account_type": "",
  "pipeline_status_id": "",
  "lead_source_id": "",
  "tags": ""
}
'
import requests

url = "https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers"

payload = {
"first_name": "",
"last_name": "",
"display_name": "",
"email": "",
"phone": "",
"notes": "",
"has_different_billing_address": "",
"status": "",
"company_name": "",
"alt_email": "",
"billing_address_1": "",
"billing_address_2": "",
"billing_city": "",
"billing_state": "",
"billing_zip_code": "",
"assigned_to": "",
"secondary_email": "",
"secondary_phone": "",
"service_address_1": "",
"service_address_2": "",
"service_address_city": "",
"service_address_state": "",
"service_address_zip_code": "",
"job_notes": "",
"customfields": [
{
"id": "",
"field_instance_id": "",
"value": ""
},
{
"id": "",
"field_instance_id": "",
"value": ""
}
],
"locations": [
{
"object_type": "",
"object_id": "",
"title": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"zip_code": "",
"is_main_location": ""
},
{
"object_type": "",
"object_id": "",
"title": "",
"address_1": "",
"address_2": "",
"city": "",
"state": "",
"zip_code": "",
"is_main_location": ""
}
],
"account_type": "",
"pipeline_status_id": "",
"lead_source_id": "",
"tags": ""
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

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

print(response.text)
const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
first_name: '',
last_name: '',
display_name: '',
email: '',
phone: '',
notes: '',
has_different_billing_address: '',
status: '',
company_name: '',
alt_email: '',
billing_address_1: '',
billing_address_2: '',
billing_city: '',
billing_state: '',
billing_zip_code: '',
assigned_to: '',
secondary_email: '',
secondary_phone: '',
service_address_1: '',
service_address_2: '',
service_address_city: '',
service_address_state: '',
service_address_zip_code: '',
job_notes: '',
customfields: [
{id: '', field_instance_id: '', value: ''},
{id: '', field_instance_id: '', value: ''}
],
locations: [
{
object_type: '',
object_id: '',
title: '',
address_1: '',
address_2: '',
city: '',
state: '',
zip_code: '',
is_main_location: ''
},
{
object_type: '',
object_id: '',
title: '',
address_1: '',
address_2: '',
city: '',
state: '',
zip_code: '',
is_main_location: ''
}
],
account_type: '',
pipeline_status_id: '',
lead_source_id: '',
tags: ''
})
};

fetch('https://ywe3crmpll.execute-api.us-east-2.amazonaws.com/stage/customers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));

Authorizations

x-api-key
string
header
required

Body

application/json

The body is of type object.

Response

200 - application/json

Successful response