{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pluggy/json-schema/pluggy-connect-token-request-schema.json",
  "title": "ConnectTokenRequest",
  "description": "Create a connect token request payload",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pluggy-auth-api-openapi.yml#/components/schemas/ConnectTokenRequest",
  "properties": {
    "itemId": {
      "type": "string",
      "description": "Item identifier to allow Connect Widget to performan an update on it.",
      "format": "uuid"
    },
    "options": {
      "$ref": "#/$defs/ItemOptions"
    }
  },
  "type": "object",
  "$defs": {
    "ItemOptions": {
      "description": "Item options available to send through connect tokens",
      "properties": {
        "clientUserId": {
          "type": "string",
          "description": "Client's external identifier for the user, it can be a ID, UUID or even an email. This is free for clients to use."
        },
        "webhookUrl": {
          "type": "string",
          "description": "Url to be notified of this specific item changes"
        },
        "oauthRedirectUri": {
          "type": "string",
          "description": "Url to redirect the user after the connect flow"
        },
        "avoidDuplicates": {
          "type": "boolean",
          "description": "Avoids creating a new item if there is already one with the same credentials"
        }
      },
      "type": "object"
    }
  }
}