BSV blockchainBSV blockchain

Renew a UHRP advertisement token (inferred)

POST/renew

Extends the expiry of an existing advertisement UTXO by spending the old token and creating a new one with a future expiry timestamp. The server charges the appropriate fee via the authenticated wallet.

Body application/json

uhrpUrlstringrequired

UHRP URL of the advertisement to renew.

retentionDaysinteger

Number of additional days to extend the advertisement.

Response

Advertisement renewed successfully.

uhrpUrlstring

The UHRP URL whose advertisement was renewed.

expiresAtinteger

New UNIX timestamp of the renewed advertisement UTXO expiry.

txidstring

Transaction ID of the new advertisement UTXO.

Bad request — invalid input.

errorstring

Human-readable error description.

codestring

Machine-readable error code (see specs/errors.md).

Missing or invalid BRC-103 authentication.

errorstring

Human-readable error description.

codestring

Machine-readable error code (see specs/errors.md).

The requested UHRP URL is not known to this server.

errorstring

Human-readable error description.

codestring

Machine-readable error code (see specs/errors.md).

Internal server error.

errorstring

Human-readable error description.

codestring

Machine-readable error code (see specs/errors.md).

Request
curl -X POST "https://{host}/renew" \
  -H "Content-Type: application/json" \
  -H "x-bsv-auth: <x-bsv-auth>" \
  -d '{
  "uhrpUrl": "uhrp://XYZ123abc...",
  "retentionDays": 30
}'
Response
{
  "uhrpUrl": "uhrp://XYZ123abc...",
  "expiresAt": 1716700000,
  "txid": "b2c3d4e5..."
}