Update a program
https://referalli.com /v1/programs/{id} Scope programs:writeChanges any program field or setting; omitted fields keep their value, and publicPage is merged. Changing termsMd records a new terms version. Setting status to paused or archived stops new attribution. signupPaymentGraceMinutes (0 to 1440, default 5) is how long before the referral's sign-up time a payment still earns. mobileApp (iOS Team ID and bundle id, Android package and signing-certificate fingerprints) publishes the program's apps in the universal-links and App Links files on the org's link hosts. notificationEmails: { enabled } turns the referral and commission notification emails on or off (see the Emails guide). destinationUrl moves the program's default link destination: every link still on the old default (the widget's or a sign-in connection's) is repointed in the same call, custom destinations stay, and links already shared follow at click time; {code} in it becomes the link's code. Changing only widget.destinationUrl repoints links still on the widget's old destination the same way. Either way the response adds repointedLinks, how many links moved. brand replaces the whole override (null removes it). brand overrides the org's branding for this program: name (shown as merchant on the public page, in the join page title and in partner emails), logoUrl, theme (design tokens over the org theme), supportUrl, linkDomain (the host its links use; must be one of the org's verified domains, link or portal), portalDomain (must be the org's verified portal domain) and emailFrom (fromName, replyTo, logoUrl, primaryColor, and fromAddress, which must be on the org's verified sending domain). Anything left out falls back to the org; a domain or sender the org hasn't verified is 400 with details.field. termsUrl, faqUrl and supportUrl (https) are shown on the join page and returned by the public program. trackingConsent is the program's aff.js consent mode (auto, none, pending or an adapter id such as cookiemunch); null inherits PUT /v1/org/tracking-consent. landingParams: {code?, click?} renames the query parameters /go/ links land with (default via and ref_click_id; each a letter then up to 39 letters, digits, _, . or -, and different from each other); /t/{token}/config.json?program= echoes them and aff.js, @referalli/sdk/browser and @referalli/next read them, while null restores the defaults. publicPage.noindex keeps the hosted join page out of search engines. A publicHandle another program has is 409 conflict with details: { field: 'publicHandle' }. externalRef sets or (with null) clears the program's id in your own system; one another program has is 409 with details.field: 'externalRef'. widget (autoEnroll, destinationUrl) and notificationEmails (enabled, disabled) are merged in as sent. Audited.
Auth: an API key with programs:write, or a session with role owner, admin.
Scopes: programs:write, full, admin.
Parameters
idIdempotency-Keyidempotent-replayed: true) and nothing runs twice. The same key on a different request is 422 idempotency_key_reused; while the first is still running, 409 idempotency_in_progress.x-org-idreferalli-modetest runs a session request against the org's test data. With an API key it must match the key's mode (400 mode_mismatch otherwise). The header name from before the rename is still accepted.Request body
application/json
nameslugattributionModelcookieWindowDayssignupToConversionDaystermsMdstatuspublicHandlepublicPageShow child parameters
pitchautoApprovenoindexprobabilisticPolicyselfReferralPolicysplitCommissionsutmTemplateallowPaidSearchchallengeLinkssettlementcreditRateShow child parameters
amountMinorcurrencypayPerCallShow child parameters
enabledamountMinorcurrencyminDurationSecdedupeHoursforwardTocapsShow child parameters
conversionsPerDayconversionsPerMonthcommissionPerMonthMinorcurrencycountriesShow child parameters
allowblockcartWindowDaysstorefrontsShow child parameters
enabledsignupPaymentGraceMinutesriskPolicyShow child parameters
holdBotScoreholdRiskScoreholdHighRiskLevelholdDisposableEmailholdVelocityholdUnverifiedEmailholdSelfReferralminCustomerAgeDaysminCustomerAgeActionhold (default): the commission line is earned but held until you approve it. void: earns nothing.requirePriorPaymentwidgetShow child parameters
autoEnrolldestinationUrlmobileAppShow child parameters
iosShow child parameters
teamIdbundleIdandroidShow child parameters
packageNamesha256CertFingerprintshowItWorksMdbrandShow child parameters
namemerchant on the public page, the join page title, partner emails.logoUrltheme--r-accent, …) laid over the org theme.supportUrllinkDomainPUT /v1/programs/{id}/link-domain).portalDomainemailFromShow child parameters
fromNamefromAddressreplyTologoUrlprimaryColortermsUrlfaqUrlsupportUrltrackingConsentlandingParamsShow child parameters
codeclicknotificationEmailsShow child parameters
enableddisabledtrafficSourcesShow child parameters
allowednotesexclusiveWithpriorityallowedRangeShow child parameters
minBpsmaxBpsattributionScopeproductMatchpayoutTaxFormPolicyrecordCountrymerchantCreditBpsclawbackPaidReversalspayoutssettingsShow child parameters
publicHandlepublicPageShow child parameters
pitchautoApprovenoindexprobabilisticPolicyselfReferralPolicysplitCommissionsutmTemplateallowPaidSearchchallengeLinkssettlementcreditRateShow child parameters
amountMinorcurrencypayPerCallShow child parameters
enabledamountMinorcurrencyminDurationSecdedupeHoursforwardTocapsShow child parameters
conversionsPerDayconversionsPerMonthcommissionPerMonthMinorcurrencycountriesShow child parameters
allowblockcartWindowDaysstorefrontsShow child parameters
enabledsignupPaymentGraceMinutesriskPolicyShow child parameters
holdBotScoreholdRiskScoreholdHighRiskLevelholdDisposableEmailholdVelocityholdUnverifiedEmailholdSelfReferralminCustomerAgeDaysminCustomerAgeActionhold (default): the commission line is earned but held until you approve it. void: earns nothing.requirePriorPaymentwidgetShow child parameters
autoEnrolldestinationUrlmobileAppShow child parameters
iosandroidhowItWorksMdbrandShow child parameters
namemerchant on the public page, the join page title, partner emails.logoUrltheme--r-accent, …) laid over the org theme.supportUrllinkDomainPUT /v1/programs/{id}/link-domain).portalDomainemailFromtermsUrlfaqUrlsupportUrltrackingConsentlandingParamsShow child parameters
codeclicknotificationEmailsShow child parameters
enableddisabledtrafficSourcesShow child parameters
allowednotesexclusiveWithpriorityallowedRangeShow child parameters
minBpsmaxBpsattributionScopeproductMatchpayoutTaxFormPolicyrecordCountrymerchantCreditBpsclawbackPaidReversalspayoutsdestinationUrlexternalRef{
"name": "string",
"slug": "string",
"attributionModel": "last_click",
"cookieWindowDays": 0,
"signupToConversionDays": 0,
"termsMd": "string",
"status": "draft",
"publicHandle": "string",
"publicPage": {
"pitch": "string",
"autoApprove": true,
"noindex": true
},
"probabilisticPolicy": "auto",
"selfReferralPolicy": "review",
"splitCommissions": true,
"utmTemplate": {},
"allowPaidSearch": true,
"challengeLinks": true,
"settlement": "payout",
"creditRate": {
"amountMinor": 0,
"currency": "string"
},
"payPerCall": {
"enabled": true,
"amountMinor": 0,
"currency": "string",
"minDurationSec": 0,
"dedupeHours": 0,
"forwardTo": "string"
},
"caps": {
"conversionsPerDay": 0,
"conversionsPerMonth": 0,
"commissionPerMonthMinor": 0,
"currency": "string"
},
"countries": {
"allow": [
"string"
],
"block": [
"string"
]
},
"cartWindowDays": 0,
"storefronts": {
"enabled": true
},
"signupPaymentGraceMinutes": 0,
"riskPolicy": {
"holdBotScore": 0,
"holdRiskScore": 0,
"holdHighRiskLevel": true,
"holdDisposableEmail": true,
"holdVelocity": 0,
"holdUnverifiedEmail": true,
"holdSelfReferral": true,
"minCustomerAgeDays": 0,
"minCustomerAgeAction": "hold",
"requirePriorPayment": "hold"
},
"widget": {
"autoEnroll": true,
"destinationUrl": "string"
},
"mobileApp": {
"ios": {
"teamId": "string",
"bundleId": "string"
},
"android": {
"packageName": "string",
"sha256CertFingerprints": [
"string"
]
}
},
"howItWorksMd": "string",
"brand": {
"name": "string",
"logoUrl": "string",
"theme": {},
"supportUrl": "string",
"linkDomain": "string",
"portalDomain": "string",
"emailFrom": {
"fromName": "string",
"fromAddress": "string",
"replyTo": "string",
"logoUrl": "string",
"primaryColor": "string"
}
},
"termsUrl": "string",
"faqUrl": "string",
"supportUrl": "string",
"trackingConsent": "auto",
"landingParams": {
"code": "string",
"click": "string"
},
"notificationEmails": {
"enabled": true,
"disabled": [
"*"
]
},
"trafficSources": {
"allowed": [
"content"
],
"notes": "string"
},
"exclusiveWith": [
"string"
],
"priority": 0,
"allowedRange": {
"minBps": 0,
"maxBps": 0
},
"attributionScope": "customer",
"productMatch": "optional",
"payoutTaxFormPolicy": "required",
"recordCountry": true,
"merchantCreditBps": 0,
"clawbackPaidReversals": true,
"payouts": "runs",
"settings": {
"publicHandle": "string",
"publicPage": {
"pitch": "string",
"autoApprove": true,
"noindex": true
},
"probabilisticPolicy": "auto",
"selfReferralPolicy": "review",
"splitCommissions": true,
"utmTemplate": {},
"allowPaidSearch": true,
"challengeLinks": true,
"settlement": "payout",
"creditRate": {
"amountMinor": 0,
"currency": "string"
},
"payPerCall": {
"enabled": true,
"amountMinor": 0,
"currency": "string",
"minDurationSec": 0,
"dedupeHours": 0,
"forwardTo": "string"
},
"caps": {
"conversionsPerDay": 0,
"conversionsPerMonth": 0,
"commissionPerMonthMinor": 0,
"currency": "string"
},
"countries": {
"allow": [
"string"
],
"block": [
"string"
]
},
"cartWindowDays": 0,
"storefronts": {
"enabled": true
},
"signupPaymentGraceMinutes": 0,
"riskPolicy": {
"holdBotScore": 0,
"holdRiskScore": 0,
"holdHighRiskLevel": true,
"holdDisposableEmail": true,
"holdVelocity": 0,
"holdUnverifiedEmail": true,
"holdSelfReferral": true,
"minCustomerAgeDays": 0,
"minCustomerAgeAction": "hold",
"requirePriorPayment": "hold"
},
"widget": {
"autoEnroll": true,
"destinationUrl": "string"
},
"mobileApp": {
"ios": {
"teamId": "string",
"bundleId": "string"
},
"android": {
"packageName": "string",
"sha256CertFingerprints": [
"string"
]
}
},
"howItWorksMd": "string",
"brand": {
"name": "string",
"logoUrl": "string",
"theme": {},
"supportUrl": "string",
"linkDomain": "string",
"portalDomain": "string",
"emailFrom": {
"fromName": "string",
"fromAddress": "string",
"replyTo": "string",
"logoUrl": "string",
"primaryColor": "string"
}
},
"termsUrl": "string",
"faqUrl": "string",
"supportUrl": "string",
"trackingConsent": "auto",
"landingParams": {
"code": "string",
"click": "string"
},
"notificationEmails": {
"enabled": true,
"disabled": [
"*"
]
},
"trafficSources": {
"allowed": [
"content"
],
"notes": "string"
},
"exclusiveWith": [
"string"
],
"priority": 0,
"allowedRange": {
"minBps": 0,
"maxBps": 0
},
"attributionScope": "customer",
"productMatch": "optional",
"payoutTaxFormPolicy": "required",
"recordCountry": true,
"merchantCreditBps": 0,
"clawbackPaidReversals": true,
"payouts": "runs"
},
"destinationUrl": "string",
"externalRef": "string"
}Code samples
cURL
curl -X PATCH "https://referalli.com/v1/programs/{id}" \
-H "Authorization: Bearer $REFERALLI_API_KEY" \
-H "Idempotency-Key: <value>" \
-H "x-org-id: <value>" \
-H "referalli-mode: <value>" \
-H "Content-Type: application/json" \
-d '{"name":"string","slug":"string","attributionModel":"last_click","cookieWindowDays":0,"signupToConversionDays":0,"termsMd":"string","status":"draft","publicHandle":"string","publicPage":{"pitch":"string","autoApprove":true,"noindex":true},"probabilisticPolicy":"auto","selfReferralPolicy":"review","splitCommissions":true,"utmTemplate":{},"allowPaidSearch":true,"challengeLinks":true,"settlement":"payout","creditRate":{"amountMinor":0,"currency":"string"},"payPerCall":{"enabled":true,"amountMinor":0,"currency":"string","minDurationSec":0,"dedupeHours":0,"forwardTo":"string"},"caps":{"conversionsPerDay":0,"conversionsPerMonth":0,"commissionPerMonthMinor":0,"currency":"string"},"countries":{"allow":["string"],"block":["string"]},"cartWindowDays":0,"storefronts":{"enabled":true},"signupPaymentGraceMinutes":0,"riskPolicy":{"holdBotScore":0,"holdRiskScore":0,"holdHighRiskLevel":true,"holdDisposableEmail":true,"holdVelocity":0,"holdUnverifiedEmail":true,"holdSelfReferral":true,"minCustomerAgeDays":0,"minCustomerAgeAction":"hold","requirePriorPayment":"hold"},"widget":{"autoEnroll":true,"destinationUrl":"string"},"mobileApp":{"ios":{"teamId":"string","bundleId":"string"},"android":{"packageName":"string","sha256CertFingerprints":["string"]}},"howItWorksMd":"string","brand":{"name":"string","logoUrl":"string","theme":{},"supportUrl":"string","linkDomain":"string","portalDomain":"string","emailFrom":{"fromName":"string","fromAddress":"string","replyTo":"string","logoUrl":"string","primaryColor":"string"}},"termsUrl":"string","faqUrl":"string","supportUrl":"string","trackingConsent":"auto","landingParams":{"code":"string","click":"string"},"notificationEmails":{"enabled":true,"disabled":["*"]},"trafficSources":{"allowed":["content"],"notes":"string"},"exclusiveWith":["string"],"priority":0,"allowedRange":{"minBps":0,"maxBps":0},"attributionScope":"customer","productMatch":"optional","payoutTaxFormPolicy":"required","recordCountry":true,"merchantCreditBps":0,"clawbackPaidReversals":true,"payouts":"runs","settings":{"publicHandle":"string","publicPage":{"pitch":"string","autoApprove":true,"noindex":true},"probabilisticPolicy":"auto","selfReferralPolicy":"review","splitCommissions":true,"utmTemplate":{},"allowPaidSearch":true,"challengeLinks":true,"settlement":"payout","creditRate":{"amountMinor":0,"currency":"string"},"payPerCall":{"enabled":true,"amountMinor":0,"currency":"string","minDurationSec":0,"dedupeHours":0,"forwardTo":"string"},"caps":{"conversionsPerDay":0,"conversionsPerMonth":0,"commissionPerMonthMinor":0,"currency":"string"},"countries":{"allow":["string"],"block":["string"]},"cartWindowDays":0,"storefronts":{"enabled":true},"signupPaymentGraceMinutes":0,"riskPolicy":{"holdBotScore":0,"holdRiskScore":0,"holdHighRiskLevel":true,"holdDisposableEmail":true,"holdVelocity":0,"holdUnverifiedEmail":true,"holdSelfReferral":true,"minCustomerAgeDays":0,"minCustomerAgeAction":"hold","requirePriorPayment":"hold"},"widget":{"autoEnroll":true,"destinationUrl":"string"},"mobileApp":{"ios":{"teamId":"string","bundleId":"string"},"android":{"packageName":"string","sha256CertFingerprints":["string"]}},"howItWorksMd":"string","brand":{"name":"string","logoUrl":"string","theme":{},"supportUrl":"string","linkDomain":"string","portalDomain":"string","emailFrom":{"fromName":"string","fromAddress":"string","replyTo":"string","logoUrl":"string","primaryColor":"string"}},"termsUrl":"string","faqUrl":"string","supportUrl":"string","trackingConsent":"auto","landingParams":{"code":"string","click":"string"},"notificationEmails":{"enabled":true,"disabled":["*"]},"trafficSources":{"allowed":["content"],"notes":"string"},"exclusiveWith":["string"],"priority":0,"allowedRange":{"minBps":0,"maxBps":0},"attributionScope":"customer","productMatch":"optional","payoutTaxFormPolicy":"required","recordCountry":true,"merchantCreditBps":0,"clawbackPaidReversals":true,"payouts":"runs"},"destinationUrl":"string","externalRef":"string"}'TypeScript
Python
Go
PHP
Ruby
Java
Responses
Example
{
"id": "string",
"name": "string",
"slug": "string",
"attributionModel": "last_click",
"cookieWindowDays": 0,
"signupToConversionDays": 0,
"termsMd": "string",
"status": "draft",
"publicHandle": "string",
"settings": {
"probabilisticPolicy": "string",
"selfReferralPolicy": "review",
"splitCommissions": true,
"utmTemplate": {},
"allowPaidSearch": true,
"challengeLinks": true,
"settlement": "payout",
"cartWindowDays": 0,
"caps": {
"conversionsPerDay": 0,
"conversionsPerMonth": 0,
"commissionPerMonthMinor": 0,
"currency": "string"
},
"countries": {
"allow": [
"string"
],
"block": [
"string"
]
},
"creditRate": {
"amountMinor": 0,
"currency": "string"
},
"payPerCall": {
"enabled": true,
"amountMinor": 0,
"currency": "string",
"minDurationSec": 0,
"dedupeHours": 0,
"forwardTo": "string"
},
"allowedRange": {
"minBps": 0,
"maxBps": 0
},
"trafficSources": {
"allowed": [
"string"
],
"notes": "string"
},
"exclusiveWith": [
"string"
],
"priority": 0,
"attributionScope": "customer",
"productMatch": "optional",
"payoutTaxFormPolicy": "required",
"clawbackPaidReversals": true,
"payouts": "runs",
"merchantCreditBps": 0,
"landingParams": {
"code": "string",
"click": "string"
},
"recordCountry": true,
"storefronts": {
"enabled": true
},
"signupPaymentGraceMinutes": 0,
"riskPolicy": {
"holdBotScore": 0,
"holdDisposableEmail": true,
"holdVelocity": 0,
"holdUnverifiedEmail": true,
"holdSelfReferral": true,
"holdRiskScore": 0,
"holdHighRiskLevel": true,
"minCustomerAgeDays": 0,
"minCustomerAgeAction": "hold",
"requirePriorPayment": "hold"
},
"widget": {
"autoEnroll": true,
"destinationUrl": "string"
},
"refereeReward": {},
"mobileApp": {
"ios": {
"teamId": "string",
"bundleId": "string"
},
"android": {
"packageName": "string",
"sha256CertFingerprints": [
"string"
]
}
},
"notificationEmails": {
"enabled": true,
"disabled": [
"string"
]
},
"howItWorksMd": "string"
},
"publicPage": {
"pitch": "string",
"autoApprove": true,
"noindex": true
},
"brand": {
"name": "string",
"logoUrl": "string",
"theme": {},
"supportUrl": "string",
"linkDomain": "string",
"portalDomain": "string",
"emailFrom": {
"fromName": "string",
"fromAddress": "string",
"replyTo": "string",
"logoUrl": "string",
"primaryColor": "string"
}
},
"termsUrl": "string",
"faqUrl": "string",
"supportUrl": "string",
"trackingConsent": "string",
"externalRef": "string",
"createdAt": "2024-01-01T00:00:00Z",
"repointedLinks": 0
}Schema
idnameslugattributionModelcookieWindowDayssignupToConversionDaystermsMdstatuspublicHandlesettingsShow child parameters
probabilisticPolicyerror.code is one of:Example
{
"error": {
"code": "validation_error",
"message": "the body or query failed validation, an unknown field was sent, the body is not valid json, or a session call has no `x-org-id`",
"details": [
{
"code": "invalid_format",
"path": [
"destinationUrl"
],
"message": "Invalid URL"
}
],
"docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
}
}{
"error": {
"code": "mode_mismatch",
"message": "the `referalli-mode` header disagrees with the api key's mode",
"docs_url": "https://referalli.com/docs/errors-and-limits#mode_mismatch"
}
}{
"error": {
"code": "bad_request",
"message": "rejected by the http layer before the handler",
"docs_url": "https://referalli.com/docs/errors-and-limits#bad_request"
}
}{
"error": {
"code": "invalid_handoff_token",
"message": "`handofftoken` on `associate` is malformed, expired (24 hours), signed for another org, or its signature does not verify",
"docs_url": "https://referalli.com/docs/errors-and-limits#invalid_handoff_token"
}
}x-request-idreq_…), matching the server logs. On every response.error.code is one of:Example
{
"error": {
"code": "unauthorized",
"message": "no credentials, an unknown, revoked or expired api key or session, or a signature that did not verify",
"docs_url": "https://referalli.com/docs/errors-and-limits#unauthorized"
}
}{
"error": {
"code": "step_up_required",
"message": "a partner with two-factor on must send `x-totp-code`",
"docs_url": "https://referalli.com/docs/errors-and-limits#step_up_required"
}
}{
"error": {
"code": "reauth_required",
"message": "a session that signed in too long ago changed payout details",
"docs_url": "https://referalli.com/docs/errors-and-limits#reauth_required"
}
}x-request-idreq_…), matching the server logs. On every response.error.code is one of:Example
{
"error": {
"code": "forbidden",
"message": "the wrong role, a key without the needed scope (the message names it",
"docs_url": "https://referalli.com/docs/errors-and-limits#forbidden"
}
}{
"error": {
"code": "sso_required",
"message": "this organization requires single sign-on",
"docs_url": "https://referalli.com/docs/errors-and-limits#sso_required"
}
}{
"error": {
"code": "access_suspended",
"message": "your identity provider suspended your access and you are the last owner",
"docs_url": "https://referalli.com/docs/errors-and-limits#access_suspended"
}
}{
"error": {
"code": "unsupported_media_type",
"message": "the request body's `content-type` isn't one this endpoint reads",
"docs_url": "https://referalli.com/docs/errors-and-limits#unsupported_media_type"
}
}{
"error": {
"code": "program_scoped_key",
"message": "a key limited to some programs (`programids`) called an org-wide endpoint",
"docs_url": "https://referalli.com/docs/errors-and-limits#program_scoped_key"
}
}x-request-idreq_…), matching the server logs. On every response.error.code is one of:Example
{
"error": {
"code": "not_found",
"message": "the resource does not exist in this org (ids from other orgs look the same), a referenced id does not exist, a list cursor is not in the list, or the endpoint does not exist",
"docs_url": "https://referalli.com/docs/errors-and-limits#not_found"
}
}{
"error": {
"code": "not_enrolled",
"message": "the user is not a partner in the program (and the widget's autoenroll is off, or no verified email was given)",
"docs_url": "https://referalli.com/docs/errors-and-limits#not_enrolled"
}
}x-request-idreq_…), matching the server logs. On every response.error.code is one of:Example
{
"error": {
"code": "conflict",
"message": "a unique value is taken, or the action would break a rule (the message says which)",
"docs_url": "https://referalli.com/docs/errors-and-limits#conflict"
}
}{
"error": {
"code": "billing_connection_no_key",
"message": "the stripe billing connection keeps no key to reuse for payouts (only one connected with `stripekey` and `creditrail` does)",
"docs_url": "https://referalli.com/docs/errors-and-limits#billing_connection_no_key"
}
}{
"error": {
"code": "api_key_expired",
"message": "this key has expired, so it can no longer be rotated",
"docs_url": "https://referalli.com/docs/errors-and-limits#api_key_expired"
}
}{
"error": {
"code": "idempotency_in_progress",
"message": "a request with the same `idempotency-key` is still running",
"docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_in_progress"
}
}{
"error": {
"code": "stripe_key_required",
"message": "stripe balance credits need a stripe key",
"docs_url": "https://referalli.com/docs/errors-and-limits#stripe_key_required"
}
}x-request-idreq_…), matching the server logs. On every response.error.code is one of:Example
{
"error": {
"code": "idempotency_key_reused",
"message": "the `idempotency-key` was used for a different request",
"docs_url": "https://referalli.com/docs/errors-and-limits#idempotency_key_reused"
}
}{
"error": {
"code": "validation_error",
"message": "on the signed auth-connection endpoints",
"docs_url": "https://referalli.com/docs/errors-and-limits#validation_error"
}
}{
"error": {
"code": "stripe_key_invalid",
"message": "stripe rejected the stripe balance credit key (revoked, rolled or mistyped)",
"docs_url": "https://referalli.com/docs/errors-and-limits#stripe_key_invalid"
}
}{
"error": {
"code": "stripe_key_wrong_mode",
"message": "a stripe balance credit key of the other mode",
"docs_url": "https://referalli.com/docs/errors-and-limits#stripe_key_wrong_mode"
}
}{
"error": {
"code": "stripe_key_permission",
"message": "the restricted stripe key lacks a permission the call needs (webhook endpoints write",
"docs_url": "https://referalli.com/docs/errors-and-limits#stripe_key_permission"
}
}x-request-idreq_…), matching the server logs. On every response.error.code is one of:Example
{
"error": {
"code": "rate_limited",
"message": "an endpoint limit or the per-key quota was exceeded",
"docs_url": "https://referalli.com/docs/errors-and-limits#rate_limited"
}
}x-request-idreq_…), matching the server logs. On every response.Retry-AfterRateLimit-LimitRateLimit-RemainingRateLimit-Reseterror.code is one of:Example
{
"error": {
"code": "internal_error",
"message": "retry with backoff",
"requestId": "req_8f2c1d4e5a6b7c8d",
"docs_url": "https://referalli.com/docs/errors-and-limits#internal_error"
}
}x-request-idreq_…), matching the server logs. On every response.{
"error": {
"code": "string",
"message": "string",
"details": {},
"requestId": "string",
"docs_url": "string"
}
}