{"openapi":"3.1.0","info":{"title":"Apilyn Public API","summary":"Public contract for the Apilyn document intelligence API.","version":"1.0.0","description":"The Apilyn API accepts sandbox and live document-processing jobs, exposes tenant-scoped upload and download URLs, and emits signed webhooks for asynchronous completion events."},"paths":{"/v1/orgs":{"post":{"summary":"Create Org","operationId":"post_v1_orgs","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["orgs"],"security":[{"BearerAuth":[]}]}},"/v1/orgs/current":{"get":{"summary":"Get Current Org","operationId":"get_v1_orgs_current","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["orgs"],"security":[{"BearerAuth":[]}]},"patch":{"summary":"Update Current Org","operationId":"patch_v1_orgs_current","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["orgs"],"security":[{"BearerAuth":[]}]}},"/v1/me":{"get":{"summary":"Read Me","operationId":"get_v1_me","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActorRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["me"],"security":[{"BearerAuth":[]}]}},"/v1/me/organizations":{"get":{"summary":"List My Organizations","operationId":"get_v1_me_organizations","parameters":[],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserOrganizationRead"},"title":"Response List My Organizations V1 Me Organizations Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["me"],"security":[{"BearerAuth":[]}]}},"/v1/memberships":{"get":{"summary":"List Org Memberships","operationId":"get_v1_memberships","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MembershipRead"},"title":"Response List Org Memberships V1 Memberships Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["memberships"],"security":[{"BearerAuth":[]}]}},"/v1/memberships/invites":{"post":{"summary":"Invite Membership","operationId":"post_v1_memberships_invites","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipInvite"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["memberships"],"security":[{"BearerAuth":[]}]}},"/v1/memberships/{membership_id}":{"patch":{"summary":"Change Membership Role","operationId":"patch_v1_memberships_by_membership_id","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"membership_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Membership Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipRoleUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MembershipRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["memberships"],"security":[{"BearerAuth":[]}]}},"/v1/api-keys":{"post":{"summary":"Create Key","operationId":"post_v1_api_keys","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["api-keys"],"security":[{"BearerAuth":[]}]},"get":{"summary":"List Keys","operationId":"get_v1_api_keys","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ApiKeyRead"},"title":"Response List Keys V1 Api Keys Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["api-keys"],"security":[{"BearerAuth":[]}]}},"/v1/api-keys/{key_id}/revoke":{"post":{"summary":"Revoke Key","operationId":"post_v1_api_keys_by_key_id_revoke","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["api-keys"],"security":[{"BearerAuth":[]}]}},"/v1/api-keys/{key_id}/rotate":{"post":{"summary":"Rotate Key","operationId":"post_v1_api_keys_by_key_id_rotate","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Key Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyRotateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyCreated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["api-keys"],"security":[{"BearerAuth":[]}]}},"/v1/uploads":{"post":{"summary":"Create Upload","operationId":"post_v1_uploads","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCreate"},"examples":{"default":{"summary":"Create a sandbox upload intent","value":{"filename":"sample.pdf","content_type":"application/pdf","content_length":1024,"purpose":"input","delete_after_download":false}}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadCreated"},"examples":{"default":{"summary":"Upload intent","value":{"id":"00000000-0000-4000-8000-000000000010","org_id":"00000000-0000-4000-8000-000000000020","job_id":"00000000-0000-4000-8000-000000000030","purpose":"input","filename":"sample.pdf","content_type":"application/pdf","content_length":1024,"region":"eu","status":"pending_upload","expires_at":"2026-07-24T20:00:00Z","uploaded_at":null,"delete_after_download":false,"created_at":"2026-07-24T19:00:00Z","updated_at":"2026-07-24T19:00:00Z","upload_url":"fake://uploads/00000000-0000-4000-8000-000000000010","upload_method":"PUT","upload_headers":{"Content-Type":"application/pdf"},"upload_expires_at":"2026-07-24T19:15:00Z"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["uploads"],"security":[{"BearerAuth":[]}],"x-codeSamples":[{"lang":"curl","label":"Create upload intent","source":"curl -sS -X POST \"$APILYN_API_URL/v1/uploads\" -H \"Authorization: Bearer $APILYN_API_KEY\" -H \"X-Org-Id: $APILYN_ORG_ID\" -H \"Content-Type: application/json\" -d '{\"filename\":\"sample.pdf\",\"content_type\":\"application/pdf\",\"content_length\":1024}'"}]}},"/v1/uploads/{upload_id}/complete":{"post":{"summary":"Complete Upload","operationId":"post_v1_uploads_by_upload_id_complete","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["uploads"],"security":[{"BearerAuth":[]}]}},"/v1/uploads/{upload_id}/download":{"get":{"summary":"Download Upload","operationId":"get_v1_uploads_by_upload_id_download","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"upload_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Upload Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadDownload"},"examples":{"default":{"summary":"Presigned download URL","value":{"id":"00000000-0000-4000-8000-000000000010","download_url":"fake://downloads/00000000-0000-4000-8000-000000000010","download_method":"GET","expires_at":"2026-07-24T19:15:00Z"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["uploads"],"security":[{"BearerAuth":[]}],"x-codeSamples":[{"lang":"curl","label":"Create download URL","source":"curl -sS \"$APILYN_API_URL/v1/uploads/$UPLOAD_ID/download\" -H \"Authorization: Bearer $APILYN_API_KEY\" -H \"X-Org-Id: $APILYN_ORG_ID\""}]}},"/v1/jobs/{job_id}/files":{"delete":{"summary":"Delete Job Files","operationId":"delete_v1_jobs_by_job_id_files","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobFilesDeleted"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["jobs"],"security":[{"BearerAuth":[]}]}},"/v1/privacy/gdpr-erase":{"post":{"summary":"Gdpr Erase","operationId":"post_v1_privacy_gdpr_erase","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GdprEraseRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GdprEraseResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["privacy"],"security":[{"BearerAuth":[]}]}},"/v1/pipelines":{"get":{"summary":"Pipelines","operationId":"get_v1_pipelines","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PipelineRead"},"title":"Response Pipelines V1 Pipelines Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["pipelines"],"security":[{"BearerAuth":[]}]}},"/v1/jobs":{"post":{"summary":"Create Job","operationId":"post_v1_jobs","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobCreate"},"examples":{"default":{"summary":"Create a PDF merge job","value":{"pipeline":"pdf.merge","pipeline_version":"1","inputs":{"files":[{"upload_id":"00000000-0000-4000-8000-000000000001"}]},"parameters":{"preserve_bookmarks":true},"webhook":{"event":"job.completed"},"priority":"default"}}}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRead"},"examples":{"default":{"summary":"Accepted asynchronous job","value":{"id":"00000000-0000-4000-8000-000000000040","org_id":"00000000-0000-4000-8000-000000000020","pipeline":"pdf.merge","pipeline_version":"1","status":"queued","priority":"default","params":{"preserve_bookmarks":true},"input_refs":{"files":[{"upload_id":"00000000-0000-4000-8000-000000000010"}]},"output_refs":{},"error":null,"progress":"0","region":"eu","idempotency_key":"quickstart-merge-001","expires_at":"2026-07-27T19:00:00Z","created_at":"2026-07-24T19:00:00Z","updated_at":"2026-07-24T19:00:00Z"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["jobs"],"security":[{"BearerAuth":[]}],"x-codeSamples":[{"lang":"curl","label":"Create job","source":"curl -sS -X POST \"$APILYN_API_URL/v1/jobs\" -H \"Authorization: Bearer $APILYN_API_KEY\" -H \"X-Org-Id: $APILYN_ORG_ID\" -H \"Idempotency-Key: quickstart-merge-001\" -H \"Content-Type: application/json\" -d '{\"pipeline\":\"pdf.merge\",\"inputs\":{\"files\":[{\"upload_id\":\"$UPLOAD_ID\"}]}}'"}]},"get":{"summary":"List Jobs","operationId":"get_v1_jobs","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["jobs"],"security":[{"BearerAuth":[]}]}},"/v1/jobs/{job_id}":{"get":{"summary":"Get Job","operationId":"get_v1_jobs_by_job_id","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["jobs"],"security":[{"BearerAuth":[]}],"x-codeSamples":[{"lang":"curl","label":"Poll job","source":"curl -sS \"$APILYN_API_URL/v1/jobs/$JOB_ID\" -H \"Authorization: Bearer $APILYN_API_KEY\" -H \"X-Org-Id: $APILYN_ORG_ID\""}]}},"/v1/jobs/{job_id}/outputs/{output_alias}/download":{"get":{"summary":"Download Job Output","operationId":"get_v1_jobs_by_job_id_outputs_by_output_alias_download","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}},{"name":"output_alias","in":"path","required":true,"schema":{"type":"string","title":"Output Alias"}},{"name":"index","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"title":"Index"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobOutputDownload"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["jobs"],"security":[{"BearerAuth":[]}]}},"/v1/jobs/{job_id}/cancel":{"post":{"summary":"Cancel Job","operationId":"post_v1_jobs_by_job_id_cancel","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"job_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Job Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["jobs"],"security":[{"BearerAuth":[]}]}},"/v1/tools":{"get":{"tags":["tools"],"summary":"Tools Catalog","operationId":"get_v1_tools","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ToolRead"},"title":"Response Tools Catalog V1 Tools Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"BearerAuth":[]}]}},"/v1/tools/{tool_name}":{"post":{"tags":["tools"],"summary":"Run Tool","operationId":"post_v1_tools_by_tool_name","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"tool_name","in":"path","required":true,"schema":{"type":"string","title":"Tool Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolRunResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"BearerAuth":[]}]}},"/v1/operations":{"get":{"tags":["catalog"],"summary":"Operations Catalog","operationId":"get_v1_operations","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"execution_mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Execution Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OperationList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"BearerAuth":[]}]}},"/v1/billing/portal":{"post":{"summary":"Create Portal Link","operationId":"post_v1_billing_portal","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalRequest"},"examples":{"default":{"summary":"Create a billing portal link","value":{"return_url":"https://app.apilyn.test/billing"}}}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PortalResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["billing"],"security":[{"BearerAuth":[]}]}},"/v1/billing/credits":{"get":{"summary":"Get Credit Balance","operationId":"get_v1_billing_credits","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreditBalanceResponse"},"examples":{"default":{"summary":"Current credit balance","value":{"balance_minor":1000}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["billing"],"security":[{"BearerAuth":[]}],"x-codeSamples":[{"lang":"curl","label":"Read credit balance","source":"curl -sS \"$APILYN_API_URL/v1/billing/credits\" -H \"Authorization: Bearer $APILYN_API_KEY\" -H \"X-Org-Id: $APILYN_ORG_ID\""}]}},"/v1/billing/webhooks/stripe":{"post":{"summary":"Stripe Webhook","operationId":"post_v1_billing_webhooks_stripe","parameters":[{"name":"Stripe-Signature","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stripe-Signature"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StripeWebhookResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["billing"]}},"/v1/usage/rollups":{"get":{"summary":"Usage Rollups","operationId":"get_v1_usage_rollups","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageRollupResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["usage"],"security":[{"BearerAuth":[]}]}},"/v1/billing/overview":{"get":{"summary":"Billing Overview","operationId":"get_v1_billing_overview","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingOverviewResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["billing"],"security":[{"BearerAuth":[]}]}},"/v1/webhooks":{"post":{"summary":"Create Webhook","operationId":"post_v1_webhooks","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreate"},"examples":{"default":{"summary":"Subscribe to job lifecycle events","value":{"url":"https://example.test/apilyn/webhook","subscribed_events":["job.completed","job.failed"]}}}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointCreated"},"examples":{"default":{"summary":"Webhook endpoint with one-time signing secret","value":{"id":"00000000-0000-4000-8000-000000000050","org_id":"00000000-0000-4000-8000-000000000020","url":"https://example.test/apilyn/webhook","signing_secret_prefix":"whsec_12345678","subscribed_events":["job.completed","job.failed"],"status":"active","failure_count":0,"disabled_at":null,"created_at":"2026-07-24T19:00:00Z","updated_at":"2026-07-24T19:00:00Z","secret":"whsec_test_1234567890"}}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}],"x-codeSamples":[{"lang":"curl","label":"Register webhook","source":"curl -sS -X POST \"$APILYN_API_URL/v1/webhooks\" -H \"Authorization: Bearer $APILYN_API_KEY\" -H \"X-Org-Id: $APILYN_ORG_ID\" -H \"Content-Type: application/json\" -d '{\"url\":\"https://example.test/apilyn/webhook\",\"subscribed_events\":[\"job.completed\",\"job.failed\"]}'"}]},"get":{"summary":"List Webhooks","operationId":"get_v1_webhooks","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpointRead"},"title":"Response List Webhooks V1 Webhooks Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}]}},"/v1/webhooks/deliveries":{"get":{"summary":"List Deliveries","operationId":"get_v1_webhooks_deliveries","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"endpoint_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Endpoint Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryRead"},"title":"Response List Deliveries V1 Webhooks Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}]}},"/v1/webhooks/deliveries/{delivery_id}/replay":{"post":{"summary":"Replay Delivery","operationId":"post_v1_webhooks_deliveries_by_delivery_id_replay","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"delivery_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Delivery Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookDeliveryRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}]}},"/v1/webhooks/{endpoint_id}":{"get":{"summary":"Get Webhook","operationId":"get_v1_webhooks_by_endpoint_id","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}]},"patch":{"summary":"Update Webhook","operationId":"patch_v1_webhooks_by_endpoint_id","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpointRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}]},"delete":{"summary":"Delete Webhook","operationId":"delete_v1_webhooks_by_endpoint_id","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}]}},"/v1/webhooks/{endpoint_id}/rotate":{"post":{"summary":"Rotate Webhook Secret","operationId":"post_v1_webhooks_by_endpoint_id_rotate","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSecretRotated"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}]}},"/v1/webhooks/{endpoint_id}/deliveries":{"get":{"summary":"List Endpoint Deliveries","operationId":"get_v1_webhooks_by_endpoint_id_deliveries","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Endpoint Id"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WebhookDeliveryRead"},"title":"Response List Endpoint Deliveries V1 Webhooks  Endpoint Id  Deliveries Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["webhooks"],"security":[{"BearerAuth":[]}]}},"/v1/api-logs":{"get":{"summary":"List Api Logs","operationId":"get_v1_api_logs","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"pipeline","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pipeline"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiLogList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["api-logs"],"security":[{"BearerAuth":[]}]}},"/v1/audit-events":{"get":{"summary":"List Audit Events","operationId":"get_v1_audit_events","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}},{"name":"action","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Action"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"query","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Query"}},{"name":"target_type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Type"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"tags":["audit-events"],"security":[{"BearerAuth":[]}]}},"/v1/search/semantic":{"post":{"tags":["search"],"summary":"Search Semantic","operationId":"post_v1_search_semantic","parameters":[{"name":"X-Org-Id","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Org-Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticSearchRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SemanticSearchResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"BearerAuth":[]}]}},"/v1/openapi.json":{"get":{"tags":["contract"],"summary":"Public Openapi","description":"Serve the versioned public API contract without authentication.","operationId":"get_v1_openapi_json","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Missing or invalid bearer token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"Missing or invalid bearer token","value":{"error":{"code":"unauthorized","message":"Missing bearer access token.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"403":{"description":"Permission denied","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"not_found":{"summary":"Resource not found","value":{"error":{"code":"not_found","message":"Resource was not found.","details":{},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"409":{"description":"Request conflicts with current resource state","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Validation error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_error":{"summary":"Validation error","value":{"error":{"code":"validation_error","message":"Request validation failed.","details":{"errors":[]},"request_id":"req_0123456789abcdef0123456789abcdef"}}}}}}},"429":{"description":"Rate or quota limit exceeded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"parameters":[]}}},"components":{"schemas":{"ActorRead":{"properties":{"user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"role":{"$ref":"#/components/schemas/MembershipRole"},"permissions":{"items":{"type":"string"},"type":"array","title":"Permissions"},"auth_method":{"type":"string","title":"Auth Method","default":"jwt"}},"type":"object","required":["org_id","role","permissions"],"title":"ActorRead"},"ApiKeyCreate":{"properties":{"environment":{"$ref":"#/components/schemas/ApiKeyEnvironment","default":"sandbox"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","title":"ApiKeyCreate"},"ApiKeyCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"environment":{"$ref":"#/components/schemas/ApiKeyEnvironment"},"public_prefix":{"type":"string","title":"Public Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","org_id","environment","public_prefix","scopes","created_at","updated_at","secret"],"title":"ApiKeyCreated"},"ApiKeyEnvironment":{"type":"string","enum":["sandbox","live"],"title":"ApiKeyEnvironment"},"ApiKeyRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"environment":{"$ref":"#/components/schemas/ApiKeyEnvironment"},"public_prefix":{"type":"string","title":"Public Prefix"},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes"},"created_by_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Created By User Id"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"revoked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Revoked At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","environment","public_prefix","scopes","created_at","updated_at"],"title":"ApiKeyRead"},"ApiKeyRotateRequest":{"properties":{"revoke_old":{"type":"boolean","title":"Revoke Old","default":false}},"type":"object","title":"ApiKeyRotateRequest"},"ApiLogList":{"properties":{"source":{"type":"string","title":"Source"},"data":{"items":{"$ref":"#/components/schemas/ApiLogRead"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["source","data"],"title":"ApiLogList"},"ApiLogRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"kind":{"type":"string","title":"Kind"},"method":{"type":"string","title":"Method"},"path":{"type":"string","title":"Path"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Api Key Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"pipeline":{"type":"string","title":"Pipeline"},"status":{"type":"string","title":"Status"},"redacted_summary":{"additionalProperties":true,"type":"object","title":"Redacted Summary"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","kind","method","path","job_id","pipeline","status","redacted_summary","created_at","updated_at"],"title":"ApiLogRead"},"AuditEventList":{"properties":{"source":{"type":"string","title":"Source"},"data":{"items":{"$ref":"#/components/schemas/AuditEventRead"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["source","data"],"title":"AuditEventList"},"AuditEventRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"actor_user_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Actor User Id"},"action":{"type":"string","title":"Action"},"target_type":{"type":"string","title":"Target Type"},"target_id":{"type":"string","title":"Target Id"},"request_metadata":{"additionalProperties":true,"type":"object","title":"Request Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","org_id","action","target_type","target_id","request_metadata","created_at"],"title":"AuditEventRead"},"BillingInvoiceSummary":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"usage_units":{"type":"integer","title":"Usage Units"},"overage_units":{"type":"integer","title":"Overage Units"},"amount_due_minor":{"type":"integer","title":"Amount Due Minor"}},"type":"object","required":["id","status","period_start","period_end","usage_units","overage_units","amount_due_minor"],"title":"BillingInvoiceSummary"},"BillingOverviewResponse":{"properties":{"source":{"type":"string","title":"Source","default":"usage_events"},"plan":{"$ref":"#/components/schemas/BillingPlanSummary"},"subscription":{"anyOf":[{"$ref":"#/components/schemas/BillingSubscriptionSummary"},{"type":"null"}]},"credit_balance_minor":{"type":"integer","title":"Credit Balance Minor"},"period_usage_units":{"type":"integer","title":"Period Usage Units"},"included_units":{"type":"integer","title":"Included Units"},"projected_overage_units":{"type":"integer","title":"Projected Overage Units"},"projected_overage_minor":{"type":"integer","title":"Projected Overage Minor"},"projected_invoice_minor":{"type":"integer","title":"Projected Invoice Minor"},"payment_portal_available":{"type":"boolean","title":"Payment Portal Available"},"invoices":{"items":{"$ref":"#/components/schemas/BillingInvoiceSummary"},"type":"array","title":"Invoices"}},"type":"object","required":["plan","credit_balance_minor","period_usage_units","included_units","projected_overage_units","projected_overage_minor","projected_invoice_minor","payment_portal_available"],"title":"BillingOverviewResponse"},"BillingPlanSummary":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"included_units":{"type":"integer","title":"Included Units"},"overage_rate_minor":{"type":"integer","title":"Overage Rate Minor"},"soft_limit_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Soft Limit Units"},"hard_limit_units":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Hard Limit Units"}},"type":"object","required":["code","name","included_units","overage_rate_minor"],"title":"BillingPlanSummary"},"BillingSubscriptionSummary":{"properties":{"status":{"type":"string","title":"Status"},"current_period_start":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period Start"},"current_period_end":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Current Period End"}},"type":"object","required":["status"],"title":"BillingSubscriptionSummary"},"ChunkCitation":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"chunk_id":{"type":"string","format":"uuid","title":"Chunk Id"},"chunk_ordinal":{"type":"integer","title":"Chunk Ordinal"},"page_start":{"type":"integer","title":"Page Start"},"page_end":{"type":"integer","title":"Page End"},"block_ids":{"items":{"type":"string"},"type":"array","title":"Block Ids"},"source_artifact_key":{"type":"string","title":"Source Artifact Key"}},"type":"object","required":["job_id","chunk_id","chunk_ordinal","page_start","page_end","block_ids","source_artifact_key"],"title":"ChunkCitation"},"CreditBalanceResponse":{"properties":{"balance_minor":{"type":"integer","title":"Balance Minor"}},"type":"object","required":["balance_minor"],"title":"CreditBalanceResponse"},"GdprEraseRequest":{"properties":{"confirmation":{"type":"string","title":"Confirmation","description":"Must equal erase-org-files"}},"type":"object","required":["confirmation"],"title":"GdprEraseRequest"},"GdprEraseResult":{"properties":{"org_id":{"type":"string","format":"uuid","title":"Org Id"},"deleted_objects":{"type":"integer","title":"Deleted Objects"},"uploads_scrubbed":{"type":"integer","title":"Uploads Scrubbed"},"audit_event_id":{"type":"string","format":"uuid","title":"Audit Event Id"}},"type":"object","required":["org_id","deleted_objects","uploads_scrubbed","audit_event_id"],"title":"GdprEraseResult"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"JobCreate":{"properties":{"pipeline":{"type":"string","maxLength":128,"minLength":1,"title":"Pipeline"},"pipeline_version":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}],"title":"Pipeline Version"},"inputs":{"additionalProperties":true,"type":"object","title":"Inputs"},"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"},"webhook":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Webhook"},"priority":{"$ref":"#/components/schemas/JobPriority","default":"default"}},"type":"object","required":["pipeline"],"title":"JobCreate"},"JobFilesDeleted":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"deleted_objects":{"type":"integer","title":"Deleted Objects"},"uploads_purged":{"type":"integer","title":"Uploads Purged"}},"type":"object","required":["job_id","deleted_objects","uploads_purged"],"title":"JobFilesDeleted"},"JobList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/JobRead"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"JobList"},"JobOutputDownload":{"properties":{"job_id":{"type":"string","format":"uuid","title":"Job Id"},"output_alias":{"type":"string","title":"Output Alias"},"download_url":{"type":"string","title":"Download Url"},"download_method":{"type":"string","title":"Download Method"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["job_id","output_alias","download_url","download_method","expires_at"],"title":"JobOutputDownload"},"JobPriority":{"type":"string","enum":["high","default","low"],"title":"JobPriority"},"JobRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"pipeline":{"type":"string","title":"Pipeline"},"pipeline_version":{"type":"string","title":"Pipeline Version"},"status":{"$ref":"#/components/schemas/JobStatus"},"priority":{"$ref":"#/components/schemas/JobPriority"},"params":{"additionalProperties":true,"type":"object","title":"Params"},"input_refs":{"additionalProperties":true,"type":"object","title":"Input Refs"},"output_refs":{"additionalProperties":true,"type":"object","title":"Output Refs"},"error":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Error"},"progress":{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$","title":"Progress"},"region":{"type":"string","title":"Region"},"idempotency_key":{"type":"string","title":"Idempotency Key"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","pipeline","pipeline_version","status","priority","params","input_refs","output_refs","progress","region","idempotency_key","created_at","updated_at"],"title":"JobRead"},"JobStatus":{"type":"string","enum":["queued","running","completed","failed","cancelled","expired"],"title":"JobStatus"},"MembershipInvite":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"role":{"$ref":"#/components/schemas/MembershipRole","default":"member"}},"type":"object","required":["email"],"title":"MembershipInvite"},"MembershipRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"user_id":{"type":"string","format":"uuid","title":"User Id"},"role":{"$ref":"#/components/schemas/MembershipRole"},"status":{"$ref":"#/components/schemas/MembershipStatus"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","user_id","role","status","created_at","updated_at"],"title":"MembershipRead"},"MembershipRole":{"type":"string","enum":["owner","admin","billing","developer","member"],"title":"MembershipRole"},"MembershipRoleUpdate":{"properties":{"role":{"$ref":"#/components/schemas/MembershipRole"}},"type":"object","required":["role"],"title":"MembershipRoleUpdate"},"MembershipStatus":{"type":"string","enum":["active","invited","revoked"],"title":"MembershipStatus"},"OperationList":{"properties":{"data":{"items":{"$ref":"#/components/schemas/OperationRead"},"type":"array","title":"Data"}},"type":"object","required":["data"],"title":"OperationList"},"OperationRead":{"properties":{"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"execution_mode":{"type":"string","enum":["async_job","sync_tool"],"title":"Execution Mode"},"endpoint":{"type":"string","title":"Endpoint"},"required_scope":{"type":"string","title":"Required Scope"},"input_mode":{"type":"string","title":"Input Mode"},"stage_names":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Stage Names"},"catalog_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Id"}},"type":"object","required":["name","version","description","category","execution_mode","endpoint","required_scope","input_mode"],"title":"OperationRead"},"OrganizationCreate":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"slug":{"type":"string","maxLength":64,"minLength":2,"pattern":"^[a-z0-9-]+$","title":"Slug"},"plan_code":{"type":"string","title":"Plan Code","default":"free"},"data_region":{"type":"string","title":"Data Region","default":"eu"},"retention_hours":{"type":"integer","maximum":720.0,"minimum":1.0,"title":"Retention Hours","default":72}},"type":"object","required":["name","slug"],"title":"OrganizationCreate"},"OrganizationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"plan_id":{"type":"string","format":"uuid","title":"Plan Id"},"data_region":{"type":"string","title":"Data Region"},"retention_hours":{"type":"integer","title":"Retention Hours"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","slug","plan_id","data_region","retention_hours","created_at","updated_at"],"title":"OrganizationRead"},"OrganizationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"retention_hours":{"anyOf":[{"type":"integer","maximum":720.0,"minimum":1.0},{"type":"null"}],"title":"Retention Hours"}},"type":"object","title":"OrganizationUpdate"},"PipelineRead":{"properties":{"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"type":"string","title":"Description"},"stage_names":{"items":{"type":"string"},"type":"array","title":"Stage Names"},"required_scope":{"type":"string","title":"Required Scope"},"category":{"type":"string","title":"Category","default":"documents"},"input_mode":{"type":"string","title":"Input Mode","default":"uploads_required"}},"type":"object","required":["name","version","description","stage_names","required_scope"],"title":"PipelineRead"},"PortalRequest":{"properties":{"return_url":{"type":"string","minLength":1,"title":"Return Url","default":"https://app.apilyn.test/billing"}},"type":"object","title":"PortalRequest"},"PortalResponse":{"properties":{"url":{"type":"string","title":"Url"}},"type":"object","required":["url"],"title":"PortalResponse"},"SemanticSearchFilters":{"properties":{"job_ids":{"items":{"type":"string","format":"uuid"},"type":"array","maxItems":50,"title":"Job Ids"},"pipelines":{"items":{"type":"string"},"type":"array","maxItems":20,"title":"Pipelines"},"page_start":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page Start"},"page_end":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Page End"}},"type":"object","title":"SemanticSearchFilters"},"SemanticSearchRequest":{"properties":{"query":{"type":"string","maxLength":4000,"minLength":1,"title":"Query"},"filters":{"$ref":"#/components/schemas/SemanticSearchFilters"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","default":10},"cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"},"embedding_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Model"},"embedding_model_version":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Embedding Model Version"}},"type":"object","required":["query"],"title":"SemanticSearchRequest"},"SemanticSearchResponse":{"properties":{"data":{"items":{"$ref":"#/components/schemas/SemanticSearchResult"},"type":"array","title":"Data"},"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"}},"type":"object","required":["data"],"title":"SemanticSearchResponse"},"SemanticSearchResult":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"score":{"type":"number","maximum":1.0,"minimum":-1.0,"title":"Score"},"text":{"type":"string","title":"Text"},"citation":{"$ref":"#/components/schemas/ChunkCitation"},"pipeline":{"type":"string","title":"Pipeline"},"embedding_model":{"type":"string","title":"Embedding Model"},"embedding_model_version":{"type":"string","title":"Embedding Model Version"},"embedding_dimension":{"type":"integer","title":"Embedding Dimension"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","score","text","citation","pipeline","embedding_model","embedding_model_version","embedding_dimension","created_at"],"title":"SemanticSearchResult"},"StripeWebhookResponse":{"properties":{"duplicate":{"type":"boolean","title":"Duplicate"},"processed":{"type":"boolean","title":"Processed"}},"type":"object","required":["duplicate","processed"],"title":"StripeWebhookResponse"},"ToolRead":{"properties":{"name":{"type":"string","title":"Name"},"version":{"type":"string","title":"Version"},"description":{"type":"string","title":"Description"},"category":{"type":"string","title":"Category"},"required_scope":{"type":"string","title":"Required Scope"},"catalog_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Catalog Id"}},"type":"object","required":["name","version","description","category","required_scope"],"title":"ToolRead"},"ToolRunRequest":{"properties":{"parameters":{"additionalProperties":true,"type":"object","title":"Parameters"}},"type":"object","title":"ToolRunRequest"},"ToolRunResponse":{"properties":{"tool":{"type":"string","title":"Tool"},"version":{"type":"string","title":"Version"},"status":{"type":"string","const":"succeeded","title":"Status"},"output":{"additionalProperties":true,"type":"object","title":"Output"},"usage_units":{"type":"integer","title":"Usage Units"},"duration_ms":{"type":"number","title":"Duration Ms"}},"type":"object","required":["tool","version","status","output","usage_units","duration_ms"],"title":"ToolRunResponse"},"UploadCreate":{"properties":{"filename":{"type":"string","maxLength":255,"minLength":1,"title":"Filename"},"content_type":{"type":"string","maxLength":128,"minLength":3,"title":"Content Type"},"content_length":{"type":"integer","minimum":1.0,"title":"Content Length"},"job_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Job Id"},"purpose":{"$ref":"#/components/schemas/UploadPurpose","default":"input"},"delete_after_download":{"type":"boolean","title":"Delete After Download","default":false}},"type":"object","required":["filename","content_type","content_length"],"title":"UploadCreate"},"UploadCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"purpose":{"$ref":"#/components/schemas/UploadPurpose"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"content_length":{"type":"integer","title":"Content Length"},"region":{"type":"string","title":"Region"},"status":{"$ref":"#/components/schemas/UploadStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"uploaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Uploaded At"},"delete_after_download":{"type":"boolean","title":"Delete After Download"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"upload_url":{"type":"string","title":"Upload Url"},"upload_method":{"type":"string","title":"Upload Method"},"upload_headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Upload Headers"},"upload_expires_at":{"type":"string","format":"date-time","title":"Upload Expires At"}},"type":"object","required":["id","org_id","job_id","purpose","filename","content_type","content_length","region","status","expires_at","delete_after_download","created_at","updated_at","upload_url","upload_method","upload_headers","upload_expires_at"],"title":"UploadCreated"},"UploadDownload":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"download_url":{"type":"string","title":"Download Url"},"download_method":{"type":"string","title":"Download Method"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"}},"type":"object","required":["id","download_url","download_method","expires_at"],"title":"UploadDownload"},"UploadPurpose":{"type":"string","enum":["input","output"],"title":"UploadPurpose"},"UploadRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"job_id":{"type":"string","format":"uuid","title":"Job Id"},"purpose":{"$ref":"#/components/schemas/UploadPurpose"},"filename":{"type":"string","title":"Filename"},"content_type":{"type":"string","title":"Content Type"},"content_length":{"type":"integer","title":"Content Length"},"region":{"type":"string","title":"Region"},"status":{"$ref":"#/components/schemas/UploadStatus"},"expires_at":{"type":"string","format":"date-time","title":"Expires At"},"uploaded_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Uploaded At"},"delete_after_download":{"type":"boolean","title":"Delete After Download"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","job_id","purpose","filename","content_type","content_length","region","status","expires_at","delete_after_download","created_at","updated_at"],"title":"UploadRead"},"UploadStatus":{"type":"string","enum":["pending_upload","uploaded","processing","completed","expired","purged","quarantined","rejected"],"title":"UploadStatus"},"UsageBreakdownItem":{"properties":{"operation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Operation"},"api_key_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Api Key Id"},"api_key_prefix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Api Key Prefix"},"units":{"type":"integer","title":"Units"},"jobs":{"type":"integer","title":"Jobs"}},"type":"object","required":["units","jobs"],"title":"UsageBreakdownItem"},"UsageDailyPoint":{"properties":{"date":{"type":"string","title":"Date"},"units":{"type":"integer","title":"Units"}},"type":"object","required":["date","units"],"title":"UsageDailyPoint"},"UsageRollupResponse":{"properties":{"source":{"type":"string","title":"Source","default":"usage_events"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"total_units":{"type":"integer","title":"Total Units"},"by_operation":{"items":{"$ref":"#/components/schemas/UsageBreakdownItem"},"type":"array","title":"By Operation"},"by_api_key":{"items":{"$ref":"#/components/schemas/UsageBreakdownItem"},"type":"array","title":"By Api Key"},"daily":{"items":{"$ref":"#/components/schemas/UsageDailyPoint"},"type":"array","title":"Daily"}},"type":"object","required":["period_start","period_end","total_units"],"title":"UsageRollupResponse"},"UserOrganizationRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"slug":{"type":"string","title":"Slug"},"plan_id":{"type":"string","format":"uuid","title":"Plan Id"},"data_region":{"type":"string","title":"Data Region"},"retention_hours":{"type":"integer","title":"Retention Hours"},"role":{"$ref":"#/components/schemas/MembershipRole"}},"type":"object","required":["id","name","slug","plan_id","data_region","retention_hours","role"],"title":"UserOrganizationRead"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WebhookDeliveryRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"endpoint_id":{"type":"string","format":"uuid","title":"Endpoint Id"},"outbox_event_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Outbox Event Id"},"source_delivery_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Source Delivery Id"},"event_type":{"type":"string","title":"Event Type"},"payload":{"$ref":"#/components/schemas/WebhookEventEnvelope"},"attempt":{"type":"integer","title":"Attempt"},"response_status":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Response Status"},"response_metadata":{"additionalProperties":true,"type":"object","title":"Response Metadata"},"attempt_log":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Attempt Log"},"status":{"$ref":"#/components/schemas/WebhookDeliveryStatus"},"next_retry_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Next Retry At"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","org_id","endpoint_id","event_type","payload","attempt","response_metadata","attempt_log","status","created_at"],"title":"WebhookDeliveryRead"},"WebhookDeliveryStatus":{"type":"string","enum":["pending","succeeded","failed","retrying"],"title":"WebhookDeliveryStatus"},"WebhookEndpointCreate":{"properties":{"url":{"type":"string","title":"Url"},"subscribed_events":{"items":{"type":"string"},"type":"array","title":"Subscribed Events"}},"type":"object","required":["url"],"title":"WebhookEndpointCreate"},"WebhookEndpointCreated":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"url":{"type":"string","title":"Url"},"signing_secret_prefix":{"type":"string","title":"Signing Secret Prefix"},"subscribed_events":{"items":{"type":"string"},"type":"array","title":"Subscribed Events"},"status":{"$ref":"#/components/schemas/WebhookEndpointStatus"},"failure_count":{"type":"integer","title":"Failure Count"},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disabled At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["id","org_id","url","signing_secret_prefix","subscribed_events","status","failure_count","created_at","updated_at","secret"],"title":"WebhookEndpointCreated"},"WebhookEndpointRead":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"org_id":{"type":"string","format":"uuid","title":"Org Id"},"url":{"type":"string","title":"Url"},"signing_secret_prefix":{"type":"string","title":"Signing Secret Prefix"},"subscribed_events":{"items":{"type":"string"},"type":"array","title":"Subscribed Events"},"status":{"$ref":"#/components/schemas/WebhookEndpointStatus"},"failure_count":{"type":"integer","title":"Failure Count"},"disabled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Disabled At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","org_id","url","signing_secret_prefix","subscribed_events","status","failure_count","created_at","updated_at"],"title":"WebhookEndpointRead"},"WebhookEndpointStatus":{"type":"string","enum":["active","disabled"],"title":"WebhookEndpointStatus"},"WebhookEndpointUpdate":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url"},"subscribed_events":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Subscribed Events"},"status":{"anyOf":[{"$ref":"#/components/schemas/WebhookEndpointStatus"},{"type":"null"}]}},"type":"object","title":"WebhookEndpointUpdate"},"WebhookEventEnvelope":{"properties":{"id":{"type":"string","title":"Id"},"type":{"type":"string","title":"Type"},"version":{"type":"integer","title":"Version","default":1},"created_at":{"type":"string","title":"Created At"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"type":"object","required":["id","type","created_at","data"],"title":"WebhookEventEnvelope"},"WebhookSecretRotated":{"properties":{"endpoint":{"$ref":"#/components/schemas/WebhookEndpointRead"},"secret":{"type":"string","title":"Secret"}},"type":"object","required":["endpoint","secret"],"title":"WebhookSecretRotated"},"ErrorEnvelope":{"properties":{"error":{"properties":{"code":{"description":"Stable machine-readable error code.","examples":["validation_error"],"type":"string"},"message":{"description":"Safe human-readable error summary.","examples":["Request validation failed."],"type":"string"},"details":{"additionalProperties":true,"description":"Optional structured details. Never contains secrets or document text.","type":"object"},"request_id":{"description":"Correlation ID echoed in the X-Request-Id response header.","examples":["req_0123456789abcdef0123456789abcdef"],"type":"string"}},"required":["code","message","details","request_id"],"type":"object"}},"required":["error"],"title":"ErrorEnvelope","type":"object"}},"securitySchemes":{"BearerAuth":{"bearerFormat":"API key or JWT","description":"Use a sandbox or live API key in the Authorization bearer token.","scheme":"bearer","type":"http"}}},"servers":[{"url":"http://127.0.0.1:8000","description":"Local development sandbox"},{"url":"https://sandbox.api.apilyn.test","description":"Hosted sandbox"},{"url":"https://api.apilyn.test","description":"Production"}],"externalDocs":{"description":"Sandbox quickstart","url":"https://docs.apilyn.test/api/quickstart"}}