# List and Create Experiences POST /api/v1/experiences/ Content-Type: application/json **GET:** List all experiences (drafts and published) for the logged-in user, ordered by last updated date. **POST:** Create a new experience with AI experience types and custom data. **Publishing Behavior:** - When an experience is fully published (all selected types succeed), the original draft is hidden from listings - When partially published (some types fail), the draft remains visible but only contains the failed types - Published experiences appear as separate entries with deployed resource UIDs **UID Format for Listing:** - **Draft experiences:** 'uid' contains the experience UID - **Published experiences:** 'uid' contains the deployed resource UID (domain/blog/quest), 'experience_uid' contains the original experience UID **Filtering and Search:** Supports extensive filtering by category, subcategory, draft status, etc. **Category, Subcategory and Tags Support:** 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 category/subcategory names to the corresponding objects. **Podcast Preset Selection:** For PODCAST experiences, include 'voice_type' in the data field with a valid preset code. First call GET /api/v1/podcasts/presets/ to list available presets (interview, panel, educational, narrative, debate), then use the preset code. The system validates that the selected preset has active voices available. Reference: https://docs.aisquare.studio/api-reference/ai-square-studio-api/experiences/list ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: AISquare Studio API version: 1.0.0 paths: /api/v1/experiences/: post: operationId: create summary: List and Create Experiences description: >- **GET:** List all experiences (drafts and published) for the logged-in user, ordered by last updated date. **POST:** Create a new experience with AI experience types and custom data. **Publishing Behavior:** - When an experience is fully published (all selected types succeed), the original draft is hidden from listings - When partially published (some types fail), the draft remains visible but only contains the failed types - Published experiences appear as separate entries with deployed resource UIDs **UID Format for Listing:** - **Draft experiences:** 'uid' contains the experience UID - **Published experiences:** 'uid' contains the deployed resource UID (domain/blog/quest), 'experience_uid' contains the original experience UID **Filtering and Search:** Supports extensive filtering by category, subcategory, draft status, etc. **Category, Subcategory and Tags Support:** 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 category/subcategory names to the corresponding objects. **Podcast Preset Selection:** For PODCAST experiences, include 'voice_type' in the data field with a valid preset code. First call GET /api/v1/podcasts/presets/ to list available presets (interview, panel, educational, narrative, debate), then use the preset code. The system validates that the selected preset has active voices available. tags: - subpackage_experiences responses: '200': description: List of experiences (mixed format based on draft status) content: application/json: schema: $ref: '#/components/schemas/experiences_create_Response_200' '400': description: Invalid input data content: application/json: schema: description: Any type '401': description: Unauthorized content: application/json: schema: description: Any type requestBody: content: application/json: schema: $ref: '#/components/schemas/ExperienceCreateUpdate' 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 ExperienceCreateUpdate: type: object properties: id: type: integer uid: type: string format: uuid title: type: - string - 'null' rag_documents: type: array items: type: integer content_vault_documents: type: array items: type: integer description: List of content vault document IDs to link to this experience category: type: - string - 'null' description: Category name subcategory: type: - string - 'null' description: Subcategory name focus_area: type: - string - 'null' tags: type: array items: type: string description: List of tag names (will be created if they don't exist) visibility: $ref: '#/components/schemas/GlobalVisibilityEnum' status: $ref: '#/components/schemas/GlobalCreationStatusEnum' is_draft: type: boolean step: type: - integer - 'null' publication: type: - integer - 'null' description: Single publication ID to link to the experience user: type: - integer - 'null' needs_review: type: boolean description: Whether this experience requires review before publishing experience_types_data: type: array items: $ref: '#/components/schemas/ExperienceTypeData' selected_experience_types: type: array items: $ref: '#/components/schemas/ExperienceTypeEnum' description: List of experience types to include workspace_group: type: integer workspace_name: type: string workspace_type: type: string created_at: type: string format: date-time updated_at: type: string format: date-time required: - id - uid - user - workspace_group - workspace_name - workspace_type - created_at - updated_at description: Serializer for creating and updating Experience model. title: ExperienceCreateUpdate experiences_create_Response_200: type: object properties: {} description: Empty response body title: experiences_create_Response_200 ``` ## SDK Code Examples ```python Create a minimal experience with auto-generated title import requests url = "https://api.example.com/api/v1/experiences/" payload = {} headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Create a minimal experience with auto-generated title const url = 'https://api.example.com/api/v1/experiences/'; const options = {method: 'POST', 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 Create a minimal experience with auto-generated title package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/experiences/" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", 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 Create a minimal experience with auto-generated title require 'uri' require 'net/http' url = URI("https://api.example.com/api/v1/experiences/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java Create a minimal experience with auto-generated title import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Create a minimal experience with auto-generated title request('POST', 'https://api.example.com/api/v1/experiences/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Create a minimal experience with auto-generated title using RestSharp; var client = new RestClient("https://api.example.com/api/v1/experiences/"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Create a minimal experience with auto-generated title 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/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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 Create a basic experience import requests url = "https://api.example.com/api/v1/experiences/" payload = {} headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Create a basic experience const url = 'https://api.example.com/api/v1/experiences/'; const options = {method: 'POST', 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 Create a basic experience package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/experiences/" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", 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 Create a basic experience require 'uri' require 'net/http' url = URI("https://api.example.com/api/v1/experiences/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java Create a basic experience import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Create a basic experience request('POST', 'https://api.example.com/api/v1/experiences/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Create a basic experience using RestSharp; var client = new RestClient("https://api.example.com/api/v1/experiences/"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Create a basic experience 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/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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 Create AI Expert experience with custom data import requests url = "https://api.example.com/api/v1/experiences/" payload = {} headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Create AI Expert experience with custom data const url = 'https://api.example.com/api/v1/experiences/'; const options = {method: 'POST', 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 Create AI Expert experience with custom data package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/experiences/" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", 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 Create AI Expert experience with custom data require 'uri' require 'net/http' url = URI("https://api.example.com/api/v1/experiences/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java Create AI Expert experience with custom data import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Create AI Expert experience with custom data request('POST', 'https://api.example.com/api/v1/experiences/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Create AI Expert experience with custom data using RestSharp; var client = new RestClient("https://api.example.com/api/v1/experiences/"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Create AI Expert experience with custom data 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/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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 Create podcast experience with voice preset selection import requests url = "https://api.example.com/api/v1/experiences/" payload = {} headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Create podcast experience with voice preset selection const url = 'https://api.example.com/api/v1/experiences/'; const options = {method: 'POST', 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 Create podcast experience with voice preset selection package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.example.com/api/v1/experiences/" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", 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 Create podcast experience with voice preset selection require 'uri' require 'net/http' url = URI("https://api.example.com/api/v1/experiences/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java Create podcast experience with voice preset selection import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Create podcast experience with voice preset selection request('POST', 'https://api.example.com/api/v1/experiences/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Create podcast experience with voice preset selection using RestSharp; var client = new RestClient("https://api.example.com/api/v1/experiences/"); var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Create podcast experience with voice preset selection 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/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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/" payload = {} headers = {"Content-Type": "application/json"} response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.example.com/api/v1/experiences/'; const options = {method: 'POST', 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/" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", 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/") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.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.post("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('POST', 'https://api.example.com/api/v1/experiences/', [ 'body' => '{}', 'headers' => [ 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.example.com/api/v1/experiences/"); var request = new RestRequest(Method.POST); 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/")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" 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() ```