The Configuration API allows you to manage platform settings programmatically. These settings override SDK defaults and take effect without app updates.
Endpoints
Method Endpoint Description GET/v1/configGet all configuration GET/v1/config/{key}Get specific config PUT/v1/config/{key}Update configuration DELETE/v1/config/{key}Reset to default
Configuration categories
Category Key Description Playback playbackPlayer behavior settings Feed feedFeed ranking and display CDN cdnContent delivery settings Ads adsAdvertising configuration Playback Restrictions playback-restrictionsDomain and security settings Theme themeUI theming (remote override)
Get all configuration
Retrieve the complete configuration for your organization.
Example request
curl https://api.shortkit.dev/v1/config \
-H "Authorization: Bearer sk_live_your_secret_key"
Response
{
"data" : {
"playback" : {
"autoplay" : true ,
"muted" : true ,
"loop" : true ,
"preloadCount" : 3 ,
"maxBitrate" : null ,
"preferredCodec" : "auto"
},
"feed" : {
"pageSize" : 20 ,
"prefetchCount" : 5 ,
"refreshInterval" : 300
},
"cdn" : {
"urlExpiry" : 21600 ,
"preferredEdge" : "auto"
},
"ads" : {
"enabled" : true ,
"frequency" : {
"mode" : "count" ,
"interval" : 5 ,
"firstAdAfter" : 3
}
},
"playback-restrictions" : {
"allowedDomains" : [ "yourcompany.com" , "*.yourcompany.com" ],
"allowNoReferrer" : false ,
"allowHighRiskUserAgents" : false
}
},
"meta" : {
"version" : 12 ,
"updatedAt" : "2024-02-04T12:00:00Z"
}
}
Get specific configuration
Retrieve a single configuration category.
Path parameters
Configuration category key.
Example request
curl https://api.shortkit.dev/v1/config/playback \
-H "Authorization: Bearer sk_live_your_secret_key"
Response
{
"data" : {
"autoplay" : true ,
"muted" : true ,
"loop" : true ,
"preloadCount" : 3 ,
"maxBitrate" : null ,
"preferredCodec" : "auto"
},
"meta" : {
"version" : 5 ,
"updatedAt" : "2024-02-01T10:00:00Z"
}
}
Update configuration
Update settings for a configuration category.
Playback configuration
curl -X PUT https://api.shortkit.dev/v1/config/playback \
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"autoplay": true,
"muted": true,
"loop": true,
"preloadCount": 5,
"maxBitrate": 4000000,
"preferredCodec": "av1"
}'
Auto-start playback when content is visible.
Loop video on completion.
Number of videos to preload (1-10).
Maximum bitrate in bps. null for unlimited.
Preferred codec: auto, h264, av1.
Feed configuration
curl -X PUT https://api.shortkit.dev/v1/config/feed \
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"pageSize": 20,
"prefetchCount": 5,
"refreshInterval": 300
}'
Items per feed request (10-50).
Items to prefetch ahead (1-10).
Auto-refresh interval in seconds (60-3600).
CDN configuration
curl -X PUT https://api.shortkit.dev/v1/config/cdn \
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"urlExpiry": 21600,
"preferredEdge": "auto"
}'
Signed URL expiry in seconds (3600-86400).
Preferred edge location: auto, us, eu, asia.
Ads configuration
curl -X PUT https://api.shortkit.dev/v1/config/ads \
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"frequency": {
"mode": "count",
"interval": 5,
"firstAdAfter": 3
},
"testMode": false
}'
Enable in-feed advertising.
Ad frequency settings. Frequency mode: count, time, platform-optimized.
Videos between ads (count mode).
Minimum videos before first ad.
Minutes between ads (time mode).
Playback restrictions
curl -X PUT https://api.shortkit.dev/v1/config/playback-restrictions \
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{
"allowedDomains": ["yourcompany.com", "*.yourcompany.com"],
"allowNoReferrer": true,
"allowHighRiskUserAgents": false
}'
Domains allowed to play content.
Allow requests without referrer header.
Allow known bot/scraper user agents.
Response
{
"data" : {
"autoplay" : true ,
"muted" : true ,
"loop" : true ,
"preloadCount" : 5 ,
"maxBitrate" : 4000000 ,
"preferredCodec" : "av1"
},
"meta" : {
"version" : 6 ,
"updatedAt" : "2024-02-04T12:00:00Z" ,
"previousVersion" : 5
}
}
Reset configuration
Reset a configuration category to defaults.
Example request
curl -X DELETE https://api.shortkit.dev/v1/config/playback \
-H "Authorization: Bearer sk_live_your_secret_key"
Response
{
"data" : {
"reset" : true ,
"defaults" : {
"autoplay" : true ,
"muted" : true ,
"loop" : true ,
"preloadCount" : 3 ,
"maxBitrate" : null ,
"preferredCodec" : "auto"
}
}
}
Configuration versioning
Each configuration update creates a new version:
curl https://api.shortkit.dev/v1/config/playback/versions \
-H "Authorization: Bearer sk_live_your_secret_key"
{
"data" : [
{
"version" : 6 ,
"updatedAt" : "2024-02-04T12:00:00Z" ,
"updatedBy" : "[email protected] "
},
{
"version" : 5 ,
"updatedAt" : "2024-02-01T10:00:00Z" ,
"updatedBy" : "[email protected] "
}
]
}
Rollback to previous version
curl -X POST https://api.shortkit.dev/v1/config/playback/rollback \
-H "Authorization: Bearer sk_live_your_secret_key" \
-H "Content-Type: application/json" \
-d '{ "version": 5 }'
SDK sync
SDKs fetch configuration on initialization and periodically refresh:
shortkit . initialize ({
apiKey : 'pk_live_...' ,
config : {
refreshInterval : 300000 // Check every 5 minutes
}
});
// Force refresh
await shortkit . refreshConfig ();
// Get current config
const config = shortkit . getConfig ();
Configuration changes take effect on next SDK refresh (typically within 5 minutes).
Best practices
Always validate configuration changes in staging before applying to production.
For significant changes, use A/B testing to roll out to a subset of users first.
Watch analytics after configuration changes to detect any negative impact.
Keep a changelog of configuration updates for troubleshooting.
Next steps