# Delete Link

Deletes a payment link identified by its unique ID. The link moves to the CANCELLED status, which makes it invalid and unusable from then on. This action is irreversible, and a link that is already cancelled or finalized answers with a 409.
**Required scope:** <code style="background:#e8f0fe;color:#1a73e8;padding:2px 8px;border-radius:12px;font-size:0.85em">link:delete</code>

Endpoint: DELETE /link/{id}
Version: 2.0
Security: accountId, apiKey

## Path parameters:

  - `id` (string, required)
    Unique identifier of the payment link.

## Response 400 fields (application/json):

  - `type` (string, required)
    Link that redirects to the API documentation.
    Example: https://docs.easypay.pt/docs/error-handling#invalid-params-error-400

  - `title` (string, required)
    Brief title about the error.
    Example: Invalid payload provided

  - `detail` (string, required)
    Brief description about the error.
    Example: Your request parameters didn't validate

  - `status` (number, required)
    API error code.

  - `invalid_params` (array)
    One entry for each payload field that failed validation. Omitted when the request failed for a reason that isn't tied to a specific field.

  - `invalid_params.name` (string, required)
    Name of the payload field that contains an error.
    Example: expiration_time

  - `invalid_params.reason` (string, required)
    Reason why this payload field contains an error.
    Example: expiration_time should be formatted as RFC 3339 and in the future

## Response 403 fields (application/json):

  - `type` (string, required)
    Link that redirects to the API documentation.
    Example: https://docs.easypay.pt/docs/error-handling#authentication-error-403

  - `title` (string, required)
    Brief title about the error.
    Example: Forbidden

  - `detail` (string, required)
    Brief description about the error.
    Example: Authentication failed

  - `status` (number, required)
    API error code.

## Response 404 fields (application/json):

  - `title` (string, required)
    Brief title about the error.
    Example: Not Found

  - `detail` (string, required)
    Brief description about the error.
    Example: no link found with the provided id

  - `status` (number, required)
    API error code.

## Response 409 fields (application/json):

  - `title` (string, required)
    Brief title about the error.
    Example: Conflict with the current state of the target resource

  - `detail` (string, required)
    Brief description about the error.
    Example: conflict with the resource's current state

  - `status` (number, required)
    API error code.

## Response 500 fields (application/json):

  - `type` (string, required)
    Link that redirects to the API documentation.
    Example: https://docs.easypay.pt/docs/error-handling#internal-error-500

  - `title` (string, required)
    Brief title about the error.
    Example: An unexpected error has occurred

  - `detail` (string, required)
    Brief description about the error.
    Example: An unexpected error has occurred, try again later if the error persists please contact correio@easypay.pt

  - `status` (number, required)
    API error code.

