Delete an expiry type

posthttps://api.expiryedge.com/v1/deleteExpiryType
editor or admin60/minAny method
Request
curl -X POST 'https://api.expiryedge.com/v1/deleteExpiryType' \
  -H "Authorization: Bearer $EXPIRYEDGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "typeId": "et_5Gm1rT",
  "option": "move",
  "newTypeNameOrId": "et_2Kd9wB"
}'
Response
{
  "message": "Moved 12 expiries to new type and deleted old type",
  "moved_expiries": 12
}

If expiries use the type, option decides what happens to them: move (to type newTypeNameOrId), rename (keep the type under the new name newTypeNameOrId) or delete_all (permanently delete those expiries).

Body parameters

application/json
  • typeIdstringrequired
  • optionstring
    Required when the type is in use.
    Allowedmoverenamedelete_all
  • newTypeNameOrIdstring
    Target type id for move, new name for rename.

Returns

200
Deleted (or renamed). Exactly one of the count fields is present.
  • messagestringrequired
  • deleted_expiriesinteger
    Present when the type was unused or option was delete_all.
  • moved_expiriesinteger
    Present for option: move.
  • updated_expiriesinteger
    Present for option: rename.

Errors

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
The record does not exist or is not in your organization.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.