Skip to main content
Version: 25.03

Update custom property expiration

Enterprise

This endpoint is part of Countly Enterprise. To get access, contact sales or compare versions. Existing customers can reach the support portal with questions.

Endpoint​

/i/data-manager/property-expire

Overview​

Sets or removes TTL for a custom user property in Data Manager metadata.

Authentication​

Pass api_key or auth_token as a query parameter, or send countly-token as a header. See Authentication.

Permissions​

Requires data_manager Update permission.

Request Parameters​

ParameterTypeRequiredDescription
app_idStringYesTarget app ID.
customPropertyStringYesCustom property key under custom.{property}.
ttlString or NumberConditionalTTL value. Must be a number or SESSION (case-insensitive input accepted as session).
disableExpireStringNoIf present, removes TTL instead of setting it.
api_keyStringConditionalRequired if auth_token is not provided.
auth_tokenStringConditionalRequired if api_key is not provided.

Examples​

Set property TTL to 30 days​

/i/data-manager/property-expire?
app_id=64f5c0d8f4f7ac0012ab3456&
customProperty=campaign_code&
ttl=30

Set session-based expiration​

/i/data-manager/property-expire?
app_id=64f5c0d8f4f7ac0012ab3456&
customProperty=temp_flag&
ttl=SESSION

Disable expiration​

/i/data-manager/property-expire?
app_id=64f5c0d8f4f7ac0012ab3456&
customProperty=temp_flag&
disableExpire=true

Response​

Success Response​

"Success"

Response Fields​

FieldTypeDescription
(root value)StringSuccess when TTL update/removal is applied.

Error Responses​

  • 400
{
"result": "TTL must be a number or SESSION"
}
  • 500
500

Behavior​

  • Updates countly_drill.drill_meta record _id={app_id}_meta_up.
  • Sets custom.{customProperty}.ttl when TTL is valid.
  • Removes custom.{customProperty}.ttl when disableExpire is provided.
  • Invalidates Data Manager cache after update.

Operational Considerations​

  • TTL changes affect future retention behavior for the property; existing stored values are not rewritten immediately.

Limitations​

  • disableExpire is treated as a truthy flag; any provided value triggers TTL removal path.
  • On runtime exceptions, this endpoint can return HTTP 200 with raw JSON body 500.
Implementation details

Audit & System Logs

  • This endpoint does not emit /systemlogs actions.

Database Collections

CollectionUsed forData touched by this endpoint
countly_drill.drill_metaUser-property metadata storageUpdates/removes custom.{property}.ttl under the app-level _meta_up document.