POST /lead-sources/{leadSourceId}/active
Activate a lead source
Sets a lead source to active status. 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
x-account-id
header string Account ID for the request
leadSourceId
path integer The ID of the lead source to activate
Try it out
Loading...
Output:
Responses
Description
Lead source activated successfully
{ "id": 0, "name": "string", "accountId": "string", "active": true, "createdBy": "string", "updatedBy": "string", "createdAt": "string", "updatedAt": "string"}Description
Unauthorized - User not authenticated
Description
Forbidden - User does not have permission to modify this lead source
Description
Lead source not found
Description
Internal server error
References
#/components/parameters/xAccountIdHeader
in: headername: x-account-idschema: type: stringdescription: Account ID for the requestrequired: trueexample: "2311"|export type xAccountIdHeader = any; // Schema type not fully supported#/components/schemas/LeadSource
type: objectdescription: Lead source object representing a channel through which leads are acquiredproperties: 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 updatedrequired: - id - name - accountId|export interface LeadSource { /** Unique identifier for the lead source */ id: number; /** Name of the lead source */ name: string; /** ID of the account that owns this lead source */ accountId: string; /** Whether the lead source is active */ active?: boolean; /** Email of the user who created the lead source */ createdBy?: string; /** Email of the user who last updated the lead source */ updatedBy?: string; /** When the lead source was created */ createdAt?: Date; /** When the lead source was last updated */ updatedAt?: Date;}Route Source Code
Check out the source code for this route entrypoint here: /lead-sources/[leadSourceId]/active/route.ts
Or the swagger.yaml spec this documentation was generated from:
/lead-sources/swagger.yaml