---
title: "Rotate a source intake credential."
method: POST
path: "/sources/{id}/credentials/rotate"
tags: ["Sources"]
---

# Rotate a source intake credential.

`POST /sources/{id}/credentials/rotate`

## Request

- Base URL: `https://api.leadping.ai`
- URL: `https://api.leadping.ai/sources/{id}/credentials/rotate`
- Auth: HTTP bearer

Invalidates the current credential and returns the replacement secret once. Only its hash and short preview are retained.

## Path parameters

- `id` string, required

## Response `200`

The updated source and its newly issued credential; store the credential securely when returned.

- SourceCredentialIssueResponse: Returns a newly issued source credential exactly once.
  - `source` SourceResponse: Describes lead source data returned by Leadping.
    - `isDemo` boolean: Whether this record belongs to demo data.
    - `dailyLeadLimit` integer, nullable: Maximum new leads accepted per UTC day. Null means unlimited; zero pauses intake.
    - `description` string, nullable: Human-readable description that explains this lead source response to API users.
    - `enabled` boolean: Indicates whether this lead source response is active and available in the Leadping API.
    - `apiKeyPreview` string, nullable: Masked preview of the source API key for compact display.
    - `apiKeyRotatedAt` string, date-time, nullable: UTC timestamp when the source credential was most recently rotated.
    - `firstLeadReceivedAt` string, date-time, nullable: UTC timestamp when this source first delivered a lead to Leadping.
    - `lastLeadReceivedAt` string, date-time, nullable: UTC timestamp when this source most recently delivered a lead to Leadping.
    - `user` IdNamePair, nullable: User summary connected to this automation configuration response.
      - `id` string, required
      - `name` string, required
    - `createdByUser` IdNamePair, nullable: User summary connected to this automation configuration response.
      - `id` string, required
      - `name` string, required
    - `createdByUserEmail` string, email, nullable: Email used to resolve the creator's avatar.
    - `modifiedByUser` IdNamePair, nullable: User summary connected to this automation configuration response.
      - `id` string, required
      - `name` string, required
    - `organization` IdNamePair, nullable: User summary connected to this automation configuration response.
      - `id` string, required
      - `name` string, required
    - `costPerLead` number, double, nullable: Configured cost charged when this source creates a billable lead.
    - `automaticPhoneLookup` boolean: Whether to look up lead phone numbers during intake. When disabled, lookup is required before calling or texting.
    - `normalizeIncomingData` boolean: Whether to normalize capitalization in incoming lead names and cities.
    - `automaticConsentValidation` boolean: Whether to validate consent certificates during intake. Skipped validation leaves consent unverified.
    - `requiresTrustedForm` boolean: Indicates whether leads from this source must include a TrustedForm or Leadping Consent certificate for consent proof.
    - `complianceApproved` boolean: Indicates whether the organization or sender passed compliance review.
    - `defaultTagIds` string[]: Tag IDs automatically assigned to leads created by this source.
    - `defaultTags` TagSummary[]: Default tag summaries automatically applied to leads from this source.
      - `id` string: Unique Leadping identifier for this tag summary.
      - `name` string: Display name for this tag summary in the Leadping API.
      - `normalizedName` string: Normalized name used for case-insensitive tag matching and deduplication.
      - `color` string, nullable: Hex color used to display this tag or status in Leadping clients.
    - `name` string
    - `id` string
    - `createdAt` string, date-time
    - `modifiedAt` string, date-time, nullable
  - `secret` string: Newly issued source credential. Leadping does not retain this plaintext value.

## Other responses

- `400`: The request contains invalid values or fails validation.
- `401`: Authentication credentials are missing or invalid.
- `403`: The caller does not have permission to perform this operation.
- `404`: The requested resource or required account context was not found.
- `429`: The client or account rate limit was exceeded. Retry after the interval in the Retry-After header.
- `500`: An unexpected error prevented the server from completing the request.

## Changes

- **2026-11-23** `dc1ddf79f3a9`: 1 info
  - added the optional property `allOf[#/components/schemas/SourceCredentialIssueResponse]/source/allOf[#/components/schemas/SourceResponse]/normalizeIncomingData` to the response with the `200` status
- **2026-11-11** `81aed8c9afb7`: 2 info
  - added the non-success response with the status `400`
  - added the non-success response with the status `500`
- **2026-10-27** `22db4c970c18`: 1 info
  - added the optional property `allOf[#/components/schemas/SourceCredentialIssueResponse]/source/allOf[#/components/schemas/SourceResponse]/automaticConsentValidation` to the response with the `200` status
- **2026-10-26** `94a9591dd410`: 1 info
  - added the optional property `allOf[#/components/schemas/SourceCredentialIssueResponse]/source/allOf[#/components/schemas/SourceResponse]/dailyLeadLimit` to the response with the `200` status
- **2026-10-20** `b148f0010d53`: 1 warning
  - removed the optional property `allOf[#/components/schemas/SourceCredentialIssueResponse]/source/allOf[#/components/schemas/SourceResponse]/allowedStates` from the response with the `200` status

[Operation history](https://skmtc.dev/leadping/apis/leadping-api/changes/sources/:id/credentials/rotate/post.md)

---

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