# List and Create Experiences GET /api/v1/experiences/ **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/: get: operationId: list 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 parameters: - name: experience_type in: query required: false schema: type: string - name: is_draft in: query required: false schema: type: boolean - name: ordering in: query description: >- Comma separated list of ordering fields. Prefix with - for descending. required: false schema: type: string - name: page in: query description: A page number within the paginated result set. required: false schema: type: integer - name: page_size in: query description: Number of results to return per page. required: false schema: type: integer - name: q in: query description: Full-text search across key fields required: false schema: type: string - name: search in: query required: false schema: type: string - name: sort in: query required: false schema: type: string - name: status in: query required: false schema: type: string - name: visibility in: query description: |- * `public` - Public * `private` - Private * `team` - Team * `org` - Organization required: false schema: $ref: '#/components/schemas/ApiV1ExperiencesGetParametersVisibility' responses: '200': description: List of experiences (mixed format based on draft status) content: application/json: schema: $ref: '#/components/schemas/experiences_list_Response_200' '400': description: Invalid input data content: application/json: schema: description: Any type '401': description: Unauthorized content: application/json: schema: description: Any type components: schemas: ApiV1ExperiencesGetParametersVisibility: type: string enum: - org - private - public - team title: ApiV1ExperiencesGetParametersVisibility experiences_list_Response_200: type: object properties: {} description: Empty response body title: experiences_list_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.get(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: 'GET', 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("GET", 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::Get.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.get("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Create a minimal experience with auto-generated title request('GET', '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.GET); 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 = "GET" 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.get(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: 'GET', 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("GET", 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::Get.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.get("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Create a basic experience request('GET', '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.GET); 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 = "GET" 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.get(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: 'GET', 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("GET", 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::Get.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.get("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Create AI Expert experience with custom data request('GET', '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.GET); 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 = "GET" 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.get(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: 'GET', 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("GET", 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::Get.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.get("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Create podcast experience with voice preset selection request('GET', '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.GET); 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 = "GET" 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.get(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.example.com/api/v1/experiences/'; const options = {method: 'GET', 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("GET", 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::Get.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.get("https://api.example.com/api/v1/experiences/") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('GET', '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.GET); 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 = "GET" 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() ```