{"openapi":"3.1.0","info":{"title":"License Renew API","version":"1.0.0","description":"Read supported licensing requirements and calculate renewal plans and date-only deadline watches. Paid with x402 exact USDC on Base. No account is required.","contact":{"email":"support@brainiac.software"},"x-guidance":"BRAINIAC.software is a pay-per-call API for software agents. No account or API key is required.\nPayment uses the x402 protocol with exact USDC on Base (chain id 8453). Each POST operation has a fixed USD price.\nHow to call an operation:\n1. POST a JSON body matching the operation's requestBody schema to the operation path. Include an Idempotency-Key header (64 hex characters, 32 random bytes).\n2. If you have not paid, the server responds 402 with payment requirements in the body. Pay the exact amount to the payTo address on Base.\n3. Retry the identical request with the same Idempotency-Key and add a payment-signature header containing the x402 payment payload. On success (200) the operation result is returned.\n4. Reuse the same Idempotency-Key only for retries of the same operation and request body; it will not be charged twice.\nAll outputs are compliance prechecks, drafts, or data lookups for human review. They are not official determinations, legal advice, identity confirmation, or certified filings. Verify time-sensitive or official data with the cited source before acting."},"servers":[{"url":"https://www.brainiac.software"}],"paths":{"/api/v1/license/requirements":{"post":{"operationId":"read_verified_licence_renewal_requirements","summary":"Read verified licence renewal requirements","description":"Return source-linked rules only for supported Texas electrician and UK SIA licence types; unsupported jurisdictions remain explicitly unsupported.","tags":["license"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jurisdiction":{"type":"string","minLength":1,"maxLength":40},"licenseType":{"type":"string","minLength":1,"maxLength":120}},"required":["jurisdiction","licenseType"],"additionalProperties":false},"example":{"jurisdiction":"US-TX","licenseType":"Journeyman Electrician"}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"jurisdiction":{"type":"string"},"licenseType":{"type":"string"},"coverage":{"type":"string"},"supported":{"type":"boolean"},"renewalCycle":{"type":"string"},"ceHours":{"type":"number"},"renewalFee":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"additionalProperties":true},"renewalWindowMonths":{"type":"null"},"checklist":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"retrievedAt":{"type":"string"}},"additionalProperties":true}},"retrievedAt":{"type":"string"}},"additionalProperties":true},"example":{"jurisdiction":"US-TX","licenseType":"Journeyman Electrician","coverage":"verified","supported":true,"renewalCycle":"Annual","ceHours":4,"renewalFee":{"amount":30,"currency":"USD"},"renewalWindowMonths":null,"checklist":["Complete approved continuing education.","Submit the TDLR renewal application."],"sources":[{"url":"https://www.tdlr.texas.gov/electricians/renew/individuals/journeyman-electrician.htm","retrievedAt":"2026-10-28"}],"retrievedAt":"2026-10-28"}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}},"/api/v1/license/renewal-plan":{"post":{"operationId":"build_a_sourced_renewal_plan","summary":"Build a sourced renewal plan","description":"Calculate a renewal checklist and PDF from verified rules and caller-supplied expiry/CE data. Unsupported combinations remain unsupported.","tags":["license"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"jurisdiction":{"type":"string","minLength":1,"maxLength":40},"licenseType":{"type":"string","minLength":1,"maxLength":120},"expiresOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"completedCeHours":{"default":0,"type":"number","minimum":0}},"required":["jurisdiction","licenseType","completedCeHours"],"additionalProperties":false},"example":{"jurisdiction":"US-TX","licenseType":"Journeyman Electrician","expiresOn":"2027-01-31","completedCeHours":2}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"supported":{"type":"boolean"},"jurisdiction":{"type":"string"},"licenseType":{"type":"string"},"expiresOn":{"type":"string"},"daysUntilExpiry":{"type":"number"},"startBy":{"type":"null"},"ceHoursRequired":{"type":"number"},"ceHoursCompleted":{"type":"number"},"ceHoursRemaining":{"type":"number"},"renewalFee":{"type":"object","properties":{"amount":{"type":"number"},"currency":{"type":"string"}},"additionalProperties":true},"checklist":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"retrievedAt":{"type":"string"}},"additionalProperties":true}},"retrievedAt":{"type":"string"},"pdfBase64":{"type":"string"}},"additionalProperties":true},"example":{"status":"WARN","supported":true,"jurisdiction":"US-TX","licenseType":"Journeyman Electrician","expiresOn":"2027-01-31","daysUntilExpiry":94,"startBy":null,"ceHoursRequired":4,"ceHoursCompleted":2,"ceHoursRemaining":2,"renewalFee":{"amount":30,"currency":"USD"},"checklist":["Complete approved continuing education."],"sources":[{"url":"https://www.tdlr.texas.gov/electricians/renew/individuals/journeyman-electrician.htm","retrievedAt":"2026-10-28"}],"retrievedAt":"2026-10-28","pdfBase64":"<base64-encoded-pdf>"}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.05"},"protocols":[{"x402":{}}]}}},"/api/v1/license/deadline-watch":{"post":{"operationId":"calculate_licence_reminder_dates","summary":"Calculate licence reminder dates","description":"Return reminder dates from a caller-supplied expiry date. This is data only; BRAINIAC.software does not send notifications.","tags":["license"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expiresOn":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"remindDays":{"default":[90,30,7],"minItems":1,"maxItems":20,"type":"array","items":{"type":"integer","minimum":0,"maximum":730}}},"required":["expiresOn","remindDays"],"additionalProperties":false},"example":{"expiresOn":"2027-01-31","remindDays":[90,30,7]}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"description":"Fresh random 32-byte value encoded as 64 hexadecimal characters. Reuse unchanged only for retries of the same operation and request.","schema":{"type":"string","pattern":"^[0-9a-fA-F]{64}$"}}],"responses":{"200":{"description":"Illustrative endpoint-specific JSON response shape. Conditional fields depend on the result and data-source availability.","content":{"application/json":{"schema":{"type":"object","properties":{"expiresOn":{"type":"string"},"reminders":{"type":"array","items":{"type":"object","properties":{"daysBefore":{"type":"number"},"date":{"type":"string"}},"additionalProperties":true}},"delivery":{"type":"string"}},"additionalProperties":true},"example":{"expiresOn":"2027-01-31","reminders":[{"daysBefore":90,"date":"2026-11-02"},{"daysBefore":30,"date":"2027-01-01"}],"delivery":"Reminder dates only; no notification is sent."}}}},"400":{"description":"Invalid JSON or request schema."},"402":{"description":"Payment Required"},"409":{"description":"Idempotency conflict, in-progress payment, or expired result cache. Reusing the key cannot trigger a second charge."},"413":{"description":"Request body exceeds the 24 MB limit."},"500":{"description":"Operation failed. With upfront settlement this may occur after payment; reuse the same idempotency key to retrieve the stored result."},"503":{"description":"Payment or retry-safe result storage is unavailable; the operation is not run."}},"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]}}}},"components":{"schemas":{"ApiError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{}}}}}}}}