Skip to content
Elara One docs
CRM

Create a company

POST
/v1/merchant/crm/companies

Authorization

tenantKeybearerAuth
headerX-Tenant-Key<token>

The public store key (pk_live_…). Required on every call.

headerAuthorizationBearer <token>

A customer token from POST /v1/auth/login, or a merchant API key, on routes that need one.

Header Parameters

X-Client-IP?string

Optional. IP address of the shopper (one IPv4/IPv6, no port, no list). Honoured only together with a valid X-Tenant-Secret; ignored otherwise. Used for rate limits and recorded with form submissions.

X-Tenant-Secret?string

Optional here. Server secret of the store: server-to-server only, never from a browser. Enables X-Client-IP.

Idempotency-Key?string

Optional; recommended (a UUID made once per user action, reused only to retry that action). Only a success is stored (24 hours): the same key with the same body, URI and credentials (Authorization, X-Cart-Token, X-Chat-Token) replays it (Idempotent-Replayed: true); anything else under that key is 422 IDEMPOTENCY_KEY_REUSED. An error is never stored: after a 4xx or 5xx, retrying with the same key runs the request again.

Request Body

application/json
  1. body

POST merchant/crm/companies and PATCH merchant/crm/companies/{id}. The shape only; the CRM writer validates the values (a domain another company owns, a free mail domain, an unknown size or stage, custom fields) with a 422 naming the field. domains replaces the whole list, first = primary.

name*string
Lengthlength <= 200
domains?array<>|
Itemsitems <= 20
phone?|
Lengthlength <= 32
address_line_one?|
Lengthlength <= 255
address_line_two?|
Lengthlength <= 255
address_city?|
Lengthlength <= 120
address_region?|
Lengthlength <= 120
address_postcode?|
Lengthlength <= 16
address_country?|
Length2 <= length <= 2
industry?|
Lengthlength <= 120
size?|
Lengthlength <= 16
owner_id?|
Range1 <= value
lifecycle_stage?|
Lengthlength <= 64
is_sole_trader?boolean
custom_fields?array<string>

Response Body

Success.

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.elaraone.app/api/v1/merchant/crm/companies' \  -H 'X-Tenant-Key: pk_live_…' \  -H 'X-Tenant-Secret: your-server-secret' \  -H 'Content-Type: application/json' \  -d '{  "name": "string"}'
Example Response
{  "data": {    "id": 0,    "name": "string",    "domains": [      "string"    ],    "phone": "string",    "address": {      "line_one": "string",      "line_two": "string",      "city": "string",      "region": "string",      "postcode": "string",      "country": "string"    },    "industry": "string",    "size": "string",    "lifecycle_stage": "string",    "owner_id": 0,    "is_sole_trader": true,    "custom_fields": "string",    "created_at": "string",    "updated_at": "string"  }}