Contents

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

  1. Ask for a sign-in code with POST /auth/sign-in/request-code. The code goes to that email address; the call answers 202.

    Request a code
    curl -X POST "https://api.scaffoldyourdocs.com/auth/sign-in/request-code" \
      -H "Content-Type: application/json" \
      -d '{"identifier": "you@example.com"}'
  2. Send the code back with POST /auth/verify. The response carries session_token: that is your session token. Its orgId field is the organisation to send as x-org-id.

    Verify the code
    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.

Headers
Authorization: Bearer <session token>
x-org-id: org_example

In 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