Skip to main content
POST
/
sources
/
{id}
/
deactivate
Deactivate Tenant Source by RoyaltySource ID
curl --request POST \
  --url https://api.royalti.io/sources/{id}/deactivate \
  --header 'Authorization: Bearer <token>'
{
  "message": "Source deactivated successfully"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Required Permissions

  • sources:update

Important: ID Parameter

The id parameter represents the RoyaltySource ID, not the TenantSource association ID.

Side Effects

  • Sets isActive=false on the tenant source association
  • Triggers regeneration of tenant’s sales data query cache
  • Updates tenant-specific BigQuery query configurations

Code Examples

const response = await fetch('https://api.royalti.io/sources/example-id/deactivate', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({})
});

const data = await response.json();
console.log(data);

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Path Parameters

id
string
required

RoyaltySource ID (not TenantSource ID)

Example:

"src-1"

Response

Source deactivated successfully

message
string
Example:

"Source deactivated successfully"