{"openapi":"3.1.0","info":{"title":"anewera Agent Action API","version":"0.1.0","description":"Read company profiles and prepare confirmed contact requests through anewera.ch."},"servers":[{"url":"https://anewera.ch"}],"paths":{"/api/agent/companies/{slug}":{"get":{"operationId":"readCompanyAgentProfile","summary":"Read a structured company profile","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Company agent profile"},"404":{"description":"Not found"}}}},"/api/agent/companies/{slug}/contact-request":{"post":{"operationId":"prepareCompanyContactRequest","summary":"Prepare a contact request that requires human confirmation","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["intent","message","sender_name","sender_email","consent"],"properties":{"intent":{"type":"string","minLength":3,"maxLength":120},"message":{"type":"string","minLength":10,"maxLength":4000},"sender_name":{"type":"string","minLength":2,"maxLength":120},"sender_email":{"type":"string","format":"email"},"sender_company":{"type":"string"},"sender_phone":{"type":"string"},"service_area":{"type":"string"},"urgency":{"type":"string"},"budget":{"type":"string"},"consent":{"type":"boolean","const":true}}}}}},"responses":{"200":{"description":"Contact request draft created. Human confirmation required."},"400":{"description":"Invalid request or missing consent"},"404":{"description":"Company not found"}}}},"/api/agent/companies/{slug}/calendar-slots":{"get":{"operationId":"listCompanyCalendarSlots","summary":"List available calendar slots for a company","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Calendar slots or not-configured status"},"404":{"description":"Company not found"}}}},"/api/agent/companies/{slug}/calendar-booking":{"post":{"operationId":"prepareCompanyCalendarBooking","summary":"Prepare a calendar booking that requires confirmation","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["start","attendee_name","attendee_email","consent"],"properties":{"start":{"type":"string","format":"date-time"},"attendee_name":{"type":"string"},"attendee_email":{"type":"string","format":"email"},"attendee_timezone":{"type":"string","default":"Europe/Zurich"},"company_name":{"type":"string"},"company_website":{"type":"string","format":"uri"},"notes":{"type":"string"},"consent":{"type":"boolean","const":true}}}}}},"responses":{"200":{"description":"Booking draft prepared. Response includes confirmationUrl. Cal.com is called only after human confirmation."},"400":{"description":"Invalid request or missing consent"},"404":{"description":"Company not found"}}}},"/api/profile-claims":{"post":{"operationId":"claimCompanyProfile","summary":"Submit a profile claim for manual review","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_name","requester_name","requester_email"],"properties":{"company_slug":{"type":"string"},"company_name":{"type":"string"},"company_website":{"type":"string"},"requester_name":{"type":"string"},"requester_email":{"type":"string","format":"email"},"requester_role":{"type":"string"},"requester_phone":{"type":"string"},"message":{"type":"string"},"profile_check_id":{"type":"string","format":"uuid"},"source":{"type":"string"}}}}}},"responses":{"200":{"description":"Profile claim received. Manual review required."},"400":{"description":"Invalid claim request"}}}}}}