# Claim the fresh Postdot instance and optionally mint an initial API key



URL: /docs/reference/system/bootstrapInstance

```json
{"openapi":"3.0.3","info":{"title":"Postdot API","description":"The HTTP API for the lightweight, self-hosted Postdot publication orchestrator.","version":"0.1.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Postdot API key","description":"A user-owned Postdot API key sent as `Authorization: Bearer <token>`. Its project scope is limited by the creator’s current access."},"sessionCookie":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"The Better Auth email/password session cookie used by the web application."}},"schemas":{}},"security":[{"bearerAuth":[]},{"sessionCookie":[]}],"tags":[{"name":"System","description":"Service health and runtime information."},{"name":"Access","description":"Instance membership and invitations."},{"name":"Projects","description":"Project lifecycle and access."},{"name":"Channels","description":"Project publication destinations."},{"name":"Posts","description":"Source posts and publication creation."},{"name":"Publications","description":"Publication workflow operations."},{"name":"Taxonomy","description":"Project categories and publication tags."},{"name":"Media","description":"Project media assets and uploads."},{"name":"Settings","description":"Instance-level runtime configuration."},{"name":"Audit","description":"Project audit history."},{"name":"Notifications","description":"Signed-in user notification inboxes with optional project context."},{"name":"Analytics","description":"Provider-neutral publication and execution analytics."},{"name":"Provider Analytics","description":"Persisted provider-owned metric observations."}],"paths":{"/api/instance/bootstrap":{"post":{"operationId":"bootstrapInstance","summary":"Claim the fresh Postdot instance and optionally mint an initial API key","tags":["System"],"security":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","email","password"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","minLength":1,"maxLength":320},"password":{"type":"string","minLength":8,"maxLength":128},"apiKey":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"projectIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1},"minItems":1},{"type":"null"}]},"actionAccess":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"string","const":"project:read"},{"type":"string","const":"project:manage"},{"type":"string","const":"project:permanently_delete"},{"type":"string","const":"publication:manage"},{"type":"string","const":"publication:dispatch"},{"type":"string","const":"channel:manage"},{"type":"string","const":"channel:share"},{"type":"string","const":"media:manage"},{"type":"string","const":"analytics:refresh"},{"type":"string","const":"media:permanently_delete"},{"type":"string","const":"project:access_manage"},{"type":"string","const":"publication:approve"},{"type":"string","const":"workspace:manage"},{"type":"string","const":"api_key:manage"},{"type":"string","const":"instance:admin"}]},"minItems":1},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}}}}}},"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["name","email","password"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","minLength":1,"maxLength":320},"password":{"type":"string","minLength":8,"maxLength":128},"apiKey":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"projectIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1},"minItems":1},{"type":"null"}]},"actionAccess":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"string","const":"project:read"},{"type":"string","const":"project:manage"},{"type":"string","const":"project:permanently_delete"},{"type":"string","const":"publication:manage"},{"type":"string","const":"publication:dispatch"},{"type":"string","const":"channel:manage"},{"type":"string","const":"channel:share"},{"type":"string","const":"media:manage"},{"type":"string","const":"analytics:refresh"},{"type":"string","const":"media:permanently_delete"},{"type":"string","const":"project:access_manage"},{"type":"string","const":"publication:approve"},{"type":"string","const":"workspace:manage"},{"type":"string","const":"api_key:manage"},{"type":"string","const":"instance:admin"}]},"minItems":1},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}}}}}},"multipart/form-data":{"schema":{"type":"object","required":["name","email","password"],"properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","minLength":1,"maxLength":320},"password":{"type":"string","minLength":8,"maxLength":128},"apiKey":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"projectIds":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1},"minItems":1},{"type":"null"}]},"actionAccess":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"string","const":"project:read"},{"type":"string","const":"project:manage"},{"type":"string","const":"project:permanently_delete"},{"type":"string","const":"publication:manage"},{"type":"string","const":"publication:dispatch"},{"type":"string","const":"channel:manage"},{"type":"string","const":"channel:share"},{"type":"string","const":"media:manage"},{"type":"string","const":"analytics:refresh"},{"type":"string","const":"media:permanently_delete"},{"type":"string","const":"project:access_manage"},{"type":"string","const":"publication:approve"},{"type":"string","const":"workspace:manage"},{"type":"string","const":"api_key:manage"},{"type":"string","const":"instance:admin"}]},"minItems":1},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]}}}}}}}},"responses":{"201":{"description":"Response for status 201","content":{"application/json":{"schema":{"type":"object","required":["user","instance"],"properties":{"user":{"type":"object","required":["id","name","email","role"],"properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"email":{"type":"string","minLength":1},"role":{"type":"string","const":"admin"}}},"instance":{"type":"object","required":["state","claimedByUserId","claimedAt"],"properties":{"state":{"type":"string","const":"claimed"},"claimedByUserId":{"type":"string","minLength":1},"claimedAt":{"type":"integer","minimum":0}}},"apiKey":{"type":"object","required":["key","token"],"properties":{"key":{"type":"object","required":["id","name","tokenPrefix","projectAccess","actionAccess","expiresAt","createdAt","updatedAt"],"properties":{"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"tokenPrefix":{"type":"string","minLength":1},"projectAccess":{"anyOf":[{"type":"string","const":"all"},{"type":"array","items":{"type":"string","minLength":1}}]},"actionAccess":{"anyOf":[{"type":"string","const":"all"},{"type":"array","items":{"anyOf":[{"type":"string","const":"project:read"},{"type":"string","const":"project:manage"},{"type":"string","const":"project:permanently_delete"},{"type":"string","const":"publication:manage"},{"type":"string","const":"publication:dispatch"},{"type":"string","const":"channel:manage"},{"type":"string","const":"channel:share"},{"type":"string","const":"media:manage"},{"type":"string","const":"analytics:refresh"},{"type":"string","const":"media:permanently_delete"},{"type":"string","const":"project:access_manage"},{"type":"string","const":"publication:approve"},{"type":"string","const":"workspace:manage"},{"type":"string","const":"api_key:manage"},{"type":"string","const":"instance:admin"}]}}]},"expiresAt":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}]},"createdAt":{"type":"integer","minimum":0},"updatedAt":{"type":"integer","minimum":0}}},"token":{"type":"string","minLength":1,"description":"The plaintext API key. It is returned only once when the key is created."}}}}}}}},"400":{"description":"Response for status 400","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1}}}}}}}},"403":{"description":"Response for status 403","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1}}}}}}}},"409":{"description":"Response for status 409","content":{"application/json":{"schema":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","minLength":1},"message":{"type":"string","minLength":1}}}}}}}}}}}},"servers":[{"url":"https://postdot.example","description":"Replace with your Postdot instance origin."}]}
```
