{"openapi":"3.1.0","info":{"title":"nodenly. One API","version":"1.0.0","description":"Send the contacts of any website to a company's nodenly. One panel, and take bookings on any website (Pro and up). Guides: https://www.nodenly.com/en/docs. Changes within v1 are backwards compatible; breaking changes go to /api/v2."},"servers":[{"url":"https://www.nodenly.com/api/v1"}],"security":[{"bearer":[]},{"apiKeyHeader":[]}],"paths":{"/leads":{"post":{"operationId":"createLead","summary":"Send a contact (lead)","description":"Creates a lead in the company that owns the key. The same email reuses the existing client. Public keys (pk_live_) only from the company's authorized domains (Origin); secret keys (sk_live_) only without an Origin. Limits: 60 requests/minute per key, 10/minute per visitor IP with public keys. Up to 32 KB.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":100},"description":"Same value within 24 hours → the first answer, nothing new stored."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lead"}},"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/LeadForm"}},"multipart/form-data":{"schema":{"$ref":"#/components/schemas/LeadForm"}}}},"responses":{"200":{"description":"Repeated Idempotency-Key: the first answer (header Idempotent-Replayed: true)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Created"}}}},"201":{"description":"Stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Created"}}}},"202":{"description":"Spam trap (_gotcha) filled: nothing stored"},"303":{"description":"Form with _redirect: go to that page"},"400":{"description":"invalid_body","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"missing_key, invalid_key, revoked_key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"secret_key_in_browser, origin_required, origin_not_allowed, org_inactive","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"payload_too_large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid_field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}},"500":{"description":"internal_error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/booking/services":{"get":{"operationId":"listBookingServices","summary":"What can be booked","description":"Services (name, duration, price when the company shows prices, intake questions), professionals and tables, and the booking rules. Limits: 300/minute per key, 120/minute per visitor IP.","parameters":[{"name":"locale","in":"query","required":false,"schema":{"type":"string","enum":["en","pt"]}}],"responses":{"200":{"description":"Services, staff and rules"},"401":{"description":"missing_key, invalid_key, revoked_key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"feature_not_in_plan, origin_not_allowed, …","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"bookings_off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/booking/days":{"get":{"operationId":"listBookingDays","summary":"Days ahead and whether the company is open","responses":{"200":{"description":"{ time_zone, days: [{ date, open }] }"},"409":{"description":"bookings_off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/booking/slots":{"get":{"operationId":"listBookingSlots","summary":"Free start times of a day","description":"The same rules as the company's booking page: opening hours, notice, holidays and leave, times held for the waiting list.","parameters":[{"name":"service","in":"query","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"date","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"staff","in":"query","required":false,"schema":{"type":"string"},"description":"A professional or table id, or any (default)."},{"name":"party_size","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100},"description":"For services booked with tables."}],"responses":{"200":{"description":"{ date, time_zone, slots: [{ start, end }] }"},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid_field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bookings":{"post":{"operationId":"createBooking","summary":"Book a service","description":"Books a free time with the company's rules: contact asked, intake form, overdue dues, session packs; the client gets the usual emails and the day-before reminder. Limits: 60/minute per key, 10/minute per visitor IP. Webhook: booking.created.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":100}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Booking"}}}},"responses":{"200":{"description":"Repeated Idempotency-Key: the first booking's id"},"201":{"description":"{ id, status (confirmed | pending), manage_url, calendar, payment_overdue }"},"202":{"description":"Spam trap (website) filled: nothing stored"},"403":{"description":"dues_overdue, feature_not_in_plan, origin_not_allowed, …","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"not_found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"slot_taken, bookings_off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid_field (name, contact, start, intake)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/newsletter":{"post":{"operationId":"subscribeNewsletter","summary":"Subscribe to the company's newsletter","description":"The person gets an email to confirm (double opt-in); only confirmed emails join the list. The answer is the same whether the email is new, waiting or already subscribed. Public keys from the authorized domains (or the key in the body as \"key\"), secret keys from a server. Limits: 120/minute per key, 10/minute per visitor IP with public keys.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsletterSubscription"}}}},"responses":{"202":{"description":"Confirmation email sent (or nothing to do)"},"401":{"description":"missing_key, invalid_key, revoked_key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"secret_key_in_browser, origin_required, origin_not_allowed, org_inactive, feature_not_in_plan","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid_field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"rate_limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"headers":{"Retry-After":{"schema":{"type":"integer"}}}}}}},"/booking/waitlist":{"post":{"operationId":"joinWaitlist","summary":"Join the waiting list of a full day","description":"When a time frees up, one person at a time (order of sign-up) is told by email and has 1 hour to take it.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WaitlistEntry"}}}},"responses":{"201":{"description":"On the list"},"409":{"description":"already_waiting, bookings_off","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"invalid_field","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"Authorization: Bearer pk_live_… or sk_live_…"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"X-Api-Key"}},"schemas":{"NewsletterSubscription":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","maxLength":200},"name":{"type":"string","maxLength":120},"locale":{"type":"string","enum":["pt","en"],"description":"Language of the confirmation email and page."},"source":{"type":"string","pattern":"^[\\w-]{1,40}$","description":"Where it came from, e.g. footer or checkout (default website)."},"page_url":{"type":"string","maxLength":500}}},"Lead":{"type":"object","required":["name"],"description":"email or phone is required. Any other text field is added to fields.","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":40},"company":{"type":"string","maxLength":120},"message":{"type":"string","maxLength":5000},"locale":{"type":"string","enum":["en","pt"],"description":"Language of what the client will receive. Default: Accept-Language."},"page_url":{"type":"string","format":"uri","maxLength":2000,"description":"Default: the Referer header."},"utm_source":{"type":"string","maxLength":200},"utm_medium":{"type":"string","maxLength":200},"utm_campaign":{"type":"string","maxLength":200},"utm_term":{"type":"string","maxLength":200},"utm_content":{"type":"string","maxLength":200},"fields":{"type":"object","maxProperties":30,"additionalProperties":{"type":"string","maxLength":2000}},"_gotcha":{"type":"string","description":"Spam trap: leave empty."}},"additionalProperties":{"type":"string"}},"LeadForm":{"allOf":[{"$ref":"#/components/schemas/Lead"}],"properties":{"api_key":{"type":"string","description":"The key, for plain HTML forms."},"_redirect":{"type":"string","format":"uri","description":"Thank-you page on the same website (answer 303)."}}},"Booking":{"type":"object","required":["service_id","start","name"],"properties":{"service_id":{"type":"string","format":"uuid"},"start":{"type":"string","format":"date-time","description":"A start from /booking/slots."},"staff_id":{"type":"string","description":"A professional or table id, or any (default)."},"party_size":{"type":"integer","minimum":1,"maximum":100},"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email"},"phone":{"type":"string","maxLength":40},"note":{"type":"string","maxLength":1000},"intake":{"type":"object","additionalProperties":{"type":"string"},"description":"Answers by question id (see /booking/services)."},"locale":{"type":"string","enum":["en","pt"]},"website":{"type":"string","description":"Spam trap: leave empty."}}},"WaitlistEntry":{"type":"object","required":["service_id","date","name","email"],"properties":{"service_id":{"type":"string","format":"uuid"},"date":{"type":"string","format":"date"},"staff_id":{"type":"string"},"party_size":{"type":"integer","minimum":1,"maximum":100},"name":{"type":"string","minLength":1,"maxLength":120},"email":{"type":"string","format":"email"},"locale":{"type":"string","enum":["en","pt"]}}},"Created":{"type":"object","required":["ok"],"properties":{"ok":{"type":"boolean"},"id":{"type":"string","format":"uuid"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["missing_key","invalid_key","revoked_key","secret_key_in_browser","origin_required","origin_not_allowed","org_inactive","feature_not_in_plan","rate_limited","payload_too_large","invalid_body","invalid_field","bookings_off","shop_off","out_of_stock","payment_unavailable","not_found","slot_taken","dues_overdue","already_waiting","internal_error"]},"message":{"type":"string"},"field":{"type":"string","description":"The invalid field (invalid_field only)."}}}}}}}}