---
isPublished: true
knowledgeIndex: false
hidden: true
noindex: true
template: "page.peb"
title: "AI API Key Action Flow Reference"
description: "Inputs, outputs, transaction effects and troubleshooting for AI API Key Action in Salesforce Flow."
contentType: "reference"
audience: "admin,developer"
---

# AI API Key Action

Update the OpenAI API key configured for DialogueOne.
The namespaced Apex action name is `rooms__AIKeyAction`.

**Reference status: Administrative.** Review the supported behavior and limitations below.

## Transaction summary

| Effect | Behavior |
| --- | --- |
| API callout | Yes. The action waits for an API response. |
| Record writes | Requests a credential-setting change. It does not directly insert, update or delete Salesforce records. |
| Background work | No queued work is started. |
| Platform event | The action does not directly publish a platform event. |
| Email | The action does not send email. |

Use this administrative action only in an approved credential-management Flow. Do not place the key in a public screen, email or diagnostic record. Treat the returned API Key as sensitive.

## Inputs

Required describes the Flow input setting. Additional conditions are stated in the guidance.

| API name | Flow label | Required | Default or guidance |
| --- | --- | --- | --- |
| `key` | OpenAI API Key | No | The replacement OpenAI API key. Treat it as a secret. |

## Outputs

| API name | Flow label | Meaning |
| --- | --- | --- |
| `success` | Success | Whether the action reported success. Check this value before continuing. |
| `message` | Message | Result details or an error. Read this value with Success. |
| `key` | API Key | Sensitive API-key response. Do not display or log it. |

## Configure the Flow

1. Confirm the intended credential change and administrative action access.
2. Supply the new OpenAI API Key through the approved secure input process.
3. Check Success and Message. Do not display the returned API Key.

Confirm the Flow user's action access and the required access to the referenced records.
Review the configured Salesforce API connection user's access when the action makes a callout.
Connect the action's Fault path.

## Troubleshooting

**You have uncommitted work pending.** Check earlier record writes, queued work and other actions in the same transaction.
Review the [transaction settings and debugger limits](/content/build/flows/index.md#resolve-uncommitted-work-pending).

**The update fails or is uncertain.** Review Message without copying credentials into logs. Verify the configured credential before repeating the change.

Confirm that the action and its fields exist in the installed package.
See the [Flow action index](/content/build/flows/index.md) for related actions and transaction guidance.
