Update an existing credential. This allows you to change the credential name or update the stored values.
Path Parameters
The unique identifier of the credential to update
Request Body
Updated user-defined name for the credential
Updated credential fields and values. Structure varies by credential type.
Response
Unique identifier for the credential
Updated name for the credential
Updated encrypted credential data
When the credential was last updated
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
Bad Request - Invalid credential format
Unauthorized - Invalid or missing API key
Forbidden - Insufficient permissions to update credentials
Not Found - Credential with specified ID not found or workspace not found
Precondition Failed - Missing required ID parameter or request body
Internal Server Error - Error updating credential