---
title: "PATCH /users/{user_id}/cards/{card_id}"
method: PATCH
path: "/users/{user_id}/cards/{card_id}"
tags: ["userCards"]
---

# PATCH /users/{user_id}/cards/{card_id}

`PATCH /users/{user_id}/cards/{card_id}`

## Request

- Base URL: `https://api.outdoorsy.com/v0`
- URL: `https://api.outdoorsy.com/v0/users/{user_id}/cards/{card_id}`
- Auth: one of:
  - API key in header `Authorization`
  - API key in header `API-Key`
- TypeScript: <https://skmtc.dev/outdoorsy/apis/outdoorsy-api-documentation/docs/users/:user_id/cards/:card_id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Set default card for the user

## Path parameters

- `user_id` integer, required
- `card_id` integer, required

## Response `200`

- UserCard
  - `brand` string
  - `created` string
  - `default` boolean
  - `exp_month` integer
  - `exp_year` integer
  - `id` integer
  - `last_four` string
  - `latest_setup_intent_id` string
  - `owner_id` integer
  - `payment_processor` PaymentProcessor: Typically this object is composed into a struct, but embedded into the same table using the `db:",embed"` struct tag.
    - `country` string
    - `external_processor` string
    - `external_processor_id` string
    - `name` string
  - `stripe_token` string: internal
  - `updated` string

## Other responses

- `400`: Invalid input or state means you're bad
- `401`: Unauthorized error
- `404`: Not found error

---

[API](https://skmtc.dev/outdoorsy/apis/outdoorsy-api-documentation.md) - [All operations](https://skmtc.dev/outdoorsy/apis/outdoorsy-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/outdoorsy/apis/outdoorsy-api-documentation/revisions/f0cf8f605ea0?raw)
