{"openapi":"3.1.0","info":{"title":"Aeglo Agent API","version":"1.2.0","description":"Create a private, editable booking-page preview for an independent professional. Creating a preview never publishes a page or creates a customer booking."},"servers":[{"url":"https://aeglo.me"}],"paths":{"/api/v1/booking-page-requirements":{"get":{"operationId":"get_booking_page_requirements","summary":"Read product capabilities, separate preview-input limits and creation guidance","responses":{"200":{"description":"Product features with availability and conditions, plus separately scoped preview API input limits"}}}},"/api/v1/booking-page-previews":{"post":{"operationId":"create_booking_page_preview","summary":"Create or idempotently return a private booking-page preview","security":[{},{"BearerAuth":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","minLength":12,"maxLength":200},"description":"Reuse only for an identical logical request."},{"name":"X-Correlation-Id","in":"header","required":false,"schema":{"type":"string","minLength":8,"maxLength":120}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePreviewRequest"}}}},"responses":{"201":{"description":"Preview ready. A retry returns the identical response.","headers":{"X-Correlation-Id":{"schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["id","status","previewUrl","claimUrl","claimToken","expiresAt","providerName","sourceUrl","services","warnings","extractionConfidence","correlationId"],"properties":{"id":{"type":"string","description":"Opaque private-preview identifier."},"status":{"type":"string","enum":["READY"]},"previewUrl":{"type":"string","format":"uri"},"claimUrl":{"type":"string","format":"uri","description":"Secret one-use claim URL. Do not log, index, or forward it to anyone except the intended provider."},"claimToken":{"type":"string","description":"Secret authority for authenticated status reads and one-use claim. Treat like a password."},"expiresAt":{"type":"string","format":"date-time"},"providerName":{"type":"string"},"sourceUrl":{"type":["string","null"],"format":"uri"},"services":{"type":"array","minItems":1,"items":{"type":"object","required":["name","durationMinutes","priceCents","currency","needsPriceReview","needsDurationReview","variants"],"properties":{"name":{"type":"string"},"durationMinutes":{"type":["integer","null"]},"priceCents":{"type":["integer","null"]},"currency":{"type":"string","enum":["eur"]},"needsPriceReview":{"type":"boolean"},"needsDurationReview":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object"}}}}},"warnings":{"type":"array","items":{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["SERVICE_EXTRACTION_UNCERTAIN","PRICE_REVIEW_REQUIRED","DURATION_REVIEW_REQUIRED"]},"service":{"type":"string"}}}},"extractionConfidence":{"type":"string","enum":["high","review_required"]},"correlationId":{"type":"string"}}}}}}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"}}}},"/api/v1/booking-page-previews/{id}":{"get":{"operationId":"get_booking_page_preview","summary":"Read preview status","description":"Use the same partner API key or OAuth grant that created the preview, or pass the one-time claim token in X-Aeglo-Claim-Token.","security":[{"BearerAuth":[]},{"PreviewClaim":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Current preview status.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","required":["id","status","previewUrl","claimUrl","claimToken","expiresAt","providerName","sourceUrl","services","warnings","extractionConfidence","correlationId"],"properties":{"id":{"type":"string","description":"Opaque private-preview identifier."},"status":{"type":"string","enum":["READY"]},"previewUrl":{"type":"string","format":"uri"},"claimUrl":{"type":"string","format":"uri","description":"Secret one-use claim URL. Do not log, index, or forward it to anyone except the intended provider."},"claimToken":{"type":"string","description":"Secret authority for authenticated status reads and one-use claim. Treat like a password."},"expiresAt":{"type":"string","format":"date-time"},"providerName":{"type":"string"},"sourceUrl":{"type":["string","null"],"format":"uri"},"services":{"type":"array","minItems":1,"items":{"type":"object","required":["name","durationMinutes","priceCents","currency","needsPriceReview","needsDurationReview","variants"],"properties":{"name":{"type":"string"},"durationMinutes":{"type":["integer","null"]},"priceCents":{"type":["integer","null"]},"currency":{"type":"string","enum":["eur"]},"needsPriceReview":{"type":"boolean"},"needsDurationReview":{"type":"boolean"},"variants":{"type":"array","items":{"type":"object"}}}}},"warnings":{"type":"array","items":{"type":"object","required":["code"],"properties":{"code":{"type":"string","enum":["SERVICE_EXTRACTION_UNCERTAIN","PRICE_REVIEW_REQUIRED","DURATION_REVIEW_REQUIRED"]},"service":{"type":"string"}}}},"extractionConfidence":{"type":"string","enum":["high","review_required"]},"correlationId":{"type":"string"}}}}}}}},"401":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"429":{"$ref":"#/components/responses/Error"}}}}},"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Aeglo partner API key or scoped OAuth access token","description":"OAuth tokens target /api/mcp/account and may also call these preview endpoints with previews:create or previews:read. Anonymous creation needs no authentication."},"PreviewClaim":{"type":"apiKey","in":"header","name":"X-Aeglo-Claim-Token"}},"schemas":{"ServiceInput":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":100},"description":{"type":"string","maxLength":2000},"durationMinutes":{"type":"integer","minimum":10,"maximum":480},"priceCents":{"type":"integer","minimum":0,"maximum":1000000},"currency":{"default":"eur","type":"string","const":"eur"},"meetingType":{"type":"string","enum":["GOOGLE_MEET","ZOOM","PHONE","IN_PERSON","CUSTOM"]}},"required":["name"],"additionalProperties":false},"CreatePreviewRequest":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prompt":{"type":"string","minLength":12,"maxLength":3000},"websiteUrl":{"type":"string","maxLength":2048,"format":"uri"},"services":{"description":"1–5 structured services per preview request, not an account-wide service limit. Add further services in Aeglo under Services after claim.","minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":3,"maxLength":100},"description":{"type":"string","maxLength":2000},"durationMinutes":{"type":"integer","minimum":10,"maximum":480},"priceCents":{"type":"integer","minimum":0,"maximum":1000000},"currency":{"default":"eur","type":"string","const":"eur"},"meetingType":{"type":"string","enum":["GOOGLE_MEET","ZOOM","PHONE","IN_PERSON","CUSTOM"]}},"required":["name"],"additionalProperties":false}},"providerName":{"type":"string","minLength":2,"maxLength":100},"intendedEmail":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"locale":{"default":"en","type":"string","enum":["et","en","sv","es","ru"]},"timeZone":{"default":"Europe/Tallinn","type":"string","minLength":1,"maxLength":100},"pageMode":{"default":"profile_page","type":"string","enum":["booking_only","profile_page"]},"backgroundSector":{"description":"Supply only a confirmed provider sector. Omit when uncertain; the preview will assess it from source facts.","type":"string","enum":["consulting","training","teaching","wellbeing","health","personal","pets"]},"designBrief":{"type":"string","maxLength":600},"workingHours":{"description":"Preview input accepts one interval per day. Aeglo Working hours supports multiple intervals per day and date exceptions after claim. Do not merge split shifts across a break; review the detailed schedule in Aeglo before publishing.","minItems":1,"maxItems":7,"type":"array","items":{"type":"object","properties":{"dayOfWeek":{"type":"integer","minimum":0,"maximum":6},"start":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d$"}},"required":["dayOfWeek","start","end"],"additionalProperties":false}},"campaignId":{"type":"string","minLength":1,"maxLength":120}},"additionalProperties":false,"description":"Provide prompt, websiteUrl or services. websiteUrl and services are mutually exclusive. Working days must be unique; end must follow start. timeZone must be valid IANA."},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"fieldErrors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"responses":{"Error":{"description":"Stable machine-readable error.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}