nsindocs Search the docs⌘K
  1. Docs
  2. API reference
  3. Email Routing

Delete a destination

deletehttps://api.nsin.ir/email-routing/destinations/{destinationId}

Auth: Authorization: Bearer nsin_… or X-Api-Key: nsin_… — see API keys.

Removes the destination and DISABLES every rule and catch-all that used it, on every domain of the account. The mail hosts stop forwarding there within a minute.

Path parameters

  • destinationIdintegerrequiredpath

    Numeric id of the email destination, from the destination list.

Responses

204Deleted.
401Missing, malformed, revoked or expired API key. (A valid key whose account has been deactivated gets 403 account is inactive instead.)

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "invalid API key"
}
404No such destination on your account.

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "read-only API key"
}
429The key exceeded its request budget (300 requests per minute by default).

Content type: application/json

  • errorstringrequired

    Human-readable description of what went wrong.

json
{
  "error": "rate limit exceeded"
}

Example request

bash
curl -X DELETE "https://api.nsin.ir/email-routing/destinations/0" \
  -H "Authorization: Bearer $NSIN_API_KEY"
esc