> ## Documentation Index
> Fetch the complete documentation index at: https://developers.pcibooking.net/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Network Token

> Delete a network token from both the card network and PCI Booking storage.

Deletes a network token from the card network (Visa, Mastercard, or Amex) and removes the corresponding PCI Booking token.

## Error Responses

| Code    | HTTP Status | Condition                                                                |
| ------- | ----------- | ------------------------------------------------------------------------ |
| `-1003` | `401`       | API key is missing or invalid.                                           |
| `-1003` | `401`       | Authenticated user does not own the token.                               |
| `-125`  | `400`       | Request body validation failed (missing required fields).                |
| `-150`  | `500`       | Failed to delete the token from the network or from PCI Booking storage. |

## Parameter Constraints

* **TokenId**: Required, maximum 255 characters.
* **Reason**: Optional, maximum 255 characters.

## Parameters

### Headers

<ParamField header="Authorization" type="string" required>
  Your API key prefixed with `APIKEY`. Example: `APIKEY your-api-key`. See the [Authentication guide](/getting-started/authentication).
</ParamField>

### Request Body

<ParamField body="Brand" type="string" required>
  The card network brand. One of: `Visa`, `MasterCard`, `Amex`.
</ParamField>

<ParamField body="TokenId" type="string" required>
  The network token identifier (as returned during network tokenization). Maximum 255 characters.
</ParamField>

<ParamField body="Source" type="string" required>
  The source of the delete request (network-specific enum value).
</ParamField>

<ParamField body="Reason" type="string">
  Reason for deleting the network token. Maximum 255 characters.
</ParamField>

<RequestExample>
  ```javascript Node.js theme={null}
  const response = await fetch('https://service.pcibooking.net/api/networkToken', {
    method: 'DELETE',
    headers: {
      'Authorization': 'APIKEY your-api-key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      Brand: 'Visa',
      TokenId: '4895370012003478',
      Source: 'CardHolder',
      Reason: 'Customer requested token removal'
    })
  });

  const data = await response.json();
  console.log(data);
  ```

  ```python Python theme={null}
  import requests

  response = requests.delete(
      'https://service.pcibooking.net/api/networkToken',
      headers={
          'Authorization': 'APIKEY your-api-key',
          'Content-Type': 'application/json'
      },
      json={
          'Brand': 'Visa',
          'TokenId': '4895370012003478',
          'Source': 'CardHolder',
          'Reason': 'Customer requested token removal'
      }
  )

  print(response.json())
  ```
</RequestExample>

## Response

**200** - Network token deleted. Returns `true` if the token was successfully deleted from the card network.

<ResponseExample>
  ```json 200 theme={null}
  true
  ```

  ```json 401 theme={null}
  {
      "code": -1003,
      "message": "Not authorized to access this resource",
      "moreInfo": "User is not the owner of this bank card",
      "errorList": null
  }
  ```

  ```json 400 theme={null}
  {
      "code": -125,
      "message": "Bad input data",
      "moreInfo": "...",
      "errorList": null
  }
  ```
</ResponseExample>
