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

# DetachWorkstreamResourceAPI mirrors erdo_attach_workstream_resource's


> detach=true mode: it takes a link back off a workstream, addressed by the resource's type and id. Omit relationship\_type to remove every link the workstream holds to that resource. The response reports removed\_count, so a caller can tell "unlinked it" from "there was nothing to unlink".




## OpenAPI

````yaml /api/openapi.json delete /v1/workstreams/{workstreamSlug}/resources
openapi: 3.0.0
info:
  title: Erdo API
  description: >-
    Erdo's REST API: query and write datasets, run agents, manage threads,
    integrations, pages, evals, workstreams, experiments, and bounded outreach.
    Authenticate with a Bearer API key (erdo_api_...) or scoped token
    (erdo_token_...).
  version: '2026-09-09'
servers:
  - url: https://api.erdo.ai
    description: Production
security:
  - bearerAuth: []
paths:
  /v1/workstreams/{workstreamSlug}/resources:
    delete:
      summary: |
        DetachWorkstreamResourceAPI mirrors erdo_attach_workstream_resource's
      description: >
        detach=true mode: it takes a link back off a workstream, addressed by
        the resource's type and id. Omit relationship\_type to remove every link
        the workstream holds to that resource. The response reports
        removed\_count, so a caller can tell "unlinked it" from "there was
        nothing to unlink".
      operationId: DELETE:mcp.DetachWorkstreamResourceAPI
      parameters:
        - allowEmptyValue: true
          explode: false
          in: path
          name: workstreamSlug
          required: true
          schema:
            type: string
          style: simple
        - allowEmptyValue: true
          explode: true
          in: query
          name: resource_type
          required: false
          schema:
            type: string
          style: form
        - allowEmptyValue: true
          explode: true
          in: query
          name: resource_id
          required: false
          schema:
            type: string
          style: form
        - allowEmptyValue: true
          explode: true
          in: query
          name: relationship_type
          required: false
          schema:
            type: string
          style: form
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  relationship_type:
                    description: |
                      caller detached every relationship.
                    title: >
                      RelationshipType echoes the filter that was applied, empty
                      when the
                    type: string
                  removed:
                    items:
                      $ref: '#/components/schemas/types.WorkstreamResource'
                    type: array
                  removed_count:
                    format: int64
                    type: integer
                  resource_id:
                    format: uuid
                    type: string
                  resource_type:
                    type: string
                  workstream_id:
                    format: uuid
                    type: string
                type: object
          description: Success response
        default:
          $ref: '#/components/responses/APIError'
components:
  schemas:
    types.WorkstreamResource:
      properties:
        created_at:
          format: date-time
          type: string
        id:
          format: uuid
          type: string
        phase_id:
          format: uuid
          type: string
        relationship_type:
          type: string
        resource_id:
          format: uuid
          type: string
        resource_type:
          type: string
        title:
          type: string
        workstream_id:
          format: uuid
          type: string
      title: >
        WorkstreamResource is a typed link from a workstream to another domain
        object.
      type: object
  responses:
    APIError:
      content:
        application/json:
          schema:
            externalDocs:
              url: https://pkg.go.dev/encore.dev/beta/errs#Error
            properties:
              code:
                description: Error code
                example: not_found
                externalDocs:
                  url: https://pkg.go.dev/encore.dev/beta/errs#ErrCode
                type: string
              details:
                description: Error details
                type: object
              message:
                description: Error message
                type: string
            title: APIError
            type: object
      description: Error response
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: An Erdo API key (erdo_api_...) or scoped token (erdo_token_...).

````