Authentication
Every call carries a Scaffold session token and the organisation it acts for. You get the token by signing in with a code sent to your email.
Get a session token
Ask for a sign-in code with
POST /auth/sign-in/request-code. The code goes to that email address; the call answers 202.curl -X POST "https://api.scaffoldyourdocs.com/auth/sign-in/request-code" \ -H "Content-Type: application/json" \ -d '{"identifier": "you@example.com"}'Send the code back with
POST /auth/verify. The response carriessession_token: that is your session token. ItsorgIdfield is the organisation to send asx-org-id.curl -X POST "https://api.scaffoldyourdocs.com/auth/verify" \ -H "Content-Type: application/json" \ -d '{"identifier": "you@example.com", "code": "<code from the email>"}'
Send it on every call
Put the token in the Authorization header as a bearer token, and name the organisation the call acts for in x-org-id. Every code sample in these docs already carries both.
Authorization: Bearer <session token>
x-org-id: org_exampleIn Claude or ChatGPT
The MCP connector signs you in with OAuth: when you connect Scaffold, your assistant opens Scaffold's sign-in and you verify your email with a code. There is nothing to paste. Connect Claude or ChatGPT
API keys
API-key access to document routes is not available yet. Use a session token.
The sign-in endpoints
- POSTSend an existing-user email code
- POSTSend a new-user email code
- POSTVerify an email code
- GETList the sign-in providers
- GETStart signing in with a provider
- GETFinish signing in with a provider
- POSTAnswer the connector's consent page after a provider sign-in
- POSTTrade a sign-in handoff for a session
- POSTSign out everywhere