---
title: "POST /v1/app-connections/"
method: POST
path: "/v1/app-connections/"
tags: ["app-connections"]
---

# POST /v1/app-connections/

`POST /v1/app-connections/`

Upsert an app connection based on the app name

## Request body

- union
  - object — Secret Text
    - `name` string, required
    - `pieceName` string, required
    - `projectId` string, required
    - `type` 'SECRET_TEXT', required
    - `value` object, required
      - `type` 'SECRET_TEXT', required
      - `secret_text` string, required
  - object — OAuth2
    - `name` string, required
    - `pieceName` string, required
    - `projectId` string, required
    - `type` 'OAUTH2', required
    - `value` object, required
      - `client_id` string, required
      - `client_secret` string, required
      - `grant_type` union
        - 'authorization_code'
        - 'client_credentials'
      - `token_url` string, required
      - `props` object
      - `scope` string, required
      - `code` string, required
      - `authorization_method` union
        - 'HEADER'
        - 'BODY'
      - `code_challenge` string
      - `redirect_url` string, required
      - `type` 'OAUTH2', required
  - object — Cloud OAuth2
    - `name` string, required
    - `pieceName` string, required
    - `projectId` string, required
    - `type` 'CLOUD_OAUTH2', required
    - `value` object, required
      - `client_id` string, required
      - `authorization_method` union
        - 'HEADER'
        - 'BODY'
      - `code` string, required
      - `code_challenge` string
      - `props` object
      - `scope` string, required
      - `type` 'CLOUD_OAUTH2', required
      - `token_url` string
  - object — Platform OAuth2
    - `name` string, required
    - `pieceName` string, required
    - `projectId` string, required
    - `type` 'PLATFORM_OAUTH2', required
    - `value` object, required
      - `client_id` string, required
      - `authorization_method` union
        - 'HEADER'
        - 'BODY'
      - `code` string, required
      - `code_challenge` string
      - `props` object
      - `scope` string, required
      - `type` 'PLATFORM_OAUTH2', required
      - `token_url` string
      - `redirect_url` string, required
  - object — Basic Auth
    - `name` string, required
    - `pieceName` string, required
    - `projectId` string, required
    - `type` 'BASIC_AUTH', required
    - `value` object, required
      - `username` string, required
      - `password` string, required
      - `type` 'BASIC_AUTH', required
  - object — Custom Auth
    - `name` string, required
    - `pieceName` string, required
    - `projectId` string, required
    - `type` 'CUSTOM_AUTH', required
    - `value` object, required
      - `type` 'CUSTOM_AUTH', required
      - `props` object, required

## Response `200`

Default Response

---

[API](https://skmtc.net/tookey-io/apis/activepieces-documentation.md) · [All operations](https://skmtc.net/tookey-io/apis/activepieces-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tookey-io/activepieces-documentation/versions/47ba6f96910d/schema)
