Skip to main content
PUT
/
api
/
v1
/
credentials
/
{id}
Update Credential
curl --request PUT \
  --url https://api.example.com/api/v1/credentials/{id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "plainDataObj": {}
}
'
{
  "400": {},
  "401": {},
  "403": {},
  "404": {},
  "412": {},
  "500": {},
  "id": "<string>",
  "name": "<string>",
  "credentialName": "<string>",
  "encryptedData": "<string>",
  "updatedDate": {},
  "workspaceId": "<string>"
}
Update an existing credential. This allows you to change the credential name or update the stored values.

Path Parameters

id
string
required
The unique identifier of the credential to update

Request Body

name
string
Updated user-defined name for the credential
plainDataObj
object
Updated credential fields and values. Structure varies by credential type.

Response

id
string
Unique identifier for the credential
name
string
Updated name for the credential
credentialName
string
Type of credential
encryptedData
string
Updated encrypted credential data
updatedDate
timestamp
When the credential was last updated
workspaceId
string
ID of the workspace containing this credential

Example Request - Update Name

curl -X PUT \
  'https://your-flowise-instance.com/api/v1/credentials/cred-789' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "OpenAI Production Key"
  }'

Example Request - Update Values

curl -X PUT \
  'https://your-flowise-instance.com/api/v1/credentials/cred-789' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "OpenAI Production Key",
    "plainDataObj": {
      "openAIApiKey": "sk-new-key-..."
    }
  }'

Example Response

{
  "id": "cred-789",
  "name": "OpenAI Production Key",
  "credentialName": "openAIApi",
  "encryptedData": "encrypted_string_here",
  "createdDate": "2024-01-20T16:00:00Z",
  "updatedDate": "2024-01-20T17:30:00Z",
  "workspaceId": "workspace-123"
}

Partial Updates

You can update just the name, just the values, or both. The API will merge your changes with the existing credential data.

Impact on Flows

Updating a credential will affect all flows that use it:
  • Changes take effect immediately
  • Active flows will use the new credential values
  • Test your flows after updating credentials to ensure they work correctly

Error Responses

400
error
Bad Request - Invalid credential format
401
error
Unauthorized - Invalid or missing API key
403
error
Forbidden - Insufficient permissions to update credentials
404
error
Not Found - Credential with specified ID not found or workspace not found
412
error
Precondition Failed - Missing required ID parameter or request body
500
error
Internal Server Error - Error updating credential

Build docs developers (and LLMs) love