Skip to content

PATCH   /lead-sources/{leadSourceId}

Update a lead source by ID

Updates a specific lead source by its ID. The user must have access to the account that owns the lead source.

Authentication Required

Authorization: Bearer {token}   header string

This header is required to access this endpoint

Required Parameters

leadSourceId   path integer

The ID of the lead source to update

Optional Parameters

Click here to view an exhaustive list of all available parameters
x-account-id   header string

The account ID for the request

Request Body

{}

Try it out

Loading...

Output:

Responses

Description

Lead source updated successfully

{
"id": 0,
"name": "string",
"accountId": "string",
"active": true,
"createdBy": "string",
"updatedBy": "string",
"createdAt": "string",
"updatedAt": "string"
}

References

#/components/parameters/xAccountIdHeader

in: header
name: x-account-id
schema:
type: string
description: The account ID for the request
required: false

#/components/schemas/UpdateLeadSourceInput

type: object
description: Input for updating a lead source
properties:
name:
type: string
description: Name of the lead source
active:
type: boolean
description: Whether the lead source is active

#/components/schemas/LeadSource

type: object
description: Lead source object representing a channel through which leads are acquired
properties:
id:
type: integer
description: Unique identifier for the lead source
name:
type: string
description: Name of the lead source
accountId:
type: string
description: ID of the account that owns this lead source
active:
type: boolean
default: true
description: Whether the lead source is active
createdBy:
type: string
description: Email of the user who created the lead source
updatedBy:
type: string
description: Email of the user who last updated the lead source
createdAt:
type: string
format: date-time
description: When the lead source was created
updatedAt:
type: string
format: date-time
description: When the lead source was last updated
required:
- id
- name
- accountId

Route Source Code

Check out the source code for this route entrypoint here: /lead-sources/[leadSourceId]/route.ts

Or the swagger.yaml spec this documentation was generated from: /lead-sources/swagger.yaml