---
agentTools:
  projectIndex: https://docs.silamoney.com/llms.txt
---

# /update_card (no longer supported)

Updates a card name.

This endpoint updates successfully linked debit card names.

## Requests

The <code>card\_name</code> key is required and is the field that is updated with this endpoint.\
The <code>card\_id</code> key is required and is used to uniquely identify the card to update.

### Authorization / Authentication

#### Apps using Access Token Authorization

Use a valid access token in an Authorization: Bearer <token> request header.

See [Authenticating with an Access Token](authenticating-with-an-access-token) for more details.

#### Apps using ECDSA Authentication

Both <code>authsignature</code> and <code>usersignature</code> headers are required for this request. The usersignature header should be generated with a keypair registered to the user (either registered from the /register endpoint or the /register\_wallet endpoint).

See the section on [ECDSA Authentication](authentication) for more detail about ECDSA signature generation.

```json Specs
POST /0.2/update_card HTTP/1.1
Content-Type: application/json
// if using OAuth2
Authorization: Bearer [GENERATED JWT TOKEN HERE]
// if using ECDSA
authsignature: [GENERATED AUTHSIGNATURE HEX STRING HERE]
usersignature: [GENERATED USERSIGNATURE HEX STRING HERE]

{
  "header": {
    "created": 1234567890, 
    "app_handle": "app_handle", 
    "user_handle":"user_handle", 
    "reference": "<your unique id>"
  },
  "card_name": "Card name",
  "card_id": "<card_id>"
}

***

HTTP/1.1 200 OK

{
    "success": true,
    "card_name": "test_card",
    "card_last_4": 1157,
    "expiration": "12/27",
    "card_type": "Debit",
    "card_network": "Visa",
    "pull_enabled": true,
    "push_enabled": null,
    "push_availability": null,
    "active": true,
    "country": "GB",
    "currency": "USD",
    "card_id": "dfdbd0ac-dd7d-4691-b573-50b7b69fb29a",
    "message": "Card successfully updated.",
    "reference": "<your unique id>",
    "sila_reference_id": "sila_assigned_id",
    "status": "SUCCESS",
    "response_time_ms": "124"
}
```
```javascript JavaScript
var cardName = "your card name";
const res = await Sila.deleteCard(userHandle, userPrivateKey, cardName);


// Success Response Object
console.log(res.statusCode); // 200
```
```python Python
payload = {
    "user_handle": "user_handle",
    "card_name": "Your Card"            
}

response = User.delete_card(silaApp, payload, eth_private_key)

### Success Response Object
{
    'success': True,
    'message': 'Card visa has been successfully deleted.',
    'status': 'SUCCESS',
    'status_code': 200
}

### Failure Response Object
{
    status: 'FAILURE'
}
```
```java Java
ApiResponse response = api.deleteCard(userHandle, cardName, userPrivateKey);

// Success Response
BaseResponse parsedResponse = (BaseResponse) response.getData();
System.out.println(response.getStatusCode()); // 200
System.out.println(parsedResponse.getSuccess()); 
System.out.println(parsedResponse.getStatus()); 
System.out.println(parsedResponse.getMessage()); 
System.out.println(parsedResponse.getReference());
```
```php PHP
$userHandle = 'user_handle';
$userPrivateKey = 'user private key';
$cardName = 'visa';

$response = self::$config->api->deleteCard($userHandle, $userPrivateKey, $cardName);
        
echo $response->getStatusCode();
echo $response->getData()->getStatus();
echo $response->getData()->getSuccess();
echo $response->getData()->getMessage();
```
```c# C#
ApiResponse<object> response = api.DeleteCard(userHandle, userPrivateKey, cardName);

// Success Response Object
Console.WriteLine(response.StatusCode); // 200
Console.WriteLine(((DeleteCardResult)response.Data).Reference); // Random reference number
Console.WriteLine(((DeleteCardResult)response.Data).Success); // true            
Console.WriteLine(((DeleteCardResult)response.Data).Status); // SUCCESS
Console.WriteLine(((DeleteCardResult)response.Data).Message); // Card successfully deleted.
```

| Key        | Type        | Description                                                                                                                                                        |
| :--------- | :---------- | :----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| header     | JSON object | Required. Requires these keys in JSON format: created, auth\_handle, user\_handle. See the /check\_handle endpoint for the complete list of fields in this object. |
| card\_name | String      | Required. Name of card, assigned at time of linkage, unique to a single user handle.                                                                               |
| card\_id   | String      | Required. Unique id assigned to card at time of linkage.                                                                                                           |

## Responses

[block:parameters]
{
  "data": {
    "h-0": "Status Code",
    "h-1": "<code>success</code> Attribute",
    "h-2": "Description",
    "0-0": "200",
    "0-1": "true",
    "0-2": "",
    "1-0": "",
    "1-1": "",
    "1-2": ""
  },
  "cols": 3,
  "rows": 2,
  "align": [
    "left",
    "left",
    "left"
  ]
}
[/block]

## Response Contents

| Key                | Datatype | Possible Values                                                     | Description                                                                                                               |
| :----------------- | :------- | :------------------------------------------------------------------ | :------------------------------------------------------------------------------------------------------------------------ |
| card\_name         | String   |                                                                     | This is a nickname supplied by the /link\_card request which will be used to reference this card in transaction requests. |
| card\_last\_4      | Integer  |                                                                     | These are the last 4 digits of the card for the purpose of identifying the card among other linked cards.                 |
| expiration         | String   |                                                                     | This is the card's expiration date.                                                                                       |
| card\_type         | String   | "Debit"                                                             | This describes the type of card that was linked.                                                                          |
| card\_network      | String   | "Visa"                                                              |                                                                                                                           |
| pull\_enabled      | Boolean  | true/false                                                          | This indicates whether funds can be pulled from the card (whether funds can be debited from the card, in other words).    |
| push\_enabled      | Boolean  | true/false                                                          | This indicates whether funds can be pushed to the card (whether funds can be credited to the card, in other words).       |
| push\_availability | Boolean  | true/false                                                          | This indicates the availability of funds pushed to the card as reported by the card issuer.                               |
| active             | Boolean  | true/false                                                          | This is true if the card is usable in transaction requests, false if not.                                                 |
| country            | String   | Any 2-character country code in the ISO 3166 standard (e.g. "US")   | This is where the card was issued.                                                                                        |
| currency           | String   | Any 3-character currency code in the ISO 4217 standard (e.g. "USD") | This is the currency supported by the card.                                                                               |
| card\_id           | String   | A unique ID in UUID format.                                         | This is a unique ID generated by Sila to identify the linked card.                                                        |