Remove a file from an expiry

posthttps://api.expiryedge.com/v1/deleteExpiryAttachment
editor or admin60/min
Anfrage
curl -X POST 'https://api.expiryedge.com/v1/deleteExpiryAttachment' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "expiryId": "exp_4Tq9sLm2",
  "url": "https://firebasestorage.googleapis.com/v0/b/stylingsphere.appspot.com/o/user_files%2Forg_northwind%2Fu_71bXq%2Fexpiry_exp_4Tq9sLm2%2FGas_Safety_Certificate_2025.pdf?alt=media&token=5b1f0c7e-2a41-4d8e-9f3a-0c6d2e7b9a11"
}'
Antwort
{
  "deleted": true,
  "url": "https://firebasestorage.googleapis.com/v0/b/stylingsphere.appspot.com/o/user_files%2Forg_northwind%2Fu_71bXq%2Fexpiry_exp_4Tq9sLm2%2FGas_Safety_Certificate_2025.pdf?alt=media&token=5b1f0c7e-2a41-4d8e-9f3a-0c6d2e7b9a11",
  "attachments": [
    {
      "index": 0,
      "name": "Gas Safety Certificate 2026.pdf",
      "url": "https://firebasestorage.googleapis.com/v0/b/stylingsphere.appspot.com/o/user_files%2Forg_northwind%2Fu_71bXq%2Fexpiry_exp_4Tq9sLm2%2F1790517900000_Gas_Safety_Certificate_2026.pdf?alt=media&token=9c2e4d1a-7b3f-4e6a-8d5c-1f0a2b3c4d5e"
    }
  ]
}

Identify the file by url (recommended - safe even if the list changed since you read it) or by index. Removes it from the expiry, deletes the stored file (only if it is in your organization's storage) and frees its space in your storage quota.

Body-Parameter

application/json
  • expiryIdstringerforderlich
  • urlstring
    Download URL of the attachment, as returned by getExpiryAttachments.
  • indexinteger
    Position from getExpiryAttachments; used only when url is not given.
    min: 0

Rückgabe

200
File removed. Returns the remaining attachments.
  • deletedbooleanerforderlich
    Erlaubttrue
  • urlstringerforderlich
    Download URL of the removed file.
  • attachmentsarray of objectserforderlich

Fehler

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
Authenticated, but your role or organization does not allow this action.
404
Expiry not in your organization, or no attachment with that url / index.
405
The endpoint does not accept this HTTP method.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.
500
Unexpected server error. Retry later; quote requestId to support.