Resource lifetimes, renewal and persistent leases
How long socket.help resources last: the one-hour default, ttlSeconds, renewal up to your plan’s maximum retention, persistent paid leases and cleanup.
Updated 27 October 2026How long resources last
Every webhook inbox, mock API, file and mock MCP server has an expiry time, returned as expiresAt. Resources last one hour by default. You can choose a different lifetime at creation, renew a resource later within your plan’s maximum retention, or on a paid plan make it persistent for the subscription period.
When a resource expires it stops working immediately. Cleanup deletes its data and releases quota at least once per minute. Expired resources cannot be renewed or restored.
| Plan | Maximum retention |
|---|---|
| Without an account | 1 hour |
| Free | 1 day |
| Pro | 7 days |
| Team | 30 days |
Set a lifetime at creation
Add ttlSeconds to the creation query string: an integer from 60 to your plan’s maximum retention in seconds. Values outside that range return 400 with the allowed range.
curl -X POST 'https://socket.help/api/mocks?ttlSeconds=86400' \
-H "Authorization: Bearer $SOCKET_HELP_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"name":"Status","routes":[{"method":"GET","path":"/status","status":200,"body":"{\"ok\":true}"}]}'Renew a resource
POST /api/{kind}/{id}/renew, where kind is inboxes, mocks, files or mcp-servers. Renewal sets expiresAt to the creation time plus the caller’s maximum retention; it does not add a fixed amount from now. The response is {"id","expiresAt","persistent"}.
If that time has already passed, renewal returns 409: "This resource has reached its maximum lifetime. Create a new resource." It also returns 409 if the current expiry is later than the current plan allows, in which case the resource keeps its existing expiry.
curl -X POST https://socket.help/api/inboxes/INBOX_ID/renew \
-H "Authorization: Bearer $SOCKET_HELP_API_KEY" \
-H 'Content-Type: application/json' \
-d '{"persistent":false}'
{"id":"INBOX_ID","expiresAt":"2026-10-28T12:00:00.000Z","persistent":false}Persistent leases
On an active paid plan, send persistent=true at creation or {"persistent":true} on renewal. A persistent resource expires 24 hours after the end of the current subscription period, and successful billing renewals extend live leases. Cancelling stops the extensions. Without an active paid plan, persistent returns 403.
Delete early
Delete resources you no longer need with DELETE /api/{kind}/{id}. Deletion is immediate and frees the resource slot and storage. Lifecycle events keep metadata (not payloads) for 30 days.
Frequently asked questions
Can I keep an anonymous resource longer than one hour?
Not with anonymous credentials: the anonymous maximum is one hour from creation. Renewal uses the caller’s plan, so create resources with an account key when you need longer retention.
Why did renewal return 409?
Either the resource has reached its maximum lifetime for your plan, or its current expiry is already later than your current plan allows. Create a new resource in the first case; in the second the resource keeps its existing expiry.
Can I recover an expired resource?
No. Expired resources stop working immediately and their data is deleted during cleanup. Keep an independent copy of anything important.
What does persistent mean?
A lease tied to a paid subscription. The resource lives through the current billing period plus 24 hours and is extended by successful renewals.