From 1dc07d35505c5cfbbf99018ea30d656a38be22fd Mon Sep 17 00:00:00 2001 From: Saket Aryan Date: Mon, 29 Dec 2025 14:51:42 +0530 Subject: [PATCH] (docs): update to use the v2 URL Patterns in delete user route (#3864) --- docs/api-reference/entities/delete-user.mdx | 2 +- docs/openapi.json | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/api-reference/entities/delete-user.mdx b/docs/api-reference/entities/delete-user.mdx index 58d136806..fef79f62a 100644 --- a/docs/api-reference/entities/delete-user.mdx +++ b/docs/api-reference/entities/delete-user.mdx @@ -1,4 +1,4 @@ --- title: 'Delete User' -openapi: delete /v1/entities/{entity_type}/{entity_id}/ +openapi: delete /v2/entities/{entity_type}/{entity_id}/ --- \ No newline at end of file diff --git a/docs/openapi.json b/docs/openapi.json index 4feb00a77..f842853a2 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -222,7 +222,7 @@ } } }, - "/v1/entities/{entity_type}/{entity_id}/": { + "/v2/entities/{entity_type}/{entity_id}/": { "get": { "tags": [ "entities" @@ -329,27 +329,27 @@ "x-code-samples": [ { "lang": "Python", - "source": "import requests\n\nurl = \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\"\n\nheaders = {\"Authorization\": \"Token \"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers)\n\nprint(response.text)" + "source": "import requests\n\nurl = \"https://api.mem0.ai/v2/entities/{entity_type}/{entity_id}/\"\n\nheaders = {\"Authorization\": \"Token \"}\n\nresponse = requests.request(\"DELETE\", url, headers=headers)\n\nprint(response.text)" }, { "lang": "JavaScript", - "source": "const options = {method: 'DELETE', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" + "source": "const options = {method: 'DELETE', headers: {Authorization: 'Token '}};\n\nfetch('https://api.mem0.ai/v2/entities/{entity_type}/{entity_id}/', options)\n .then(response => response.json())\n .then(response => console.log(response))\n .catch(err => console.error(err));" }, { "lang": "cURL", - "source": "curl --request DELETE \\\n --url https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/ \\\n --header 'Authorization: Token '" + "source": "curl --request DELETE \\\n --url https://api.mem0.ai/v2/entities/{entity_type}/{entity_id}/ \\\n --header 'Authorization: Token '" }, { "lang": "Go", - "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}" + "source": "package main\n\nimport (\n\t\"fmt\"\n\t\"net/http\"\n\t\"io/ioutil\"\n)\n\nfunc main() {\n\n\turl := \"https://api.mem0.ai/v2/entities/{entity_type}/{entity_id}/\"\n\n\treq, _ := http.NewRequest(\"DELETE\", url, nil)\n\n\treq.Header.Add(\"Authorization\", \"Token \")\n\n\tres, _ := http.DefaultClient.Do(req)\n\n\tdefer res.Body.Close()\n\tbody, _ := ioutil.ReadAll(res.Body)\n\n\tfmt.Println(res)\n\tfmt.Println(string(body))\n\n}" }, { "lang": "PHP", - "source": " \"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}" + "source": " \"https://api.mem0.ai/v2/entities/{entity_type}/{entity_id}/\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"DELETE\",\n CURLOPT_HTTPHEADER => [\n \"Authorization: Token \"\n ],\n]);\n\n$response = curl_exec($curl);\n$err = curl_error($curl);\n\ncurl_close($curl);\n\nif ($err) {\n echo \"cURL Error #:\" . $err;\n} else {\n echo $response;\n}" }, { "lang": "Java", - "source": "HttpResponse response = Unirest.delete(\"https://api.mem0.ai/v1/entities/{entity_type}/{entity_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" + "source": "HttpResponse response = Unirest.delete(\"https://api.mem0.ai/v2/entities/{entity_type}/{entity_id}/\")\n .header(\"Authorization\", \"Token \")\n .asString();" } ] }