Skip to main content

Create Provider

POST/api/v1/lead_providers/create/

Add a new Lead Provider (partner) to the system. You then use the returned id to generate an API key.

Auth: Admin JWT + IsAdminOnlyPosition.

Body fields

FieldTypeRequiredDescription
nameStringRequiredProvider name
emailString (email)RequiredContact email
statusString enumOptionalactive (default) / inactive
is_exclusiveBooleanOptionalExclusive provider (default false)
assigned_userInteger (ID)OptionalResponsible staff ID (an integer on write)
price_per_leadString (decimal)OptionalPrice per lead, ">= 0"; omitted if left empty

:::info assigned_user — an integer on write On read (List/Get) assigned_user is returned as an object, but on write send only the user's integer id. :::

:::note price_per_lead price_per_lead is a decimal value sent as a string (e.g. "12.50"). If the value is empty, the field is not sent at all (this is how the frontend behaves). :::

Request sample

{
"name": "Super Leads LLC",
"email": "contact@superleads.com",
"status": "active",
"is_exclusive": false,
"assigned_user": 7,
"price_per_lead": "12.50"
}

Response

The created provider object is returned (with id). Use the id in the next step to generate an API key.

{
"id": 43,
"name": "Super Leads LLC",
"email": "contact@superleads.com",
"status": "active",
"is_exclusive": false,
"assigned_user": { "id": 7, "username": "jdoe", "full_name": "John Doe" },
"price_per_lead": "12.50",
"created_at": "2026-07-15T09:00:00Z",
"updated_at": "2026-07-15T09:00:00Z"
}

:::note TODO: verify — create response body The exact response body depends on the backend serializer. At minimum id is expected; confirm the full shape with the backend team. :::

Code samples

curl -X POST https://api.navigo.example/api/v1/lead_providers/create/ \
-H "Authorization: Bearer $NAVIGO_ADMIN_JWT" \
-H "Content-Type: application/json" \
-d '{
"name": "Super Leads LLC",
"email": "contact@superleads.com",
"status": "active",
"is_exclusive": false,
"assigned_user": 7,
"price_per_lead": "12.50"
}'

Possible errors

StatusReason
400Validation error (e.g. invalid email)
401JWT is invalid
403No admin position

Full format: Errors.