Salesly API
API Reference

Create a contact

POST
/contacts

Authorization

x-api-key<token>

Your tenant API key

In: header

Request Body

application/jsonRequired
name
Required
string
type
Required
string

Enterprise type ref (e.g. "client", "lead")

emailstring
Format: "email"
is_personboolean
cifstring
phonestring
webstring
ibanstring
commentsstring
usersarray<string>
locationobject
extra_fieldsobject

Values for custom contact fields already configured in the workspace associated with your API key. Keys must match the field's exact name, including accents and capitalization, not its display label or ID. For a field named "Originació" (label "ORIGINACIO"), use {"Originació": ["Web"]}. Text fields take strings; selection fields take arrays of configured option labels, even for a single selection. Send plain labels without internal markers. Unknown field names are silently ignored; this endpoint does not create field definitions. Omit extra_fields when unused; do not send null. Currently, values of 0 and text containing double quotes are not preserved, and contact responses omit extra_fields even when saved. Verify values in Salesly. See the custom fields example in the Getting Started guide.

curl -X POST "https://rest.salesly.app/api/v1/developers/contacts" \
  -H "x-api-key: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "string",
    "type": "string",
    "email": "[email protected]",
    "is_person": true,
    "cif": "string",
    "phone": "string",
    "web": "string",
    "iban": "string",
    "comments": "string",
    "users": [
      "[email protected]"
    ],
    "location": {
      "primary": 0,
      "direction": "string",
      "city": "string",
      "postal": "string",
      "country": "string",
      "latitude": "string",
      "longitude": "string",
      "extra_info": "string"
    },
    "extra_fields": {
      "Originació": [
        "Web"
      ]
    }
  }'

Contact created

{
  "data": {
    "id": 0,
    "name": "string",
    "email": "[email protected]",
    "type": "client",
    "is_person": true,
    "cif": "string",
    "phone": "string",
    "web": "string",
    "iban": "string",
    "comments": "string",
    "extra_fields": {},
    "location": {
      "id": 0,
      "primary": 0,
      "direction": "string",
      "city": "string",
      "postal": "string",
      "country": "string",
      "latitude": "string",
      "longitude": "string",
      "extra_info": "string"
    },
    "users": [
      {
        "id": 0,
        "name": "string",
        "email": "[email protected]"
      }
    ],
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}