Skip to main content

Lead API

This page documents the partner-facing Lead workflow for API v1: submit a prospect (lead) with profile, finance information, and free-form search metadata.

Before You Start

Environment URLs, API key provisioning, and global response envelope are centralized in Getting Started. Authentication flow is documented in Authentication.

Canonical Endpoint Paths

All endpoint paths on this page are documented without an extra service prefix and start directly with /v1.

1. Endpoint Summary

OperationMethodEndpoint
Create leadPOST/v1/lead

2. Create Lead

Creates a lead attached to the authenticated partner organization.

POST /v1/lead
POST /v1/lead HTTP/1.1
Host: sandbox.api.smart-garant.fr
Authorization: Bearer {bearerToken}
Content-Type: application/json

{
"profile": {
"gender": 2,
"firstName": "Lea",
"lastName": "Martin",
"phoneNumber": "+33699887766",
"email": "simon.huet-test@yopmail.com"
},
"financeInformation": {
"status": 5,
"monthlyIncome": 2800
},
"metadata": {
"key1": "value1",
"exempleData": "LD-20260630-001"
}
}

3. Request Body

FieldTypeRequiredDescription
profileobjectYesProspect identity and contact details.
financeInformationobjectNoProspect professional and income details.
metadataobject (map)NoFree-form key/value pairs used as search criteria.

3.1 profile

FieldTypeRequiredDescription
genderintegerYesProspect gender. 0 none, 1 men, 2 women.
firstNamestringYesProspect first name.
lastNamestringYesProspect last name.
phoneNumberstringYesPhone number in international format (e.g. +33699887766).
emailstringYesValid email address. Invalid emails are rejected.

3.2 financeInformation

FieldTypeRequiredDescription
statusintegerNoProfessional status. See Professional status reference.
monthlyIncomenumberNoNet monthly income of the prospect.

3.3 metadata

A map of string keys to string values. Use it to store your own external references and search criteria (for example a CRM identifier). All entries are stored as-is and returned on the created lead.

{
"key1": "value1",
"exempleData": "LD-20260630-001"
}

4. Response

On success the endpoint returns HTTP 201 Created with the persisted lead, including the generated id, the resolved organization, and the submitted profile, finance information, and metadata.

For the response envelope format and requestId tracing, see Getting Started.

5. Professional Status Reference

The financeInformation.status field accepts the following integer codes.

CodeSituation
0Titulaire du public
1CDI public
2CDD public
3Militaire
4CDI privé
5CDD privé
6Intérimaire
7Intermittent
8Artisan / Commerçant
9Auto-entrepreneur
10Profession libérale
11Chef d’entreprise
12Étudiant
13Alternant
14Retraité
15Recherche d’emploi

6. Reference

Common business errors

Most business validation failures are returned as HTTP 400.

CodeMeaning
E0000Lead could not be created (generic API error).
E0015Unauthorized, invalid payload, or invalid email.
E0059Organization does not exist.