> ## Documentation Index
> Fetch the complete documentation index at: https://developers.notion.com/llms.txt
> Use this file to discover all available pages before exploring further.

> Get general workflows metadata for a space.

# Get general workflows metadata for a space

The organization bot token must have the following scopes:

* `workflows:read`


## OpenAPI

````yaml openapi-adminApi.json GET /v1/spaces/{space_id}/agents
openapi: 3.1.0
info:
  title: Notion Admin API
  version: 1.0.0
  termsOfService: >-
    https://notion.notion.site/Terms-and-Privacy-28ffdd083dc3473e9c2da6ec011b58ac
servers:
  - url: https://api.notion.com/admin
security:
  - bearerAuth: []
tags:
  - name: Exports
    description: Workspace export endpoints
  - name: Legal holds
    description: Legal hold endpoints
  - name: Managed users
    description: Managed user endpoints
paths:
  /v1/spaces/{space_id}/agents:
    get:
      tags:
        - Admin API
      summary: Get general workflows metadata for a space
      operationId: get-workflows-metadata-for-space
      parameters:
        - $ref: '#/components/parameters/notionVersion'
        - name: space_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
        - name: created_by_ids
          in: query
          schema:
            description: User IDs of agent creators to filter by.
            type: array
            items:
              type: string
              format: uuid
        - name: created_time_from
          in: query
          schema:
            description: >-
              Inclusive lower bound on 'created_time', as epoch-millisecond
              digits. Requests with non-numeric values return a validation
              error.
            type: string
        - name: created_time_to
          in: query
          schema:
            description: >-
              Inclusive upper bound on 'created_time', as epoch-millisecond
              digits. Requests with non-numeric values return a validation
              error.
            type: string
        - name: credit_usage_time_from
          in: query
          schema:
            description: >-
              Epoch ms, inclusive. When either bound is set, an agent is
              returned only if its latest credit usage is inside the [from, to]
              window; agents with no in-window usage are excluded entirely, and
              'last_credit_usage_time' reflects the most recent credit usage of
              the agent.
            type: string
        - name: credit_usage_time_to
          in: query
          schema:
            description: >-
              Epoch ms, inclusive. See 'credit_usage_time_from' for the window
              semantics.
            type: string
        - name: cursor
          in: query
          schema:
            description: >-
              Pagination cursor returned from a previous response's
              'next_cursor'.
            type: string
        - name: integration_types
          in: query
          schema:
            description: >-
              Integration types to filter by, such as "slack", "github", or
              "mcpServer".
            type: array
            items:
              type: string
        - name: mcp_server_names
          in: query
          schema:
            description: MCP server names to filter by.
            type: array
            items:
              type: string
        - name: models
          in: query
          schema:
            description: >-
              Agent models to filter by. Accepts model display names (such as
              "Claude 4 Sonnet") as shown in the response 'model' field.
            type: array
            items:
              type: string
        - name: name
          in: query
          schema:
            description: >-
              Case-insensitive substring match against the agent name or
              description. Every other string filter uses exact matching against
              its target field values.
            type: string
        - name: shared_with_group_ids
          in: query
          schema:
            description: >-
              Filter to agents shared with any of these group IDs. Matches
              custom agents only: database (autofill) agents are excluded
              whenever this filter is set, since their sharing state is not
              exposed.
            type: array
            items:
              type: string
              format: uuid
        - name: shared_with_user_ids
          in: query
          schema:
            description: >-
              Filter to agents shared with any of these user IDs. Matches custom
              agents only: database (autofill) agents are excluded whenever this
              filter is set, since their sharing state is not exposed.
            type: array
            items:
              type: string
              format: uuid
        - name: status
          in: query
          schema:
            description: >-
              Status filter. Accepts every response status value, plus the
              "disabled" convenience bucket for admin-disabled agents.
            type: array
            items:
              type: string
              enum:
                - active
                - credit_limit
                - deleted
                - disabled
                - disabled_by_notion
                - disabled_due_to_lack_of_editors
                - disabled_due_to_lack_of_full_access_members
                - disabled_from_agent_settings
                - disabled_from_api
                - disabled_from_workspace_settings
                - failure_limit
                - internal_error
                - mark_session_failed_autopause
                - needs_review
                - run_limit
                - runaway_credit_usage
                - tool_unavailable
                - workspace_credit_limit
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  has_more:
                    type: boolean
                  results:
                    description: >-
                      The page of agents matching the filters, up to 25.
                      Permanently deleted tombstones are excluded.
                    type: array
                    items:
                      type: object
                      properties:
                        alive:
                          description: >-
                            Whether the agent is live (not soft-deleted).
                            'false' for deleted agents, which are returned only
                            when the "deleted" status filter is set.
                          type: boolean
                        id:
                          description: The agent's unique identifier.
                          type: string
                        space_id:
                          type: string
                          format: uuid
                        status:
                          description: >-
                            The agent's current status: "active", "deleted", or
                            a snake_case paused reason. Uses the same values as
                            the 'status' query filter.
                          type: string
                          enum:
                            - active
                            - credit_limit
                            - deleted
                            - disabled_by_notion
                            - disabled_due_to_lack_of_editors
                            - disabled_due_to_lack_of_full_access_members
                            - disabled_from_agent_settings
                            - disabled_from_api
                            - disabled_from_workspace_settings
                            - failure_limit
                            - internal_error
                            - mark_session_failed_autopause
                            - needs_review
                            - run_limit
                            - runaway_credit_usage
                            - tool_unavailable
                            - workspace_credit_limit
                        type:
                          description: Custom agents vs database (autofill) agents.
                          type: string
                          enum:
                            - custom
                            - database_autofill
                        created_by_id:
                          type: string
                          format: uuid
                        created_by_table:
                          description: >-
                            The actor table of the agent's creator, such as
                            "notion_user".
                          type: string
                          enum:
                            - bot
                            - notion_user
                            - organization_bot
                        created_time:
                          description: Epoch ms when the agent was created.
                          type: number
                        description:
                          description: The agent's description.
                          type: string
                        icon:
                          description: The agent's icon.
                          type: string
                        last_credit_usage_time:
                          description: >-
                            Epoch ms of the agent's most recent premium-credit
                            usage; omitted if the agent has never consumed
                            credits.
                          type: number
                        last_edited_by_id:
                          type: string
                          format: uuid
                        last_edited_by_table:
                          description: >-
                            The actor table of the agent's last editor, such as
                            "notion_user".
                          type: string
                          enum:
                            - bot
                            - notion_user
                            - organization_bot
                        last_edited_time:
                          description: Epoch ms when the agent was last edited.
                          type: number
                        last_run_time:
                          description: >-
                            Epoch ms of the agent's most recent run; omitted if
                            the agent has never run.
                          type: number
                        model:
                          description: >-
                            Human-readable model name, such as "Claude 4
                            Sonnet". Omitted when the agent is set to
                            automatically choose a model, or when no display
                            name is available.
                          type: string
                        modules:
                          description: >-
                            The capabilities and tools the agent is allowed to
                            use — both inside Notion and in connected apps such
                            as Slack, the web, or MCP servers. At most 250
                            module summaries are returned.
                          type: array
                          items:
                            description: >-
                              Summary of a module attached to a workflow (which
                              integration + its reach).
                            type: object
                            properties:
                              id:
                                type: string
                              type:
                                type: string
                              name:
                                type: string
                              resources:
                                description: >-
                                  Per-resource access this module grants the
                                  agent, such as channels, pages, repositories,
                                  files, or MCP resources, and the actions
                                  allowed on each.
                                type: array
                                items:
                                  description: >-
                                    A resource, or set of resources, that a
                                    module grants the agent access to. This
                                    includes the resource kind when available,
                                    resource identifiers, and granted actions.
                                  type: object
                                  properties:
                                    actions:
                                      description: >-
                                        Action verbs granted on these resources
                                        (read/write/search/editor/...).
                                      type: array
                                      items:
                                        type: string
                                    ids:
                                      description: >-
                                        Opaque resource identifiers the agent
                                        can act on: Slack channel/user URIs,
                                        Notion page/collection ids, GitHub
                                        repos, Drive file ids, MCP resource
                                        URIs, or "*" for workspace-wide access.
                                      type: array
                                      items:
                                        type: string
                                    kind:
                                      description: >-
                                        Resource discriminator when the module
                                        distinguishes kinds (Notion:
                                        "pageOrCollectionViewBlock" | "agent" |
                                        "workspacePublic" | "databaseProperty";
                                        search: "web" | "helpdocs"; MCP: "tool"
                                        | "resource"). Omitted when the module
                                        has a single implicit resource kind.
                                      type: string
                              scopes:
                                description: >-
                                  Distinct capability scopes granted to the
                                  module — the action verbs from its permission
                                  entries (e.g. Slack "read"/"write", GitHub
                                  "search", Notion "reader"/"editor"),
                                  aggregated across all resources for a quick
                                  overview.
                                type: array
                                items:
                                  type: string
                              version:
                                description: Module version, for change tracking.
                                type: string
                            required:
                              - id
                              - type
                        moved_to_trash_time:
                          description: >-
                            Epoch ms when the agent was deleted; only present
                            for deleted agents.
                          type: number
                        name:
                          description: The agent's name.
                          type: string
                        parent_id:
                          type: string
                          format: uuid
                        parent_table:
                          description: >-
                            The table the agent is parented to: custom agents
                            belong to the workspace ("space"); database
                            (autofill) agents belong to their database's block
                            ("block").
                          type: string
                          enum:
                            - block
                            - space
                        permissions:
                          description: >-
                            Who the agent is shared with: each principal's
                            stored and resolved roles, workspace grant first, at
                            most 250 entries. Omitted for database (autofill)
                            agents, whose sharing state is not exposed.
                          type: array
                          items:
                            description: >-
                              A principal with its stored and workspace-resolved
                              roles.
                            type: object
                            properties:
                              principal:
                                anyOf:
                                  - type: object
                                    properties:
                                      group_id:
                                        type: string
                                        format: uuid
                                      type:
                                        type: string
                                        const: group
                                    required:
                                      - group_id
                                      - type
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        const: user
                                      user_id:
                                        type: string
                                        format: uuid
                                    required:
                                      - type
                                      - user_id
                                  - type: object
                                    properties:
                                      type:
                                        type: string
                                        const: workspace
                                    required:
                                      - type
                              resolved_role:
                                description: >-
                                  The effective role for this principal: the
                                  most permissive of the stored role and every
                                  other grant that reaches the principal — the
                                  workspace-wide grant and, for users, any
                                  granted group they belong to. Roles rank
                                  "view_and_interact" < "edit" < "full_access",
                                  so a user whose stored role is "edit" resolves
                                  to "full_access" when the workspace-wide grant
                                  allows "full_access". Grants that do not reach
                                  the principal are excluded: the workspace-wide
                                  grant reaches only full workspace members, and
                                  group grants reach only workspace members
                                  (never page guests or non-members, even if a
                                  stale group-member row still exists for them).
                                type: string
                                enum:
                                  - edit
                                  - full_access
                                  - view_and_interact
                              role:
                                description: >-
                                  The role stored on this principal's agent
                                  permission item.
                                type: string
                                enum:
                                  - edit
                                  - full_access
                                  - view_and_interact
                            required:
                              - principal
                              - resolved_role
                              - role
                      required:
                        - alive
                        - id
                        - space_id
                        - status
                        - type
                  next_cursor:
                    type: string
                required:
                  - has_more
                  - results
        '400':
          description: The request body, path parameters, or query parameters are invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError400'
              example:
                type: error
                code: validation_error
                status: 400
                message: The request body is invalid.
        '401':
          description: The request is missing a valid bearer token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError401'
              example:
                type: error
                code: unauthorized
                status: 401
                message: Unauthorized.
        '403':
          description: >-
            The authenticated bot does not have access to the requested resource
            or scope.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError403'
              example:
                type: error
                code: forbidden
                status: 403
                message: Forbidden.
        '404':
          description: The requested resource could not be found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError404'
              example:
                type: error
                code: not_found
                status: 404
                message: Not found.
        '429':
          description: The request was rate limited.
          headers:
            retry-after:
              description: Seconds to wait before retrying the request.
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError429'
              example:
                type: error
                code: rate_limited
                status: 429
                message: Rate limited.
        '500':
          description: An unexpected server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/adminApiError500'
              example:
                type: error
                code: internal_server_error
                status: 500
                message: An unexpected error occurred.
components:
  parameters:
    notionVersion:
      name: Notion-Version
      in: header
      required: true
      schema:
        enum:
          - '2026-06-01'
      description: The Admin API version to use for this request.
  schemas:
    adminApiError400:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - validation_error
        status:
          enum:
            - 400
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError401:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - unauthorized
        status:
          enum:
            - 401
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError403:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - missing_scope
            - forbidden
        status:
          enum:
            - 403
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError404:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - not_found
        status:
          enum:
            - 404
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError429:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - rate_limited
        status:
          enum:
            - 429
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
    adminApiError500:
      type: object
      properties:
        type:
          enum:
            - error
        code:
          enum:
            - internal_server_error
        status:
          enum:
            - 500
        message:
          type: string
      required:
        - type
        - code
        - status
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````