{"openapi":"3.1.0","webhooks":{"credential.captured":{"post":{"summary":"A technician captured one of your jobs live","security":[],"description":"Signed with Serenn-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of 't.body' with your signing secret>. Reject timestamps older than 5 minutes. Respond 2xx; Serenn retries otherwise, so handle duplicates by event id. Each company has its own secret; if one URL serves several companies, use Serenn-Company-Id to pick the secret, then verify.","parameters":[{"name":"Serenn-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Serenn-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Serenn-Company-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Serenn-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Received"}}}},"ping":{"post":{"summary":"Test event sent from your company page","security":[],"description":"Signed with Serenn-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256 of 't.body' with your signing secret>. Reject timestamps older than 5 minutes. Respond 2xx; Serenn retries otherwise, so handle duplicates by event id. Each company has its own secret; if one URL serves several companies, use Serenn-Company-Id to pick the secret, then verify.","parameters":[{"name":"Serenn-Event-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Serenn-Event-Type","in":"header","required":true,"schema":{"type":"string"}},{"name":"Serenn-Company-Id","in":"header","required":true,"schema":{"type":"string"}},{"name":"Serenn-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEvent"}}}},"responses":{"2XX":{"description":"Received"}}}}},"info":{"title":"Serenn API","version":"1.0.0","description":"Send your technicians and jobs to Serenn. PUT creates or merges (omitted keeps, null clears). Send jobs when they're booked so technicians can capture them live; only live captures taken within 100 m of the service address count toward rank. Imported history never ranks. Raw imports need a readable plate cover or a photo matched within 100 m of the job address to count publicly. credential.status: created means the credential exists; credential.publicEligibility reports its current eligibility and reasons. Excluded credentials and credentials awaiting customer confirmation are not eligible. photos.ready counts downloads, not qualifying evidence. Profile privacy separately controls actual publication. Dry runs report an existing credential's stored eligibility after any reassignment the write would apply; new photos are not evaluated."},"servers":[{"url":"https://serenn.ai"}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/me":{"get":{"summary":"Check your key","description":"Returns the company behind the key, its limits, and progress counts.","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"Invalid request body or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API access for this company is not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale write or version conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 64 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or daily write budget exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/technicians/{externalId}":{"put":{"summary":"Add or update a technician","description":"Creates or updates a technician by your ID. An email that matches a member of your Serenn company links their work to their profile.","parameters":[{"name":"externalId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"Serenn-Dry-Run","in":"header","required":false,"description":"true validates and predicts the result without saving anything.","schema":{"type":"string","enum":["true"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicianPut"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicianWrite"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicianWrite"}}}},"400":{"description":"Invalid request body or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API access for this company is not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale write or version conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 64 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or daily write budget exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get a technician","description":"Returns one technician and whether they are matched to a Serenn member.","parameters":[{"name":"externalId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Technician"}}}},"400":{"description":"Invalid request body or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API access for this company is not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale write or version conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 64 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or daily write budget exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/technicians":{"get":{"summary":"List technicians","description":"Cursor-paginated by externalId. Pass nextCursor back as ?cursor= until it is null.","parameters":[{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":50}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TechnicianList"}}}},"400":{"description":"Invalid request body or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API access for this company is not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale write or version conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 64 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or daily write budget exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/jobs/{externalId}":{"put":{"summary":"Send a job","description":"Creates or updates a job by your ID. Send jobs when they're booked: scheduled and in-progress jobs become capture cards for the assigned technician; completed jobs become imported history.","parameters":[{"name":"externalId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}},{"name":"Serenn-Dry-Run","in":"header","required":false,"description":"true validates and predicts the result without saving anything.","schema":{"type":"string","enum":["true"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPut"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobWrite"}}}},"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobWrite"}}}},"400":{"description":"Invalid request body or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API access for this company is not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale write or version conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 64 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or daily write budget exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get a job","description":"Returns capture eligibility and the resulting credential, if any.","parameters":[{"name":"externalId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Job"}}}},"400":{"description":"Invalid request body or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API access for this company is not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale write or version conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 64 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or daily write budget exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/jobs":{"post":{"summary":"Send up to 100 jobs","description":"Bulk import for history or catch-up. Each item is written like PUT /jobs/{externalId} and succeeds or fails on its own; check every result.","parameters":[{"name":"Serenn-Dry-Run","in":"header","required":false,"description":"true validates and predicts the result without saving anything.","schema":{"type":"string","enum":["true"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobBatch"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobBatchResult"}}}},"400":{"description":"Invalid request body or parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"API access for this company is not active","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Stale write or version conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"413":{"description":"Body larger than 64 KB","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit or daily write budget exceeded (see Retry-After)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"Server error; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/openapi.json":{"get":{"summary":"This specification","description":"OpenAPI 3.1 document for the Serenn v1 API. No key required.","security":[],"responses":{"200":{"description":"OK"},"500":{"description":"Server error; safe to retry","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"srn_live_… key from your company page"}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","invalid_api_key","access_inactive","not_found","stale_write","version_conflict","payload_too_large","rate_limited","write_budget_exceeded","internal_error"]},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"Me":{"type":"object","properties":{"company":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"additionalProperties":false},"key":{"type":"object","properties":{"name":{"type":"string"},"display":{"type":"string"}},"required":["name","display"],"additionalProperties":false},"limits":{"type":"object","properties":{"requestsPerMinute":{"type":"number"},"jobWritesPerDay":{"type":"number"}},"required":["requestsPerMinute","jobWritesPerDay"],"additionalProperties":false},"counts":{"type":"object","properties":{"techniciansMatched":{"type":"number"},"techniciansUnmatched":{"type":"number"},"openCaptureCards":{"type":"number"},"legacyCredentials":{"type":"number"},"liveCredentials":{"type":"number"}},"required":["techniciansMatched","techniciansUnmatched","openCaptureCards","legacyCredentials","liveCredentials"],"additionalProperties":false}},"required":["company","key","limits","counts"],"additionalProperties":false},"TechnicianPut":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"email":{"description":"Matched to your Serenn company members to link this technician's work to their profile.","anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"active":{"description":"false removes this person's pending capture cards and stops assigning new jobs to them; completed work stays. true reassigns their jobs.","type":"boolean"}},"additionalProperties":false},"TechnicianWrite":{"type":"object","properties":{"outcome":{"type":"string","enum":["created","updated"]},"dryRun":{"type":"boolean"},"technician":{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"matched":{"type":"boolean","description":"True when linked to a Serenn company member."}},"required":["externalId","name","active","matched"],"additionalProperties":false}},"required":["outcome","dryRun","technician"],"additionalProperties":false},"Technician":{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"matched":{"type":"boolean","description":"True when linked to a Serenn company member."}},"required":["externalId","name","active","matched"],"additionalProperties":false},"TechnicianList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"matched":{"type":"boolean","description":"True when linked to a Serenn company member."}},"required":["externalId","name","active","matched"],"additionalProperties":false}},"nextCursor":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["data","nextCursor"],"additionalProperties":false},"JobPut":{"type":"object","properties":{"status":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]},"sourceUpdatedAt":{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When this job last changed in your system. Must not go backwards; older versions are rejected as stale."},"technicianExternalId":{"description":"Your ID for the assigned technician (send them to PUT /technicians first or later).","anyOf":[{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp with a timezone offset, e.g. 2026-10-07T09:00:00-07:00."},{"type":"null"}]},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp with a timezone offset, e.g. 2026-10-07T09:00:00-07:00."},{"type":"null"}]},"completedAt":{"description":"Required when status is completed.","anyOf":[{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp with a timezone offset, e.g. 2026-10-07T09:00:00-07:00."},{"type":"null"}]},"jobType":{"description":"For example Repair, Installation, Maintenance.","anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]}},"additionalProperties":false,"description":"Visible only to your team and the assigned technician. Never shown on public profiles or returned by this API."},{"type":"null"}]},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":200},"line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"city":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","minLength":2,"maxLength":40,"description":"Two-letter state code or full state name."},"zip":{"type":"string","minLength":3,"maxLength":20}},"required":["line1","city","state","zip"],"additionalProperties":false,"description":"Service address. Required when creating a job; replaces the stored address as a whole."},"photos":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your stable ID for this photo."},"url":{"type":"string","maxLength":2048,"description":"Public https link to the image. Serenn downloads it once; links may expire after that."}},"required":["id","url"],"additionalProperties":false},"description":"Photos of the work. Added, never removed; each id is stored once. To retry a failed download, resend the id with a fresh link and a newer sourceUpdatedAt. Used as the cover of imported history; never counts as a live capture."}},"required":["status","sourceUpdatedAt"],"additionalProperties":false},"JobWrite":{"type":"object","properties":{"outcome":{"type":"string","enum":["created","updated","unchanged"]},"dryRun":{"type":"boolean"},"job":{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"status":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]},"sourceUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"technician":{"anyOf":[{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"matched":{"type":"boolean"},"active":{"type":"boolean"}},"required":["externalId","matched","active"],"additionalProperties":false},{"type":"null"}]},"captureEligibility":{"type":"string","enum":["eligible","not_eligible"],"description":"eligible: the assigned technician can capture this job live from the Serenn app. The app shows up to 10 cards at a time, and completed jobs leave the card flow."},"ineligibleReasons":{"type":"array","items":{"type":"string","enum":["status_closed","credential_exists","technician_unmapped","technician_inactive","dismissed_by_technician"]}},"photos":{"type":"object","properties":{"received":{"type":"number"},"ready":{"type":"number"},"failed":{"type":"number"}},"required":["received","ready","failed"],"additionalProperties":false,"description":"Photos you sent for this job: downloaded, still pending, or failed (resend with a fresh link). ready counts downloads, not photos that qualify as public evidence."},"credential":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","created"],"description":"created means the credential exists; it does not guarantee public eligibility or visibility."},"kind":{"type":"string","enum":["legacy","legacy_with_photo","live"]},"id":{"type":"string"},"capturedAt":{"type":"string"},"publicEligibility":{"description":"Present for an existing credential. Reports its current eligibility for public totals and browse; profile privacy still controls publication. Raw imports need a readable plate cover or a photo matched within 100 m of the job. evidence_required can change as photos are processed. A dry run reports the existing credential's stored eligibility, not a prediction for new photos or an uncreated credential.","type":"object","properties":{"status":{"type":"string","enum":["eligible","not_eligible"]},"reasons":{"type":"array","items":{"type":"string","enum":["excluded","pending_confirmation","evidence_required"]}}},"required":["status","reasons"],"additionalProperties":false}},"required":["status"],"additionalProperties":false}},"required":["externalId","status","sourceUpdatedAt","technician","captureEligibility","ineligibleReasons","photos","credential"],"additionalProperties":false}},"required":["outcome","dryRun","job"],"additionalProperties":false},"JobBatch":{"type":"object","properties":{"jobs":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"status":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]},"sourceUpdatedAt":{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"When this job last changed in your system. Must not go backwards; older versions are rejected as stale."},"technicianExternalId":{"description":"Your ID for the assigned technician (send them to PUT /technicians first or later).","anyOf":[{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},{"type":"null"}]},"scheduledStartAt":{"anyOf":[{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp with a timezone offset, e.g. 2026-10-07T09:00:00-07:00."},{"type":"null"}]},"scheduledEndAt":{"anyOf":[{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp with a timezone offset, e.g. 2026-10-07T09:00:00-07:00."},{"type":"null"}]},"completedAt":{"description":"Required when status is completed.","anyOf":[{"type":"string","format":"date-time","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])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$","description":"ISO 8601 timestamp with a timezone offset, e.g. 2026-10-07T09:00:00-07:00."},{"type":"null"}]},"jobType":{"description":"For example Repair, Installation, Maintenance.","anyOf":[{"type":"string","minLength":1,"maxLength":80},{"type":"null"}]},"customer":{"anyOf":[{"type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"email":{"anyOf":[{"type":"string","maxLength":320},{"type":"null"}]},"phone":{"anyOf":[{"type":"string","maxLength":32},{"type":"null"}]}},"additionalProperties":false,"description":"Visible only to your team and the assigned technician. Never shown on public profiles or returned by this API."},{"type":"null"}]},"address":{"type":"object","properties":{"line1":{"type":"string","minLength":1,"maxLength":200},"line2":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"city":{"type":"string","minLength":1,"maxLength":120},"state":{"type":"string","minLength":2,"maxLength":40,"description":"Two-letter state code or full state name."},"zip":{"type":"string","minLength":3,"maxLength":20}},"required":["line1","city","state","zip"],"additionalProperties":false,"description":"Service address. Required when creating a job; replaces the stored address as a whole."},"photos":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your stable ID for this photo."},"url":{"type":"string","maxLength":2048,"description":"Public https link to the image. Serenn downloads it once; links may expire after that."}},"required":["id","url"],"additionalProperties":false},"description":"Photos of the work. Added, never removed; each id is stored once. To retry a failed download, resend the id with a fresh link and a newer sourceUpdatedAt. Used as the cover of imported history; never counts as a live capture."}},"required":["externalId","status","sourceUpdatedAt"],"additionalProperties":false}}},"required":["jobs"],"additionalProperties":false},"JobBatchResult":{"type":"object","properties":{"dryRun":{"type":"boolean"},"results":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"externalId":{"type":"string"},"ok":{"type":"boolean","const":true},"outcome":{"type":"string","enum":["created","updated","unchanged"]},"job":{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"status":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]},"sourceUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"technician":{"anyOf":[{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"matched":{"type":"boolean"},"active":{"type":"boolean"}},"required":["externalId","matched","active"],"additionalProperties":false},{"type":"null"}]},"captureEligibility":{"type":"string","enum":["eligible","not_eligible"],"description":"eligible: the assigned technician can capture this job live from the Serenn app. The app shows up to 10 cards at a time, and completed jobs leave the card flow."},"ineligibleReasons":{"type":"array","items":{"type":"string","enum":["status_closed","credential_exists","technician_unmapped","technician_inactive","dismissed_by_technician"]}},"photos":{"type":"object","properties":{"received":{"type":"number"},"ready":{"type":"number"},"failed":{"type":"number"}},"required":["received","ready","failed"],"additionalProperties":false,"description":"Photos you sent for this job: downloaded, still pending, or failed (resend with a fresh link). ready counts downloads, not photos that qualify as public evidence."},"credential":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","created"],"description":"created means the credential exists; it does not guarantee public eligibility or visibility."},"kind":{"type":"string","enum":["legacy","legacy_with_photo","live"]},"id":{"type":"string"},"capturedAt":{"type":"string"},"publicEligibility":{"description":"Present for an existing credential. Reports its current eligibility for public totals and browse; profile privacy still controls publication. Raw imports need a readable plate cover or a photo matched within 100 m of the job. evidence_required can change as photos are processed. A dry run reports the existing credential's stored eligibility, not a prediction for new photos or an uncreated credential.","type":"object","properties":{"status":{"type":"string","enum":["eligible","not_eligible"]},"reasons":{"type":"array","items":{"type":"string","enum":["excluded","pending_confirmation","evidence_required"]}}},"required":["status","reasons"],"additionalProperties":false}},"required":["status"],"additionalProperties":false}},"required":["externalId","status","sourceUpdatedAt","technician","captureEligibility","ineligibleReasons","photos","credential"],"additionalProperties":false}},"required":["externalId","ok","outcome","job"],"additionalProperties":false},{"type":"object","properties":{"externalId":{"type":"string"},"ok":{"type":"boolean","const":false},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"retryable":{"type":"boolean"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message","retryable"],"additionalProperties":false}},"required":["externalId","ok","error"],"additionalProperties":false}]}}},"required":["dryRun","results"],"additionalProperties":false},"Job":{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"status":{"type":"string","enum":["scheduled","in_progress","completed","cancelled"]},"sourceUpdatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"technician":{"anyOf":[{"type":"object","properties":{"externalId":{"type":"string","pattern":"^[A-Za-z0-9._:-]{1,128}$","description":"Your own stable ID for this record."},"matched":{"type":"boolean"},"active":{"type":"boolean"}},"required":["externalId","matched","active"],"additionalProperties":false},{"type":"null"}]},"captureEligibility":{"type":"string","enum":["eligible","not_eligible"],"description":"eligible: the assigned technician can capture this job live from the Serenn app. The app shows up to 10 cards at a time, and completed jobs leave the card flow."},"ineligibleReasons":{"type":"array","items":{"type":"string","enum":["status_closed","credential_exists","technician_unmapped","technician_inactive","dismissed_by_technician"]}},"photos":{"type":"object","properties":{"received":{"type":"number"},"ready":{"type":"number"},"failed":{"type":"number"}},"required":["received","ready","failed"],"additionalProperties":false,"description":"Photos you sent for this job: downloaded, still pending, or failed (resend with a fresh link). ready counts downloads, not photos that qualify as public evidence."},"credential":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","created"],"description":"created means the credential exists; it does not guarantee public eligibility or visibility."},"kind":{"type":"string","enum":["legacy","legacy_with_photo","live"]},"id":{"type":"string"},"capturedAt":{"type":"string"},"publicEligibility":{"description":"Present for an existing credential. Reports its current eligibility for public totals and browse; profile privacy still controls publication. Raw imports need a readable plate cover or a photo matched within 100 m of the job. evidence_required can change as photos are processed. A dry run reports the existing credential's stored eligibility, not a prediction for new photos or an uncreated credential.","type":"object","properties":{"status":{"type":"string","enum":["eligible","not_eligible"]},"reasons":{"type":"array","items":{"type":"string","enum":["excluded","pending_confirmation","evidence_required"]}}},"required":["status","reasons"],"additionalProperties":false}},"required":["status"],"additionalProperties":false}},"required":["externalId","status","sourceUpdatedAt","technician","captureEligibility","ineligibleReasons","photos","credential"],"additionalProperties":false},"WebhookEvent":{"type":"object","properties":{"id":{"type":"string","description":"Unique per event; use it to ignore duplicate deliveries."},"type":{"type":"string","enum":["credential.captured","ping"]},"createdAt":{"type":"string"},"company":{"type":"object","properties":{"id":{"type":"string","description":"Stable; the same id GET /api/v1/me returns for that company's keys."},"slug":{"type":"string","description":"Readable, but it can change. Match on id."}},"required":["id","slug"],"additionalProperties":false,"description":"The company this event belongs to. One receiver URL can serve several companies."},"data":{"type":"object","properties":{"job":{"type":"object","properties":{"externalId":{"type":"string"}},"required":["externalId"],"additionalProperties":false},"technician":{"anyOf":[{"type":"object","properties":{"externalId":{"type":"string"}},"required":["externalId"],"additionalProperties":false},{"type":"null"}]},"credential":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","const":"live"},"revision":{"type":"number","description":"Increases when the technician re-captures the job."},"capturedAt":{"type":"string"}},"required":["id","kind","revision","capturedAt"],"additionalProperties":false}},"additionalProperties":false}},"required":["id","type","createdAt","company","data"],"additionalProperties":false}}}}