Leads management

Upsert a customer

Create or update one customer by your externalId. A retry with the same idempotencyKey replays the stored response.

POST
/duranta.api.public.v1.CustomerService/UpsertCustomer

Authorization

Authorizationheaderrequired

Bearer token with the customers:import scope. You get it in exchange for an API key: see Authentication, or press Try in Playground, which takes your key and gets the token for you.

Request body

application/json
  1. body
record*

The customer to create or update.

idempotencyKey*string

A unique key for this call, such as a UUID. Retrying with the same key and the same record returns the original response, with nothing written twice. Reusing a key with a different request fails with already_exists. At most 512 bytes.

Response

Success

application/json
  1. response
result?

The outcome for the record.

Upsert a customer
curl -X POST \  'https://app.getduranta.com/duranta.api.public.v1.CustomerService/UpsertCustomer' \  -H 'Content-Type: application/json' \  -d '{  "record": {    "externalId": "crm-48213",    "kind": "CUSTOMER_KIND_COMMERCIAL",    "companyName": "Lakeside Office Park",    "givenName": "Dana",    "familyName": "Ortiz",    "email": "dana.ortiz@example.com",    "phone": "+1 715 555 0142",    "address": {      "line1": "2910 Mall Dr",      "city": "Eau Claire",      "region": "WI",      "postalCode": "54701",      "country": "US"    },    "sourceRevision": "2026-06-05T17:30:00Z"  },  "idempotencyKey": "6f1c2a1e-6d4b-4b8e-9a51-0c3f2d7e9b10"}'
Response
{  "result": {    "externalId": "crm-48213",    "customer": "customers/t0a1b2c3d4e5f6i",    "outcome": "CUSTOMER_UPSERT_OUTCOME_CREATED",    "serverRevision": "1"  }}