Skip to main content
POST
/
webhook
/
royalty
/
file-update
/
webhook
Royalty file status update webhook
curl --request POST \
  --url https://api.royalti.io/webhook/royalty/file-update/webhook \
  --header 'Content-Type: application/json' \
  --data '
{
  "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
  "tenant": 123
}
'
{
  "message": "File status updated successfully"
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

Authentication: Requires royalti-x-hash header containing HMAC signature. Workflow:
  1. Validates file exists and belongs to tenant
  2. Invalidates accounting cache
  3. Sends notification to tenant admins (if status is ‘processed’)
  4. Records Stripe usage meter event for billing
  5. Queues stats and accounting pipeline jobs

Code Examples

const response = await fetch('https://api.royalti.io/webhook/royalty/file-update/webhook', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
    "tenant": 123
  })
});

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

Body

application/json
id
string<uuid>
required

File UUID from the File table

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

tenant
integer
required

Tenant ID that owns the file

Example:

123

Response

Webhook processed successfully

message
string
Example:

"File status updated successfully"