{"openapi":"3.1.0","info":{"title":"Bartosz Paszkowski — recruiting agent API","version":"1.0.0","description":"Answers recruitment questions about Bartosz Paszkowski from an approved fact base and lets recruiters request a call. Every response carries an X-Request-Id header. Cross-origin browser access is not enabled."},"servers":[{"url":"https://agent.bartoszpaszkowski.pl"}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/ask":{"post":{"operationId":"ask","summary":"Ask a question about Bartosz","description":"Counts toward the per-minute and daily request limits and the daily budget.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AskRequest"}}}},"responses":{"200":{"description":"The answer with its sources.","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentAnswer"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"402":{"$ref":"#/components/responses/BudgetExceeded"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"},"502":{"$ref":"#/components/responses/UpstreamError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/api/v1/profile":{"get":{"operationId":"getProfile","summary":"Concise profile built from approved facts","parameters":[{"name":"lang","in":"query","schema":{"type":"string","enum":["pl","en"],"default":"pl"}}],"responses":{"200":{"description":"Profile facts.","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Profile"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/usage":{"get":{"operationId":"getUsage","summary":"Remaining requests for today (UTC)","responses":{"200":{"description":"Daily usage.","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Usage"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/meeting/slots":{"get":{"operationId":"listMeetingSlots","summary":"Free slots for a call with Bartosz","description":"Up to 8 slots of 30 minutes on the next working days, 10:00–17:00 Europe/Warsaw.","responses":{"200":{"description":"Offered slots.","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingSlots"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"500":{"$ref":"#/components/responses/InternalError"}}}},"/api/v1/meeting/request":{"post":{"operationId":"requestMeeting","summary":"Request a call with Bartosz","description":"Does not call the model. Bartosz confirms by e-mail. Each token may have one pending and three requests in total.","parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingRequest"}}}},"responses":{"200":{"description":"A request with this Idempotency-Key already existed.","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingReceipt"}}}},"201":{"description":"The request was created.","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeetingReceipt"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/TooManyRequests"},"500":{"$ref":"#/components/responses/InternalError"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Access token (bp_…) from a one-time invitation."}},"parameters":{"IdempotencyKey":{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating the same key with the same token returns the original request instead of creating a new one.","schema":{"type":"string","pattern":"^[\\x21-\\x7e]{1,64}$"}}},"responses":{"BadRequest":{"description":"The request is invalid, too long or names a slot that is not offered (INVALID_REQUEST, INPUT_TOO_LONG, INVALID_SLOT).","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"The Bearer token is missing, invalid, expired, revoked or lacks the api scope (UNAUTHORIZED).","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}},"WWW-Authenticate":{"schema":{"type":"string","const":"Bearer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"BudgetExceeded":{"description":"The daily budget is spent (BUDGET_EXCEEDED).","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"TooManyRequests":{"description":"A request limit was reached (RATE_LIMITED, MEETING_LIMIT).","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InternalError":{"description":"Unexpected server error (INTERNAL).","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UpstreamError":{"description":"The model service failed (UPSTREAM_ERROR).","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"The assistant is paused or temporarily unavailable (LLM_PAUSED, LLM_UNAVAILABLE).","headers":{"X-Request-Id":{"description":"Identifier of this request, also written to the server logs.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["INVALID_REQUEST","INPUT_TOO_LONG","INVALID_SLOT","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","METHOD_NOT_ALLOWED","CONFLICT","RATE_LIMITED","MEETING_LIMIT","BUDGET_EXCEEDED","LLM_PAUSED","LLM_UNAVAILABLE","UPSTREAM_ERROR","INTERNAL"]},"message":{"type":"string"}}}}},"Turn":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","minLength":1,"maxLength":3000}}},"AskRequest":{"type":"object","required":["question"],"properties":{"question":{"type":"string","minLength":1,"maxLength":1500},"history":{"type":"array","maxItems":12,"description":"Earlier turns, alternating user and assistant, starting with user. At most 6 exchanges and 6000 characters in total.","items":{"$ref":"#/components/schemas/Turn"}},"lang":{"type":"string","enum":["pl","en"],"description":"Detected from the question when omitted."}}},"AgentAnswer":{"type":"object","required":["answer","sources","confidence","status","suggest_meeting"],"properties":{"answer":{"type":"string"},"sources":{"type":"array","items":{"type":"string"},"description":"IDs of the approved facts that support the answer."},"confidence":{"type":"string","enum":["high","medium","low"]},"status":{"type":"string","enum":["answered","unknown","refused"]},"suggest_meeting":{"type":"boolean"}}},"Profile":{"type":"object","required":["facts"],"properties":{"facts":{"type":"array","items":{"type":"object","required":["id","category","text"],"properties":{"id":{"type":"string"},"category":{"type":"string"},"text":{"type":"string"}}}}}},"Usage":{"type":"object","required":["remaining","limit"],"properties":{"remaining":{"type":"integer","minimum":0},"limit":{"type":"integer","minimum":1}}},"Slot":{"type":"object","required":["start","end"],"properties":{"start":{"type":"string","format":"date-time"},"end":{"type":"string","format":"date-time"}}},"MeetingSlots":{"type":"object","required":["verified","timeZone","slots"],"properties":{"verified":{"type":"boolean","description":"False when availability could not be checked; Bartosz confirms provisional slots."},"timeZone":{"type":"string","const":"Europe/Warsaw"},"slots":{"type":"array","maxItems":8,"items":{"$ref":"#/components/schemas/Slot"}}}},"MeetingRequest":{"type":"object","required":["name","email","company","slotStart"],"properties":{"name":{"type":"string","minLength":1,"maxLength":80},"email":{"type":"string","format":"email","maxLength":254},"company":{"type":"string","minLength":1,"maxLength":120},"slotStart":{"type":"string","format":"date-time","description":"The start of a slot returned by /api/v1/meeting/slots."},"note":{"type":"string","maxLength":500}}},"MeetingReceipt":{"type":"object","required":["id","status","slotStart","createdAt"],"properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","confirmed","rejected"]},"slotStart":{"type":"string","format":"date-time"},"createdAt":{"type":"string","format":"date-time"}}}}}}