Skip to content
FacilydevelopersDashboard
Build with Facily
DocsREST APIsUpdate Lead Source
Search the full API reference Esc to close

Update Lead Source

Leads · REST API reference

Get support
PATCH/v1/lead-sources/{source_id}
Edit a lead source; `active: false` retires it.

Authentication

Bearer API key or Facily session, subject to permissions and facility scope.

Authentication and scope

Request example

Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.

cURL
curl --request PATCH \
  --url 'https://api.staging.facily.ai/v1/lead-sources/<SOURCE_ID>' \
  --header "Authorization: Bearer $FACILY_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "active": false,
  "category": "web",
  "facility_ids": [
    "00000000-0000-4000-8000-000000000001"
  ],
  "name": "string",
  "sort_order": 0
}'
An example for building your request, not an executed call. Check required fields, allowed values, and environment configuration before sending.

Parameters

source_idpath · stringrequired

Format: uuid

Request body

application/json · Required

activeboolean | null

false retires the source from new leads.

Show active schema
boolean | null

false retires the source from new leads.

Variant 1: boolean
boolean
Variant 2: null
null
categorystring | null

web, print or lead; null clears it.

Values: "web", "print", "lead"

Show category schema
string | null

web, print or lead; null clears it.

Variant 1: string
string

Values: "web", "print", "lead"

Variant 2: null
null
facility_idsstring[] | null

The new facility set; [] for every facility. Needs the configure permission on every one.

Show facility_ids schema
string[] | null

The new facility set; [] for every facility. Needs the configure permission on every one.

Variant 1: string[]
string[]
Variant 2: null
null
namestring | null

The new name.

Min length: 1 · Max length: 100

Show name schema
string | null

The new name.

Variant 1: string
string
Variant 2: null
null
sort_orderinteger | null

Position in lists, lowest first.

Minimum: 0

Show sort_order schema
integer | null

Position in lists, lowest first.

Variant 1: integer
integer
Variant 2: null
null

Responses

Expand a status to inspect its schema. Generated examples show structure and synthetic values.

200Successful Response
JSON · generated example
{
  "data": {
    "active": false,
    "category": "string",
    "created_at": "2026-10-29T12:00:00Z",
    "facility_ids": [
      "00000000-0000-4000-8000-000000000001"
    ],
    "id": "00000000-0000-4000-8000-000000000001",
    "name": "string",
    "sort_order": 0,
    "updated_at": "2026-10-29T12:00:00Z"
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

dataLeadSourceResponserequired
Show data schema
activebooleanrequired

false when the source is retired from new leads.

categorystring | nullrequired

web, print or lead; null for none.

Show category schema
string | null

web, print or lead; null for none.

Variant 1: string
string
Variant 2: null
null
created_atstringrequired

When the source was created.

Format: date-time

facility_idsstring[]required

Facilities the entry applies at; [] means every facility.

Show facility_ids schema
string
idstringrequired

Unique identifier for this source.

Format: uuid

namestringrequired

Shown in the lead's source list.

sort_orderintegerrequired

Position in lists, lowest first.

updated_atstringrequired

When the source was last modified.

Format: date-time

metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
400Validation error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
401Unauthenticated
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
403Permission denied
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
404Not found
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
409Business logic error
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
503Temporary failure
JSON · generated example
{
  "error": {
    "code": "string",
    "message": "string",
    "details": {}
  },
  "meta": {
    "request_id": "string"
  }
}

application/json

errorErrorBodyrequired

The shape of error.* in an error response.

Show error schema
codestringrequired
detailsobject | null
Show details schema
object | null
Variant 1: object
object
Variant 2: null
null
messagestringrequired
metaMetarequired

Envelope metadata. Every response carries one.

Show meta schema
request_idstringrequired
Continue exploringAll leads operations
Build something that works beautifully.

Facily API · Contract v1.200 · Reviewed October 29, 2026

Update Lead Source | Facily Developers