# Complete partnership withdrawal

`provider_relationships.withdraw`

Complete the unchanged action reviewed by provider_relationships.review_withdrawal. Live permissions, ownership, limits, expiry, and pending state are checked again. Reuse client_request_id only for an identical retry, then list invitations and requests to verify the outcome.

[Partnerships guide](https://docs.levr.ai/mcp/resources/provider_relationships.md)

Availability depends on live discovery and your access to the record. Do not infer MCP calls from REST paths.

Operation: write. Required OAuth scopes: mcp.

## Input schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "properties": {
    "client_request_id": {
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "process_id": {
      "description": "Copy process_id with process_kind from provider_relationships.list_invitations_and_requests: rinv_ for invitation, rreq_ for request.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "process_kind": {
      "description": "Copy with process_id from provider_relationships.list_invitations_and_requests.",
      "enum": [
        "invitation",
        "request"
      ],
      "type": "string"
    },
    "provider_slug": {
      "description": "Copy provider_slug from providers.list; named slugs are valid.",
      "maxLength": 255,
      "minLength": 1,
      "type": "string"
    },
    "review_token": {
      "minLength": 1,
      "type": "string"
    },
    "user_confirmed": {
      "const": true,
      "type": "boolean"
    }
  },
  "required": [
    "provider_slug",
    "process_kind",
    "process_id",
    "review_token",
    "client_request_id",
    "user_confirmed"
  ],
  "type": "object"
}
```

## Output schema

```json
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "additionalProperties": false,
  "oneOf": [
    {
      "not": {
        "required": [
          "error"
        ]
      },
      "properties": {
        "ok": {
          "const": true
        }
      },
      "required": [
        "data"
      ]
    },
    {
      "not": {
        "required": [
          "data"
        ]
      },
      "properties": {
        "ok": {
          "const": false
        }
      },
      "required": [
        "error"
      ]
    }
  ],
  "properties": {
    "data": {
      "additionalProperties": false,
      "properties": {
        "completed": {
          "const": true,
          "type": "boolean"
        },
        "process": {
          "additionalProperties": false,
          "properties": {
            "allowed_actions": {
              "items": {
                "enum": [
                  "accept",
                  "reject",
                  "resend",
                  "withdraw"
                ],
                "type": "string"
              },
              "type": "array"
            },
            "created_at": {
              "type": "string"
            },
            "expires_at": {
              "format": "date-time",
              "type": [
                "string",
                "null"
              ]
            },
            "invited_company_name": {
              "type": [
                "string",
                "null"
              ]
            },
            "invited_email": {
              "type": [
                "string",
                "null"
              ]
            },
            "process_id": {
              "description": "Stable public identifier for the referenced resource.",
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            "process_kind": {
              "enum": [
                "invitation",
                "request"
              ],
              "type": "string"
            },
            "receiver_provider_slug": {
              "description": "Stable public identifier for the referenced resource.",
              "maxLength": 255,
              "minLength": 1,
              "type": "string"
            },
            "sender_provider_slug": {
              "type": [
                "string",
                "null"
              ]
            },
            "status": {
              "type": "string"
            },
            "updated_at": {
              "type": "string"
            },
            "workspace_role": {
              "enum": [
                "sender",
                "receiver"
              ],
              "type": "string"
            }
          },
          "required": [
            "process_kind",
            "process_id",
            "status",
            "sender_provider_slug",
            "receiver_provider_slug",
            "invited_email",
            "invited_company_name",
            "expires_at",
            "workspace_role",
            "allowed_actions",
            "created_at",
            "updated_at"
          ],
          "type": "object"
        }
      },
      "required": [
        "completed",
        "process"
      ],
      "type": "object"
    },
    "error": {
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "details": {
          "additionalProperties": true,
          "description": "Optional bounded, agent-safe correction or recovery facts.",
          "type": "object"
        },
        "message": {
          "type": "string"
        },
        "retryable": {
          "type": "boolean"
        }
      },
      "required": [
        "code",
        "message",
        "retryable"
      ],
      "type": "object"
    },
    "meta": {
      "additionalProperties": false,
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "type": "object"
    },
    "ok": {
      "description": "Whether the tool completed successfully.",
      "type": "boolean"
    }
  },
  "required": [
    "ok",
    "meta"
  ],
  "type": "object"
}
```

Check the result, then read the affected record to confirm your change.
