Skip to main content
POST
/
v1
/
customers
Create customer
curl --request POST \
  --url https://api.example.com/v1/customers
{
  "data": {
    "key": "customer_123",
    "partner": "partner_123",
    "deleted": false,
    "name": "Alice",
    "surname": "Brown",
    "email": "[email protected]",
    "status": "active",
    "created_at": "2025-05-02T16:12:39.000000Z",
    "updated_at": "2025-05-02T16:12:39.000000Z",
    "deleted_at": null,
    "tags": [
      {
        "value": "new"
      }
    ]
  },
  "status": 1
}

Endpoint

POST https://api.partnero.com/v1/customers

Request body

ParameterTypeRequiredDescription
keystringYesUnique customer identifier (use account ID or email)
emailstringNoCustomer’s email address
namestringNoCustomer’s first name
surnamestringNoCustomer’s last name
tagsarrayNoTags to associate with the customer
partner.keystringYes*Partner’s referral key (from partnero_partner cookie or URL)
partner.idstringYes*Partner’s ID (alternative to key)
partner.emailstringYes*Partner’s email (alternative to key)
options.referral_urlstringNoReferral URL for custom link attribution
*Provide at least one: partner.key, partner.id, or partner.email.

Request

cURL
curl --location 'https://api.partnero.com/v1/customers' \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "partner": {
      "key": "ref_123"
    },
    "key": "customer_123",
    "email": "[email protected]",
    "name": "Alice",
    "surname": "Brown",
    "tags": ["new"]
  }'

Response

{
  "data": {
    "key": "customer_123",
    "partner": "partner_123",
    "deleted": false,
    "name": "Alice",
    "surname": "Brown",
    "email": "[email protected]",
    "status": "active",
    "created_at": "2025-05-02T16:12:39.000000Z",
    "updated_at": "2025-05-02T16:12:39.000000Z",
    "deleted_at": null,
    "tags": [
      {
        "value": "new"
      }
    ]
  },
  "status": 1
}
The partner.key is stored in the partnero_partner cookie when a visitor clicks a referral link. Use the PartneroJS script to automatically capture this.

Error responses

StatusErrorSolution
400Invalid partner keyVerify the partner exists in your program
422Validation errorCheck required fields (key, partner identification)
422Duplicate keyCustomer with this key already exists