> This page is for version v1 (default).
> For other versions, use one of these documentation indexes:
> - v1 (default): https://developers.outpave.com/v1/llms.txt
> - v2: https://developers.outpave.com/v2/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.outpave.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.outpave.com/_mcp/server.

# Update a card

POST https://api.outpave.com/api/v1/cards/{cardId}
Content-Type: application/json

Updates the card's nickname and/or policy. At least one of `nickname` or `policy` must be provided. Requires **Admin** role.

Reference: https://developers.outpave.com/api-reference/company-api/cards/post-api-v-1-cards-id

## Authentication

- `Authorization` header (bearer token, required) — A short-lived access token from `POST /api/v1/access-token` (30 minutes by default). Send as `Authorization: Bearer <jwt>`.

## Request

### Path parameters

- `cardId` (string, required) — The card's unique identifier.

### Body (application/json)

This endpoint expects a CardUpdatePayload.

- `nickname` (string, optional)
- `policy` (CardPolicy, optional) — The spending controls applied to a card. At least one spending limit (transaction, daily, monthly, or total) must be specified when creating a card.

## Response

### 200

Card updated.

- `id` (string, required) — The card's unique identifier.
- `type` (enum, required) — The card form factor.
  - Allowed values: `VIRTUAL`, `PHYSICAL`
- `company` (CardCompany, required) — A summary of the company that owns the card.
- `status` (enum, required) — The card's current status.
  - Allowed values: `ACTIVE`, `INACTIVE`, `SUSPENDED`, `CANCELLED`, `PENDING`, `FROZEN`, `CLOSED`
- `user` (CardUser, required) — A summary of the cardholder.
- `nickname` (string, required) — A display name for the card.
- `cardNumber` (string, optional) — The masked card number (last 4 digits only).
- `shippingSpeed` (enum, optional) — Shipping speed for a physical card. Present only for physical cards.
  - Allowed values: `Standard`, `Express`
- `policy` (CardPolicy, optional) — The spending controls applied to a card. At least one spending limit (transaction, daily, monthly, or total) must be specified when creating a card.
- `cardToken` (CardToken, optional) — Credentials for revealing sensitive card details client-side. Returned only when `extend=cardToken` is requested.
- `cardProgram` (CardProgramSummary, optional) — The card program this card is issued against.
- `cardDetails` (CardDetails, optional) — The full card number, CVV and expiration. Returned only when `extend=cardDetails` is requested. This is cardholder data; never log or store it.

## Errors

### 400 Bad Request Error

The request was malformed or failed validation.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 401 Unauthorized Error

The credential is missing, invalid, expired, or doesn't have permission for this endpoint.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 403 Forbidden Error

The credential is valid but doesn't have permission to access this resource, or your plan does not include API access or the feature.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 404 Not Found Error

The requested resource doesn't exist or isn't accessible to your company.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 429 Too Many Requests Error

You've exceeded the rate limit for your API key. Check the `RateLimit-*` headers for your remaining quota.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

### 500 Internal Server Error

An unexpected server error occurred. Retry the request; if the problem persists, contact support.

- `error` (string, required) — A short, human-readable error message.
- `details` (list of string, optional) — Additional error details (returned on validation failures).

## Types

### CardPolicy

The spending controls applied to a card. At least one spending limit (transaction, daily, monthly, or total) must be specified when creating a card.

- `merchants` (list of MerchantInput, optional) — The merchants this card is allowed to transact with. An empty array allows all merchants.
- `allowedCategories` (list of CardCategoryInput, optional) — The merchant category codes (MCCs) this card is allowed to transact with. An empty array allows all categories.
- `blockedMerchants` (list of MerchantInput, optional) — The merchants this card is never allowed to transact with. A match declines before any allow list is evaluated. Cannot be combined with `merchants`.
- `blockedCategories` (list of CardCategoryInput, optional) — The merchant categories this card is never allowed to transact with. A match declines before any allow list is evaluated. Cannot be combined with `allowedCategories`.
- `status` (enum, optional) — The policy's status.
  - Allowed values: `ACTIVE`, `INACTIVE`, `SUSPENDED`
- `transactionLimit` (integer, optional) — The maximum amount allowed on a single transaction, in cents.
- `dailyLimit` (integer, optional) — The maximum amount that can be spent in a single day, in cents.
- `weeklyLimit` (integer, optional) — The maximum amount that can be spent in a single week, in cents.
- `monthlyLimit` (integer, optional) — The maximum amount that can be spent in a single month, in cents.
- `totalLimit` (integer, optional) — The maximum total amount that can be spent over the card's lifetime, in cents.
- `expenseCategory` (string, optional, nullable) — The expense category assigned to transactions on this card.
- `allocationId` (string, optional, nullable) — The allocation linked to transactions on this card.
- `receiptPolicy` (enum, optional) — When the cardholder is required to upload a receipt. `POLICY` follows the company-wide setting.
  - Allowed values: `POLICY`, `ALWAYS`, `NEVER`
- `allocationPolicy` (enum, optional) — When the cardholder is required to assign an allocation. `POLICY` follows the company-wide setting.
  - Allowed values: `POLICY`, `ALWAYS`, `NEVER`
- `cardActivationDate` (date, optional, nullable) — The date the card becomes active.
- `cardExpirationDate` (date, optional, nullable) — The date the card expires.

### CardCompany

A summary of the company that owns the card.

- `id` (string, optional) — The company's unique identifier.
- `businessLegalName` (string, optional) — The legal name of the company.

### CardUser

A summary of the cardholder.

- `id` (string, required) — The cardholder's unique identifier (the same value you would pass as `userId` on create).
- `email` (string, optional) — The cardholder's email address.
- `firstName` (string, optional) — The cardholder's first name.
- `lastName` (string, optional) — The cardholder's last name.

### CardToken

Credentials for revealing sensitive card details client-side. Returned only when `extend=cardToken` is requested.

- `issuerId` (string, optional) — The card's identifier on the issuer's platform.
- `key` (CardTokenKey, optional) — A short-lived ephemeral key used to fetch sensitive card details client-side.
- `accountId` (string, optional) — The connected account ID. Pass alongside `key` when calling the card-display SDK so the request is scoped correctly.
- `publishableKey` (string, optional, nullable) — The publishable key to initialize the card-display SDK with. It belongs to the integration that issued this card, which can differ between a company's card programs. Null when the issuer needs none.

### CardProgramSummary

The card program this card is issued against.

- `id` (string, optional)
- `issuer` (enum, optional)
  - Allowed values: `STRIPE`, `HIGHNOTE`
- `nickname` (string, optional)

### CardDetails

The full card number, CVV and expiration. Returned only when `extend=cardDetails` is requested. This is cardholder data; never log or store it.

- `number` (string, optional) — The full primary account number (PAN).
- `cvv` (string, optional) — The card verification value.
- `expirationMonth` (string, optional) — The two-digit expiration month.
- `expirationYear` (string, optional) — The four-digit expiration year.

### MerchantInput

A merchant identifier.

- `id` (string, optional) — The merchant's unique identifier.
- `name` (string, optional) — The merchant's display name.

### CardCategoryInput

A merchant category code (MCC) entry.

- `id` (string, optional) — The category's unique identifier.
- `name` (string, optional) — The category's display name.

### CardTokenKey

A short-lived ephemeral key used to fetch sensitive card details client-side.

- `id` (string, optional) — The ephemeral key's identifier.
- `object` (string, optional) — The object type. Always `ephemeral_key`.
- `associated_objects` (list of CardTokenAssociatedObject, optional) — The objects this key grants access to.
- `created` (long, optional) — Unix timestamp (seconds) when the key was created.
- `expires` (long, optional) — Unix timestamp (seconds) when the key expires.
- `livemode` (boolean, optional) — Whether this key was created in live mode.
- `secret` (string, optional) — The secret used to authenticate requests with this key. Treat as sensitive — never log it or expose it client-side.

### CardTokenAssociatedObject

An object that the ephemeral key grants access to.

- `id` (string, optional) — The associated object's identifier.
- `type` (string, optional) — The associated object's type.

## Examples

**Request**

```json
{}
```

**Response**

```json
{
  "id": "44419f82-9784-4045-a465-2c632cf9dd06",
  "type": "VIRTUAL",
  "company": {
    "id": "13f43c3a-1094-4540-9050-32ac53a86739",
    "businessLegalName": "Example Company Inc."
  },
  "status": "ACTIVE",
  "user": {
    "id": "112d33ef-aeea-4f46-a366-3307ee5c3a64",
    "email": "john.doe@example.com",
    "firstName": "John",
    "lastName": "Doe"
  },
  "nickname": "Marketing card",
  "cardNumber": "•••• 4242",
  "shippingSpeed": "Standard",
  "policy": {
    "merchants": [],
    "allowedCategories": [],
    "blockedMerchants": [],
    "blockedCategories": [],
    "status": "ACTIVE",
    "transactionLimit": 50,
    "dailyLimit": 75,
    "weeklyLimit": 1000,
    "monthlyLimit": 2500,
    "totalLimit": 10000,
    "expenseCategory": null,
    "allocationId": null,
    "receiptPolicy": "POLICY",
    "allocationPolicy": "POLICY",
    "cardActivationDate": "2023-01-15",
    "cardExpirationDate": "2023-01-15"
  },
  "cardToken": {
    "issuerId": "ic_1TfBoXPp4Hhx72LcDi9lUIRu",
    "key": {
      "id": "ephkey_1TfNUZPp4Hhx72LcuXPoor8w",
      "object": "ephemeral_key",
      "associated_objects": [
        {
          "id": "ic_1TfBoXPp4Hhx72LcDi9lUIRu",
          "type": "issuing.card"
        }
      ],
      "created": 1,
      "expires": 1,
      "livemode": true,
      "secret": "string"
    },
    "accountId": "acct_1RYSy3Pp4Hhx72Lc",
    "publishableKey": "pk_live_51RYSy3Pp4Hhx72Lc"
  },
  "cardProgram": {
    "id": "9a1b2c3d-4e5f-6071-8293-a4b5c6d7e8f9",
    "issuer": "STRIPE",
    "nickname": "Operating account"
  },
  "cardDetails": {
    "number": "4111111111111111",
    "cvv": "123",
    "expirationMonth": "09",
    "expirationYear": "2029"
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.outpave.com/api/v1/cards/cardId"

payload = {}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript
const url = 'https://api.outpave.com/api/v1/cards/cardId';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.outpave.com/api/v1/cards/cardId"

	payload := strings.NewReader("{}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.outpave.com/api/v1/cards/cardId")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{}"

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.outpave.com/api/v1/cards/cardId")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{}")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.outpave.com/api/v1/cards/cardId', [
  'body' => '{}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.outpave.com/api/v1/cards/cardId");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.outpave.com/api/v1/cards/cardId")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```