Salesly API

Getting Started

Make your first API call to Salesly in minutes.

This guide walks you through making your first API call to Salesly.

Prerequisites

  • A Salesly account with an active subscription
  • Your API key (found in Settings → Integrations)

Step 1: Get Your API Key

  1. Log in to Salesly CRM
  2. Navigate to Settings → Integrations
  3. Copy your API Key

Keep your API key secret. Do not share it in client-side code, public repositories, or URLs.

Step 2: Make Your First Request

Let's fetch the list of contact types available in your account.

curl -X GET "https://rest.salesly.app/api/v1/developers/contacts/types" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Accept: application/json"

Expected response:

200 OK
{
  "data": [
    { "id": 1, "ref": "client", "value": "Client" },
    { "id": 2, "ref": "lead", "value": "Lead" }
  ]
}

Step 3: Create a Contact

curl -X POST "https://rest.salesly.app/api/v1/developers/contacts" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "name": "ACME Corporation",
    "type": "client",
    "email": "[email protected]",
    "phone": "+34 600 000 000"
  }'
200 OK
{
  "data": {
    "id": 1,
    "name": "ACME Corporation",
    "email": "[email protected]",
    "phone": "+34 600 000 000",
    "type": 1,
    "created_at": "2026-03-05T10:30:00+00:00",
    "updated_at": "2026-03-05T10:30:00+00:00"
  }
}

Set custom contact fields (extra_fields)

Create the custom field in your Salesly workspace before sending values through the API. Use its exact name as the JSON key, including accents and capitalization. Do not use the display label or numeric field ID. Only existing contact fields in the workspace associated with your API key are accepted; unknown keys are silently ignored.

For example, a selection field with name: "Originació", label: "ORIGINACIO" and options Fira;Trucada;Web is set to Web like this:

Create a contact with Originació = Web
{
  "name": "Website contact",
  "type": "client",
  "email": "[email protected]",
  "extra_fields": {
    "Originació": ["Web"]
  }
}

In Postman, send this as Body → raw → JSON to https://rest.salesly.app/api/v1/developers/contacts, with the x-api-key and Content-Type: application/json headers. Replace the example field name and options with those configured in your workspace.

  • Text fields: send a string, for example "Sector": "Technology".
  • Selection fields: send an array of option labels, even for one selection: "Originació": ["Web"]. For multiple selections, use ["Fira", "Web"].
  • Send plain option labels; the API adds its internal selection markers.
  • Omit extra_fields when you do not need custom values. {} sets no values on creation.

The same format works inside each contact in POST /contacts/batch and in PUT /contacts/{identifier}. On update, extra_fields replaces all existing custom values, so include every value you want to keep.

Current limitations: contact API responses omit extra_fields, even when values were saved. Verify the result on the contact in Salesly. Sending extra_fields: null fails; text values containing double quotes and values of 0 are not preserved. Use the configured selection options: the API does not reject unrecognized option labels.

Step 4: List Your Contacts

curl -X GET "https://rest.salesly.app/api/v1/developers/contacts?per_page=10&page=1" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Accept: application/json"

See Pagination for details on navigating large result sets.

Next Steps