---
title: "Create API key connection"
method: POST
path: "/connections/{provider}/api-key"
tags: ["Connections"]
---

# Create API key connection

`POST /connections/{provider}/api-key`

## Request

- Base URL: `https://workflow.loopfour.ai/api/v1`
- URL: `https://workflow.loopfour.ai/api/v1/connections/{provider}/api-key`
- Auth: API key in header `x-api-key`

Creates or updates a connection using API key authentication.

## Path parameters

- `provider` 'rillet' | 'resend' | 'airwallex' | 'odoo', required

## Request body

- object
  - `apiKey` string, required: The API key.
  - `clientId` string: Client ID (Airwallex only).
  - `externalAccountId` string: Account ID (Airwallex only).
  - `domain` string: Instance domain (Odoo only).
  - `connectionId` string, uuid: Update existing connection.
  - `name` string: Display name.

## Response `200`

Connection updated

- object
  - `success` unknown
  - `data` Connection
    - `id` string
    - `provider` string
    - `name` string, nullable
    - `status` 'active' | 'error' | 'disconnected' | 'pending' | 'expired' | 'abandoned'
    - `externalAccountId` string, nullable
    - `isDefault` boolean
    - `authVariant` string, nullable
    - `lastSyncedAt` string, date-time, nullable
    - `createdAt` string, date-time
    - `updatedAt` string, date-time

## Other responses

- `201`: Connection created
- `400`: Bad request — invalid parameters or request body.
- `401`: Missing or invalid API key.
- `403`: Forbidden — insufficient permissions for this resource.
- `404`: Resource not found.

---

[API](https://skmtc.dev/loopfour/apis/loopfour-workflows-api.md) - [All operations](https://skmtc.dev/loopfour/apis/loopfour-workflows-api/llms.txt) - [OpenAPI document](https://skmtc.dev/loopfour/apis/loopfour-workflows-api/revisions/872822a3af00?raw)
