openapi: 3.0.1
info:
  title: Connectivity API
  description: |
    The Alloy Connectivity API enables you to create and manage MCP (Model Context Protocol) servers that provide secure, controlled access to platform integrations for AI assistants.
  version: "1.0"
  contact:
    name: Alloy Support
    email: support@runalloy.com
    url: https://runalloy.com
servers:
  - url: https://production.runalloy.com
    description: Production server
tags:
  - name: Connectors
    description: Get connector details and execute actions
  - name: Credentials
    description: Manage credentials for connectors
  - name: Files
    description: Manage file uploads and downloads
  - name: Users
    description: Manage users
paths:
  /connectors:
    get:
      summary: Get Connectors
      description: Get a list of available connectors
      tags:
        - Connectors
      operationId: get-connectors
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: x-alloy-userid
          in: header
          required: false
          description: The ID of the user making the request; If not provided, the request will be made as the API Key user
          schema:
            type: string
          example: 68b666094a6821e749c36006
      responses:   # ✅ moved out from under parameters
        '200':
          description: List of connectors
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Connectors'
              example:
                connectors:
                  - id: "slack"
                    name: "Slack"
                    icon: "https://cdn.runalloy.com/icons/slack.png"
                    group: ["output"]
                    category: ["communication"]
  /connectors/{connectorId}/resources:
    get:
      summary: Get Connector Resources
      description: Get a list of available resources and their actions for a connector
      tags:
        - Connectors
      operationId: get-connector-resources
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: x-alloy-userid
          in: header
          required: false
          description: The ID of the user making the request; if not provided, the request will be made as the API Key user
          schema:
            type: string
          example: 68b666094a6821e749c36006
        - name: connectorId
          in: path
          required: true
          description: Connector ID
          schema:
            type: string
          example: "slack"
      responses:
        '200':
          description: List of resources
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Resources'
              example:
                resources:
                  - name: "chat"
                    description: "Operations related to chat."
                    actions:
                      - id: "chat_postMessage"
                        name: "Post"
                        description: "Posts a message into a channel."
  /connectors/{connectorId}/actions/{actionId}:
    get:
      summary: Get Connector Action Details
      description: Get a specific action details for a connector
      tags:
        - Connectors
      operationId: get-connector-action-details
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: x-alloy-userid
          in: header
          required: false
          description: The ID of the user making the request; If not provided, the request will be made as the API Key user
          schema:
            type: string
          example: 68b666094a6821e749c36006
        - name: connectorId
          in: path
          required: true
          description: Connector ID
          schema:
            type: string
          example: "slack"
        - name: actionId
          in: path
          required: true
          description: Action ID
          schema:
            type: string
          example: "chat_postMessage"
      responses:
        '200':
          description: Action details
          content:
            application/json:
              example:
                action:
                  id: chat_postMessage
                  displayName: Post
                  description: Posts a message into a channel.
                  httpMethod: post
                  path: "/chat.postMessage"
                  parameters:
                  - name: token
                    in: header
                    description: 'Authentication token. Requires scope: `chat:write`'
                    required: true
                    schema:
                      type: string
                  requestBody:
                    required:
                    - channel
                    - text
                    type: object
                    properties:
                      as_user:
                        type: string
                        description: Pass true to post the message as the authed user, instead of
                          as a bot. Defaults to false. See [authorship](#authorship) below.
                      attachments:
                        type: string
                        description: A JSON-based array of structured attachments, presented as a
                          URL-encoded string.
                      blocks:
                        title: Block Kit blocks
                        type: array
                        description: This is a very loose definition, in the future, we'll populate
                          this with deeper schema in this definition namespace.
                        items:
                          required:
                          - type
                          type: object
                          properties:
                            type:
                              type: string
                      channel:
                        type: string
                        description: Channel, private group, or IM channel to send message to. Can
                          be an encoded ID, or a name. See [below](#channels) for more details.
                      icon_emoji:
                        type: string
                        description: Emoji to use as the icon for this message. Overrides `icon_url`.
                          Must be used in conjunction with `as_user` set to `false`, otherwise ignored.
                          See [authorship](#authorship) below.
                      icon_url:
                        type: string
                        description: URL to an image to use as the icon for this message. Must be
                          used in conjunction with `as_user` set to false, otherwise ignored. See
                          [authorship](#authorship) below.
                      link_names:
                        type: boolean
                        description: Find and link channel names and usernames.
                      mrkdwn:
                        type: boolean
                        description: Disable Slack markup parsing by setting to `false`. Enabled by
                          default.
                      parse:
                        type: string
                        description: Change how messages are treated. Defaults to `none`. See [below](#formatting).
                      reply_broadcast:
                        type: boolean
                        description: Used in conjunction with `thread_ts` and indicates whether reply
                          should be made visible to everyone in the channel or conversation. Defaults
                          to `false`.
                      text:
                        type: string
                        description: How this field works and whether it is required depends on other
                          fields you use in your API call. [See below](#text_usage) for more detail.
                      thread_ts:
                        type: string
                        description: Provide another message's `ts` value to make this message a reply.
                          Avoid using a reply's `ts` value; use its parent instead.
                      unfurl_links:
                        type: boolean
                        description: Pass true to enable unfurling of primarily text-based content.
                      unfurl_media:
                        type: boolean
                        description: Pass false to disable unfurling of media content.
                      username:
                        type: string
                        description: Set your bot's user name. Must be used in conjunction with `as_user`
                          set to false, otherwise ignored. See [authorship](#authorship) below.
                  sampleSuccessResponse:
                    ok: true
                    channel: C1H9RESGL
                    ts: '1503435956.000247'
                    message:
                      text: Here's a message for you
                      username: ecto1
                      bot_id: B19LU7CSY
                      attachments:
                      - text: This is an attachment
                        id: 1
                        fallback: This is an attachment's fallback
                      type: message
                      subtype: bot_message
                      ts: '1503435956.000247'
  /connectors/{connectorId}/actions/{actionId}/execute:
    post:
      summary: Execute Connector Action
      description: Execute a connector action
      tags:
        - Connectors
      operationId: execute-connector-action
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: x-alloy-userid
          in: header
          required: false
          description: The ID of the user executing the action; If not provided, the request will be made as the API Key user
          schema:
            type: string
          example: 68b666094a6821e749c36006
        - name: connectorId
          in: path
          required: true
          description: Connector ID
          schema:
            type: string
          example: "slack"
        - name: actionId
          in: path
          required: true
          description: Action ID
          schema:
            type: string
          example: "chat_postMessage"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ExecuteConnectorActionRequest'
      responses:   # ✅ Added required responses
        '200':
          description: Action executed successfully
          content:
            application/json:
              example:
                success: true
                result:
                  messageId: "1234567890"

  /connectors/{connectorId}/credentials:
    get:
      summary: Get Connector Credentials
      description: Get connector credentials
      tags:
        - Credentials
      operationId: get-connector-credentials
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: x-alloy-userid
          in: header
          required: false
          description: The ID of the user you're getting credentials for; If not provided, the request will be made as the API Key user
          schema:
            type: string
          example: 68b666094a6821e749c36006
        - name: connectorId
          in: path
          required: true
          description: Connector ID
          schema:
            type: string
          example: "slack"
      responses:
        '200':
          description: List of credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credentials'
              example:
                credentials:
                  - credentialId: 68f8a98a48af02e752bf8e1b
                    name: Slack User's Slack Credential
                    connectorId: slack
                    authenticationType: oauth2
                    createdAt: '2025-10-22T09:53:14.374Z'
                    updatedAt: '2025-10-22T09:53:14.382Z'
    post:
      summary: Create a Credential for a Connector
      description: Create a credential for a specified
      tags:
        - Credentials
      operationId: create-connector-credential
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: connectorId
          in: path
          required: true
          description: Connector ID
          schema:
            type: string
          example: "slack"
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConnectorCredentialRequest'
            example:
              userId: "{{userId}}"
              authenticationType: "oauth2"
              redirectUri: "http://localhost:3000"
      responses:
        '200':
          description: Credential created successfully
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - oauthUrl
                    properties:
                      oauthUrl:
                        type: string
                        format: uri
                        description: OAuth authorization URL to redirect the user and complete credential linking
                    example:
                      oauthUrl: "http://localhost:4040/api/strategy/connector/slack/authorize?userId=5eba51a03fe9631316668514&redirectUri=http%3A%2F%2Flocalhost%3A3000&token=abcdefghijklmnopqrstvwxyz123456790"
                  - type: object
                    required:
                      - credentialId
                    properties:
                      credentialId:
                        type: string
                        description: Unique credential identifier for the newly created credential
                    example:
                      credentialId: "67a37f29e0aa276e50d7253a"
  /connectors/{connectorId}/credentials/metadata:
    get:
      summary: Get Connector Credentials Metadata
      description: Get connector credentials metadata
      tags:
        - Credentials
      operationId: get-connector-credentials-metadata
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: x-alloy-userid
          in: header
          required: false
          description: The ID of the user making the request; If not provided, the request will be made as the API Key user
          schema:
            type: string
          example: 68b666094a6821e749c36006
        - name: connectorId
          in: path
          required: true
          description: Connector ID
          schema:
            type: string
          example: "slack"
      responses:
        '200':
          description: List of credentials metadata
          content:
            application/json:
              schema:
                type: object
                properties:
                  metadata:
                    type: array
                    items:
                      type: object
                      required:
                        - authenticationType
                        - inputSchema
                      properties:
                        authenticationType:
                          type: string
                          description: Type of authentication method
                        authConfigRequired:
                          type: boolean
                          description: Whether an auth config is required for this authentication type
                        inputSchema:
                          type: object
                          description: JSON Schema describing required input fields for credential creation
                          additionalProperties: true
                        sampleInput:
                          type: object
                          description: Sample input data for this authentication type
                          additionalProperties: true
              example:
                metadata:
                  - authenticationType: oauth2
                    authConfigRequired: false
                    inputSchema:
                      type: object
                      properties:
                        userId:
                          type: string
                          description: User ID of the credential
                        authenticationType:
                          type: string
                          description: Type of authentication method of the connector
                          const: oauth2
                        redirectUri:
                          type: string
                          format: uri
                          description: Redirect URI for OAuth authentication
                      required:
                        - userId
                        - authenticationType
                        - redirectUri
                    sampleInput:
                      userId: 68fe36549000cce448466858
                      authenticationType: oauth2
                      redirectUri: https://example.com
  /connectors/credentials/all:
    get:
      summary: Get All Credentials
      description: Get all credentials across all connectors
      tags:
        - Credentials
      operationId: get-all-credentials
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: x-alloy-userid
          in: header
          required: false
          description: The ID of the user you're getting credentials for; If not provided, the request will be made as the API Key user
          schema:
            type: string
          example: 68b666094a6821e749c36006
      responses:
        '200':
          description: List of credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Credentials'
              example:
                credentials:
                  - credentialId: 68f8a98a48af02e752bf8e1b
                    name: Slack User's Slack Credential
                    connectorId: slack
                    authenticationType: oauth2
                    createdAt: '2025-10-22T09:53:14.374Z'
                    updatedAt: '2025-10-22T09:53:14.382Z'
  /users:
    get:
      summary: Retrieve a list of all users
      description: Returns a list of all users created in your Embedded account.
      operationId: list-all-users
      security:
        - bearerAuth: []
      tags:
        - Users
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: parentWorkflowId
          in: query
          description: You can pass a parentWorkflowId if you wish to list users for a specific workflow.
          schema:
            type: string
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "data": [
                            {
                                "userId": "6323d7c9122ae69742a5d0a2",
                                "username": "gregg",
                                "fullName": "Gregg Mojica"
                            },
                            {
                                "userId": "6323d7cf9ae88f59bf66ce63",
                                "username": "sara",
                                "fullName": "Sara Du"
                            },
                            {
                                "userId": "6323d7e159479ba26d80fcc8",
                                "fullName": "William Jackson"
                            },
                            {
                                "userId": "6323d7f090020baf1091b151",
                                "username": "izzy@gmail.com",
                                "fullName": "Izzy Jackson"
                            },
                             {
                                "userId": "6323d7da4b764bfe02cacaef",
                                "username": "jose@example.com",
                                "fullName": "Jose Santos"
                            }
                        ]
                    }
              schema:
                type: object
                description: List of users response
                required:
                  - data
                properties:
                  data:
                    type: array
                    description: Array of user objects
                    items:
                      type: object
                      description: User information
                      required:
                        - userId
                        - fullName
                      properties:
                        userId:
                          type: string
                          description: Unique identifier for the user
                          example: "6323d7c9122ae69742a5d0a2"
                        username:
                          type: string
                          description: Username or email address (optional)
                          example: "gregg"
                        fullName:
                          type: string
                          description: Full name of the user
                          example: "Gregg Mojica"
        "401":
          description: "401"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "message":"Unauthorized"
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
      deprecated: false
    post:
      summary: Create a user
      description: >
        Creates a new user in your Embedded account. The user record acts like a
        "container" to store all the integrations, workflows, and credentials
        for any given user. Returns a user identifier.
      operationId: create-a-user
      tags:
        - Users
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - username
              properties:
                fullName:
                  type: string
                  description: >
                    The name of the user you want to create. Typically a full
                    name.
                username:
                  type: string
                  description: >
                    The username to be associated with the user. To easily
                    identify a customer, we recommend using a friendly username
                    such as an email for example. The username must be unique
                    (this acts as an identifier to reference and lookup a given
                    merchant on your platform).
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value:
                    userId: 675987329f2bda83f0dff233
              schema:
                type: object
                properties:
                  userId:
                    type: string
                    example: xyz123abc098754
        "401":
          description: "401"
          content:
            application/json:
              examples:
                Result:
                  value: "{}"
              schema:
                type: object
                properties: {}
      deprecated: false
      security:
        - bearerAuth: []
  /users/{userId}:
    put:
      summary: Update a user
      description: >
        Updates a user given a specified userId. This endpoint allows you to
        update a username or fullName and returns the updated user object.
      operationId: update-a-user
      tags:
        - Users
      parameters:
        - name: userId
          in: path
          description: >
            The Id of the user you want to lookup. Returned from the Create User
            endpoint. Note: you can also use the Embedded user's `username` in
            this field.
          schema:
            type: string
          required: true
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                username:
                  type: string
                  description: The unique identifier of the user
                fullName:
                  type: string
                  description: The name of the user
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "userId": "6323d7c9122ae69742a5d0a2",
                        "fullName": "Gregg Mojica",
                        "username": "greggmojica"
                    }
              schema:
                type: object
                properties:
                  userId:
                    type: string
                    example: 6323d7c9122ae69742a5d0a2
                  fullName:
                    type: string
                    example: Gregg Mojica
                  username:
                    type: string
                    example: greggmojica
        "401":
          description: "401"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "message":"Unauthorized"
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
      deprecated: false
      security:
        - bearerAuth: []
    get:
      summary: Retrieve a single user
      description: >
        Returns a specific user given a userId and any active workflows
        associated with the user.
      operationId: get-a-user
      tags:
        - Users
      parameters:
        - name: userId
          in: path
          description: >
            The Id of the user you want to lookup. Returned from the Create User
            endpoint. Note: you can also use the Embedded user's `username` in
            this field.
          schema:
            type: string
          required: true
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                        "userId": "6323d7c9122ae69742a5d0a2",
                        "fullName": "Gregg Mojica",
                        "username": "support@runalloy.com",
                    }
      deprecated: false
      security:
        - bearerAuth: []
    delete:
      summary: Delete a user
      description: >
        This endpoint deletes a user account. It is most commonly used when a
        user stops being a customer of your platform or in conjunction with a
        GDPR compliance request. Note that this endpoint only deletes the user's
        account – not any corresponding workflow logs or other data. To remove
        that data as part of a compliance request, see our 'Delete User Logs'
        endpoint.
      operationId: delete-a-user
      tags:
        - Users
      parameters:
        - name: userId
          in: path
          description: >
            The Id of the user you want to lookup. Returned from the Create User
            endpoint. Note: you can also use the Embedded user's `username` in
            this field.
          schema:
            type: string
          required: true
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
      responses:
        "200":
          description: "200"
          content:
            application/json:
              examples:
                Result:
                  value:
                    success: true
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                    default: true
        "401":
          description: "401"
          content:
            application/json:
              examples:
                Result:
                  value: |-
                    {
                      "message":"Unauthorized"
                    }
              schema:
                type: object
                properties:
                  message:
                    type: string
                    example: Unauthorized
      deprecated: false
      security:
        - bearerAuth: []
  /connectors/files/upload/request:
    post:
      summary: Generate Presigned Upload URL
      description: Generate a presigned URL for direct S3 file upload
      tags:
        - Files
      operationId: generate-presigned-upload-url
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - filename
                - mimeType
                - md5
              properties:
                filename:
                  type: string
                  description: Name of the file to be uploaded
                  example: "document.pdf"
                mimeType:
                  type: string
                  description: MIME type of the file
                  example: "application/pdf"
                md5:
                  type: string
                  description: MD5 hash of the file (hex or base64 format)
                  example: "2942bfabb3d05332b66eb128e0842cff"
      responses:
        "200":
          description: Presigned URL generated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  presignedUrl:
                    type: object
                    properties:
                      md5:
                        type: string
                        description: MD5 hash in base64 format
                        example: "KUK/q7PQUzK2brEo4IQs/w=="
                      presignedUrl:
                        type: string
                        description: Presigned URL for uploading
                        example: "https://alloy-user-files.s3.us-east-1.amazonaws.com/651eb6e11d156e0d7a42c59d_document.pdf"
                      type:
                        type: string
                        enum: ["new", "existing"]
                        description: File status
                        example: "new"
                      s3Key:
                        type: string
                        description: S3 key for the file
                        example: "651eb6e11d156e0d7a42c59d_document.pdf"
              example:
                presignedUrl:
                  md5: "KUK/q7PQUzK2brEo4IQs/w=="
                  presignedUrl: "https://alloy-user-files.s3.us-east-1.amazonaws.com/651eb6e11d156e0d7a42c59d_document.pdf"
                  type: "new"
                  s3Key: "651eb6e11d156e0d7a42c59d_document.pdf"
        "400":
          description: Invalid input
        "401":
          description: Unauthorized
  /connectors/files/list:
    get:
      summary: List User Files
      description: List all files uploaded by the authenticated user
      tags:
        - Files
      operationId: list-user-files
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
      responses:
        "200":
          description: List of user files
          content:
            application/json:
              schema:
                type: object
                properties:
                  files:
                    type: array
                    items:
                      type: object
                      properties:
                        s3Key:
                          type: string
                          description: The S3 key of the file
                        filename:
                          type: string
                          description: The filename without the userId prefix
                        size:
                          type: number
                          description: File size in bytes
                        lastModified:
                          type: string
                          format: date-time
                          description: Last modified timestamp
              example:
                files:
                  - s3Key: "651eb6e11d156e0d7a42c59d_document.pdf"
                    filename: "document.pdf"
                    size: 13264
                    lastModified: "2025-10-15T13:22:52.000Z"
        "401":
          description: Unauthorized
        "500":
          description: Internal server error
  /connectors/files/{s3Key}:
    delete:
      summary: Delete User File
      description: Delete a file by its S3 key
      tags:
        - Files
      operationId: delete-user-file
      security:
        - bearerAuth: []
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: s3Key
          in: path
          required: true
          description: The S3 key of the file to delete
          schema:
            type: string
          example: "651eb6e11d156e0d7a42c59d_document.pdf"
      responses:
        "200":
          description: File deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: "File deleted successfully"
              example:
                success: true
                message: "File deleted successfully"
        "400":
          description: Invalid input or file not found
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                    example: "Invalid S3 key, file not found"
        "401":
          description: Unauthorized
        "500":
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer
  schemas:
    Connector:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Unique integration identifier
          example: "slack"
        name:
          type: string
          description: Display name of the integration
          example: "Slack"
        icon:
          type: string
          format: uri
          description: URL to the integration's icon
          example: "https://cdn.runalloy.com/icons/spotify.png"
        group:
          type: array
          items:
            type: string
          description: Groups this integration belongs to
          example: []
        category:
          type: array
          items:
            type: string
          description: Categories this integration belongs to
          example: ["marketing-automation"]
    Connectors:
      type: object
      properties:
        connectors:
          type: array
          items:
            $ref: '#/components/schemas/Connector'
    Action:
      type: object
      required:
        - id
        - name
      properties:
        id:
          type: string
          description: Unique action identifier
          example: "chat_postMessage"
        name:
          type: string
          description: Display name of the action
          example: "Post"
        description:
          type: string
          description: Description of what the action does
          example: "Posts a message into a channel."
    Actions:
      type: object
      properties:
        actions:
          type: array
          items:
            $ref: '#/components/schemas/Action'
    Resource:
      type: object
      required:
        - name
      properties:
        name:
          type: string
          description: Name of the resource
          example: "chat"
        description:
          type: string
          description: Description of the resource operations
          example: "Operations related to chat."
        actions:
          type: array
          items:
            $ref: '#/components/schemas/Action'
          description: List of actions available for this resource
    Resources:
      type: object
      properties:
        resources:
          type: array
          items:
            $ref: '#/components/schemas/Resource'
    ExecuteConnectorActionRequest:
      type: object
      required:
        - credentialId
      properties:
        credentialId:
          type: string
          description: Valid credential ID (must be a valid ObjectId)
          example: "507f1f77bcf86cd799439011"
        requestBody:
          type: object
          additionalProperties: true
          description: Request body data for the action
        additionalHeaders:
          type: object
          additionalProperties: true
          description: Additional headers to include in the request
        queryParameters:
          type: object
          additionalProperties: true
          description: Query parameters for the request
        pathParams:
          type: object
          additionalProperties: true
          description: Path parameters for the request
    Credentials:
      type: object
      properties:
        credentials:
          type: array
          items:
            $ref: '#/components/schemas/Credential'
    Credential:
      type: object
      required:
        - credentialId
        - name
        - connectorId
        - authenticationType
      properties:
        credentialId:
          type: string
          description: Unique credential identifier
          example: "68f8a98a48af02e752bf8e1b"
        name:
          type: string
          description: Display name of the credential
          example: "Slack User's Slack Credential"
        connectorId:
          type: string
          description: ID of the connector this credential is for
          example: "slack"
        authenticationType:
          type: string
          description: Type of authentication method
          example: "oauth2"
        createdAt:
          type: string
          format: date-time
          description: Timestamp when the credential was created
          example: "2025-10-22T09:53:14.374Z"
        updatedAt:
          type: string
          format: date-time
          description: Timestamp when the credential was last updated
          example: "2025-10-22T09:53:14.382Z"
    ConnectorCredentialsMetadata:
      type: object
      properties:
        metadata:
          type: array
          items:
            $ref: '#/components/schemas/CredentialMetadata'
    CredentialMetadata:
      type: object
      required:
        - authenticationType
        - properties
      properties:
        authenticationType:
          type: string
          description: Type of authentication method
          example: "oauth2"
        properties:
          type: array
          items:
            $ref: '#/components/schemas/CredentialProperty'
          description: List of properties required for this credential type
    CredentialProperty:
      type: object
      required:
        - name
        - required
        - type
      properties:
        name:
          type: string
          description: Name of the property
          example: "userId"
        required:
          type: boolean
          description: Whether this property is required
          example: true
        type:
          type: string
          description: Data type of the property
          example: "string"
    CreateConnectorCredentialRequest:
      type: object
      required:
        - userId
        - authenticationType
      properties:
        userId:
          type: string
          description: User identifier for the credential
          example: "{{userId}}"
        authenticationType:
          type: string
          description: Type of authentication method
          example: "oauth2"
        authConfigId:
          type: string
          description: ID of the auth config you want to create the credential with
          example: "67a37f29e0aa276e50d7253a"
        redirectUri:
          type: string
          format: uri
          description: The URI to which we'll redirect the user after authenticating
          example: "https://myapp.com"
