Trying to create a Postgres Credential using the API / What is the Ignore SSL Issues (Insecure) option?

Hello,

I wrote a script to create and sync secrets using the n8n api. I’m syncing a postgres credential. I can’t seem to find how to enable the Ignore SSL Issues (Insecure) from the api. Can you help please.

  • n8n version: lastest
  • Database (default: SQLite): postgres
  • n8n EXECUTIONS_PROCESS setting (default: own, main): own
  • Running n8n via (Docker, npm, n8n cloud, desktop app): kubernetes

Hi @arnaud-ch I can help you with that, here’s how to include it in your API call:

When creating or updating a Postgres credential via the n8n API, you need to include the SSL configuration in the credential data. The field you’re looking for is typically:

{
  "name": "Postgres Credential Name",
  "type": "postgres",
  "data": {
    "host": "your-host",
    "database": "your-database",
    "user": "your-user",
    "password": "your-password",
    "port": 5432,
    "ssl": "disable",
    "allowUnauthorizedCerts": true
  }
}

Key fields for SSL:

  • "ssl": "disable" - Disables SSL entirely

  • "allowUnauthorizedCerts": true - This is the equivalent of “Ignore SSL Issues” checkbox

If you want SSL enabled but ignore certificate validation:

{
  "ssl": "allow",
  "allowUnauthorizedCerts": true
}

Does this help?

1 Like

Thank you, it worked like a charm

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.