Create Workflow Credential
POST/api/automation/workflow-credentials
Creates a new workflow credential. Secret fields listed in CredentialTypeEnum::secretFields() are redacted in the response fields object.
Validation (StoreWorkflowCredentialRequest):
name— required, string, max 128type— required, string, must be a validCredentialTypeEnum:basic_auth,api_key,bearer_token,ftp,sftp,google_oauth,webhook_tokendata— required, array (shape varies by type)
Expected data shape per type:
basic_auth:{ username, password }api_key:{ key, header?: "X-API-Key" }bearer_token:{ token }ftp/sftp:{ host, port, username, password?, privateKey?, passphrase? }google_oauth:{ accessToken, refreshToken, clientId, clientSecret }webhook_token:{ token }
Response: 201 Created with WorkflowCredentialResource:
{
"data": {
"uuid": "...",
"name": "...",
"type": "sftp",
"typeLabel": "SFTP",
"fields": { "host": "...", "port": 22, "username": "...", "password": "********", "privateKey": "********", "passphrase": "********" },
"createdBy": { "id": 1, "name": "Jane Doe" },
"createdAt": "2026-04-16T12:34:56+00:00",
"updatedAt": "2026-04-16T12:34:56+00:00"
}
}
Route name: automation.credentials.store
Request
Responses
- 200
Successful response