# Connectors

## List connectors

`GET https://app.italic.com/api/v2/connectors`

Required permission: workflows:read or connectors:manage. Connected apps and accounts, and each app's permission. Connecting an account is a sign-in with the provider, in the Italic apps.

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Italic API",
    "version": "2.0.0",
    "description": "Recordings, devices, chat, tasks, workflows, connectors and notifications. Text syncs to Italic; audio stays on the client."
  },
  "servers": [
    {
      "url": "https://app.italic.com/api/v2"
    }
  ],
  "paths": {
    "/connectors": {
      "get": {
        "operationId": "listConnectors",
        "summary": "List connectors",
        "tags": [
          "Connectors"
        ],
        "parameters": [],
        "description": "Required permission: workflows:read or connectors:manage. Connected apps and accounts, and each app's permission. Connecting an account is a sign-in with the provider, in the Italic apps.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Writes without read permission return an ID and revision only.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for troubleshooting."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectorList"
                }
              }
            }
          },
          "default": {
            "description": "Request failed. Errors include a stable code and a readable message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from Settings → Developers → API keys."
      },
      "accountSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "A signed-in Italic account session. An API key cannot create or revoke keys."
      }
    },
    "schemas": {
      "Connector": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "accounts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 256,
                  "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
                },
                "label": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              },
              "required": [
                "id",
                "label"
              ]
            }
          }
        },
        "required": [
          "id",
          "name",
          "accounts"
        ]
      },
      "ConnectorList": {
        "type": "object",
        "properties": {
          "connectors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Connector"
            }
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Permission"
            }
          }
        },
        "required": [
          "connectors",
          "permissions"
        ]
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "minLength": 0,
                "maxLength": 100
              },
              "message": {
                "type": "string",
                "minLength": 0,
                "maxLength": 1000
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ]
      },
      "Permission": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string",
            "enum": [
              "send_email",
              "create_event",
              "create_reminder",
              "create_notion_page",
              "send_slack_message",
              "save_to_drive"
            ]
          },
          "label": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "ask",
              "allow",
              "off"
            ]
          },
          "accounts": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "ask",
                "allow",
                "off"
              ]
            },
            "description": "Accounts with their own permission, by account ID."
          }
        },
        "required": [
          "tool",
          "label",
          "mode",
          "accounts"
        ]
      }
    }
  }
}
```

## Set a permission

`PUT https://app.italic.com/api/v2/connectors/permissions/{tool}`

Required permission: connectors:manage. Whether Italic asks first before it acts in an app, in chat. Workflows set Ask or Run automatically on each action; `off` turns the app off for both.

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Italic API",
    "version": "2.0.0",
    "description": "Recordings, devices, chat, tasks, workflows, connectors and notifications. Text syncs to Italic; audio stays on the client."
  },
  "servers": [
    {
      "url": "https://app.italic.com/api/v2"
    }
  ],
  "paths": {
    "/connectors/permissions/{tool}": {
      "put": {
        "operationId": "setPermission",
        "summary": "Set a permission",
        "tags": [
          "Connectors"
        ],
        "parameters": [
          {
            "name": "tool",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "send_email",
                "create_event",
                "create_reminder",
                "create_notion_page",
                "send_slack_message",
                "save_to_drive"
              ]
            }
          }
        ],
        "description": "Required permission: connectors:manage. Whether Italic asks first before it acts in an app, in chat. Workflows set Ask or Run automatically on each action; `off` turns the app off for both.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetPermission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Writes without read permission return an ID and revision only.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for troubleshooting."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionResult"
                }
              }
            }
          },
          "default": {
            "description": "Request failed. Errors include a stable code and a readable message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from Settings → Developers → API keys."
      },
      "accountSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "A signed-in Italic account session. An API key cannot create or revoke keys."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "minLength": 0,
                "maxLength": 100
              },
              "message": {
                "type": "string",
                "minLength": 0,
                "maxLength": 1000
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ]
      },
      "Permission": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string",
            "enum": [
              "send_email",
              "create_event",
              "create_reminder",
              "create_notion_page",
              "send_slack_message",
              "save_to_drive"
            ]
          },
          "label": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "ask",
              "allow",
              "off"
            ]
          },
          "accounts": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "ask",
                "allow",
                "off"
              ]
            },
            "description": "Accounts with their own permission, by account ID."
          }
        },
        "required": [
          "tool",
          "label",
          "mode",
          "accounts"
        ]
      },
      "PermissionResult": {
        "type": "object",
        "properties": {
          "permission": {
            "$ref": "#/components/schemas/Permission"
          }
        },
        "required": [
          "permission"
        ]
      },
      "SetPermission": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "ask",
              "allow",
              "off"
            ],
            "description": "`ask`: drafts wait for approval. `allow`: Italic acts without asking. `off`: the app is not used."
          }
        },
        "required": [
          "mode"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

## Set an account permission

`PUT https://app.italic.com/api/v2/connectors/permissions/{tool}/accounts/{accountId}`

Required permission: connectors:manage. One account's own permission for send_email, create_event or save_to_drive.

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Italic API",
    "version": "2.0.0",
    "description": "Recordings, devices, chat, tasks, workflows, connectors and notifications. Text syncs to Italic; audio stays on the client."
  },
  "servers": [
    {
      "url": "https://app.italic.com/api/v2"
    }
  ],
  "paths": {
    "/connectors/permissions/{tool}/accounts/{accountId}": {
      "put": {
        "operationId": "setAccountPermission",
        "summary": "Set an account permission",
        "tags": [
          "Connectors"
        ],
        "parameters": [
          {
            "name": "tool",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "enum": [
                "send_email",
                "create_event",
                "create_reminder",
                "create_notion_page",
                "send_slack_message",
                "save_to_drive"
              ]
            }
          },
          {
            "name": "accountId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            }
          }
        ],
        "description": "Required permission: connectors:manage. One account's own permission for send_email, create_event or save_to_drive.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetAccountPermission"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success. Writes without read permission return an ID and revision only.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for troubleshooting."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PermissionResult"
                }
              }
            }
          },
          "default": {
            "description": "Request failed. Errors include a stable code and a readable message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from Settings → Developers → API keys."
      },
      "accountSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "A signed-in Italic account session. An API key cannot create or revoke keys."
      }
    },
    "schemas": {
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "minLength": 0,
                "maxLength": 100
              },
              "message": {
                "type": "string",
                "minLength": 0,
                "maxLength": 1000
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ]
      },
      "Permission": {
        "type": "object",
        "properties": {
          "tool": {
            "type": "string",
            "enum": [
              "send_email",
              "create_event",
              "create_reminder",
              "create_notion_page",
              "send_slack_message",
              "save_to_drive"
            ]
          },
          "label": {
            "type": "string"
          },
          "mode": {
            "type": "string",
            "enum": [
              "ask",
              "allow",
              "off"
            ]
          },
          "accounts": {
            "type": "object",
            "additionalProperties": {
              "type": "string",
              "enum": [
                "ask",
                "allow",
                "off"
              ]
            },
            "description": "Accounts with their own permission, by account ID."
          }
        },
        "required": [
          "tool",
          "label",
          "mode",
          "accounts"
        ]
      },
      "PermissionResult": {
        "type": "object",
        "properties": {
          "permission": {
            "$ref": "#/components/schemas/Permission"
          }
        },
        "required": [
          "permission"
        ]
      },
      "SetAccountPermission": {
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "ask",
              "allow",
              "off",
              "default"
            ],
            "description": "As for the app's permission; `default` uses the app's."
          }
        },
        "required": [
          "mode"
        ],
        "additionalProperties": false
      }
    }
  }
}
```

## Disconnect an account

`DELETE https://app.italic.com/api/v2/connectors/accounts/{id}`

Required permission: connectors:manage. Removes a Google, Outlook, Notion or Slack account and revokes Italic's access where the provider allows it. Linear, Granola and Ramp sign-ins and custom connectors are disconnected in the apps.

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Italic API",
    "version": "2.0.0",
    "description": "Recordings, devices, chat, tasks, workflows, connectors and notifications. Text syncs to Italic; audio stays on the client."
  },
  "servers": [
    {
      "url": "https://app.italic.com/api/v2"
    }
  ],
  "paths": {
    "/connectors/accounts/{id}": {
      "delete": {
        "operationId": "disconnectAccount",
        "summary": "Disconnect an account",
        "tags": [
          "Connectors"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 256,
              "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
            }
          }
        ],
        "description": "Required permission: connectors:manage. Removes a Google, Outlook, Notion or Slack account and revokes Italic's access where the provider allows it. Linear, Granola and Ramp sign-ins and custom connectors are disconnected in the apps.",
        "security": [
          {
            "apiKey": []
          }
        ],
        "responses": {
          "200": {
            "description": "Success. Writes without read permission return an ID and revision only.",
            "headers": {
              "X-Request-Id": {
                "schema": {
                  "type": "string"
                },
                "description": "Request identifier for troubleshooting."
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Deleted"
                }
              }
            }
          },
          "default": {
            "description": "Request failed. Errors include a stable code and a readable message.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "apiKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "An API key from Settings → Developers → API keys."
      },
      "accountSession": {
        "type": "http",
        "scheme": "bearer",
        "description": "A signed-in Italic account session. An API key cannot create or revoke keys."
      }
    },
    "schemas": {
      "Deleted": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 256,
            "pattern": "^[A-Za-z0-9][A-Za-z0-9._:-]*$"
          },
          "deleted": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "deleted"
        ],
        "additionalProperties": false
      },
      "Error": {
        "type": "object",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "code": {
                "type": "string",
                "minLength": 0,
                "maxLength": 100
              },
              "message": {
                "type": "string",
                "minLength": 0,
                "maxLength": 1000
              }
            },
            "required": [
              "code",
              "message"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "error"
        ]
      }
    }
  }
}
```
