https://onestudy.ai/api/1
The API Key should be sent in the x-api-key header. e.g.
const res = await fetch(`https://onestudy.ai/api/1/conversation/interview-id-1234567`, {
headers: {
'Content-Type': 'application/json',
'x-api-key': 'API KEY HERE',
},
})
const data = await res.json() // etc...
GET /api/1/study/{id}Get a study’s metadata by it's ID
The response will have the following properties (the study object):
id: string,
name: string,
status: string,
meta: {
numberCompleted?: number;
generalInformation?: string;
firstQuestion?: string;
farewellMessage?: string;
followUpQuestionNumber?: number;
shareTitle?: string;
shareDescription?: string;
primaryColor?: string;
imageUrl?: string;
},
summary: string,
interviewerStyle: string,
interviewerStyleCustomMessage: string,
userId: string,
userMetaData: [{
key: string;
type: string;
label: string;
required?: boolean;
}],
status is an enum that can be any of these values:
Active
Inactive
Completed
Cancelled
POST /api/1/conversation/startStarts an interview
<aside> 📌 NOTE: The interview/conversation will be valid for about 30 minutes before it is processed.
</aside>
The body of the POST accepts the following: