> For the complete documentation index, see [llms.txt](https://zeko.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://zeko.gitbook.io/docs/zekoai-api-docs/api-reference/ai-interview/create-interview.md).

# Create Interview

## Create Interview

> Create a new interview.

```json
{"openapi":"3.0.3","info":{"title":"ZekoAI Interview APIs","version":"1.0.0"},"servers":[{"url":"https://interview-api.zeko.ai","description":"Production Server"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"}},"schemas":{"CreateInterviewRequest":{"type":"object","required":["interviewName","jdType","jd"],"properties":{"interviewName":{"type":"string"},"roleName":{"type":"string"},"minExperience":{"type":"integer"},"maxExperience":{"type":"integer"},"jdType":{"type":"string","enum":["text","link"]},"jd":{"type":"string"},"sampleQuestions":{"type":"array","items":{"type":"string"}},"interviewConfig":{"type":"object","properties":{"redirectUrl":{"type":"string","format":"uri"},"allowAccess":{"type":"string","enum":["anyone","scheduledCandidates"]},"allowLateAttempts":{"type":"boolean"},"allowContinueFromMiddle":{"type":"boolean"},"allowContinueFromMiddleCount":{"type":"integer"},"allowReattempt":{"type":"boolean"},"allowReattemptCount":{"type":"integer"},"allowInterviewOnMobile":{"type":"boolean"},"allowScreenLeaveCount":{"type":"integer"},"allowTabSwitchCount":{"type":"integer"},"webhookUrl":{"type":"string","format":"uri"}}},"metaData":{"type":"object","properties":{"Id":{"type":"integer"},"name":{"type":"string"},"clientId":{"type":"integer"}}},"published":{"type":"boolean"},"codingSection":{"type":"array","items":{"$ref":"#/components/schemas/CreateCodingInterviewPayload"},"description":"Optional coding interview sections"}}},"CreateCodingInterviewPayload":{"type":"object","required":["selectionType"],"properties":{"selectionType":{"$ref":"#/components/schemas/SelectionTypeEnum"},"tagBasedCodingInterview":{"$ref":"#/components/schemas/TagBasedCodingInterviewPayload","description":"Required when selectionType is tag-based."},"customCodingInterview":{"$ref":"#/components/schemas/CustomCodingInterviewPayload","description":"Required when selectionType is custom."}}},"SelectionTypeEnum":{"type":"string","enum":["custom","tag-based","ai-suggested"]},"TagBasedCodingInterviewPayload":{"type":"object","required":["topic","difficulty"],"properties":{"topic":{"$ref":"#/components/schemas/TopicEnum"},"difficulty":{"$ref":"#/components/schemas/DifficultyEnum"},"followUpQuestionCount":{"type":"integer","default":3,"description":"Follow up question count for the interview."},"questionTime":{"type":"integer","default":15,"description":"Coding question time in minutes for the interview."},"allowedLanguages":{"type":"array","items":{"$ref":"#/components/schemas/CodingLanguageEnum"},"description":"Allowed languages for the interview."}}},"TopicEnum":{"type":"string","enum":["DSA","Android Development","Angular","C++","Computer Vision","Django","Docker","Flutter","Generative AI","Java","JavaScript","Kubernetes","Machine Learning","MongoDB","Natural Language Processing (NLP)","Node.js","Python","React Native","ReactJs","SQL","Spring Boot","Vue.js"]},"DifficultyEnum":{"type":"string","enum":["easy","medium","hard"]},"CodingLanguageEnum":{"type":"string","enum":["javascript","python","c","cpp","java","csharp","ruby","go","php","typescript","swift","kotlin","rust","scala","dart","perl","bash","lua","sql","text"]},"CustomCodingInterviewPayload":{"type":"object","required":["questions"],"properties":{"questions":{"type":"array","items":{"$ref":"#/components/schemas/CustomCodingQuestion"},"description":"Questions for the interview."},"followUpQuestionCount":{"type":"integer","default":3,"description":"Follow up question count for the interview."},"allowedLanguages":{"type":"array","items":{"$ref":"#/components/schemas/CodingLanguageEnum"},"description":"Allowed languages for the interview."},"questionTime":{"type":"integer","default":15,"description":"Coding question time in minutes for the interview."}}},"CustomCodingQuestion":{"type":"object","required":["questionText"],"properties":{"questionText":{"type":"string","description":"Question text for the interview."}}},"CreateInterviewResponse":{"allOf":[{"$ref":"#/components/schemas/SuccessWrapper"},{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"object","properties":{"interviewId":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"interviewLink":{"type":"string","nullable":true},"competencyData":{"type":"array","items":{"type":"object","properties":{"questionCount":{"type":"integer"},"time":{"type":"integer"},"competency":{"type":"string"},"explanation":{"type":"string"},"difficulty":{"type":"string"},"questionType":{"type":"string"},"category":{"type":"string"},"sampleQuestions":{"type":"array","items":{"type":"string"}}}}},"metaData":{"type":"object","properties":{"Id":{"type":"integer"},"name":{"type":"string"},"clientId":{"type":"integer"}}},"codingSection":{"type":"array","items":{"type":"object","properties":{"selectionType":{"type":"string","enum":["custom","tag-based"]},"topic":{"type":"string"},"difficulty":{"type":"string","enum":["easy","medium","hard"]},"allowedLanguages":{"type":"array","items":{"type":"string"}},"followUpQuestionCount":{"type":"integer"},"questionTime":{"type":"integer"}}}}}}}}]},"SuccessWrapper":{"type":"object","properties":{"message":{"type":"string"},"success":{"type":"boolean"},"data":{"type":"object","description":"Actual response data object"}}},"ErrorWrapper":{"type":"object","properties":{"message":{"type":"string"},"success":{"type":"boolean"},"error":{"nullable":true,"description":"Error details: Error Message"}},"required":["message","success","error"]},"ValidationErrorWrapper":{"type":"object","properties":{"message":{"type":"string"},"success":{"type":"boolean"},"error":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}}}}},"required":["message","success","error"]}}},"paths":{"/api/v1/interview/create":{"post":{"tags":["Interview"],"summary":"Create Interview","description":"Create a new interview.","operationId":"createInterview","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInterviewRequest"}}}},"responses":{"201":{"description":"Interview created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateInterviewResponse"}}}},"401":{"description":"Missing or invalid Authorization header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWrapper"}}}},"422":{"description":"Input Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidationErrorWrapper"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorWrapper"}}}}}}}}}
```
