---
title: "Upsert integration"
method: POST
path: "/api/v1/integrations"
tags: ["Integrations"]
---

# Upsert integration

`POST /api/v1/integrations`

## Request

- Base URL: `https://api.intheloop.io`
- URL: `https://api.intheloop.io/api/v1/integrations`
- Auth: API key in header `Authorization`

## Headers

- `Authorization` string
- `X-Impersonate-User` string

## Request body

- Integration: Integration type helper class
  - `id` string: Resource id
  - `name` string: Resource name or title
  - `revision` string: Resource revision
  - `clientId` string: Resource client id
  - `$type` string, required
  - `integrationType` 'Grammarly' | 'Custom' | 'OpenAI' | 'Insights' | 'HubSpot', required: Possible Integration Types
  - `apiKey` string: APIKey
  - `iFrameURL` string: IframeURL
  - `pinned` boolean: Pinned to sidebar
  - `disconnected` boolean: Disconnected

## Response `200`

OK

- Integration: Integration type helper class
  - `id` string: Resource id
  - `name` string: Resource name or title
  - `revision` string: Resource revision
  - `clientId` string: Resource client id
  - `$type` string, required
  - `integrationType` 'Grammarly' | 'Custom' | 'OpenAI' | 'Insights' | 'HubSpot', required: Possible Integration Types
  - `apiKey` string: APIKey
  - `iFrameURL` string: IframeURL
  - `pinned` boolean: Pinned to sidebar
  - `disconnected` boolean: Disconnected

## Other responses

- `400`: Bad request. Check fields message and error code from response body for additional information.
- `401`: Unauthorized request. Check fields message and error code from response body for additional information.
- `429`: Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
- `451`: Unavailable because account is not verified.

---

[API](https://skmtc.dev/intheloop/apis/loop-api.md) - [All operations](https://skmtc.dev/intheloop/apis/loop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/intheloop/apis/loop-api/revisions/0892c5ba0787?raw)
