> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.withpersona.com/2020-05-18/api-reference/inquiry-sessions/create-an-inquiry-session/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpersona.com/_mcp/server. # Create an Inquiry Session POST https://api.withpersona.com/api/v1/inquiry-sessions Content-Type: application/json Creates a new Inquiry Session. By default, we only allow up to 25 sessions per Inquiry. Reference: https://docs.withpersona.com/api-reference/inquiry-sessions/create-an-inquiry-session ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Query parameters - `include` (string, optional) — A comma-separated list of relationship paths. This can be used to customize which related resources will be fully serialized in the `included` key in the response. See [Serialization](https://docs.withpersona.com/serialization#inclusion-of-related-resources) for more details. - `fields` (map from string to string, optional) — Comma-separated list(s) of attributes to include in the response. This can be used to customize which attributes will be serialized in the response. See [Serialization](https://docs.withpersona.com/serialization#sparse-fieldsets) for more details. ### Headers - `Key-Inflection` (enum, optional) — Determines casing for the API response. - Allowed values: `camel`, `kebab`, `snake` - `Idempotency-Key` (string, optional) — Ensures the request is idempotent. - `Persona-Version` (enum, optional) — Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning). - Allowed values: `2025-12-08`, `2025-10-27`, `2023-01-05`, `2022-09-01`, `2021-08-18`, `2021-07-05`, `2021-02-21`, `2020-05-18` ### Body (application/json) This endpoint expects an object. - `data` (InquirySessionsPostRequestBodyContentApplicationJsonSchemaData, optional) ## Response ### 201 This endpoint returns an Inquiry Session object and (optionally) its related objects in `included`. - `data` (inquiry-session, required) - `included` (list of InquirySessionsIncludedObjectsItems, optional) — Objects that _may_ be returned if specified via the `include` query parameter in the request. ## Errors ### 400 Bad Request Error The request was unacceptable, often due to invalid parameters. - `errors` (list of InquirySessionsPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 401 Unauthorized Error An invalid API key was provided. - `errors` (list of InquirySessionsPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 403 Forbidden Error The given API key doesn’t have permissions to perform the request or a quota has been exceeded. - `errors` (list of InquirySessionsPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 404 Not Found Error The requested resource doesn’t exist. - `errors` (list of InquirySessionsPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 409 Conflict Error The request conflicts with another request, often due to attempting to create a duplicate resource. - `errors` (list of InquirySessionsPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 422 Unprocessable Entity Error The request modifies the resource in an unacceptable way, often due to an invalid action or parameter. - `errors` (list of InquirySessionsPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ### 429 Too Many Requests Error Your organization’s rate limit has been exceeded. We recommend an exponential backoff on requests. - `errors` (list of InquirySessionsPostResponsesContentApplicationJsonSchemaErrorsItems, optional) ## Types ### InquirySessionsPostRequestBodyContentApplicationJsonSchemaData - `attributes` (InquirySessionsPostRequestBodyContentApplicationJsonSchemaDataAttributes, optional) ### inquiry-session - `id` (string, optional) - `attributes` (InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionAttributes, optional) - `relationships` (InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationships, optional) ### InquirySessionsIncludedObjectsItems - `type`: `device` (device) - `attributes` (InquirySessionsIncludedObjectsItemsDiscriminatorMappingDeviceAttributes, optional) - `id` (string, optional) — Unique identifier for this Device. Starts with `dev_`. - `type`: `inquiry` (inquiry) - `attributes` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributes, required) - `id` (string, required) - `relationships` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationships, required) - `type`: `network` (network) - `attributes` (InquirySessionsIncludedObjectsItemsDiscriminatorMappingNetworkAttributes, optional) - `id` (string, optional) — Unique identifier for this Network. Starts with `net_`. ### InquirySessionsPostResponsesContentApplicationJsonSchemaErrorsItems - `title` (string, optional) - `details` (string, optional) ### InquirySessionsPostRequestBodyContentApplicationJsonSchemaDataAttributes - `inquiry-id` (string, required) — Inquiry ID of the session ### InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionAttributes - `status` (string, optional) — Possible values: - new - active - expired Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update. - `created-at` (datetime, optional) - `started-at` (datetime, optional, nullable) - `expired-at` (datetime, optional, nullable) - `ip-address` (string, optional, nullable) - `user-agent` (string, optional, nullable) - `os-name` (string, optional, nullable) - `os-full-version` (string, optional, nullable) - `device-type` (string, optional, nullable) - `device-name` (string, optional, nullable) - `browser-name` (string, optional, nullable) - `browser-full-version` (string, optional, nullable) - `mobile-sdk-name` (string, optional, nullable) - `mobile-sdk-full-version` (string, optional, nullable) - `device-handoff-method` (string, optional, nullable) - `is-proxy` (boolean, optional, nullable) - `is-tor` (boolean, optional, nullable) - `is-datacenter` (boolean, optional, nullable) - `is-vpn` (boolean, optional, nullable) - `threat-level` (string, optional, nullable) - `country-code` (string, optional, nullable) - `country-name` (string, optional, nullable) - `region-code` (string, optional, nullable) - `region-name` (string, optional, nullable) - `latitude` (double, optional, nullable) - `longitude` (double, optional, nullable) - `gps-latitude` (double, optional, nullable) - `gps-longitude` (double, optional, nullable) - `gps-precision` (string, optional, nullable) - `gps-country-code` (string, optional, nullable) — ISO 3166-1 alpha-2 country code stored from the session's GPS coordinates. Null when it has not been stored, including for sessions created before this value existed; null does not mean a GPS country cannot be derived. - `ip-connection-type` (string, optional, nullable) - `ip-isp` (string, optional, nullable) - `network-organization` (string, optional, nullable) - `browser-fingerprint` (string, optional, nullable, deprecated) — (DEPRECATED) Use `browser-fingerprint` from the session's device relationship instead. ### InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationships - `inquiry` (InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsInquiry, optional) - `device` (InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsDevice, optional) - `network` (InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsNetwork, optional) ### InquirySessionsIncludedObjectsItemsDiscriminatorMappingDeviceAttributes - `device-vendor-id` (string, optional, nullable) - `device-fingerprint` (string, optional, nullable) - `browser-fingerprint` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributes - `status` (string, required) — The status of the Inquiry Possible values: - created - pending - completed - expired - failed - needs_review - approved - declined Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update. - `reference-id` (string, required, nullable) - `note` (string, required, nullable) - `behaviors` (map from string to any, required, nullable) — Risk signals surfaced to enterprise customers. Specific keys are not enumerated in the public spec and may be added or removed over time. Contact your Persona account team for more information. - `tags` (list of string, required) - `creator` (string, required) - `reviewer-comment` (string, required, nullable) - `created-at` (datetime, required) - `updated-at` (datetime, required) - `started-at` (datetime, required, nullable) - `expires-at` (datetime, required, nullable) - `completed-at` (datetime, required, nullable) - `failed-at` (datetime, required, nullable) — Set when an Inquiry transitions to `failed`. Not typically set on `declined` Inquiries — those carry `completed-at` from the transition that preceded the decision. - `marked-for-review-at` (datetime, required, nullable) - `decisioned-at` (datetime, required, nullable) - `expired-at` (datetime, required, nullable) - `redacted-at` (datetime, required, nullable) - `previous-step-name` (string, required, nullable) - `next-step-name` (string, required, nullable) - `fields` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFields, required) — JSON key-value pairs of field name to field value. Exact schema depends on the configuration of the Inquiry template for this Inquiry. - `birthdate` (date, optional, nullable) — Birthdate, must be in the format "YYYY-MM-DD". - `name-first` (string, optional, nullable) — Given or first name. - `name-middle` (string, optional, nullable) — Middle name. - `name-last` (string, optional, nullable) — Family or last name. - `phone-number` (string, optional, nullable) — Phone number. - `email-address` (string, optional, nullable) — Email address. - `social-security-number` (string, optional, nullable) — Social security number. - `address-street-1` (string, optional, nullable) — Street name of residence address. - `address-street-2` (string, optional, nullable) — Extension of residence address, usually apartment or suite number. - `address-city` (string, optional, nullable) — City of residence address. Not all international addresses use this attribute. - `address-subdivision` (string, optional, nullable) — State or subdivision of residence address. In the US, this should be the unabbreviated name. Not all international addresses use this attribute. - `address-postal-code` (string, optional, nullable) — ZIP or postal code of residence address. Not all international addresses use this attribute. - `address-subdivision-abbr` (string, optional, nullable) - `address-postal-code-abbr` (string, optional, nullable) - `identification-number` (string, optional, nullable) - `reviewer` (string, optional, nullable) — The email address or identifier of the reviewer who made the decision on this inquiry. For User reviewers, this is their email address. For Workflow reviewers, this is the workflow token. For API decisions, this is "api". - `reviewer-type` (string, optional, nullable) — The type of reviewer who made the decision. Can be "user", "workflow", "workflow-run", or "api". - `driver-license-number` (string, optional, nullable, deprecated) - `passport-number` (string, optional, nullable, deprecated) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationships - `account` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsAccount, optional) - `documents` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsDocuments, optional) - `template` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsTemplate, optional) — Only present for Legacy 2.0 inquiries - `inquiry-template` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsInquiryTemplate, optional) — Only present for Dynamic Flow inquiries - `inquiry-template-version` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsInquiryTemplateVersion, optional) — Only present for Dynamic Flow inquiries - `reports` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsReports, optional) - `transaction` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsTransaction, optional) - `selfies` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsSelfies, optional) - `sessions` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsSessions, optional) - `verifications` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsVerifications, optional) ### InquirySessionsIncludedObjectsItemsDiscriminatorMappingNetworkAttributes - `created-at` (datetime, optional) - `ip-address` (string, optional, nullable) - `service-provider` (string, optional, nullable) - `service-type` (string, optional, nullable) — Possible values: - residential - mobile - datacenter - corporate - education Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update. - `proxy-type` (string, optional, nullable) — Possible values: - residential - mobile - corporate - vpn - unknown - tor Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update. - `threat-level` (string, optional, nullable) — Possible values: - unknown - low - medium - high Do not assume this is a static enumeration; Persona may add new values in the future without a versioned update. - `country-code` (string, optional, nullable) - `country-name` (string, optional, nullable) - `region-code` (string, optional, nullable) - `region-name` (string, optional, nullable) - `latitude` (double, optional, nullable) - `longitude` (double, optional, nullable) ### InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsInquiry - `data` (InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsInquiryData, optional) ### InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsDevice - `data` (InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsDeviceData, optional, nullable) ### InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsNetwork - `data` (InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsNetworkData, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFields JSON key-value pairs of field name to field value. Exact schema depends on the configuration of the Inquiry template for this Inquiry. - `name-first` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsNameFirst, optional) - `name-middle` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsNameMiddle, optional) - `name-last` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsNameLast, optional) - `address-street-1` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressStreet1, optional) - `address-street-2` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressStreet2, optional) - `address-city` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressCity, optional) — City of residence address. Not all international addresses use this attribute. - `address-subdivision` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressSubdivision, optional) — State or subdivision of residence address. In the US, this should be the unabbreviated name. Not all international addresses use this attribute. - `address-postal-code` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressPostalCode, optional) — ZIP or postal code of residence address. Not all international addresses use this attribute. - `address-country-code` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressCountryCode, optional) — ISO 3166-1 alpha 2 country code. - `birthdate` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsBirthdate, optional) - `email-address` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsEmailAddress, optional) - `phone-number` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsPhoneNumber, optional) - `driver-license-number` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsDriverLicenseNumber, optional, deprecated) - `passport-number` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsPassportNumber, optional, deprecated) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsAccount - `data` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsAccountData, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsDocuments - `data` (list of SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsDocumentsDataItems, optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsTemplate Only present for Legacy 2.0 inquiries - `data` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsTemplateData, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsInquiryTemplate Only present for Dynamic Flow inquiries - `data` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsInquiryTemplateData, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsInquiryTemplateVersion Only present for Dynamic Flow inquiries - `data` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsInquiryTemplateVersionData, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsReports - `data` (list of SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsReportsDataItems, optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsTransaction - `data` (SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsTransactionData, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsSelfies - `data` (list of SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsSelfiesDataItems, optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsSessions - `data` (list of SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsSessionsDataItems, optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsVerifications - `data` (list of SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsVerificationsDataItems, optional) ### InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsInquiryData - `type` ("inquiry", optional) - `id` (string, optional) ### InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsDeviceData - `type` ("device", optional) - `id` (string, optional) ### InquiryIncludedObjectsItemsDiscriminatorMappingInquirySessionRelationshipsNetworkData - `type` ("network", optional) - `id` (string, optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsNameFirst - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsNameMiddle - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsNameLast - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressStreet1 - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressStreet2 - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressCity City of residence address. Not all international addresses use this attribute. - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressSubdivision State or subdivision of residence address. In the US, this should be the unabbreviated name. Not all international addresses use this attribute. - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressPostalCode ZIP or postal code of residence address. Not all international addresses use this attribute. - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsAddressCountryCode ISO 3166-1 alpha 2 country code. - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsBirthdate - `type` (string, optional) - `value` (string, optional, nullable) — Date of birth in YYYY-MM-DD format ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsEmailAddress - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsPhoneNumber - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsDriverLicenseNumber - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryAttributesFieldsPassportNumber - `type` (string, optional) - `value` (string, optional, nullable) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsAccountData - `id` (string, optional) - `type` ("account", optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsDocumentsDataItems - `id` (string, optional) - `type` (string, optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsTemplateData - `id` (string, optional) - `type` ("template", optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsInquiryTemplateData - `id` (string, optional) - `type` ("inquiry-template", optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsInquiryTemplateVersionData - `id` (string, optional) - `type` ("inquiry-template-version", optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsReportsDataItems - `id` (string, optional) - `type` (string, optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsTransactionData - `id` (string, optional) - `type` ("transaction", optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsSelfiesDataItems - `id` (string, optional) - `type` (string, optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsSessionsDataItems - `id` (string, optional) - `type` ("inquiry-session", optional) ### SelfieIncludedObjectsItemsDiscriminatorMappingInquiryRelationshipsVerificationsDataItems - `id` (string, optional) - `type` (string, optional) ## Examples **Request** ```json {} ``` **Response** ```json { "data": { "id": "iqse_ABC123", "attributes": { "status": "expired", "created-at": "2023-07-25T04:15:20.000Z", "started-at": "2023-07-25T05:14:50.000Z", "expired-at": "2023-07-26T05:14:50.000Z", "ip-address": "127.0.0.1", "user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36", "os-name": "Mac", "os-full-version": "10.15.7", "device-type": "desktop", "device-name": null, "browser-name": "Chrome", "browser-full-version": "115.0.0.0", "mobile-sdk-name": null, "mobile-sdk-full-version": null, "device-handoff-method": null, "is-proxy": false, "is-tor": false, "is-datacenter": false, "is-vpn": false, "threat-level": "low", "country-code": "US", "country-name": "United States", "region-code": "CA", "region-name": "California", "latitude": 37.7688, "longitude": -122.262, "gps-latitude": null, "gps-longitude": null, "gps-precision": null, "gps-country-code": null, "browser-fingerprint": "abc123def456" }, "relationships": { "inquiry": { "data": { "type": "inquiry", "id": "inq_ABC123" } }, "device": { "data": { "type": "device", "id": "dev_ABC123" } } }, "type": "inquiry-session" } } ``` **SDK Code** ```python Created import requests url = "https://api.withpersona.com/api/v1/inquiry-sessions" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Created const url = 'https://api.withpersona.com/api/v1/inquiry-sessions'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', '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 Created package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.withpersona.com/api/v1/inquiry-sessions" payload := strings.NewReader("{}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") 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 Created require 'uri' require 'net/http' url = URI("https://api.withpersona.com/api/v1/inquiry-sessions") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java Created import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://api.withpersona.com/api/v1/inquiry-sessions") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php Created request('POST', 'https://api.withpersona.com/api/v1/inquiry-sessions', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Created using RestSharp; var client = new RestClient("https://api.withpersona.com/api/v1/inquiry-sessions"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Created import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/inquiry-sessions")! 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() ```