{"openapi":"3.0.3","info":{"title":"Forms Live API","description":"REST API for Forms Live — the digital forms platform for Australian real estate. Enables creation, management, and electronic signing of real estate forms across all Australian states and territories. Full documentation: https://developer.formslive.com.au","version":"1.0.0","contact":{"name":"Forms Live Developer Support","url":"https://developer.formslive.com.au"}},"servers":[{"url":"https://{state}.api.formslive.com.au","description":"Production","variables":{"state":{"enum":["nsw","vic","qld","sa","wa","tas","nt","act"],"default":"nsw","description":"Australian state or territory abbreviation"}}},{"url":"https://{state}-api.formslive-staging.com.au","description":"Staging","variables":{"state":{"enum":["nsw","vic","qld","sa","wa","tas","nt","act"],"default":"nsw","description":"Australian state or territory abbreviation"}}}],"security":[{"BasicAuth":[]}],"tags":[{"name":"Session","description":"Deep-link token creation and session info"},{"name":"News","description":"Platform news and announcements"},{"name":"Agency","description":"Agency account information"},{"name":"Templates","description":"Form templates available to the agency"},{"name":"Forms","description":"Create, manage, and download forms"},{"name":"Form Fields","description":"Update form field values"},{"name":"Form Files","description":"Manage file attachments on forms"},{"name":"User Templates","description":"Pre-configured reusable form templates"},{"name":"Electronic Signing","description":"Remote electronic signing workflow"},{"name":"Executed Forms","description":"Store externally-executed form versions"},{"name":"Webhooks","description":"Event-driven webhook subscriptions"}],"components":{"securitySchemes":{"BasicAuth":{"type":"http","scheme":"basic","description":"Construct the Authorization header by combining your API key and user access token with a colon (`{api_key}:{access_token}`), base64-encoding the result, and prefixing with \"Basic \". Example: `Authorization: Basic base64({api_key}:{access_token})`"}},"schemas":{"Form":{"type":"object","properties":{"id":{"type":"integer","description":"Unique identifier for the form"},"template_version_id":{"type":"integer","description":"Template version used"},"agency_id":{"type":"integer","description":"Agency the form belongs to"},"user_id":{"type":"integer","description":"User who created the form"},"name":{"type":"string","description":"Form name"},"template":{"type":"boolean","description":"Whether the form is a template"},"finalised":{"type":"boolean","description":"Whether the form is finalised (locked)"},"private":{"type":"boolean","description":"Whether the form is private"},"deleted":{"type":"boolean","description":"Whether the form is deleted"},"created":{"type":"integer","description":"Unix timestamp of creation"},"updated":{"type":"integer","description":"Unix timestamp of last update"},"given_name":{"type":"string","description":"Form owner's first name"},"surname":{"type":"string","description":"Form owner's last name"},"template_cost":{"type":"integer","description":"Template cost in cents"},"template_id":{"type":"integer","description":"Template identifier"},"template_name":{"type":"string","description":"Template name"},"template_code":{"type":"string","description":"Template code identifier"},"template_instruction_pages":{"type":"integer","description":"Number of instruction pages"}}},"SessionToken":{"type":"object","properties":{"token":{"type":"string","format":"uuid","description":"Deep-link token for Forms Live UI embedding. Append as `?x-token={token}` to the UI base URL."}}},"Session":{"type":"object","properties":{"user":{"$ref":"#/components/schemas/User"},"agency":{"$ref":"#/components/schemas/Agency"},"token":{"type":"string","format":"uuid","description":"Session token"},"impersonating":{"type":"boolean","description":"Whether session is impersonating another user"}}},"User":{"type":"object","properties":{"id":{"type":"integer"},"agency_id":{"type":"integer"},"member_number":{"type":"string","nullable":true},"realtor_number":{"type":"string","nullable":true},"given_name":{"type":"string"},"surname":{"type":"string"},"email":{"type":"string","format":"email"},"mobile":{"type":"string"},"principal":{"type":"boolean","description":"Whether user is a principal of the agency"},"default_private":{"type":"boolean"},"active":{"type":"boolean"},"deleted":{"type":"boolean"},"created":{"type":"integer","description":"Unix timestamp"},"updated":{"type":"integer","description":"Unix timestamp"}}},"Agency":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"address":{"type":"string"},"address2":{"type":"string"},"suburb":{"type":"string"},"state":{"type":"string","description":"State abbreviation (e.g. NSW, VIC)"},"postcode":{"type":"string"},"phone":{"type":"string"},"fax":{"type":"string"},"email":{"type":"string","format":"email"},"credits":{"type":"integer","description":"Available form credits"},"active":{"type":"boolean"},"approved":{"type":"boolean"},"member_number":{"type":"string"},"licencee_name":{"type":"string"},"licencee_number":{"type":"string"},"gst":{"type":"boolean"},"abn":{"type":"string","description":"Australian Business Number"},"logo":{"type":"string","nullable":true,"description":"URL to agency logo"},"created":{"type":"integer","description":"Unix timestamp"},"updated":{"type":"integer","description":"Unix timestamp"},"active_subscription":{"type":"boolean"},"subscription_expiry":{"type":"integer","nullable":true,"description":"Unix timestamp"},"subscription_type":{"type":"string","enum":["ALL","FM","SA"],"description":"ALL = all form types, FM = Forms Manager, SA = standalone access"},"admin":{"type":"boolean"},"forms_created":{"type":"integer"}}},"NewsItem":{"type":"object","properties":{"id":{"type":"integer"},"title":{"type":"string"},"content":{"type":"string"},"created":{"type":"integer","description":"Unix timestamp"},"updated":{"type":"integer","description":"Unix timestamp"}}},"Template":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"code":{"type":"string","description":"Template code identifier"},"cost":{"type":"integer","description":"Template cost in cents"},"instruction_pages":{"type":"integer"},"template_group":{"type":"string","description":"Category group (e.g. Sales, Property Management)"},"fields":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Field name used in the save endpoint"},"display_name":{"type":"string","description":"Human-readable field label"}}}}}},"DownloadToken":{"type":"object","properties":{"id":{"type":"integer"},"agency_id":{"type":"integer"},"ip":{"type":"string"},"token":{"type":"string","format":"uuid","description":"Single-use download token"}}},"FormFile":{"type":"object","properties":{"id":{"type":"integer"},"form_id":{"type":"integer"},"name":{"type":"string","description":"File name"},"content_type":{"type":"string","description":"MIME type of the file"},"size":{"type":"integer","description":"File size in bytes"},"attachment":{"type":"boolean","description":"Whether to include as print attachment"},"created":{"type":"integer","description":"Unix timestamp"},"updated":{"type":"integer","description":"Unix timestamp"}}},"UserTemplate":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"template_id":{"type":"integer"},"template_name":{"type":"string"},"template_code":{"type":"string"},"created":{"type":"integer","description":"Unix timestamp"},"updated":{"type":"integer","description":"Unix timestamp"}}},"Signer":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string","format":"email"},"role":{"type":"string","description":"Signer role on the form"}}},"RemoteSignStatus":{"type":"object","properties":{"id":{"type":"integer"},"form_id":{"type":"integer"},"status":{"type":"string","enum":["sent","delivered","completed"],"description":"Current signing status"},"signers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"},"status":{"type":"string","enum":["pending","signed"]},"signed_at":{"type":"integer","nullable":true,"description":"Unix timestamp"}}}},"created":{"type":"integer","description":"Unix timestamp"}}},"Webhook":{"type":"object","properties":{"id":{"type":"integer"},"active":{"type":"boolean"},"events":{"type":"array","items":{"type":"string","enum":["form.create","form.finalise","form.sign","form.remotesign","form.update","form.delete","user_template.create","user_template.update","user_template.delete"]}},"uri":{"type":"string","format":"uri","description":"Your endpoint URL to receive POST payloads"},"form_id":{"type":"integer","nullable":true,"description":"Scope webhook to a specific form (null = all forms)"},"user_template_id":{"type":"integer","nullable":true,"description":"Scope webhook to a specific user template"}}},"WebhookPayload":{"type":"object","description":"Payload POSTed to your webhook URI when an event fires","properties":{"id":{"type":"string","description":"Unique delivery ID"},"type":{"type":"string","enum":["form.create","form.finalise","form.sign","form.remotesign","form.update","form.delete","user_template.create","user_template.update","user_template.delete"]},"payload":{"$ref":"#/components/schemas/Form"}}},"Error":{"type":"object","properties":{"type":{"type":"string","enum":["api_error","invalid_request"],"description":"api_error = server-side fault; invalid_request = client-side fault"},"message":{"type":"string","description":"Human-readable error description"},"documentation_url":{"type":"string","description":"Link to relevant documentation"}}},"SuccessMessage":{"type":"object","properties":{"message":{"type":"string"}}}}},"paths":{"/user/session":{"post":{"tags":["Session"],"summary":"Create deep-link token","description":"Creates a session token for deep-linking the end-user into Forms Live. Append the token to the state UI base URL as `?x-token={token}` to authenticate the user without requiring a separate login. Only applicable for third-party (Basic auth) authentication.","operationId":"createUserSession","responses":{"200":{"description":"Deep-link token created successfully","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionToken"},"example":{"token":"00000000-0000-0000-0000-000000000000"}}}},"401":{"description":"Unauthorized — invalid credentials"}}}},"/session/":{"get":{"tags":["Session"],"summary":"Get current session","description":"Returns the authenticated user, their agency, and the current session token. Useful for verifying authentication and retrieving agency credit balance and subscription status.","operationId":"getSession","responses":{"200":{"description":"Session information","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Session"}}}},"401":{"description":"Unauthorized"}}}},"/news/":{"get":{"tags":["News"],"summary":"List all news items","description":"Returns all platform news and announcement items.","operationId":"listNews","responses":{"200":{"description":"List of news items","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NewsItem"}}}}}}}},"/news/{id}":{"get":{"tags":["News"],"summary":"Get a news item","operationId":"getNewsItem","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"News item","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsItem"}}}},"404":{"description":"Not found"}}}},"/agency/":{"get":{"tags":["Agency"],"summary":"Get agency information","description":"Returns full agency details including name, address, ABN, credit balance, subscription status, and licencee information.","operationId":"getAgency","responses":{"200":{"description":"Agency details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agency"}}}}}}},"/templates/":{"get":{"tags":["Templates"],"summary":"List all templates","description":"Returns all form templates available to the authenticated agency, grouped by template group (e.g. Sales, Property Management).","operationId":"listTemplates","responses":{"200":{"description":"List of templates grouped by category","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Template"}}}}}}}},"/templates/{id}":{"get":{"tags":["Templates"],"summary":"Get a template","description":"Returns a single template with its version info, cost, and the list of field names. Use the field names when calling PUT /forms/{id}/save to populate form data.","operationId":"getTemplate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Template details with fields","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Template"}}}},"404":{"description":"Not found"}}}},"/forms/":{"get":{"tags":["Forms"],"summary":"List all forms","description":"Returns a paginated list of forms. Supports filtering by name.","operationId":"listForms","parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1},"description":"Page number for pagination"},{"name":"query","in":"query","schema":{"type":"string"},"description":"Filter forms by name"}],"responses":{"200":{"description":"List of forms","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Form"}}}}}}},"post":{"tags":["Forms"],"summary":"Create a form","description":"Creates a new form from a template. Use GET /templates/ to discover available template IDs.","operationId":"createForm","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["template_id","name"],"properties":{"template_id":{"type":"integer","description":"ID of the template to use"},"name":{"type":"string","description":"Name for the new form"}}},"example":{"template_id":144,"name":"New Property Lease"}}}},"responses":{"200":{"description":"Form created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}}}}},"/forms/{id}":{"get":{"tags":["Forms"],"summary":"Get a form","operationId":"getForm","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Form details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}},"404":{"description":"Not found"}}},"put":{"tags":["Forms"],"summary":"Update form name","operationId":"updateForm","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string"}}}}}},"responses":{"200":{"description":"Updated form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}}}},"delete":{"tags":["Forms"],"summary":"Delete a form","operationId":"deleteForm","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Form deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessage"}}}}}}},"/forms/{id}/download/":{"get":{"tags":["Forms"],"summary":"Get form download token","description":"Returns a single-use download token. Pass the token to GET /download/{token}/attach/ to retrieve the PDF.","operationId":"getFormDownloadToken","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Download token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DownloadToken"}}}}}}},"/download/{token}/attach/":{"get":{"tags":["Forms"],"summary":"Download form as PDF","description":"Downloads the form as a PDF using a token obtained from GET /forms/{id}/download/. No Authorization header required — the token itself authenticates the request.","operationId":"downloadForm","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","format":"uuid"},"description":"Download token from GET /forms/{id}/download/"}],"responses":{"200":{"description":"PDF file","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}}}}},"/forms/{id}/finalise":{"post":{"tags":["Forms"],"summary":"Finalise a form","description":"Locks the form — once finalised it can no longer be edited.","operationId":"finaliseForm","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Form finalised","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessage"}}}}}}},"/forms/{id}/duplicate":{"post":{"tags":["Forms"],"summary":"Duplicate a form","description":"Creates a copy of the form. The duplicated form will not be finalised.","operationId":"duplicateForm","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name"],"properties":{"name":{"type":"string","description":"Name for the duplicated form"},"private":{"type":"boolean","description":"Whether the copy is private. Defaults to the user's preference."}}}}}},"responses":{"200":{"description":"Duplicated form","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}}}}},"/forms/{id}/save":{"put":{"tags":["Form Fields"],"summary":"Update form field values","description":"Updates one or more field values within a form. The request body is a flat key/value object where keys are field names from the template. Use GET /templates/{id} or the state CSV field lists at /files/fields/{state}-fields.csv to discover valid field names.","operationId":"saveFormFields","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string"},"description":"Key/value pairs of field_name: field_value"},"example":{"property_address":"123 Main Street","sale_price":"750000","settlement_date":"2024-12-31"}}}},"responses":{"200":{"description":"Fields saved","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessage"}}}}}}},"/forms/{form_id}/files":{"get":{"tags":["Form Files"],"summary":"List form files","operationId":"listFormFiles","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"attachments","in":"query","schema":{"type":"boolean"},"description":"If true, return only files flagged as print attachments"}],"responses":{"200":{"description":"List of form files","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FormFile"}}}}}}},"post":{"tags":["Form Files"],"summary":"Upload a form file","description":"Uploads a file attachment to a form.","operationId":"createFormFile","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary"},"name":{"type":"string","description":"File name"},"attachment":{"type":"boolean","description":"Whether to include as a print attachment"}}}}}},"responses":{"200":{"description":"File uploaded","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormFile"}}}}}}},"/forms/{form_id}/files/{file_id}":{"get":{"tags":["Form Files"],"summary":"Download a form file","operationId":"getFormFile","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"File binary content","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}}}}}},"put":{"tags":["Form Files"],"summary":"Update a form file","description":"Updates metadata (name, attachment flag) of an existing form file.","operationId":"updateFormFile","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"attachment":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Updated file metadata","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FormFile"}}}}}},"delete":{"tags":["Form Files"],"summary":"Delete a form file","operationId":"deleteFormFile","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}},{"name":"file_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"File deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessage"}}}}}}},"/user-templates/":{"get":{"tags":["User Templates"],"summary":"List all user templates","description":"Returns all pre-configured user templates available to the authenticated user.","operationId":"listUserTemplates","responses":{"200":{"description":"List of user templates","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/UserTemplate"}}}}}}}},"/user-templates/{id}":{"get":{"tags":["User Templates"],"summary":"Get a user template","operationId":"getUserTemplate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"User template details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserTemplate"}}}}}},"delete":{"tags":["User Templates"],"summary":"Delete a user template","operationId":"deleteUserTemplate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessage"}}}}}}},"/user-templates/{id}/form":{"post":{"tags":["User Templates"],"summary":"Create a form from a user template","description":"Creates a new form using a user template, skipping the template selection step. The resulting form is pre-populated with the user template defaults.","operationId":"createFormFromUserTemplate","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Name for the new form"}}}}}},"responses":{"200":{"description":"Form created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Form"}}}}}}},"/forms/{form_id}/remote_sign/signers":{"get":{"tags":["Electronic Signing"],"summary":"Get available signers for a form","description":"Returns the list of parties (roles) available to sign the specified form.","operationId":"getFormSigners","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"List of signers","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Signer"}}}}}}}},"/forms/{form_id}/remote_sign":{"post":{"tags":["Electronic Signing"],"summary":"Create a remote signing request","description":"Dispatches signing invitation emails to the specified signers and initiates the remote signing workflow.","operationId":"createRemoteSign","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"signers":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Signer ID from GET /remote_sign/signers"},"email":{"type":"string","format":"email"},"name":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Signing request created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSignStatus"}}}}}},"get":{"tags":["Electronic Signing"],"summary":"Get remote signing status","description":"Returns the current status of the signing request (sent / delivered / completed).","operationId":"getRemoteSignStatus","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Signing status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RemoteSignStatus"}}}}}},"delete":{"tags":["Electronic Signing"],"summary":"Void a remote signing request","description":"Cancels an in-progress remote signing request.","operationId":"voidRemoteSign","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Signing request voided","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessage"}}}}}}},"/forms/{form_id}/remote_sign/pdf":{"get":{"tags":["Electronic Signing"],"summary":"Download signed PDF","description":"Downloads the completed signed PDF once all parties have signed.","operationId":"downloadSignedPdf","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Signed PDF file","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}}}}},"/forms/{form_id}/versions":{"post":{"tags":["Executed Forms"],"summary":"Store an executed form version","description":"Stores a PDF of a form that was signed or executed outside of the Forms Live platform, creating an audit record linking the external signing event to the original form.","operationId":"createExecutedFormVersion","parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"file":{"type":"string","format":"binary","description":"Executed PDF file"},"description":{"type":"string","description":"Description of the executed version"}},"additionalProperties":{"type":"string","description":"Optional key/value pairs captured during external execution"}}}}},"responses":{"200":{"description":"Executed form version stored","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessage"}}}}}}},"/webhooks/":{"get":{"tags":["Webhooks"],"summary":"List all webhooks","operationId":"listWebhooks","responses":{"200":{"description":"List of webhooks","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Webhook"}}}}}}},"post":{"tags":["Webhooks"],"summary":"Create a webhook","description":"Registers a webhook endpoint to receive event notifications. Your endpoint must respond with HTTP 200 within 5 seconds. Failed deliveries are retried up to 3 times.","operationId":"createWebhook","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["events","uri"],"properties":{"events":{"type":"array","items":{"type":"string","enum":["form.create","form.finalise","form.sign","form.remotesign","form.update","form.delete","user_template.create","user_template.update","user_template.delete"]}},"uri":{"type":"string","format":"uri"},"active":{"type":"boolean","default":true},"form_id":{"type":"integer","nullable":true,"description":"Scope to a specific form"},"user_template_id":{"type":"integer","nullable":true,"description":"Scope to a specific user template"}}}}}},"responses":{"200":{"description":"Webhook created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}}},"/webhooks/{id}":{"get":{"tags":["Webhooks"],"summary":"Get a webhook","operationId":"getWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Webhook details","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}},"put":{"tags":["Webhooks"],"summary":"Update a webhook","operationId":"updateWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"events":{"type":"array","items":{"type":"string"}},"uri":{"type":"string","format":"uri"},"active":{"type":"boolean"},"form_id":{"type":"integer","nullable":true},"user_template_id":{"type":"integer","nullable":true}}}}}},"responses":{"200":{"description":"Updated webhook","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Webhook"}}}}}},"delete":{"tags":["Webhooks"],"summary":"Delete a webhook","operationId":"deleteWebhook","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Webhook deleted","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuccessMessage"}}}}}}}}}