---
title: "Update an existing source"
method: PATCH
path: "/v2/sources/{id}"
tags: ["Sources"]
---

# Update an existing source

`PATCH /v2/sources/{id}`

## Request

- Base URL: `https://api.carecycle.ai`
- URL: `https://api.carecycle.ai/v2/sources/{id}`
- Auth: API key in header `x-api-key`

Change a lead source's settings. Price changes only apply from now on. Past charges keep the amount they had when they happened, so old reports don't change.

## Path parameters

- `id` string, uuid, required

## Request body

- PatchV2SourcesIdRequestBody
  - `sourceId` string
  - `name` string
  - `description` string
  - `label` string, nullable
  - `type` string, nullable
  - `channel` string, nullable
  - `status` 'active' | 'inactive' | 'archived'
  - `dealType` 'CPA' | 'CPL'
  - `pricingModel` 'flat_rate' | 'percentage' | 'dynamic' | 'static' | 'duration'
  - `payout` string
  - `commissionPerSale` string
  - `leadCost` string
  - `durationThreshold` string
  - `externalRefs` object, nullable
  - `metadata` object, nullable

## Response `200`

PATCH /v2/sources/:id Positive response

- PatchV2SourcesIdPositiveResponse
  - `id` string, uuid, required
  - `sourceId` string, required
  - `clientId` string, uuid, required
  - `name` string, nullable, required
  - `description` string, nullable, required
  - `label` string, nullable
  - `type` string, nullable
  - `channel` string, nullable
  - `status` 'active' | 'inactive' | 'archived', required
  - `dealType` 'CPA' | 'CPL', required
  - `pricingModel` 'flat_rate' | 'percentage' | 'dynamic' | 'static' | 'duration', required
  - `payout` string, nullable, required
  - `commissionPerSale` string, nullable, required
  - `leadCost` string, nullable, required
  - `durationThreshold` string, nullable, required
  - `externalRefs` object, nullable
  - `metadata` object, nullable
  - `createdAt` string, date-time, nullable, required: Source creation time. ISO 8601 timestamp
  - `updatedAt` string, date-time, nullable, required: Source last update time. ISO 8601 timestamp
  - `assignments` object[], required
    - `id` string, uuid, required
    - `sourceId` string, uuid, required
    - `campaignId` string, uuid, required
    - `campaignName` string, nullable
    - `direction` 'outbound' | 'inbound', required
    - `enabled` boolean, required
    - `phoneNumberId` integer, nullable, required
    - `phoneNumber` string, nullable
    - `service` 'mobius' | 'softphone' | 'null', nullable
    - `assignedAt` string, date-time, nullable, required: Source assignment time. ISO 8601 timestamp
    - `unassignedAt` string, date-time, nullable, required: Source unassignment time. ISO 8601 timestamp
  - `assignmentCount` integer, required
  - `leadDestinationCampaignId` string, uuid, nullable
  - `leadDestinationCampaignName` string, nullable

## Other responses

- `400`: PATCH /v2/sources/:id Negative response 400
- `401`: PATCH /v2/sources/:id Negative response 401
- `403`: PATCH /v2/sources/:id Negative response 403
- `404`: PATCH /v2/sources/:id Negative response 404
- `409`: PATCH /v2/sources/:id Negative response 409
- `422`: PATCH /v2/sources/:id Negative response 422
- `429`: PATCH /v2/sources/:id Negative response 429
- `500`: PATCH /v2/sources/:id Negative response 500
- `502`: PATCH /v2/sources/:id Negative response 502
- `503`: PATCH /v2/sources/:id Negative response 503

---

[API](https://skmtc.dev/carecycle/apis/carecycle-public-api.md) - [All operations](https://skmtc.dev/carecycle/apis/carecycle-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/carecycle/apis/carecycle-public-api/revisions/db390c743c36?raw)
