> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.whizcozy.com/api-reference/whiz-board-api/invitations/cancel-invitation-api-v-1-firms-firm-slug-invitations-invitation-id-delete/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.whizcozy.com/_mcp/server. # Cancel Invitation DELETE https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/{firm_slug}/invitations/{invitation_id} Cancel a pending firm invitation. **Allowed roles**: - `owner` Accepted invitations cannot be canceled. Reference: https://docs.whizcozy.com/api-reference/whiz-board-api/invitations/cancel-invitation-api-v-1-firms-firm-slug-invitations-invitation-id-delete ## Authentication - `Authorization` header (required) — API Key authentication via header ## Request ### Path parameters - `invitation_id` (string, required) - `firm_slug` (string, required) ## Response ### 200 Successful Response - `data` (InvitationResponse, required) - `status` (string, optional, default: success) ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### InvitationResponse - `id` (string, required) - `firm_id` (integer, required) - `email` (string, required) - `role` (enum, required) — Role of a user within a Firm (tenant). - Allowed values: `owner`, `ca_staff`, `client` - `status` (string, required) - `expires_at` (datetime, required) - `invite_url` (string, required) ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) - `input` (any, optional) - `ctx` (ValidationErrorCtx, optional) ### ValidationErrorLocItems ### ValidationErrorCtx ## Examples **Response** ```json { "data": { "id": "string", "firm_id": 1, "email": "string", "role": "owner", "status": "string", "expires_at": "2024-01-15T09:30:00Z", "invite_url": "string" }, "status": "success" } ``` **SDK Code** ```python import requests url = "https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/invitations/invitation_id" headers = {"Authorization": ""} response = requests.delete(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/invitations/invitation_id'; const options = {method: 'DELETE', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/invitations/invitation_id" req, _ := http.NewRequest("DELETE", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/invitations/invitation_id") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.delete("https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/invitations/invitation_id") .header("Authorization", "") .asString(); ``` ```php request('DELETE', 'https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/invitations/invitation_id', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/invitations/invitation_id"); var request = new RestRequest(Method.DELETE); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://prod-whizboard-be-680473615767.asia-southeast1.run.app/api/v1/firms/firm_slug/invitations/invitation_id")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```