# Retrieve, Update, or Delete Experience DELETE /api/v1/experiences/{id}/ Retrieve a specific experience by ID, update it, or delete it. Returns detailed information including all experience type data. Users can only access their own experiences or public ones. **Category, Subcategory and Tags Support:** When updating, you can specify category and subcategory using their names directly. Tags can be provided as a list of strings and will be created if they don't exist. The system will automatically resolve names to the corresponding objects. Reference: https://docs.aisquare.studio/api-reference/ai-square-studio-api/experiences/retrieve ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: AISquare Studio API version: 1.0.0 paths: /api/v1/experiences/{id}/: delete: operationId: destroy summary: Retrieve, Update, or Delete Experience description: >- Retrieve a specific experience by ID, update it, or delete it. Returns detailed information including all experience type data. Users can only access their own experiences or public ones. **Category, Subcategory and Tags Support:** When updating, you can specify category and subcategory using their names directly. Tags can be provided as a list of strings and will be created if they don't exist. The system will automatically resolve names to the corresponding objects. tags: - subpackage_experiences parameters: - name: id in: path required: true schema: type: integer responses: '200': description: Experience details or updated experience content: application/json: schema: $ref: '#/components/schemas/ExperienceDetail' '401': description: Unauthorized content: application/json: schema: description: Any type '403': description: Forbidden - not owner or not public content: application/json: schema: description: Any type '404': description: Experience not found content: application/json: schema: description: Any type components: schemas: GlobalVisibilityEnum: type: string enum: - public - private - team - org description: |- * `public` - Public * `private` - Private * `team` - Team * `org` - Organization title: GlobalVisibilityEnum GlobalCreationStatusEnum: type: string enum: - not_started - in_progress - completed - failed description: |- * `not_started` - Not Started * `in_progress` - In Progress * `completed` - Completed * `failed` - Failed title: GlobalCreationStatusEnum ExperienceTypeEnum: type: string enum: - AI_EXPERT - AI_NOTE - QUEST - PODCAST - AI_VIDEO description: |- * `AI_EXPERT` - AI Expert * `AI_NOTE` - AI Note * `QUEST` - Quest * `PODCAST` - Podcast * `AI_VIDEO` - AI Video title: ExperienceTypeEnum ExperienceTypeData: type: object properties: experience_type: $ref: '#/components/schemas/ExperienceTypeEnum' description: |- Type of AI experience * `AI_EXPERT` - AI Expert * `AI_NOTE` - AI Note * `QUEST` - Quest * `PODCAST` - Podcast * `AI_VIDEO` - AI Video data: description: >- Flexible JSON field for storing experience-type-specific data with custom headings and content logo_url: type: string cover_url: type: string required: - experience_type - logo_url - cover_url description: >- Serializer for ExperienceTypeData model. Adds logo_url and cover_url for frontend rendering. We purposefully expose only the URL (not the raw file field) to keep responses lightweight and avoid leaking storage backend internals. title: ExperienceTypeData SimpleUser: type: object properties: id: type: integer email: type: string format: email full_name: type: string username: type: string description: >- Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. is_verified: type: boolean profile_picture: type: string format: uri description: |- Convert ImageFieldFile to URL string for JSON serialization. Args: obj: The model instance being serialized (typically IAMUser) Returns: str | None: The URL of the profile picture, or None if not available required: - id - email - full_name - username - is_verified - profile_picture description: >- Simple user serializer with profile picture from associated IAMUserDetail. Fields: - id, email, full_name, username, is_verified (from IAMUser) - profile_picture (from first related IAMUserDetail if present) title: SimpleUser ExperienceDetail: type: object properties: id: type: integer uid: type: string format: uuid title: type: string experience_title: type: string experience_description: type: string description: |- Get the description of the primary deployed resource. Returns empty string if not published or resource not found. logo_url: type: string cover_url: type: string rag_documents: type: array items: type: integer category: type: - string - 'null' subcategory: type: - string - 'null' focus_area: type: - string - 'null' tags: type: array items: type: string visibility: $ref: '#/components/schemas/GlobalVisibilityEnum' status: $ref: '#/components/schemas/GlobalCreationStatusEnum' is_draft: type: boolean is_fully_published: type: boolean description: >- True when all selected experience types have been successfully published step: type: - integer - 'null' publication: type: string publication_details: type: string needs_review: type: boolean description: Whether this experience requires review before publishing experience_types_data: type: array items: $ref: '#/components/schemas/ExperienceTypeData' experience_types: type: array items: type: string description: Get all experience types associated with this experience has_published_versions: type: boolean description: Check if this experience has any published versions. publishing_status: type: string description: Get the current publishing status of the experience. generation_ready_for_review: type: boolean description: Check if deployed AI Notes and Podcasts have completed generation. blog_id: type: string podcast_script_preview: type: string primary_deployed_resource_uid: type: - string - 'null' format: uuid description: UID of the primary deployed resource (domain/blog/quest/podcast) primary_deployed_resource_id: type: - integer - 'null' description: Database ID of the primary deployed resource primary_deployed_resource_type: type: - string - 'null' description: >- Type of the primary deployed resource (AI Expert/AI Note/Quest/Podcast) metrics: type: object additionalProperties: description: Any type description: |- Get metrics for the primary deployed resource. Returns default metrics if not published. created_at: type: string format: date-time updated_at: type: string format: date-time owner: $ref: '#/components/schemas/SimpleUser' description: Owner/uploader user object required: - id - uid - title - experience_title - experience_description - logo_url - cover_url - rag_documents - category - subcategory - tags - is_fully_published - publication - publication_details - experience_types_data - experience_types - has_published_versions - publishing_status - generation_ready_for_review - blog_id - podcast_script_preview - metrics - created_at - updated_at - owner description: Serializer for Experience detail view with related data. title: ExperienceDetail ``` ## SDK Code Examples ```python import requests url = "https://api.example.com/api/v1/experiences/1/" payload = {} headers = {"Content-Type": "application/json"} response = requests.delete(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.example.com/api/v1/experiences/1/'; const options = {method: 'DELETE', headers: {'Content-Type': 'application/json'}, body: '{}'}; 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" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/experiences/1/" payload := strings.NewReader("{}") req, _ := http.NewRequest("DELETE", url, payload) req.Header.Add("Content-Type", "application/json") 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://api.example.com/api/v1/experiences/1/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["Content-Type"] = 'application/json' request.body = "{}" 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://api.example.com/api/v1/experiences/1/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('DELETE', 'https://api.example.com/api/v1/experiences/1/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.example.com/api/v1/experiences/1/"); var request = new RestRequest(Method.DELETE); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/api/v1/experiences/1/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ``` ```python import requests url = "https://api.example.com/api/v1/experiences/1/" payload = {} headers = {"Content-Type": "application/json"} response = requests.delete(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.example.com/api/v1/experiences/1/'; const options = {method: 'DELETE', headers: {'Content-Type': 'application/json'}, body: '{}'}; 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" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/experiences/1/" payload := strings.NewReader("{}") req, _ := http.NewRequest("DELETE", url, payload) req.Header.Add("Content-Type", "application/json") 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://api.example.com/api/v1/experiences/1/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Delete.new(url) request["Content-Type"] = 'application/json' request.body = "{}" 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://api.example.com/api/v1/experiences/1/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('DELETE', 'https://api.example.com/api/v1/experiences/1/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.example.com/api/v1/experiences/1/"); var request = new RestRequest(Method.DELETE); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Content-Type": "application/json"] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.example.com/api/v1/experiences/1/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "DELETE" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ```