Skip to main content
POST
Set organization asset expiry

Overview

Set, renew or clear when assets drop off your organization’s allowlist. Use it for assets that should only stay for a while, such as a partner’s website. When an asset’s expiry passes, it stays allowed and on your organization for a 14-day grace period, then it is removed from your organization and monitoring for it stops. Its status does not change. Organization owners and admins get a daily email digest about upcoming expiries and removals. See Expiry for the full timeline.
  • Setting a date on an expired asset renews it and ends its grace period.
  • Passing null clears the expiry, so the assets stay indefinitely.
  • The request is all or nothing: if any asset is not on your organization, nothing changes.

Quick Start

Authentication

Include your API key in the X-API-KEY header:
An organization API key needs read and write access. With user credentials, pass slug; you must be an owner or admin of that organization.

Example Request

To clear the expiry, send "expiresAt": null.

Request Body

Response

Success Response

Response Fields

The List Organization Assets response shows each asset’s allowlistExpiresAt, and allowlistExpiredAt once its grace period has started.

Error Responses

400 Bad Request

Returned when expiresAt is not in the future, or the body is malformed:

401 Unauthorized

Returned when no slug is passed and the credentials are not scoped to an organization:

403 Forbidden

Returned when the API key is read-only, belongs to a different organization than slug, or the user is not an owner or admin of the organization.

404 Not Found

Returned when any of the assets is not on your organization. Nothing is changed:

Use Cases

Expire partner assets after a year

From the CLI or MCP

The MCP server exposes the same operation as the organization_assets_set_expiry tool.

Authorizations

X-API-KEY
string
header
required

Your API key. This is required by most endpoints to access our API programatically. Reach out to us at support@chainpatrol.io to get an API key for your use.

Body

application/json

Set when organization assets expire

Sets, renews or clears the allowlist expiry of assets on your organization. Use it for assets that should only stay for a while, such as a partner's site. When the date passes, the assets stay on your organization for a 14-day grace period, then are removed from it. Their status does not change. Setting a new date on an expired asset renews it and ends its grace period.

assetIds
integer[]
required

IDs of the organization's assets to update (max 5000 per request)

Required array length: 1 - 5000 elements
Required range: x > 0
expiresAt
string<date-time> | null
required

When the assets expire, as an ISO 8601 date-time in the future (e.g. 2027-04-30T23:59:59Z). null clears the expiry so the assets stay indefinitely.

slug
string

Organization slug. Optional for organization-scoped API keys, which resolve the organization from the key itself. Required when your credentials can reach more than one organization.

Response

Successful response

Expiry update result

updatedCount
number
required

Number of assets updated

expiresAt
string | null
required

The expiry that was set, or null when it was cleared