--- title: Delete Scope | Luma Agents --- DELETE /v1/scopes/{scope\_id} Select code samplecURL (shell:curl) ```js const url = 'https://agents.lumalabs.ai/v1/scopes/example'; const options = {method: 'DELETE', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```sh curl --request DELETE \ --url https://agents.lumalabs.ai/v1/scopes/example \ --header 'Authorization: Bearer ' ``` - Productionagents.lumalabs.ai/v1/scopes/{scope\_id} Delete a scope and everything in it. Answers to the API key, which deletes your client's scopes created without a `tenant_id`, or to a session token minted with a `tenant_id`, which deletes that tenant's scopes. A session token minted without a `tenant_id` deletes none and gets 404 `SCOPE.NOT_FOUND`. Refused with 409 `SCOPE.HAS_ACTIVE_SESSIONS` while any session in the scope is still active; end those first with `DELETE /v1/sessions/{id}`. A deleted scope answers 404 from then on, and its `key` is free to name a new scope. ## Authorizations - **[BearerAuth](/api/agents/index.md#bearerauth)** ## Parameters ### Path Parameters **scope\_id** required *Scope Id* string ## Responses ### 204 Successful Response ### 422 Validation Error Media typeapplication/json *HTTPValidationError* object **detail** *Detail* Array\ *ValidationError* object **ctx** *Context* object **input** *Input* **loc** required *Location* Array **msg** required *Message* string **type** required *Error Type* string ##### Examplegenerated ```json { "detail": [ { "ctx": {}, "input": "example", "loc": [ "example" ], "msg": "example", "type": "example" } ] } ```