The Create API is the first step of the authentication flow. Your backend calls it with the user’s phone number or email and, in return, receives a requestId. By passing the identity you are effectively generating a requestId bound to it — you then use this same requestId to invoke the SDK and perform the authentication on the client, and to track the result via the Status Check API.
This is a server-to-server call. It requires your clientId and clientSecret, which must never be exposed in client-side code.
Either phoneNumber + countryCode or email must be provided.
Authorizations
clientId
string
header
required
OTPless API Client ID
clientSecret
string
header
required
OTPless API Client Secret
Body
application/json
phoneNumber
string
Phone number without country code. Required if email is not provided.
Example:
"9876543210"
countryCode
string
Country dial code (e.g. 91). Required when phoneNumber is provided.
Example:
"91"
email
string
User email. Required if phoneNumber is not provided.
Template ID to pin a specific channel config template for the subsequent initiate call.
Example:
"your-template-id"
Response
HTTP 200 — Auth request created. Returns the requestId to pass to the SDK.
requestId
string
required
Unique auth request ID (ARID token). Pass this to the SDK and use it when polling Status Check.
Example:
"ARID_A1B2C3D4E5F6"
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"OTPLESS","colors":{"primary":"#2759CD","light":"#8DB0FB","dark":"#113997"},"logo":{"light":"https://mintcdn.com/otpless-96/_aEz_FhlLI0izHsE/logo/otpless-dark.svg?fit=max\u0026auto=format\u0026n=_aEz_FhlLI0izHsE\u0026q=85\u0026s=c211521d204eaa2c4148109d50d19edd","dark":"https://mintcdn.com/otpless-96/_aEz_FhlLI0izHsE/logo/otpless-light.svg?fit=max\u0026auto=format\u0026n=_aEz_FhlLI0izHsE\u0026q=85\u0026s=3fd27e254b68526fa18064c62467b18a","href":"https://otpless.com/"},"favicon":"https://mintcdn.com/otpless-96/_aEz_FhlLI0izHsE/favicon.svg?fit=max\u0026auto=format\u0026n=_aEz_FhlLI0izHsE\u0026q=85\u0026s=b0f8f3a3e4b70cf463375510df120336","background":{"image":"https://mintcdn.com/otpless-96/MG5MLCTUP00EUtvA/images/background-documentation-min.png?fit=max\u0026auto=format\u0026n=MG5MLCTUP00EUtvA\u0026q=85\u0026s=c85d6a33e17f625c33c28433c7a595cf","color":{"light":"#F9F9F9","dark":"#0c101f"}},"navbar":{"links":[{"href":"https://otpless.com/support","label":"Contact Support"}],"primary":{"type":"button","label":"Sign in","href":"https://otpless.com/dashboard"}},"footer":{"socials":{"x":"https://x.com/otpless","github":"https://github.com/orgs/otpless-tech/repositories","linkedin":"https://www.linkedin.com/company/otpless"}},"seo":{"indexing":"all"},"contextual":{"options":["copy","view","chatgpt","claude","mcp"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"otpless-96","hasAudioNarration":false,"actualSubdomain":"otpless-96","customDomains":["otpless.com"],"gitSource":{"type":"github","owner":"otpless-tech","repo":"mintlify-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":false,"issues":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6afd6337921026410dba5442","clientVersion":"0.0.4248","searchFilterCounts":[{"language":"default","tag":"Frontend SDKs","count":77},{"language":"default","tag":"References","count":61},{"language":"default","tag":"Native/Mobile SDKs","count":51},{"language":"default","tag":"Web SDKs","count":20},{"language":"default","tag":"Android","count":14},{"language":"default","tag":"Server-Initiated Auth","count":12},{"language":"default","tag":"SDK based Integration","count":12},{"language":"default","tag":"Ionic","count":10},{"language":"default","tag":"Silent Network Auth","count":9},{"language":"default","tag":"SNA-SDK based Integration","count":9}]},"assistantConfig":{"enableStarterQuestions":true,"enableContextualStarterQuestions":true,"deflection":{"enabled":true,"email":"help@otpless.com"}},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"button_style.css","content":".activate-button{display:inline-block;padding:10px 20px;font-size:14px;font-weight:400;color:#ffffff;border-radius:4px;text-decoration:none;text-align:center;transition:all 0.3s ease;cursor:pointer;background:#113997}.activate-button p{margin:0}.activate-button:hover,.activate-button:focus{background-color:#113997e1;color:#ffffff;text-decoration:none;cursor:pointer}.activate-button:active{background-color:#0a3495;box-shadow:inset 0 3px 5px rgba(0, 0, 0, 0.125)}"}]}
{"page":{"pagePath":"server-initiated-auth/create-api","slug":"/server-initiated-auth/create-api","pageMetadata":{"title":"Create API","sidebarTitle":"Create API","description":"Create an auth request and obtain a requestId that links a user's identity to a future authentication flow. Called server-to-server.","openapi":"server-initiated-auth/server-initiated-auth-api.yaml POST /auth/v1/create","href":"/server-initiated-auth/create-api"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Create an auth request and obtain a requestId that links a user’s identity to a future authentication flow. Called server-to-server.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,p:`p`,strong:`strong`,..._provideComponents(),...props.components},{Note,Warning}=_components;if(!Note)_missingMdxReference(`Note`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The Create API is the `,_jsx(_components.strong,{children:`first step`}),` of the authentication flow. Your backend calls it with the user’s phone number or email and, in return, receives a `,_jsx(_components.code,{children:`requestId`}),`. By passing the identity you are effectively generating a `,_jsx(_components.code,{children:`requestId`}),` bound to it — you then use this same `,_jsx(_components.code,{children:`requestId`}),` to invoke the SDK and perform the authentication on the client, and to track the result via the `,_jsx(_components.a,{href:`/server-initiated-auth/status-check-api`,children:`Status Check API`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This is a `,_jsx(_components.strong,{children:`server-to-server`}),` call. It requires your `,_jsx(_components.code,{children:`clientId`}),` and `,_jsx(_components.code,{children:`clientSecret`}),`, which must never be exposed in client-side code.`]})}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Either `,_jsxs(_components.strong,{children:[_jsx(_components.code,{children:`phoneNumber`}),` + `,_jsx(_components.code,{children:`countryCode`})]}),` or `,_jsx(_components.strong,{children:_jsx(_components.code,{children:`email`})}),` must be provided.`]})})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Create API","sidebarTitle":"Create API","description":"Create an auth request and obtain a requestId that links a user's identity to a future authentication flow. Called server-to-server.","openapi":"server-initiated-auth/server-initiated-auth-api.yaml POST /auth/v1/create","href":"/server-initiated-auth/create-api"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/otpless-96/b09595f2b6159bec/script.js"],"openApiReferenceData":{"operation":{"tags":["Server-Initiated Auth"],"summary":"Create","description":"Create an auth request and obtain a requestId that links a user's identity to a future authentication flow. Called server-to-server.","operationId":"createAuthRequest","requestBody":"80a99db2-0eea-41ff-aaf0-36d9c1006bb7","responses":{"200":"10499c82-7503-4899-bd8d-38c61b1ee350","400":"49213fe8-2982-4c73-bf6d-399b6b0db6eb","401":"e2bc8c53-e5db-46fe-b41d-b68fe43ee8c5"},"method":"post","type":"path","servers":["fff4f5fe-a629-4496-b0d2-e8739202a232"],"security":["9066bedb-8deb-4713-a9ef-50a86b657f46"],"path":"/auth/v1/create","baseUrlOptions":["https://auth.otpless.app"],"title":"Create","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"phoneNumber":{"type":"string","example":"9876543210","description":"Phone number without country code. Required if `email` is not provided.","uniqueKey":"phoneNumber","typeLabel":"string"},"countryCode":{"type":"string","example":"91","description":"Country dial code (e.g. 91). Required when `phoneNumber` is provided.","uniqueKey":"countryCode","typeLabel":"string"},"email":{"type":"string","example":"user@example.com","description":"User email. Required if `phoneNumber` is not provided.","uniqueKey":"email","typeLabel":"string"},"expiry":{"type":"integer","example":300,"description":"Auth request validity in seconds. Min: 60, Max: 86400. Default: 900.","uniqueKey":"expiry","typeLabel":"integer"},"tid":{"type":"string","example":"your-template-id","description":"Template ID to pin a specific channel config template for the subsequent initiate call.","uniqueKey":"tid","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"phone":{"title":"phone","summary":"Create with phone number","value":{"phoneNumber":"9876543210","countryCode":"91","expiry":300,"tid":"your-template-id"}},"email":{"title":"email","summary":"Create with email","value":{"email":"user@example.com","expiry":300,"tid":"your-template-id"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"10499c82-7503-4899-bd8d-38c61b1ee350":{"description":"**HTTP 200** — Auth request created. Returns the `requestId` to pass to the SDK.","content":{"application/json":{"schema":{"type":"object","required":["requestId"],"properties":{"requestId":{"type":"string","example":"ARID_A1B2C3D4E5F6","description":"Unique auth request ID (ARID token). Pass this to the SDK and use it when polling Status Check.","isRequired":true,"uniqueKey":"requestId","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"success":{"title":"success","summary":"requestId generated","value":{"requestId":"ARID_A1B2C3D4E5F6"}}},"exampleType":"examples"}},"exampleType":"examples"},"49213fe8-2982-4c73-bf6d-399b6b0db6eb":{"description":"**HTTP 400.** Request rejected due to invalid parameters. Body is an error object.","content":{"application/json":{"schema":{"type":"object","description":"Error response body for HTTP 4xx responses.","properties":{"message":{"type":"string","example":"Invalid Request","uniqueKey":"message","typeLabel":"string"},"errorCode":{"type":"string","example":"7170","description":"Machine-readable error code.","uniqueKey":"errorCode","typeLabel":"string"},"description":{"type":"string","example":"Auth not started yet. Please initiate authentication first.","uniqueKey":"description","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"invalid_request_id":{"title":"invalid_request_id","summary":"Invalid request Id (7119)","value":{"message":"Invalid Request","errorCode":"7119","description":"Request error: Invalid request Id"}},"invalid_phone_or_email":{"title":"invalid_phone_or_email","summary":"Invalid phoneNumber or email (7106)","value":{"message":"Invalid Request","errorCode":"7106","description":"Request error: Invalid phoneNumber or email."}},"invalid_phone":{"title":"invalid_phone","summary":"Invalid phone number (7102)","value":{"message":"Invalid Request","errorCode":"7102","description":"Request error: Invalid phone number"}},"invalid_email":{"title":"invalid_email","summary":"Invalid email (7104)","value":{"message":"Invalid Request","errorCode":"7104","description":"Request error: Invalid email"}},"invalid_expiry":{"title":"invalid_expiry","summary":"Invalid expiry (7113)","value":{"message":"Invalid Request","errorCode":"7113","description":"Request error: Invalid expiry"}}},"exampleType":"examples"}},"exampleType":"examples"},"e2bc8c53-e5db-46fe-b41d-b68fe43ee8c5":{"description":"**HTTP 401.** Unauthorized. `clientId`/`clientSecret` headers are missing, invalid, or the merchant is blocked.","content":{"application/json":{"schema":{"type":"object","description":"Error response body for HTTP 4xx responses.","properties":{"message":{"type":"string","example":"Invalid Request","uniqueKey":"message","typeLabel":"string"},"errorCode":{"type":"string","example":"7170","description":"Machine-readable error code.","uniqueKey":"errorCode","typeLabel":"string"},"description":{"type":"string","example":"Auth not started yet. Please initiate authentication first.","uniqueKey":"description","typeLabel":"string"}},"uniqueKey":"","typeLabel":"object"},"examples":{"credentials_empty":{"title":"credentials_empty","summary":"Credentials empty (7012)","value":{"message":"Access blocked","errorCode":"7012","description":"Authorization error: Merchant credentials are empty"}},"invalid_credentials":{"title":"invalid_credentials","summary":"Invalid credentials (7002)","value":{"message":"Access blocked","errorCode":"7002","description":"Authorization error: Invalid credentials"}},"merchant_blocked":{"title":"merchant_blocked","summary":"Merchant blocked (7019)","value":{"message":"Merchant Blocked","errorCode":"7019","description":"Your account has been temporarily Blocked. Please contact support for assistance."}}},"exampleType":"examples"}},"exampleType":"examples"}},"security":{"9066bedb-8deb-4713-a9ef-50a86b657f46":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"clientId","description":"OTPless API Client ID","scopes":[]},"ApiSecretAuth":{"type":"apiKey","in":"header","name":"clientSecret","description":"OTPless API Client Secret","scopes":[]}}},"servers":{"fff4f5fe-a629-4496-b0d2-e8739202a232":{"url":"https://auth.otpless.app","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"clientId","description":"OTPless API Client ID","scopes":[]},"schema":{"title":"clientId","type":"string","description":"OTPless API Client ID","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"clientId"},{"scheme":{"type":"apiKey","in":"header","name":"clientSecret","description":"OTPless API Client Secret","scopes":[]},"schema":{"title":"clientSecret","type":"string","description":"OTPless API Client Secret","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiSecretAuth","name":"clientSecret"}],"title":"ApiKeyAuth \u0026 ApiSecretAuth"}]},"originalFileLocation":"server-initiated-auth/server-initiated-auth-api.yaml"},"subdomain":"otpless-96","siteName":"OTPLESS","title":"Create API - OTPLESS","contextualStarterQuestions":[{"_id":"6ac3872e80b763a5cad01f39","deploymentId":"65507bb0b99260c1f65d01cc","questionText":"What is a requestId?","status":"active","generatedBy":"contextual","path":"server-initiated-auth/create-api","createdAt":"2026-10-05T11:17:02.573Z","updatedAt":"2026-10-05T11:17:02.573Z","__v":0},{"_id":"6ac3872e80b763a5cad01f3a","deploymentId":"65507bb0b99260c1f65d01cc","questionText":"How do I call the Create API?","status":"active","generatedBy":"contextual","path":"server-initiated-auth/create-api","createdAt":"2026-10-05T11:17:02.573Z","updatedAt":"2026-10-05T11:17:02.573Z","__v":0},{"_id":"6ac3872e80b763a5cad01f3b","deploymentId":"65507bb0b99260c1f65d01cc","questionText":"Phone or email - which to use?","status":"active","generatedBy":"contextual","path":"server-initiated-auth/create-api","createdAt":"2026-10-05T11:17:02.573Z","updatedAt":"2026-10-05T11:17:02.573Z","__v":0}],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-05T11:16:56.975Z","originalFileLocation":"server-initiated-auth/create-api.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Create an auth request and obtain a requestId that links a user\u0026#x27;s identity to a future authentication flow. Called server-to-server.\">\u003cmeta data-mint-head name=\"application-name\" content=\"OTPLESS\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create API - OTPLESS\">\u003cmeta data-mint-head property=\"og:description\" content=\"Create an auth request and obtain a requestId that links a user\u0026#x27;s identity to a future authentication flow. Called server-to-server.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"OTPLESS\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://otpless.com/docs/server-initiated-auth/create-api\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://otpless-96.mintlify.site/docs/_mintlify/api/og/v2?division=SDK+based+Integration\u0026amp;title=Create+API\u0026amp;description=Create+an+auth+request+and+obtain+a+requestId+that+links+a+user%27s+identity+to+a+future+authentication+flow.+Called+server-to-server.\u0026amp;theme=cf86030b11b0dbc7259b2817\u0026amp;signature=5dae549568e1b5cce11358d1b7574226918a18fb8e323d678f44d985ee14ac19\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Create API - OTPLESS\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Create an auth request and obtain a requestId that links a user\u0026#x27;s identity to a future authentication flow. Called server-to-server.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://otpless-96.mintlify.site/docs/_mintlify/api/og/v2?division=SDK+based+Integration\u0026amp;title=Create+API\u0026amp;description=Create+an+auth+request+and+obtain+a+requestId+that+links+a+user%27s+identity+to+a+future+authentication+flow.+Called+server-to-server.\u0026amp;theme=cf86030b11b0dbc7259b2817\u0026amp;signature=5dae549568e1b5cce11358d1b7574226918a18fb8e323d678f44d985ee14ac19\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/otpless-96/4ecEfjOYTKC7Ncnz/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"OTPLESS\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#2759CD\">\u003clink data-mint-head rel=\"canonical\" href=\"https://otpless.com/docs/server-initiated-auth/create-api\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/server-initiated-auth/create-api.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://otpless.com/#organization\",\"name\":\"OTPLESS\",\"url\":\"https://otpless.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/otpless-96/_aEz_FhlLI0izHsE/logo/otpless-dark.svg?fit=max\u0026auto=format\u0026n=_aEz_FhlLI0izHsE\u0026q=85\u0026s=c211521d204eaa2c4148109d50d19edd\"}},{\"@type\":\"WebSite\",\"@id\":\"https://otpless.com/docs#website\",\"name\":\"OTPLESS\",\"url\":\"https://otpless.com/docs\",\"publisher\":{\"@id\":\"https://otpless.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://otpless.com/docs/server-initiated-auth/create-api#webpage\",\"url\":\"https://otpless.com/docs/server-initiated-auth/create-api\",\"name\":\"Create API\",\"description\":\"Create an auth request and obtain a requestId that links a user's identity to a future authentication flow. Called server-to-server.\",\"dateModified\":\"2026-10-05T11:16:56.975Z\",\"isPartOf\":{\"@id\":\"https://otpless.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://otpless.com/docs/server-initiated-auth/create-api#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://otpless.com/docs/server-initiated-auth/create-api#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"SDK based Integration\",\"item\":\"https://otpless.com/docs/server-initiated-auth/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create API\",\"item\":\"https://otpless.com/docs/server-initiated-auth/create-api\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://otpless.com/docs/server-initiated-auth/create-api#apireference\",\"headline\":\"Create API\",\"name\":\"Create API\",\"description\":\"Create an auth request and obtain a requestId that links a user's identity to a future authentication flow. Called server-to-server.\",\"url\":\"https://otpless.com/docs/server-initiated-auth/create-api\",\"mainEntityOfPage\":{\"@id\":\"https://otpless.com/docs/server-initiated-auth/create-api#webpage\"},\"dateModified\":\"2026-10-05T11:16:56.975Z\",\"publisher\":{\"@id\":\"https://otpless.com/#organization\"},\"isPartOf\":{\"@id\":\"https://otpless.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"OTPLESS\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"OTPLESS\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/server-initiated-auth/create-api.md","siteName":"OTPLESS","nav":{"global":null,"tabs":[{"tab":"Home","pages":[{"title":"Home","href":"/introduction"}]},{"tab":"Frontend SDKs","pages":[{"title":"Frontend SDKs","href":"/quick-start"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"Server-Initiated Auth","groups":[{"group":"SDK based Integration","pages":[{"title":"Overview","sidebarTitle":"Overview","icon":"book-open","href":"/server-initiated-auth/overview"},{"title":"Android SDK","sidebarTitle":"Android SDK","icon":"android","mode":"wide","href":"/server-initiated-auth/android-sdk"},{"title":"iOS SDK","sidebarTitle":"iOS SDK","icon":"apple","mode":"wide","href":"/server-initiated-auth/ios-sdk"},{"title":"React Native SDK","sidebarTitle":"React Native SDK","icon":"react","mode":"wide","href":"/server-initiated-auth/react-native-sdk"},{"title":"Flutter SDK","sidebarTitle":"Flutter SDK","icon":"flutter","mode":"wide","href":"/server-initiated-auth/flutter-sdk"},{"title":"Web SDK","sidebarTitle":"Web SDK","icon":"globe","mode":"wide","href":"/server-initiated-auth/web-sdk"},{"title":"SDK Error Codes","sidebarTitle":"SDK Error Codes","icon":"mobile","description":"Error codes reported by the OTPless Headless SDK on the client (Android \u0026 iOS) during the authentication flow. Most codes are common to both platforms; some are platform-specific.","href":"/server-initiated-auth/sdk-error-codes"},{"title":"Create API","sidebarTitle":"Create API","openapi":"server-initiated-auth/server-initiated-auth-api.yaml POST /auth/v1/create","href":"/server-initiated-auth/create-api"},{"title":"Status Check API","sidebarTitle":"Status Check API","description":"Poll the current auth status for a requestId. Returns the auth factor plus phone and device-fingerprinting detail when available.","openapi":"server-initiated-auth/server-initiated-auth-api.yaml GET /auth/v2/status","href":"/server-initiated-auth/status-check-api"},{"title":"API Error Codes","sidebarTitle":"API Error Codes","icon":"triangle-exclamation","href":"/server-initiated-auth/api-error-codes"},{"title":"Verify token","openapi":"POST /auth/v1/validate/token","href":"/server-initiated-auth/verify-token"},{"title":"Verify ID Token","href":"/server-initiated-auth/verify-id-token"}]}]},{"tab":"Silent Network Auth","pages":[{"title":"Silent Network Auth","href":"/sna/overview"}]},{"tab":"Device Fingerprint","pages":[{"title":"Device Fingerprint","href":"/device-fingerprint/overview"}]},{"tab":"Resources","hidden":true}]},"basePath":"","title":"Create API - OTPLESS","deploymentId":"dpl_C8nwD4Qo785i7PBDK32YZuKGR9Lm","buildId":"dpl_C8nwD4Qo785i7PBDK32YZuKGR9Lm","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-BHpAblIa.js","snippetPresets-C-QjF0k_.js","utils-Dz5URj_u.js","style-to-object-BY3JEAdk.js","utils-Da_yhPn5.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CIIxiDBb.js","conditional-requirements-CFM0id0Q.js","cloneDeep-k_8athT8.js","_Uint8Array-3TACpfVy.js","isObject-FP1Yky1u.js","ApiExamples-BwENSgQX.js","usePlaygroundInputsStore-Bwm_Juam.js","shallow-DiWjILlR.js","isEqual-D8db76Nf.js","CodeSnippets-DkFc-r7T.js","CodeSnippet-DzxI2vN3.js","getApiPlaygroundDisplay-Co0Ej2uF.js","Page-Dq2tE-AS.js","DynamicMarkdown-3piqoEk_.js","SectionHeading-BfyA8rV0.js","icon-Dz7YG_yb.js","MethodPill-D7hco0-Q.js","getPastedJson-DYtIXN3i.js","DuplicateIcon-CWgJhuEu.js","axios-CsQoIw0U.js","Markdown-Bj6sjipA.js","AssistantPageLink-vuoZnuCk.js","dist-Bb1ZYRob.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}