# Connectors

Source: https://docs.autessa.com/docs/api/poweruser/connectors

> Poweruser API endpoints to list, inspect, create, share, connect, and manage your company's external connectors, plus family-specific connector actions.

# Connectors

The Connectors API manages your company's external connectors — Gmail, Outlook, QuickBooks, Acumatica, and more — through a single set of endpoints. Instead of a separate path per integration, you select the connector type in the request body and the platform routes the call to the matching connector utility. Beyond listing and inspection, you can delete, share, and transfer connectors, obtain OAuth authorization URLs to connect or reconnect accounts, create direct-credential connectors, and call family-specific connector actions.

All endpoints are `POST` requests under the base path `https://api.autessa.com/autessa_poweruser/connectors` and authenticate with a poweruser key in the `Authorization` header, formatted as `pwrusr:{key_id}:{secret}`.

---

## Connector types

Every request selects a connector type with the `connectorType` field. The value is one of the enum names below, which also determine how the underlying connector authenticates with the external service:

| `connectorType` | Auth type |
| --- | --- |
| `QUICKBOOKS` | `OAUTH` |
| `GMAIL` | `OAUTH` |
| `GOOGLE_CALENDAR` | `OAUTH` |
| `GOOGLE_ANALYTICS` | `OAUTH` |
| `BOX` | `OAUTH` |
| `LINKEDIN` | `OAUTH` |
| `TWITTER` | `OAUTH` |
| `FACEBOOK` | `OAUTH` |
| `INSTAGRAM` | `OAUTH` |
| `THREADS` | `OAUTH` |
| `YOUTUBE` | `OAUTH` |
| `TIKTOK` | `OAUTH` |
| `ACUMATICA` | `OAUTH` |
| `ZOHO_CRM` | `OAUTH` |
| `OUTLOOK` | `OAUTH` |
| `OUTLOOK_CALENDAR` | `OAUTH` |
| `NOTION` | `OAUTH` |
| `MAILCHIMP` | `OAUTH_NO_REFRESH` |
| `GHOST` | `API_KEY` |
| `BEEHIIV` | `API_KEY` |
| `BLUESKY` | `USERNAME_PASSWORD` |
| `MEETING_BOT` | `OAUTH` |
| `AUTESSA_PAYMENTS` | `OAUTH_NO_REFRESH` |

Auth types: `OAUTH` is standard OAuth2 with access and refresh tokens, `OAUTH_NO_REFRESH` is OAuth with an access token only (e.g. Mailchimp), `API_KEY` is a single API key (e.g. Ghost), and `USERNAME_PASSWORD` is a handle plus app password that authenticates at runtime (e.g. Bluesky).

A connector type is served here as soon as its utility registers with the platform's connector registry. `MEETING_BOT` and `AUTESSA_PAYMENTS` do not yet have a registered utility: `/all` and `/get` requests for those two types currently fail with a server error, and every other endpoint returns a `422` with `errors: ["Connector type MEETING_BOT is not supported via the poweruser API"]`.

---

## Capabilities by connector family

Every registered connector type supports `/all` and `/get`. The management, OAuth, and direct-credential endpoints are opt-in per family:

| `connectorType` | `/delete` | `/share` | `/get-sharing-details` | `/transfer-ownership` | `/connect-url`, `/reconnect-url` | `/create` | `/test-connection` |
| --- | --- | --- | --- | --- | --- | --- | --- |
| `QUICKBOOKS` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `GMAIL` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `GOOGLE_CALENDAR` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `GOOGLE_ANALYTICS` | ✓ | ✓ | — | — | ✓ | — | — |
| `BOX` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `LINKEDIN` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `TWITTER` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `FACEBOOK` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `INSTAGRAM` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `THREADS` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `YOUTUBE` | ✓ | — | — | — | ✓ | — | — |
| `TIKTOK` | ✓ | — | — | — | ✓ | — | — |
| `ACUMATICA` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `ZOHO_CRM` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `OUTLOOK` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `OUTLOOK_CALENDAR` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `NOTION` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `MAILCHIMP` | ✓ | ✓ | ✓ | ✓ | ✓ | — | — |
| `GHOST` | ✓ | ✓ | ✓ | ✓ | — | ✓ | ✓ |
| `BEEHIIV` | ✓ | — | — | — | — | ✓ | ✓ |
| `BLUESKY` | ✓ | ✓ | ✓ | ✓ | — | ✓ | — |

Calling an operation a family does not support returns HTTP `422` with an explanatory message in the body:

```json title="422 Unprocessable Entity"
{
  "errors": [
    "Operation 'share' is not supported for connector type TIKTOK."
  ]
}
```

> Updating an existing connector's configuration (rename, activate/deactivate, rotate an API key) is not available through the Poweruser API — update payloads differ per family, so connector updates remain UI-only in the builder.

---

## List Connectors **POST** `/all`

Lists all active connectors of the given type in your company that the calling user can see. Connectors the caller has no access level on are filtered out of the result.

### Request Body

- `connectorType` (string, required) — The connector type to list, e.g. `GMAIL`. One of the enum values in [Connector types](#connector-types). Omitting it returns `errors: ["connectorType is required"]`.
- `connectorId` (string) — Ignored by this endpoint. Only used by `/get`.

### Response

- `connectors` (array<object>) — The visible connectors of the requested type. Each element is a connector object (see below).
- `errors` (array<string>) — Error messages, if any occurred. Absent on success.

#### Connector object

Every connector type shares this common set of fields:

- `connectorId` (string) — Unique ID of the connector.
- `companyId` (string) — The company the connector belongs to.
- `ownerId` (string) — The user who owns the connector.
- `connectorName` (string) — Display name of the connector.
- `ownerType` (string) — The owner type of the connector.
- `sharingLevel` (string) — How the connector is shared: `PRIVATE`, `SPECIFIC_MEMBER`, or `COMPANY`.
- `companyPermissionLevel` (string) — The access level granted company-wide when shared at the `COMPANY` level: `READ`, `WRITE`, `PUBLISH`, or `ADMIN`.
- `isActive` (boolean) — Whether the connector is active.
- `createdAt` (string) — When the connector was created (ISO-8601, e.g. `2026-05-04T18:22:10`).
- `updatedAt` (string) — When the connector was last updated (ISO-8601).
- `usersWithAccess` (array<object>) — Users the connector is shared with. Each entry has `userEmail` (string), `userId` (string), and `accessLevel` (string).
- `currentUserAccessLevel` (string) — The calling user's effective access level on the connector: `READ`, `WRITE`, `PUBLISH`, or `ADMIN`.

On top of these, each connector type adds its own fields. For example, `GMAIL` connectors include the connected `gmailAccountEmail` and the `availableLabels` on the mailbox, while `ACUMATICA` connectors include the instance `hostUrl`, `databaseIdentifier`, `accountEmail`, `accountName`, and `tokenExpiresAt`.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/all \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "GMAIL"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/all',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'GMAIL'
    })
  }
);

const data = await response.json();
console.log(data.connectors);
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/all",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={"connectorType": "GMAIL"},
)

data = response.json()
print(data["connectors"])
```

```json title="JSON"
{
  "connectors": [
    {
      "connectorId": "V1StGXR8Z5",
      "companyId": "kTn4vB2p9Q",
      "ownerId": "aB3xQ9LmZ2",
      "connectorName": "Support Inbox",
      "ownerType": "USER",
      "gmailAccountEmail": "support@example.com",
      "sharingLevel": "COMPANY",
      "companyPermissionLevel": "READ",
      "isActive": true,
      "createdAt": "2026-05-04T18:22:10",
      "updatedAt": "2026-06-12T09:41:23",
      "usersWithAccess": [
        {
          "userEmail": "ops@example.com",
          "userId": "pQ7wY4RdX1",
          "accessLevel": "WRITE"
        }
      ],
      "currentUserAccessLevel": "ADMIN",
      "availableLabels": [
        {
          "labelId": "Label_12",
          "labelName": "Tickets",
          "labelType": "user",
          "isEnabled": true,
          "currentUserAccessLevel": "ADMIN",
          "sharingLevel": "COMPANY",
          "companyPermissionLevel": "READ"
        }
      ]
    }
  ]
}
```

---

## Get Connector **POST** `/get`

Fetches a single connector by ID. The connector must belong to your company and the calling user must have at least `READ` access to it; otherwise the response carries an error instead of the connector.

### Request Body

- `connectorType` (string, required) — The connector's type, e.g. `ACUMATICA`. One of the enum values in [Connector types](#connector-types). Omitting it returns `errors: ["connectorType is required"]`.
- `connectorId` (string, required) — The ID of the connector to fetch. Omitting it returns `errors: ["connectorId is required"]`.

### Response

- `connector` (object) — The connector object — the same shape as the elements of `connectors` in [List Connectors](#connector-object): the common fields (`connectorId`, `companyId`, `ownerId`, `connectorName`, `ownerType`, `sharingLevel`, `companyPermissionLevel`, `isActive`, `createdAt`, `updatedAt`, `usersWithAccess`, `currentUserAccessLevel`) plus the type-specific fields for the requested `connectorType`.
- `errors` (array<string>) — Error messages, if any occurred (e.g. `"Connector not found"`). Absent on success.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/get \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "ACUMATICA",
    "connectorId": "mN8cE5TvW3"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/get',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'ACUMATICA',
      connectorId: 'mN8cE5TvW3'
    })
  }
);

const data = await response.json();
console.log(data.connector);
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/get",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "ACUMATICA",
        "connectorId": "mN8cE5TvW3",
    },
)

data = response.json()
print(data["connector"])
```

```json title="JSON"
{
  "connector": {
    "connectorId": "mN8cE5TvW3",
    "companyId": "kTn4vB2p9Q",
    "ownerId": "aB3xQ9LmZ2",
    "connectorName": "Production ERP",
    "ownerType": "USER",
    "hostUrl": "https://erp.example.com",
    "databaseIdentifier": "CompanyDB",
    "accountEmail": "erp-admin@example.com",
    "accountName": "ERP Admin",
    "sharingLevel": "SPECIFIC_MEMBER",
    "companyPermissionLevel": "READ",
    "isActive": true,
    "tokenExpiresAt": "2026-07-01T12:00:00",
    "createdAt": "2026-04-18T14:03:55",
    "updatedAt": "2026-06-28T08:17:42",
    "usersWithAccess": [
      {
        "userEmail": "finance@example.com",
        "userId": "pQ7wY4RdX1",
        "accessLevel": "READ"
      }
    ],
    "currentUserAccessLevel": "WRITE"
  }
}
```

---

## Delete Connector **POST** `/delete`

Permanently deletes a connector. Supported by every registered connector family. Deletion is enforced server-side: deleting a connector you don't own returns a permission error such as `"Access denied: Only the owner can delete this connector"`.

### Request Body

- `connectorType` (string, required) — The connector's type. Omitting it returns a `422` with `errors: ["connectorType is required"]`.
- `connectorId` (string, required) — The connector to delete. Omitting it returns a `422` with `errors: ["connectorId is required"]`.

### Response

- `message` (string) — Confirmation message, e.g. `"Connector deleted successfully"`. `GOOGLE_ANALYTICS` returns a boolean `deleted` and `ACUMATICA` a boolean `success` instead of `message`.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/delete \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "GMAIL",
    "connectorId": "V1StGXR8Z5"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/delete',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'GMAIL',
      connectorId: 'V1StGXR8Z5'
    })
  }
);

const data = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/delete",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "GMAIL",
        "connectorId": "V1StGXR8Z5",
    },
)

data = response.json()
```

```json title="JSON"
{
  "message": "Connector deleted successfully"
}
```

---

## Share Connector **POST** `/share`

Sets the connector's sharing level and per-user grants in one call. Requires `ADMIN` access on the connector. Not supported for `BEEHIIV`, `TIKTOK`, and `YOUTUBE` (returns a `422` — see [Capabilities by connector family](#capabilities-by-connector-family)).

> This endpoint changes the same sharing as the [Share dialog](/docs/guide/platform/sharing.md). Sharing with `COMPANY` adds a company-wide grant and keeps everyone already shared individually at their own level. People get the highest level from any grant that covers them.

### Request Body

- `connectorType` (string, required) — The connector's type.
- `connectorId` (string, required) — The connector to share.
- `level` (string) — Sharing level: `PRIVATE`, `SPECIFIC_MEMBER`, or `COMPANY`.
- `accessLevel` (string) — When `level` is `COMPANY`, the access level every company member gets: `READ`, `WRITE`, `PUBLISH`, or `ADMIN`.
- `usersToAdd` (array<object>) — Users to grant access. Each entry: `userEmail` or `userId` (string), plus `accessLevel`.
- `usersToRemove` (array<object>) — Users whose access to revoke, same entry shape.

### Response

- `level` (string) — The resulting sharing level.
- `accessLevel` (string) — The resulting company-wide access level, when shared with the company.
- `usersWithAccess` (array<object>) — The resulting per-user grants (`userEmail`, `userId`, `accessLevel`).
- `errors` (array<string>) — Error messages, if any occurred.

`GOOGLE_ANALYTICS` and `ACUMATICA` return the updated `connector` object instead of the `level`/`accessLevel`/`usersWithAccess` triple.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/share \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "GMAIL",
    "connectorId": "V1StGXR8Z5",
    "level": "SPECIFIC_MEMBER",
    "usersToAdd": [
      { "userEmail": "ops@example.com", "accessLevel": "WRITE" }
    ],
    "usersToRemove": []
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/share',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'GMAIL',
      connectorId: 'V1StGXR8Z5',
      level: 'SPECIFIC_MEMBER',
      usersToAdd: [
        { userEmail: 'ops@example.com', accessLevel: 'WRITE' }
      ],
      usersToRemove: []
    })
  }
);

const data = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/share",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "GMAIL",
        "connectorId": "V1StGXR8Z5",
        "level": "SPECIFIC_MEMBER",
        "usersToAdd": [
            {"userEmail": "ops@example.com", "accessLevel": "WRITE"}
        ],
        "usersToRemove": [],
    },
)

data = response.json()
```

```json title="JSON"
{
  "level": "SPECIFIC_MEMBER",
  "usersWithAccess": [
    {
      "userEmail": "ops@example.com",
      "userId": "pQ7wY4RdX1",
      "accessLevel": "WRITE"
    }
  ]
}
```

---

## Get Sharing Details **POST** `/get-sharing-details`

Returns the connector's current sharing configuration and the calling user's own access level. Not supported for `BEEHIIV`, `GOOGLE_ANALYTICS`, `TIKTOK`, and `YOUTUBE` (returns a `422`).

### Request Body

- `connectorType` (string, required) — The connector's type.
- `connectorId` (string, required) — The connector to inspect.

### Response

- `sharingLevel` (string) — `PRIVATE`, `SPECIFIC_MEMBER`, or `COMPANY`.
- `companyPermissionLevel` (string) — Access level granted company-wide, when `sharingLevel` is `COMPANY`.
- `sharedWith` (array<object>) — Per-user grants: `userEmail`, `userId`, `accessLevel`.
- `userAccessLevel` (string) — The calling user's effective access level.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/get-sharing-details \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "GMAIL",
    "connectorId": "V1StGXR8Z5"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/get-sharing-details',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'GMAIL',
      connectorId: 'V1StGXR8Z5'
    })
  }
);

const data = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/get-sharing-details",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "GMAIL",
        "connectorId": "V1StGXR8Z5",
    },
)

data = response.json()
```

```json title="JSON"
{
  "sharingLevel": "COMPANY",
  "companyPermissionLevel": "READ",
  "sharedWith": [],
  "userAccessLevel": "ADMIN"
}
```

---

## Transfer Ownership **POST** `/transfer-ownership`

Transfers the connector to another member of the company. Only the **current owner** may call this, and the new owner must be a member of the company who already has some access to the connector (share it with them first). Not supported for `BEEHIIV`, `GOOGLE_ANALYTICS`, `TIKTOK`, and `YOUTUBE` (returns a `422`).

### Request Body

- `connectorType` (string, required) — The connector's type.
- `connectorId` (string, required) — The connector to transfer.
- `newOwnerId` (string, required) — User ID of the new owner. Omitting it returns a `422` with `errors: ["newOwnerId is required"]`. A user outside the company returns `"New owner does not exist"`, and one without access returns `"New owner does not have access to connector yet."`.

### Response

- `message` (string) — Confirmation message.
- `newOwnerId` (string) — The user who now owns the connector. `ACUMATICA` returns the updated `connector` object instead of `message`/`newOwnerId`.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/transfer-ownership \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "GMAIL",
    "connectorId": "V1StGXR8Z5",
    "newOwnerId": "uB7nT2wQ9k"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/transfer-ownership',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'GMAIL',
      connectorId: 'V1StGXR8Z5',
      newOwnerId: 'uB7nT2wQ9k'
    })
  }
);

const data = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/transfer-ownership",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "GMAIL",
        "connectorId": "V1StGXR8Z5",
        "newOwnerId": "uB7nT2wQ9k",
    },
)

data = response.json()
```

```json title="JSON"
{
  "message": "Ownership transferred successfully",
  "newOwnerId": "uB7nT2wQ9k"
}
```

---

## Get Connect URL **POST** `/connect-url`

Returns the external provider's authorization URL to connect a **new** OAuth connector. Only the URL discovery happens through the API — the OAuth dance itself stays in the browser:

1. Call `/connect-url` with the `connectorType` (and any family-specific fields below).
2. Open the returned `authorizationUrl` in a browser — typically by sending it to the user whose account should be connected.
3. The user signs in and grants consent. The provider redirects to Autessa's OAuth callback, which stores the tokens server-side — there is nothing further for you to call.
4. Poll `/all` for the connector type until the new connector appears with `isActive: true`.

The OAuth state embeds the poweruser key's linked user and company, so the resulting connector is owned by the key's linked user.

Supported by every OAuth family. The direct-credential families (`BEEHIIV`, `GHOST`, `BLUESKY`) return a `422` — use [`/create`](#create-connector-) for those instead.

### Request Body

- `connectorType` (string, required) — The connector type to connect, e.g. `GMAIL`.
- `connectorName` (string) — Display name for the new connector. Applies to all families.
- `hostUrl` (string) — `ACUMATICA` only — the Acumatica instance URL.
- `databaseIdentifier` (string) — `ACUMATICA` only — the tenant/database identifier.
- `clientId` (string) — `ACUMATICA` only — the OAuth client ID of the connected application registered on the instance.
- `clientSecret` (string) — `ACUMATICA` only — the OAuth client secret of the connected application.
- `loginMethod` (string) — `INSTAGRAM` only — `FACEBOOK_LOGIN` (default) or `INSTAGRAM_LOGIN`.

### Response

- `authorizationUrl` (string) — The provider authorization URL to open in a browser.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/connect-url \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "GMAIL",
    "connectorName": "Support Inbox"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/connect-url',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'GMAIL',
      connectorName: 'Support Inbox'
    })
  }
);

const { authorizationUrl } = await response.json();
// Send authorizationUrl to the user, then poll /all
// until the new connector appears with isActive: true.
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/connect-url",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "GMAIL",
        "connectorName": "Support Inbox",
    },
)

authorization_url = response.json()["authorizationUrl"]
# Send authorization_url to the user, then poll /all
# until the new connector appears with isActive: true.
```

```json title="JSON"
{
  "authorizationUrl": "https://accounts.google.com/o/oauth2/v2/auth?client_id=...&state=..."
}
```

---

## Get Reconnect URL **POST** `/reconnect-url`

Returns the provider authorization URL to re-authenticate an **existing** OAuth connector — for example after the user revoked access, the refresh token expired, or QuickBooks access was revoked with [`/quickbooks/revoke-access`](#revoke-quickbooks-access-). The flow is the same as [`/connect-url`](#get-connect-url-): open the URL in a browser, let the user re-consent, and the callback completes server-side. Afterwards poll `/get` with the same `connectorId` until the connector reports `isActive: true`.

Supported by every OAuth family; direct-credential families return a `422`.

### Request Body

- `connectorType` (string, required) — The connector's type.
- `connectorId` (string, required) — The existing connector to re-authenticate. Omitting it returns a `422` with `errors: ["connectorId is required"]`.

### Response

- `authorizationUrl` (string) — The provider authorization URL to open in a browser.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/reconnect-url \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "QUICKBOOKS",
    "connectorId": "mN8cE5TvW3"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/reconnect-url',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'QUICKBOOKS',
      connectorId: 'mN8cE5TvW3'
    })
  }
);

const { authorizationUrl } = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/reconnect-url",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "QUICKBOOKS",
        "connectorId": "mN8cE5TvW3",
    },
)

authorization_url = response.json()["authorizationUrl"]
```

```json title="JSON"
{
  "authorizationUrl": "https://appcenter.intuit.com/connect/oauth2?client_id=...&state=..."
}
```

---

## Create Connector **POST** `/create`

Creates a connector directly from credentials — no OAuth dance. Only the direct-credential families support this endpoint; OAuth families return a `422` such as `"Operation 'create' is not supported for connector type GMAIL."` (use [`/connect-url`](#get-connect-url-) for those). Credentials are validated against the external service before the connector is saved — for example, `BEEHIIV` tests the API key and fetches its publications first.

Per family:

- `BEEHIIV` — `connectorName` + `apiKey`.
- `GHOST` — `connectorName` + `adminApiKey` + `apiUrl`.
- `BLUESKY` — `connectorName` + `handle` + `appPassword`.

### Request Body

- `connectorType` (string, required) — `BEEHIIV`, `GHOST`, or `BLUESKY`.
- `connectorName` (string, required) — Display name for the new connector.
- `apiKey` (string) — `BEEHIIV` — the Beehiiv API key.
- `adminApiKey` (string) — `GHOST` — the Ghost Admin API key.
- `apiUrl` (string) — `GHOST` — the Ghost site's API URL.
- `handle` (string) — `BLUESKY` — the Bluesky handle.
- `appPassword` (string) — `BLUESKY` — a Bluesky app password (not the account password).

### Response

- `connector` (object) — The newly created connector object, in the family's shape (see [Connector object](#connector-object)).
- `message` (string) — Confirmation message.
- `errors` (array<string>) — Error messages, if any occurred (e.g. invalid credentials).

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/create \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "BEEHIIV",
    "connectorName": "Company Newsletter",
    "apiKey": "'"$BEEHIIV_API_KEY"'"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/create',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'BEEHIIV',
      connectorName: 'Company Newsletter',
      apiKey: process.env.BEEHIIV_API_KEY
    })
  }
);

const { connector } = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/create",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "BEEHIIV",
        "connectorName": "Company Newsletter",
        "apiKey": os.environ["BEEHIIV_API_KEY"],
    },
)

connector = response.json()["connector"]
```

```json title="JSON"
{
  "connector": {
    "connectorId": "kZ3mQ9pW2x",
    "companyId": "kTn4vB2p9Q",
    "ownerId": "aB3xQ9LmZ2",
    "connectorName": "Company Newsletter",
    "ownerType": "USER",
    "publications": [
      {
        "id": "pub_00000000-0000-0000-0000-000000000000",
        "name": "Weekly Digest"
      }
    ],
    "sharingLevel": "PRIVATE",
    "isActive": true,
    "createdAt": "2026-07-01T10:15:00",
    "updatedAt": "2026-07-01T10:15:00",
    "currentUserAccessLevel": "ADMIN"
  },
  "message": "Beehiiv connector created successfully"
}
```

---

## Test Connection **POST** `/test-connection`

Tests connectivity with the external service for the direct-credential families. What is tested depends on the family:

- `BEEHIIV` — validates a **pre-create** `apiKey` and returns the publications it can access, so you can test before calling [`/create`](#create-connector-).
- `GHOST` — tests an **existing** connector identified by `connectorId`.
- `BLUESKY` — not supported (`422`); credentials are validated at create time instead.

OAuth families return a `422` unsupported-operation error.

### Request Body

- `connectorType` (string, required) — `BEEHIIV` or `GHOST`.
- `apiKey` (string) — `BEEHIIV` — the API key to validate.
- `connectorId` (string) — `GHOST` — the existing connector to test.

### Response

- `connectionSuccessful` (boolean) — Whether the connection test passed.
- `message` (string) — Human-readable result, e.g. `"Connection successful. Found 2 publication(s)."`.
- `publications` (array<object>) — `BEEHIIV` only — the publications visible to the API key. Each entry has `id` and `name`.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/connectors/test-connection \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorType": "BEEHIIV",
    "apiKey": "'"$BEEHIIV_API_KEY"'"
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/connectors/test-connection',
  {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
      'Authorization': process.env.POWERUSER_KEY
    },
    body: JSON.stringify({
      connectorType: 'BEEHIIV',
      apiKey: process.env.BEEHIIV_API_KEY
    })
  }
);

const data = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    "https://api.autessa.com/autessa_poweruser/connectors/test-connection",
    headers={"Authorization": os.environ["POWERUSER_KEY"]},
    json={
        "connectorType": "BEEHIIV",
        "apiKey": os.environ["BEEHIIV_API_KEY"],
    },
)

data = response.json()
```

```json title="JSON"
{
  "connectionSuccessful": true,
  "message": "Connection successful. Found 2 publication(s).",
  "publications": [
    {
      "id": "pub_00000000-0000-0000-0000-000000000000",
      "name": "Weekly Digest"
    },
    {
      "id": "pub_11111111-1111-1111-1111-111111111111",
      "name": "Product Updates"
    }
  ]
}
```

---

## Connector actions

Beyond the uniform surface above, some families expose family-specific actions under `https://api.autessa.com/autessa_poweruser/connectors/{family}/...`. These are the same operations the builder UI uses, with the same request and response shapes. All are `POST` requests with a JSON body and the same poweruser authentication; the `connectorId` must reference a connector of the matching family. No `connectorType` field is needed — the family is in the path.

Families without an action listed here (LinkedIn, Twitter, Notion, and so on) have no family-specific actions; they are fully covered by the endpoints above.

### View available Gmail labels **POST** `/gmail/view-available-labels`

Lists the labels on the connected Gmail mailbox and whether each one is enabled for use on the platform. Requires at least `READ` access to the connector.

#### Request Body

- `connectorId` (string, required) — The Gmail connector to inspect.

#### Response

- `labels` (array<object>) — The mailbox's labels. Each entry has `labelId`, `labelName`, `labelType` (`system` or `user`), `isEnabled`, `currentUserAccessLevel`, `sharingLevel`, and `companyPermissionLevel`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/gmail/view-available-labels \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "V1StGXR8Z5" }'
```

```json title="JSON"
{
  "labels": [
    {
      "labelId": "Label_12",
      "labelName": "Tickets",
      "labelType": "user",
      "isEnabled": true,
      "currentUserAccessLevel": "ADMIN",
      "sharingLevel": "COMPANY",
      "companyPermissionLevel": "READ"
    }
  ]
}
```

---

### Update available Gmail labels **POST** `/gmail/update-available-labels`

Enables or disables mailbox labels for use on the platform. Requires `ADMIN` access to the connector.

#### Request Body

- `connectorId` (string, required) — The Gmail connector to update.
- `labelsToEnable` (array<string>) — Label IDs to enable.
- `labelsToDisable` (array<string>) — Label IDs to disable.

#### Response

- `message` (string) — Confirmation message, e.g. `"Label settings updated successfully"`.
- `enabledLabels` (array<object>) — The resulting label list, same entry shape as [view-available-labels](#view-available-gmail-labels-).
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/gmail/update-available-labels \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "V1StGXR8Z5",
    "labelsToEnable": ["Label_12"],
    "labelsToDisable": ["Label_7"]
  }'
```

```json title="JSON"
{
  "message": "Label settings updated successfully",
  "enabledLabels": [
    {
      "labelId": "Label_12",
      "labelName": "Tickets",
      "labelType": "user",
      "isEnabled": true,
      "currentUserAccessLevel": "ADMIN",
      "sharingLevel": "COMPANY",
      "companyPermissionLevel": "READ"
    }
  ]
}
```

---

### View available Box folders **POST** `/box/view-available-folders`

Lists the Box folders known to the connector and whether each one is enabled for use on the platform.

#### Request Body

- `connectorId` (string, required) — The Box connector to inspect.

#### Response

- `folders` (array<object>) — The known folders. Each entry has `folderId`, `folderName`, `folderPath`, `isEnabled`, `currentUserAccessLevel`, `sharingLevel`, and `companyPermissionLevel`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/box/view-available-folders \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "V1StGXR8Z5" }'
```

```json title="JSON"
{
  "folders": [
    {
      "folderId": "184029571230",
      "folderName": "Contracts",
      "folderPath": "/Legal/Contracts",
      "isEnabled": true,
      "currentUserAccessLevel": "ADMIN",
      "sharingLevel": "COMPANY",
      "companyPermissionLevel": "READ"
    }
  ]
}
```

---

### Update available Box folders **POST** `/box/update-available-folders`

Enables or disables Box folders for use on the platform. Requires `ADMIN` access to the connector.

#### Request Body

- `connectorId` (string, required) — The Box connector to update.
- `foldersToEnable` (array<string>) — Folder IDs to enable.
- `foldersToDisable` (array<string>) — Folder IDs to disable.

#### Response

- `folders` (array<object>) — The resulting folder list, same entry shape as [view-available-folders](#view-available-box-folders-).
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/box/update-available-folders \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "V1StGXR8Z5",
    "foldersToEnable": ["184029571230"],
    "foldersToDisable": []
  }'
```

```json title="JSON"
{
  "folders": [
    {
      "folderId": "184029571230",
      "folderName": "Contracts",
      "folderPath": "/Legal/Contracts",
      "isEnabled": true,
      "currentUserAccessLevel": "ADMIN",
      "sharingLevel": "COMPANY",
      "companyPermissionLevel": "READ"
    }
  ]
}
```

---

### Sync Box folders **POST** `/box/sync-folders`

Refreshes the connector's folder list from Box, adding newly discovered folders. Requires `ADMIN` access to the connector.

#### Request Body

- `connectorId` (string, required) — The Box connector to sync.

#### Response

- `message` (string) — Confirmation message.
- `foldersAdded` (integer) — How many new folders the sync discovered.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/box/sync-folders \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "V1StGXR8Z5" }'
```

```json title="JSON"
{
  "message": "Folders synced successfully",
  "foldersAdded": 3
}
```

---

### View available Google calendars **POST** `/google-calendar/view-available-calendars`

Lists the calendars on the connected Google account and whether each one is enabled for use on the platform.

#### Request Body

- `connectorId` (string, required) — The Google Calendar connector to inspect.

#### Response

- `calendars` (array<object>) — The account's calendars. Each entry has `calendarId`, `calendarName`, `isEnabled`, `timezone`, `currentUserAccessLevel`, `sharingLevel`, and `companyPermissionLevel`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/google-calendar/view-available-calendars \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "V1StGXR8Z5" }'
```

```json title="JSON"
{
  "calendars": [
    {
      "calendarId": "team@example.com",
      "calendarName": "Team Calendar",
      "isEnabled": true,
      "timezone": "America/Los_Angeles",
      "currentUserAccessLevel": "ADMIN",
      "sharingLevel": "COMPANY",
      "companyPermissionLevel": "READ"
    }
  ]
}
```

---

### Update available Google calendars **POST** `/google-calendar/update-available-calendars`

Enables or disables calendars for use on the platform. Requires `ADMIN` access to the connector.

#### Request Body

- `connectorId` (string, required) — The Google Calendar connector to update.
- `calendarsToEnable` (array<string>) — Calendar IDs to enable.
- `calendarsToDisable` (array<string>) — Calendar IDs to disable.

#### Response

- `message` (string) — Confirmation message.
- `enabledCalendars` (array<object>) — The resulting calendar list, same entry shape as [view-available-calendars](#view-available-google-calendars-).
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/google-calendar/update-available-calendars \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "V1StGXR8Z5",
    "calendarsToEnable": ["team@example.com"],
    "calendarsToDisable": []
  }'
```

```json title="JSON"
{
  "message": "Calendar settings updated successfully",
  "enabledCalendars": [
    {
      "calendarId": "team@example.com",
      "calendarName": "Team Calendar",
      "isEnabled": true,
      "timezone": "America/Los_Angeles",
      "currentUserAccessLevel": "ADMIN",
      "sharingLevel": "COMPANY",
      "companyPermissionLevel": "READ"
    }
  ]
}
```

---

### Sync Google calendars **POST** `/google-calendar/sync-calendars`

Forces a re-sync of the calendar list from Google, bypassing the platform's sync throttling. Requires `WRITE`, `PUBLISH`, or `ADMIN` access to the connector.

#### Request Body

- `connectorId` (string, required) — The Google Calendar connector to sync.

#### Response

- `message` (string) — Confirmation message.
- `syncPerformed` (boolean) — Whether a sync was actually performed.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/google-calendar/sync-calendars \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "V1StGXR8Z5" }'
```

```json title="JSON"
{
  "message": "Calendars synced successfully",
  "syncPerformed": true
}
```

---

### List Outlook folders **POST** `/outlook/list-folders`

Lists the mail folders on the connected Outlook mailbox.

#### Request Body

- `connectorId` (string, required) — The Outlook connector to inspect.

#### Response

- `folders` (array<object>) — The mailbox's folders. Each entry has `folderId` and `displayName`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/outlook/list-folders \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "V1StGXR8Z5" }'
```

```json title="JSON"
{
  "folders": [
    {
      "folderId": "AAMkAGI2T...",
      "displayName": "Inbox"
    },
    {
      "folderId": "AAMkAGI2U...",
      "displayName": "Invoices"
    }
  ]
}
```

---

### List Outlook calendars **POST** `/outlook-calendar/list-calendars`

Lists the calendars on the connected Outlook account.

#### Request Body

- `connectorId` (string, required) — The Outlook Calendar connector to inspect.

#### Response

- `calendars` (array<object>) — The account's calendars. Each entry has `calendarId`, `name`, `isDefaultCalendar`, and `canEdit`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/outlook-calendar/list-calendars \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "V1StGXR8Z5" }'
```

```json title="JSON"
{
  "calendars": [
    {
      "calendarId": "AQMkAGI2T...",
      "name": "Calendar",
      "isDefaultCalendar": true,
      "canEdit": true
    }
  ]
}
```

---

### List BigQuery projects **POST** `/google-analytics/bigquery/projects`

Lists the BigQuery projects visible to the connected Google Analytics account. Requires at least `READ` access to the connector. Use this with [datasets](#list-bigquery-datasets-) and [tables](#list-bigquery-tables-) to discover where GA4 exports live.

#### Request Body

- `connectorId` (string, required) — The Google Analytics connector to query.

#### Response

- `projects` (array<object>) — The visible projects. Each entry has `projectId`, `friendlyName`, and `numericId`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/google-analytics/bigquery/projects \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "V1StGXR8Z5" }'
```

```json title="JSON"
{
  "projects": [
    {
      "projectId": "acme-analytics",
      "friendlyName": "Acme Analytics",
      "numericId": "123456789012"
    }
  ]
}
```

---

### List BigQuery datasets **POST** `/google-analytics/bigquery/datasets`

Lists the datasets in a BigQuery project.

#### Request Body

- `connectorId` (string, required) — The Google Analytics connector to query.
- `projectId` (string, required) — The BigQuery project ID, from [projects](#list-bigquery-projects-).

#### Response

- `datasets` (array<object>) — The project's datasets. Each entry has `datasetId`, `friendlyName`, and `location`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/google-analytics/bigquery/datasets \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "V1StGXR8Z5",
    "projectId": "acme-analytics"
  }'
```

```json title="JSON"
{
  "datasets": [
    {
      "datasetId": "analytics_987654321",
      "friendlyName": "GA4 Export",
      "location": "US"
    }
  ]
}
```

---

### List BigQuery tables **POST** `/google-analytics/bigquery/tables`

Lists the tables in a BigQuery dataset.

#### Request Body

- `connectorId` (string, required) — The Google Analytics connector to query.
- `projectId` (string, required) — The BigQuery project ID.
- `datasetId` (string, required) — The dataset ID, from [datasets](#list-bigquery-datasets-).

#### Response

- `tables` (array<object>) — The dataset's tables. Each entry has `tableId`, `friendlyName`, and `type`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/google-analytics/bigquery/tables \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "V1StGXR8Z5",
    "projectId": "acme-analytics",
    "datasetId": "analytics_987654321"
  }'
```

```json title="JSON"
{
  "tables": [
    {
      "tableId": "events_20260630",
      "friendlyName": "events_20260630",
      "type": "TABLE"
    }
  ]
}
```

---

### Look up Notion pages **POST** `/notion/lookup/pages`

Searches the connected Notion workspace for pages matching a query. Requires at least `READ` access to the connector.

#### Request Body

- `connectorId` (string, required) — The Notion connector to search with.
- `query` (string) — Search text. Matches page titles in the workspace.

#### Response

- `pages` (array<object>) — Matching pages. Each entry has `id`, `title`, `parentType`, and `lastEditedTime`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/notion/lookup/pages \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "V1StGXR8Z5",
    "query": "onboarding"
  }'
```

```json title="JSON"
{
  "pages": [
    {
      "id": "a1b2c3d4-0000-0000-0000-000000000000",
      "title": "Customer Onboarding Checklist",
      "parentType": "workspace",
      "lastEditedTime": "2026-06-29T14:12:00.000Z"
    }
  ]
}
```

---

### Look up Notion databases **POST** `/notion/lookup/databases`

Searches the connected Notion workspace for databases matching a query.

#### Request Body

- `connectorId` (string, required) — The Notion connector to search with.
- `query` (string) — Search text. Matches database titles in the workspace.

#### Response

- `databases` (array<object>) — Matching databases. Each entry has `id`, `title`, and `lastEditedTime`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/notion/lookup/databases \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "V1StGXR8Z5",
    "query": "tasks"
  }'
```

```json title="JSON"
{
  "databases": [
    {
      "id": "b2c3d4e5-0000-0000-0000-000000000000",
      "title": "Engineering Tasks",
      "lastEditedTime": "2026-06-30T09:03:00.000Z"
    }
  ]
}
```

---

### Look up a Notion database schema **POST** `/notion/lookup/database-schema`

Returns the property schema of a Notion database, so you can construct valid property payloads for tools that write to it.

#### Request Body

- `connectorId` (string, required) — The Notion connector to use.
- `databaseId` (string, required) — The Notion database ID, from [lookup/databases](#look-up-notion-databases-).

#### Response

- `databaseId` (string) — The database's ID.
- `title` (string) — The database's title.
- `properties` (array<object>) — The database's properties. Each entry has `name`, `type`, and — for select-like types — the available `options`.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/notion/lookup/database-schema \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "connectorId": "V1StGXR8Z5",
    "databaseId": "b2c3d4e5-0000-0000-0000-000000000000"
  }'
```

```json title="JSON"
{
  "databaseId": "b2c3d4e5-0000-0000-0000-000000000000",
  "title": "Engineering Tasks",
  "properties": [
    {
      "name": "Status",
      "type": "select",
      "options": ["Todo", "In Progress", "Done"]
    },
    {
      "name": "Title",
      "type": "title"
    }
  ]
}
```

---

### List Acumatica API versions **POST** `/acumatica/api-versions`

Lists the contract-based REST API versions available on the connected Acumatica instance.

#### Request Body

- `connectorId` (string, required) — The Acumatica connector to query.

#### Response

- `apiVersions` (array<string>) — The available API version identifiers.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/acumatica/api-versions \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "mN8cE5TvW3" }'
```

```json title="JSON"
{
  "apiVersions": ["24.200.001", "23.200.001"]
}
```

---

### Revoke QuickBooks access **POST** `/quickbooks/revoke-access`

Revokes the connector's OAuth grant with Intuit and clears the stored tokens. The connector record remains, but it cannot reach QuickBooks again until it is re-authenticated via [`/reconnect-url`](#get-reconnect-url-). Requires `ADMIN` access to the connector.

#### Request Body

- `connectorId` (string, required) — The QuickBooks connector whose access to revoke.

#### Response

- `message` (string) — Confirmation message, e.g. `"QuickBooks access revoked successfully"`.
- `connector` (object) — The updated QuickBooks connector object.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/connectors/quickbooks/revoke-access \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "connectorId": "mN8cE5TvW3" }'
```

```json title="JSON"
{
  "message": "QuickBooks access revoked successfully",
  "connector": {
    "connectorId": "mN8cE5TvW3",
    "companyId": "kTn4vB2p9Q",
    "ownerId": "aB3xQ9LmZ2",
    "connectorName": "Main QuickBooks",
    "realmId": "9341453907xxxx",
    "qbCompanyName": "Acme Corp",
    "accountEmail": "finance@example.com",
    "isSandbox": false,
    "paymentsEnabled": true,
    "isActive": true,
    "sharingLevel": "COMPANY",
    "companyPermissionLevel": "READ",
    "userAccessLevel": "ADMIN",
    "isOwner": true,
    "createdAt": "2026-03-11T16:40:02",
    "updatedAt": "2026-07-01T08:12:45",
    "sharedWith": []
  }
}
```

---

## Errors

Failed requests return an `errors` array of human-readable messages in the response body:

- A missing or invalid poweruser key returns `401 Unauthorized`.
- The management endpoints (`/delete`, `/share`, `/get-sharing-details`, `/transfer-ownership`, `/connect-url`, `/reconnect-url`, `/create`, `/test-connection`) validate the request with HTTP `422`: omitting `connectorType` returns `errors: ["connectorType is required"]`, omitting a required `connectorId` returns `errors: ["connectorId is required"]`, and omitting `newOwnerId` on `/transfer-ownership` returns `errors: ["newOwnerId is required"]`. On `/all` and `/get` the same missing-field messages are returned without the `422` status.
- Requesting a `connectorType` with no registered utility (currently `MEETING_BOT` and `AUTESSA_PAYMENTS`) returns a `422` with `errors: ["Connector type MEETING_BOT is not supported via the poweruser API"]` on the management endpoints, and fails with a server error on `/all` and `/get`.
- Calling an operation the connector family does not support (see [Capabilities by connector family](#capabilities-by-connector-family)) returns a `422` with a message such as `"Operation 'share' is not supported for connector type TIKTOK."`.
- Requesting a connector that doesn't exist in your company returns `errors: ["Connector not found"]`.
- Operating on a connector without the required access returns a permission error: reads require `READ` (e.g. `"User does not have permission to view this connector."`), `/share`, label/folder/calendar updates, `/box/sync-folders`, and `/quickbooks/revoke-access` require `ADMIN` (e.g. `"User does not have permission to share connector."`), `/google-calendar/sync-calendars` requires `WRITE` or higher, and `/delete` and `/transfer-ownership` are restricted to the connector's owner (e.g. `"Access denied: Only the owner can delete this connector"`).
- `/transfer-ownership` also validates the new owner: `"New owner does not exist"` if they aren't a member of the company, and `"New owner does not have access to connector yet."` if the connector hasn't been shared with them.

---

## Related

- [Poweruser API overview](/docs/api/poweruser.md)
- [Connectors guide](/docs/guide/connectors.md)
- [Tools API](/docs/api/poweruser/tools.md)
- [Agents API](/docs/api/poweruser/agents.md)

