> ## Documentation Index
> Fetch the complete documentation index at: https://www.marqeta.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Commando Mode Addendum

> Use these Commando Mode endpoints to create and update the Commando Mode control sets used by the Marqeta platform to respond to Gateway Just-in-Time funding requests when your decisioning system fails.

export const EndpointCard = ({method = "API", title, children, href, arrow = true}) => {
  const METHOD_STYLES = {
    GET: {
      bg: "mint-bg-green-400/20 dark:mint-bg-green-400/20",
      text: "mint-text-green-700 dark:mint-text-green-400",
      border: "mint-border-green-300 dark:mint-border-green-700"
    },
    POST: {
      bg: "mint-bg-blue-400/20 dark:mint-bg-blue-400/20",
      text: "mint-text-blue-700 dark:mint-text-blue-400"
    },
    PUT: {
      bg: "mint-bg-yellow-400/20 dark:mint-bg-yellow-400/20",
      text: "mint-text-yellow-700 dark:mint-text-yellow-400"
    },
    PATCH: {
      bg: "mint-bg-orange-400/20 dark:mint-bg-orange-400/20",
      text: "mint-text-orange-700 dark:mint-text-orange-400"
    },
    DELETE: {
      bg: "mint-bg-red-400/20 dark:mint-bg-red-400/20",
      text: "mint-text-red-700 dark:mint-text-red-400"
    },
    API: {
      bg: "mint-bg-black",
      text: "mint-text-white"
    }
  };
  const MethodBadge = ({method}) => {
    const style = METHOD_STYLES[method?.toUpperCase()] ?? METHOD_STYLES.GET;
    return <span className={`
          method-pill rounded-lg font-semibold px-1.5 py-0.5 text-xs leading-5 ${style.bg} ${style.text}`}>
        {method?.toUpperCase()}
      </span>;
  };
  const content = <div className="group flex items-center gap-4 border border-gray-200 dark:border-gray-700 rounded-xl p-5 hover:border-gray-400 dark:hover:border-gray-500 hover:shadow-md transition-all cursor-pointer">
      {}
      <div className="shrink-0">
        <MethodBadge method={method} />
      </div>
      {}
      <div className="flex-1 min-w-0">
        <p className="font-semibold text-gray-900 dark:text-white text-sm leading-snug">{title}</p>
        {children && <p className="mt-1 text-sm text-gray-500 dark:text-gray-400 line-clamp-2">{children}</p>}
      </div>
    </div>;
  if (!href) return content;
  return <a href={href} className="block no-underline border-b-0 mb-2">
      {content}
    </a>;
};

This page shows you how to create and update Commando Mode control sets using the `POST /commandomodes`, `PUT /commandomodes/{token}`, and `POST /commandomodes/transitions` operations. For other reference documentation on working with Commando Mode control sets, see [Commando Mode](/core-api/commando-mode/).

<Note>
  **Note**\
  You must be a Powered By Marqeta (PxM) customer with the Program Manager role enabled to send calls to the `POST /commandomodes`, `PUT /commandomodes/{token}`, and `POST /commandomodes/transitions` operations. Managed by Marqeta (MxM) customers who do not have the Program Manager role enabled cannot access these endpoints.

  For more information about MxM and PxM programs, see [Understanding Card Program Differences](/developer-guides/understanding-card-program-differences/).
</Note>

<h2 id="_create_commando_mode_control_set">
  Create Commando Mode control set
</h2>

**Action:** `POST`\
**Endpoint:** `/commandomodes`

{/* <EndpointCard
title="Create Commando Mode control set"
path="/commandomodes"
method="post"
/> */}

Create a Commando Mode control set to define the conditions that programmatically enable Commando Mode and what happens when Commando Mode is enabled. When enabled, Commando Mode switches your program gateway funding source to a non-gateway program funding source and enables any authorization or velocity controls you specify.

Commando Mode control sets are associated with program gateway funding sources. Each program gateway funding source can have a single associated `commandomode` object.

<Note>
  **Note**\
  The conditions for automatically enabling Commando Mode defined in the `real_time_standin_criteria` object function whether the Commando Mode is enabled or disabled. For example, if `real_time_standin_criteria.enabled` and `real_time_standin_criteria.include_connection_errors` are both `true`, a connection error will enable Commando Mode whether `current_state.commando_enabled` is `true` or `false`.
</Note>

<h3 id="_body_field_details">
  Body field details
</h3>

| Fields                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Optional                                    | The unique identifier of the Commando Mode control set.<br /><br />If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.<br /><br />**Allowable Values:**<br /><br />36 char max |
| program\_gateway\_funding\_source\_token<br /><br />string<br /><br />Required | The unique identifier of the associated program gateway funding source.<br /><br />**Allowable Values:**<br /><br />Existing program gateway funding source token.                                                                                                                                                                                                                                      |
| commando\_mode\_enables<br /><br />object<br /><br />Required                  | Defines what happens when Commando Mode is enabled.<br /><br />**Allowable Values:**<br /><br />Existing `commando_mode_enables` object.                                                                                                                                                                                                                                                                |
| real\_time\_standin\_criteria<br /><br />object<br /><br />Optional            | Specifies which event types automatically enable Commando Mode.<br /><br />**Allowable Values:**<br /><br />Existing `real_time_standin_criteria` object.                                                                                                                                                                                                                                               |

<h3 id="_the_commando_mode_enables_object">
  The commando\_mode\_enables object
</h3>

| Fields                                                                | Description                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| program\_funding\_source<br /><br />string<br /><br />Required        | The unique identifier of the program funding source that substitutes for the program gateway funding source while in Commando Mode.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                                                                       |
| velocity\_controls<br /><br />array<br /><br />Optional               | The velocity controls enabled while in Commando Mode.<br /><br />**Allowable Values:**<br /><br />One or more existing velocity control tokens.                                                                                                                                                                   |
| auth\_controls<br /><br />array<br /><br />Optional                   | The authorization controls enabled while in Commando Mode.<br /><br />**Allowable Values:**<br /><br />One or more existing authorization control tokens.                                                                                                                                                         |
| ignore\_card\_suspended\_state<br /><br />boolean<br /><br />Optional | If `true`, transactions conducted while in Commando Mode proceed even when the card is suspended; if `false`, transactions conducted while Commando Mode is enabled are declined if the card is suspended.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`false` |

<h3 id="_the_real_time_standin_criteria_object">
  The real\_time\_standin\_criteria object
</h3>

| Fields                                                              | Description                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| enabled<br /><br />boolean<br /><br />Optional                      | If `true`, Commando Mode is automatically enabled by events defined in the `real_time_standin_criteria` object; if `false`, Auto Commando Mode is not enabled.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`false`        |
| include\_connection\_errors<br /><br />boolean<br /><br />Optional  | If `true`, a non-timeout connection error automatically enables Commando Mode when `real_time_standin_criteria.enabled` is also `true`.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`true`                                |
| include\_response\_timeouts<br /><br />boolean<br /><br />Optional  | If `true`, a gateway response slower than 3000ms automatically enables Commando Mode when `real_time_standin_criteria.enabled` is also `true`.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`true`                         |
| include\_application\_errors<br /><br />boolean<br /><br />Optional | If `true`, an application error (any non-connection, non-timeout error) automatically enables Commando Mode when `real_time_standin_criteria.enabled` is also `true`.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`false` |

<h3 id="_the_current_state_object_response">
  The current\_state object (response)
</h3>

The Marqeta platform returns the `current_state` object of the Commando Mode control set in the response.

| Name              | Description                                                                          | Allowable Values         |
| ----------------- | ------------------------------------------------------------------------------------ | ------------------------ |
| commando\_enabled | Indicates whether Commando Mode is enabled.                                          | `true`, `false`          |
| reason            | Describes the reason the current state of the Commando Mode control set was changed. |                          |
| channel           | The mechanism that changed the Commando Mode control set’s state.                    | `API`, `SYSTEM`, `ADMIN` |
| user\_name        | Identifies the user who changed the Commando Mode control set’s state.               |                          |

<h3 id="_sample_request_body">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "commando_mode_1",
  "program_gateway_funding_source_token": "pgm_gateway_src_1",
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls": [
      "vel_control_1"
    ]
  }
}
```

<h3 id="_sample_response_body">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "commando_mode_1",
  "program_gateway_funding_source_token": "pgm_gateway_src_1",
  "current_state": {
    "commando_enabled": false,
    "reason": "New commandomode created",
    "channel": "SYSTEM"
  },
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls": [
      "vel_control_1"
    ]
  },
  "created_time": "2021-02-14T18:48:10Z",
  "last_modified_time": "2021-02-14T18:48:10Z"
}
```

<h2 id="_update_commando_mode_control_set">
  Update Commando Mode control set
</h2>

**Action:** `PUT`\
**Endpoint:** `/commandomodes/{token}`

{/* <EndpointCard
title="Update Commando Mode control set"
path="/commandomodes/{token}"
method="put"
/> */}

Update a specific Commando Mode control set.

Include the modified details in JSON format in the body of the request. Only values of parameters included in the request are modified; all others are left unchanged.

<h3 id="_url_path_parameters">
  URL path parameters
</h3>

| Fields                                      | Description                                                                                                                                   |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Required | The unique identifier of the Commando Mode control set.<br /><br />**Allowable Values:**<br /><br />Existing Commando Mode control set token. |

<h3 id="_body_field_details_2">
  Body field details
</h3>

| Fields                                                                         | Description                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| token<br /><br />string<br /><br />Optional                                    | The unique identifier of the Commando Mode control set.<br /><br />If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.<br /><br />**Allowable Values:**<br /><br />36 char max |
| program\_gateway\_funding\_source\_token<br /><br />string<br /><br />Required | The unique identifier of the associated program gateway funding source.<br /><br />**Allowable Values:**<br /><br />Existing program gateway funding source token.                                                                                                                                                                                                                                      |
| commando\_mode\_enables<br /><br />object<br /><br />Required                  | Defines what happens when Commando Mode is enabled.<br /><br />**Allowable Values:**<br /><br />Existing `commando_mode_enables` object.                                                                                                                                                                                                                                                                |
| real\_time\_standin\_criteria<br /><br />object<br /><br />Optional            | Specifies which event types automatically enable Commando Mode.<br /><br />**Allowable Values:**<br /><br />Existing `real_time_standin_criteria` object.                                                                                                                                                                                                                                               |

<h3 id="_the_commando_mode_enables_object_2">
  The commando\_mode\_enables object
</h3>

| Fields                                                                | Description                                                                                                                                                                                                                                                                                                       |
| --------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| program\_funding\_source<br /><br />string<br /><br />Required        | The unique identifier of the program funding source that substitutes for the program gateway funding source upon Commando Mode enablement.<br /><br />**Allowable Values:**<br /><br />36 char max                                                                                                                |
| velocity\_controls<br /><br />array<br /><br />Optional               | The velocity controls enabled while in Commando Mode.<br /><br />**Allowable Values:**<br /><br />One or more existing velocity control tokens.                                                                                                                                                                   |
| auth\_controls<br /><br />array<br /><br />Optional                   | The authorization controls enabled while in Commando Mode.<br /><br />**Allowable Values:**<br /><br />One or more existing authorization control tokens.                                                                                                                                                         |
| ignore\_card\_suspended\_state<br /><br />boolean<br /><br />Optional | If `true`, transactions conducted while in Commando Mode proceed even when the card is suspended; if `false`, transactions conducted while Commando Mode is enabled are declined if the card is suspended.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`false` |

<h3 id="_the_real_time_standin_criteria_object_2">
  The real\_time\_standin\_criteria object
</h3>

| Fields                                                              | Description                                                                                                                                                                                                                                                                  |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| enabled<br /><br />boolean<br /><br />Optional                      | If `true`, Commando Mode is automatically enabled by events defined in the `real_time_standin_criteria` object; if `false`, Auto Commando Mode is not enabled.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`false`        |
| include\_connection\_errors<br /><br />boolean<br /><br />Optional  | If `true`, a non-timeout connection error automatically enables Commando Mode when `real_time_standin_criteria.enabled` is also `true`.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`true`                                |
| include\_response\_timeouts<br /><br />boolean<br /><br />Optional  | If `true`, a gateway response slower than 3000ms automatically enables Commando Mode when `real_time_standin_criteria.enabled` is also `true`.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`true`                         |
| include\_application\_errors<br /><br />boolean<br /><br />Optional | If `true`, an application error (any non-connection, non-timeout error) automatically enables Commando Mode when `real_time_standin_criteria.enabled` is also `true`.<br /><br />**Allowable Values:**<br /><br />`true`, `false`<br /><br />**Default value:**<br />`false` |

<h3 id="_the_current_state_object_response_2">
  The current\_state object (response)
</h3>

The Marqeta platform returns the `current_state` object of the Commando Mode control set in the response.

| Name              | Description                                                                          | Allowable Values         |
| ----------------- | ------------------------------------------------------------------------------------ | ------------------------ |
| commando\_enabled | Indicates whether Commando Mode is enabled.                                          | `true`, `false`          |
| reason            | Describes the reason the current state of the Commando Mode control set was changed. |                          |
| channel           | The mechanism that changed the Commando Mode control set’s state.                    | `API`, `SYSTEM`, `ADMIN` |
| user\_name        | Identifies the user who changed the Commando Mode control set’s state.               |                          |

<h3 id="_sample_request_body_2">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "commando_mode_1",
  "program_gateway_funding_source_token": "pgm_gateway_src_1",
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls": [
      "vel_control_2"
    ]
  }
}
```

<h3 id="_sample_response_body_2">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "commando_mode_1",
  "program_gateway_funding_source_token": "pgm_gateway_src_1",
  "current_state": {
    "commando_enabled": false,
    "reason": "New commandomode created",
    "channel": "SYSTEM"
  },
  "commando_mode_enables": {
    "program_funding_source": "pgm_funding_src_1",
    "velocity_controls": [
      "vel_control_2"
    ]
  },
  "created_time": "2021-02-14T18:48:10Z",
  "last_modified_time": "2021-02-14T18:48:10Z"
}
```

<h2 id="_create_commando_mode_transition">
  Create Commando Mode transition
</h2>

**Action:** `POST`\
**Endpoint:** `/commandomodes/transitions`

{/* <EndpointCard
title="Create Commando Mode transition"
path="/commandomodes/transitions"
method="post"
/> */}

Create a Commando Mode transition.

A Commando Mode transition enables/disables a given Commando Mode control set. You must have an existing Commando Mode control set to enable/disable Commando Mode.

<h3 id="_body_field_details_3">
  Body field details
</h3>

| Fields                                                      | Description                                                                                                                                                                                                                                                                                                                                                                                            |
| ----------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| token<br /><br />string<br /><br />Optional                 | The unique identifier of the Commando Mode transition.<br /><br />If you do not include a token, the system will generate one automatically. This token is necessary for use in other API calls, so we recommend that rather than let the system generate one, you use a simple string that is easy to remember. This value cannot be updated.<br /><br />**Allowable Values:**<br /><br />36 char max |
| commando\_mode\_token<br /><br />string<br /><br />Required | The unique identifier of the Commando Mode control set to transition.<br /><br />**Allowable Values:**<br /><br />Existing Commando Mode token.                                                                                                                                                                                                                                                        |
| transition<br /><br />object<br /><br />Required            | Determines the state of the associated Commando Mode control set.<br /><br />**Allowable Values:**<br /><br />Existing `transition` object.                                                                                                                                                                                                                                                            |

<h3 id="_the_transition_object">
  The transition object
</h3>

| Fields                                                   | Description                                                                                                                                                                             |
| -------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| commando\_enabled<br /><br />boolean<br /><br />Required | Indicates whether Commando Mode is enabled.<br /><br />**Allowable Values:**<br /><br />`true`, `false`                                                                                 |
| reason<br /><br />string<br /><br />Optional             | Describes the reason the current state of the Commando Mode control set was changed.<br /><br />**Allowable Values:**<br /><br />512 char max<br /><br />**Default value:**<br />`null` |
| channel<br /><br />string<br /><br />Required            | The mechanism that changed the Commando Mode control set’s state.<br /><br />**Allowable Values:**<br /><br />`API`, `SYSTEM`, `ADMIN`                                                  |
| user\_name<br /><br />string<br /><br />Optional         | Identifies the user who changed the Commando Mode control set’s state.<br /><br />**Allowable Values:**<br /><br />256 char max<br /><br />**Default value:**<br />`null`               |

<h3 id="_sample_request_body_3">
  Sample request body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "commando_mode_1_transition",
  "commando_mode_token": "commando_mode_1",
  "transition": {
    "commando_enabled": "true",
    "reason": "Lost connection",
    "channel": "API",
    "user_name": "Bob"
  }
}
```

<h3 id="_sample_response_body_3">
  Sample response body
</h3>

```json JSON lines wrap theme={null}
{
  "token": "commando_mode_1_transition",
  "commando_mode_token": "commando_mode_1",
  "transition": {
    "commando_enabled": "true",
    "reason": "Lost connection",
    "channel": "API",
    "user_name": "Bob"
  },
  "created_time": "2021-02-14T18:48:10Z"
}
```


## Related topics

- [Commando Mode](/docs/core-api/commando-mode.md)
- [Error Handling in Europe](/docs/developer-guides/mq-eu-error-handling.md)
- [Control Center in the Marqeta Dashboard](/docs/developer-guides/control-center-dashboard.md)
- [Errors](/docs/core-api/errors.md)
- [Release Notes](/docs/developer-guides/release-notes-2025.md)
