{"openapi":"3.1.0","info":{"title":"Form Casa 1099 E-Filing API","version":"1.0.0","summary":"Pay-as-you-go REST API for IRS Form 1099-NEC, 1099-MISC, IRS IRIS e-filing, CF/SF state filing, standalone IRS TIN matching, hosted W-9 collection, free recipient e-delivery, and USPS mailing.","description":"Direct IRS IRIS e-filing API with $0 monthly fee ($0.50/e-file with free recipient e-delivery \u0026 PDFs, $1.50/USPS mail, $0.50/IRS TIN match). Includes free Sandbox test mode with simulation endpoints, Idempotency-Key support, and HMAC-SHA256 signed webhooks.","contact":{"name":"Form Casa Support","email":"support@formcasa.com","url":"https://www.formcasa.com/docs"}},"servers":[{"url":"https://www.formcasa.com","description":"Production \u0026 Sandbox (determined by OAuth Client ID/Secret)"}],"security":[{"bearerAuth":[]}],"paths":{"/api/v1/oauth/token":{"post":{"operationId":"createOAuthToken","summary":"Create an OAuth 2.0 Bearer access token (live or sandbox)","security":[],"tags":["Authentication"],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["grant_type","client_id","client_secret"],"properties":{"grant_type":{"type":"string","enum":["client_credentials","refresh_token"]},"client_id":{"type":"string","description":"Live Client ID or Sandbox Client ID (fc_test_...)."},"client_secret":{"type":"string"},"refresh_token":{"type":"string"}}}}}},"responses":{"200":{"description":"OAuth access token issued","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer","example":7200}}}}}}}}},"/api/v1/contacts":{"get":{"operationId":"listContacts","summary":"List payer and recipient contacts","tags":["Contacts"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1},"description":"Page number (1-indexed)"},{"name":"per_page","in":"query","schema":{"type":"integer","default":25},"description":"Items per page (1-100)"},{"name":"search","in":"query","schema":{"type":"string"},"description":"Search business name, first name, last name, or email."},{"name":"type_of_tin","in":"query","schema":{"type":"string","enum":["ein","ssn","itin"]}}],"responses":{"200":{"description":"Paginated list response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"post":{"operationId":"createContact","summary":"Create a payer or recipient contact","tags":["Contacts"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}},"responses":{"201":{"description":"Contact created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/contacts/{id}":{"get":{"operationId":"getContact","summary":"Fetch a single contact by ID","tags":["Contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Contact found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}}}},"put":{"operationId":"updateContact","summary":"Update an existing contact (auto-rechecks TIN if changed)","tags":["Contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactUpdateInput"}}}},"responses":{"200":{"description":"Contact updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Contact"}}}}}},"delete":{"operationId":"deleteContact","summary":"Delete a contact not linked to forms","tags":["Contacts"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Contact deleted"}}}},"/api/v1/forms/f1099_nec":{"get":{"operationId":"listNecForms","summary":"List Form 1099-NEC filings","tags":["1099-NEC"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","schema":{"type":"integer","default":25},"description":"Items per page (1-100)"},{"name":"tax_year","in":"query","schema":{"type":"integer"}},{"name":"efile_state","in":"query","schema":{"type":"string","enum":["pending","in_queued","submitted","approved","blocked","held","replaced"]}},{"name":"mail_state","in":"query","schema":{"type":"string","enum":["pending","in_queued","sent","replaced"]}},{"name":"payer_id","in":"query","schema":{"type":"string"}},{"name":"recipient_id","in":"query","schema":{"type":"string"}},{"name":"correction","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Paginated list response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/F1099NecForm"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"post":{"operationId":"createNecForm","summary":"Create a Form 1099-NEC and optionally queue IRS e-file, free e-delivery, or USPS mail","tags":["1099-NEC"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099NecFormInput"}}}},"responses":{"201":{"description":"1099-NEC created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099NecForm"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/forms/f1099_nec/{id}":{"get":{"operationId":"getNecForm","summary":"Fetch a Form 1099-NEC with live IRS e-file, mail, e-delivery, and state statuses","tags":["1099-NEC"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"1099-NEC found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099NecForm"}}}}}},"put":{"operationId":"updateNecForm","summary":"Update a pending Form 1099-NEC","tags":["1099-NEC"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099NecFormUpdateInput"}}}},"responses":{"200":{"description":"1099-NEC updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099NecForm"}}}}}},"delete":{"operationId":"deleteNecForm","summary":"Delete a pending Form 1099-NEC","tags":["1099-NEC"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"1099-NEC deleted"}}}},"/api/v1/forms/f1099_nec/{id}/pdf":{"get":{"operationId":"downloadNecPdf","summary":"Download generated Form 1099-NEC PDF","tags":["1099-NEC"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identifier","in":"query","required":true,"schema":{"type":"string","enum":["recipient"]}}],"responses":{"200":{"description":"Generated PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v1/forms/f1099_nec/{original_form_id}/correct":{"post":{"operationId":"correctNecForm","summary":"File an IRS correction (boxes, recipient, or state details) for a filed Form 1099-NEC","tags":["1099-NEC"],"parameters":[{"name":"original_form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"box_values":{"type":"object"},"recipient":{"type":"object"},"states":{"type":"array","items":{"$ref":"#/components/schemas/StateDetailInput"}},"ready_to_efile":{"type":"boolean","default":false},"ready_to_mail":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Correction created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099NecForm"}}}}}}},"/api/v1/forms/f1099_nec/{original_form_id}/void":{"post":{"operationId":"voidNecForm","summary":"Void a previously filed Form 1099-NEC via a zeroed IRS correction","tags":["1099-NEC"],"parameters":[{"name":"original_form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ready_to_efile":{"type":"boolean","default":false},"ready_to_mail":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Void correction created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099NecForm"}}}}}}},"/api/v1/forms/f1099_misc":{"get":{"operationId":"listMiscForms","summary":"List Form 1099-MISC filings","tags":["1099-MISC"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","schema":{"type":"integer","default":25},"description":"Items per page (1-100)"},{"name":"tax_year","in":"query","schema":{"type":"integer"}},{"name":"efile_state","in":"query","schema":{"type":"string","enum":["pending","in_queued","submitted","approved","blocked","held","replaced"]}},{"name":"mail_state","in":"query","schema":{"type":"string","enum":["pending","in_queued","sent","replaced"]}},{"name":"payer_id","in":"query","schema":{"type":"string"}},{"name":"recipient_id","in":"query","schema":{"type":"string"}},{"name":"correction","in":"query","schema":{"type":"boolean"}}],"responses":{"200":{"description":"Paginated list response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/F1099MiscForm"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"post":{"operationId":"createMiscForm","summary":"Create a Form 1099-MISC and optionally queue IRS e-file, free e-delivery, or USPS mail","tags":["1099-MISC"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099MiscFormInput"}}}},"responses":{"201":{"description":"1099-MISC created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099MiscForm"}}}},"400":{"description":"Error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/forms/f1099_misc/{id}":{"get":{"operationId":"getMiscForm","summary":"Fetch a Form 1099-MISC with live IRS e-file, mail, e-delivery, and state statuses","tags":["1099-MISC"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"1099-MISC found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099MiscForm"}}}}}},"put":{"operationId":"updateMiscForm","summary":"Update a pending Form 1099-MISC","tags":["1099-MISC"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099MiscFormUpdateInput"}}}},"responses":{"200":{"description":"1099-MISC updated","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099MiscForm"}}}}}},"delete":{"operationId":"deleteMiscForm","summary":"Delete a pending Form 1099-MISC","tags":["1099-MISC"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"1099-MISC deleted"}}}},"/api/v1/forms/f1099_misc/{id}/pdf":{"get":{"operationId":"downloadMiscPdf","summary":"Download generated Form 1099-MISC PDF","tags":["1099-MISC"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"identifier","in":"query","required":true,"schema":{"type":"string","enum":["recipient"]}}],"responses":{"200":{"description":"Generated PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v1/forms/f1099_misc/{original_form_id}/correct":{"post":{"operationId":"correctMiscForm","summary":"File an IRS correction (boxes, recipient, or state details) for a filed Form 1099-MISC","tags":["1099-MISC"],"parameters":[{"name":"original_form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"box_values":{"type":"object"},"recipient":{"type":"object"},"states":{"type":"array","items":{"$ref":"#/components/schemas/StateDetailInput"}},"ready_to_efile":{"type":"boolean","default":false},"ready_to_mail":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Correction created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099MiscForm"}}}}}}},"/api/v1/forms/f1099_misc/{original_form_id}/void":{"post":{"operationId":"voidMiscForm","summary":"Void a previously filed Form 1099-MISC via a zeroed IRS correction","tags":["1099-MISC"],"parameters":[{"name":"original_form_id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ready_to_efile":{"type":"boolean","default":false},"ready_to_mail":{"type":"boolean","default":false}}}}}},"responses":{"201":{"description":"Void correction created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/F1099MiscForm"}}}}}}},"/api/v1/tin_matching_requests":{"get":{"operationId":"listTinMatchingRequests","summary":"List standalone and form IRS TIN matching requests","tags":["TIN Matching"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","schema":{"type":"integer","default":25},"description":"Items per page (1-100)"},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","processing","verified","manually_verified","failed"]}},{"name":"recipient_contact_id","in":"query","schema":{"type":"string"}},{"name":"payer_contact_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/TinMatchingRequest"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"post":{"operationId":"createTinMatchingRequest","summary":"Verify a recipient name and TIN with the IRS without creating a form ($0.50; free deduping)","tags":["TIN Matching"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payer_contact_id","recipient_contact_id"],"properties":{"payer_contact_id":{"type":"string","format":"uuid"},"recipient_contact_id":{"type":"string","format":"uuid"}}}}}},"responses":{"201":{"description":"TIN check created or existing check returned","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TinMatchingRequest"}}}}}}},"/api/v1/tin_matching_requests/{id}":{"get":{"operationId":"getTinMatchingRequest","summary":"Fetch status of a TIN matching request (never returns the TIN)","tags":["TIN Matching"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"TIN check found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TinMatchingRequest"}}}}}}},"/api/v1/w9_requests":{"get":{"operationId":"listW9Requests","summary":"List hosted IRS Form W-9 collection requests","tags":["W-9 Collection"],"parameters":[{"name":"page","in":"query","schema":{"type":"integer","default":1},"description":"Page number"},{"name":"per_page","in":"query","schema":{"type":"integer","default":25},"description":"Items per page (1-100)"},{"name":"status","in":"query","schema":{"type":"string","enum":["pending","completed","cancelled"]}},{"name":"payer_contact_id","in":"query","schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated list response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/W9Request"}},"meta":{"$ref":"#/components/schemas/PaginationMeta"}}}}}}}},"post":{"operationId":"createW9Request","summary":"Send a hosted IRS Form W-9 request link to a contractor","tags":["W-9 Collection"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":255},"description":"Optional unique key to safely retry POST requests without creating duplicates."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["payer_contact_id","recipient_email"],"properties":{"payer_contact_id":{"type":"string","format":"uuid"},"recipient_email":{"type":"string","format":"email"},"recipient_name":{"type":"string"},"auto_tin_match":{"type":"boolean","default":true},"send_email":{"type":"boolean","default":true}}}}}},"responses":{"201":{"description":"W-9 request created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/W9Request"}}}}}}},"/api/v1/w9_requests/{id}":{"get":{"operationId":"getW9Request","summary":"Fetch a W-9 request by ID","tags":["W-9 Collection"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"W-9 request found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/W9Request"}}}}}},"delete":{"operationId":"cancelW9Request","summary":"Cancel a pending W-9 request so its link can no longer be used","tags":["W-9 Collection"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"W-9 request cancelled","content":{"application/json":{"schema":{"$ref":"#/components/schemas/W9Request"}}}},"409":{"description":"Only pending W-9 requests can be cancelled"}}}},"/api/v1/w9_requests/{id}/pdf":{"get":{"operationId":"downloadW9Pdf","summary":"Download the completed, signed IRS Form W-9 PDF","tags":["W-9 Collection"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Signed IRS Form W-9 PDF","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}}}}},"/api/v1/sandbox/forms/{form_type}/{id}/simulate":{"post":{"operationId":"simulateSandboxForm","summary":"Simulate IRS e-file acceptance/rejection or USPS mailing on a sandbox form","tags":["Sandbox"],"parameters":[{"name":"form_type","in":"path","required":true,"schema":{"type":"string","enum":["f1099_nec","f1099_misc"]}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["action"],"properties":{"action":{"type":"string","enum":["submit_efile","approve_efile","block_efile","mark_mailed"]},"error_code":{"type":"string"},"error_message":{"type":"string"}}}}}},"responses":{"201":{"description":"Simulated state transition applied and sandbox webhook dispatched"}}}},"/api/v1/sandbox/tin_matching_requests/{id}/simulate":{"post":{"operationId":"simulateSandboxTinMatching","summary":"Simulate IRS TIN verification or failure on a sandbox request","tags":["Sandbox"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["verified","failed"]},"failed_reason":{"type":"string","enum":["recipient_name_too_long","irs_rejected"]}}}}}},"responses":{"201":{"description":"Simulated TIN result applied and sandbox webhook dispatched"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Obtain a Bearer access token via POST /api/v1/oauth/token using live or sandbox credentials."}},"schemas":{"Error":{"type":"object","properties":{"error":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"request_id":{"type":"string"}}},"PaginationMeta":{"type":"object","properties":{"page":{"type":"integer"},"per_page":{"type":"integer"},"total_count":{"type":"integer"},"total_pages":{"type":"integer"}}},"ContactInput":{"type":"object","required":["street_address","city","state","postal_code","email","type_of_tin","tin"],"properties":{"business_name":{"type":"string","description":"Required for EIN contacts."},"first_name":{"type":"string","description":"Required for SSN/ITIN contacts."},"last_name":{"type":"string","description":"Required for SSN/ITIN contacts."},"street_address":{"type":"string","maxLength":40},"city":{"type":"string"},"state":{"type":"string","example":"TX"},"postal_code":{"type":"string","example":"78701"},"country":{"type":"string","enum":["US","CA"],"default":"US"},"phone":{"type":"string"},"email":{"type":"string","format":"email"},"type_of_tin":{"type":"string","enum":["ein","ssn","itin"]},"tin":{"type":"string","example":"12-3456789"},"account_number":{"type":"string"},"last_filing_indicator":{"type":"boolean","default":false},"second_tin_notice":{"type":"boolean","default":false},"fatca_filing_requirement_indicator":{"type":"boolean","default":false}}},"Contact":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"business_name":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"street_address":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"phone":{"type":["string","null"]},"email":{"type":"string"},"tin":{"type":"string"},"account_number":{"type":["string","null"]},"last_filing_indicator":{"type":"boolean"},"second_tin_notice":{"type":"boolean"},"fatca_filing_requirement_indicator":{"type":"boolean"}}},"StateDetailInput":{"type":"object","required":["state_code","state_id_number","state_income"],"properties":{"state_code":{"type":"string","example":"CA"},"state_id_number":{"type":"string","example":"123-4567"},"state_income":{"type":"string","example":"5000.00"},"state_tax_withheld":{"type":"string","example":"250.00"}}},"F1099NecFormInput":{"type":"object","required":["tax_year","payer","recipient","box_values"],"properties":{"tax_year":{"type":"integer","enum":[2020,2021,2022,2023,2024,2025],"example":2025},"payer":{"type":"object","description":"Existing `{ \"id\": \"\u003cuuid\u003e\" }` or inline ContactInput."},"recipient":{"type":"object","description":"Existing `{ \"id\": \"\u003cuuid\u003e\" }` or inline ContactInput."},"box_values":{"type":"object","properties":{"box1":{"type":"string","example":"5000.00","description":"Nonemployee compensation"},"box4":{"type":"string","example":"0.00","description":"Federal income tax withheld"}}},"states":{"type":"array","maxItems":2,"items":{"$ref":"#/components/schemas/StateDetailInput"}},"ready_to_efile":{"type":"boolean","default":false},"ready_to_mail":{"type":"boolean","default":false},"ready_to_edeliver":{"type":"boolean","default":false,"description":"Free electronic recipient delivery portal."}}},"F1099MiscFormInput":{"type":"object","required":["tax_year","payer","recipient","box_values"],"properties":{"tax_year":{"type":"integer","enum":[2020,2021,2022,2023,2024,2025],"example":2025},"payer":{"type":"object"},"recipient":{"type":"object"},"box_values":{"type":"object","description":"1099-MISC boxes (box1 rents, box2 royalties, box3 other income, box4 federal tax withheld, etc.)."},"states":{"type":"array","maxItems":2,"items":{"$ref":"#/components/schemas/StateDetailInput"}},"ready_to_efile":{"type":"boolean","default":false},"ready_to_mail":{"type":"boolean","default":false},"ready_to_edeliver":{"type":"boolean","default":false}}},"F1099NecForm":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"payment_year":{"type":"integer"},"efile_state":{"type":"string","enum":["pending","in_queued","submitted","approved","blocked","held","replaced"]},"mail_state":{"type":"string","enum":["pending","in_queued","sent","replaced"]},"edelivery_state":{"type":"string","enum":["not_sent","pending_consent","consented","downloaded","opted_out"]},"sandbox":{"type":"boolean"},"correction":{"type":"boolean"},"voided":{"type":"boolean"},"correction_type":{"type":["string","null"]},"correcting_form_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"approved_at":{"type":["string","null"],"format":"date-time"},"mailed_at":{"type":["string","null"],"format":"date-time"},"irs_errors":{"type":["object","null"]},"states":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string"},"region_number":{"type":"string"},"income":{"type":"string"},"tax_withheld":{"type":"string"},"cfsf_eligible":{"type":"boolean"},"regional_state":{"type":["string","null"]}}}},"pdf_available":{"type":"object"},"payer_contact":{"$ref":"#/components/schemas/Contact"},"recipient_contact":{"$ref":"#/components/schemas/Contact"},"box1":{"type":"string"},"box4":{"type":"string"}}},"F1099MiscForm":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"payment_year":{"type":"integer"},"efile_state":{"type":"string","enum":["pending","in_queued","submitted","approved","blocked","held","replaced"]},"mail_state":{"type":"string","enum":["pending","in_queued","sent","replaced"]},"edelivery_state":{"type":"string","enum":["not_sent","pending_consent","consented","downloaded","opted_out"]},"sandbox":{"type":"boolean"},"correction":{"type":"boolean"},"voided":{"type":"boolean"},"correction_type":{"type":["string","null"]},"correcting_form_id":{"type":["string","null"],"format":"uuid"},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"submitted_at":{"type":["string","null"],"format":"date-time"},"approved_at":{"type":["string","null"],"format":"date-time"},"mailed_at":{"type":["string","null"],"format":"date-time"},"irs_errors":{"type":["object","null"]},"states":{"type":"array","items":{"type":"object","properties":{"region":{"type":"string"},"region_number":{"type":"string"},"income":{"type":"string"},"tax_withheld":{"type":"string"},"cfsf_eligible":{"type":"boolean"},"regional_state":{"type":["string","null"]}}}},"pdf_available":{"type":"object"},"payer_contact":{"$ref":"#/components/schemas/Contact"},"recipient_contact":{"$ref":"#/components/schemas/Contact"},"box1":{"type":"string"},"box2":{"type":"string"},"box3":{"type":"string"},"box4":{"type":"string"},"box5":{"type":"string"},"box6":{"type":"string"},"box7":{"type":"string"},"box8":{"type":"string"},"box9":{"type":"string"},"box10":{"type":"string"},"box12":{"type":"string"},"box13":{"type":"string"},"box14":{"type":"string"}}},"TinMatchingRequest":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","processing","verified","manually_verified","failed"]},"sandbox":{"type":"boolean"},"payer_contact_id":{"type":"string","format":"uuid"},"recipient_contact_id":{"type":"string","format":"uuid"},"tin_type":{"type":"string","enum":["SSN","EIN","ITIN"]},"form_id":{"type":["string","null"],"format":"uuid"},"business_name":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"failed_reason":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time"},"verified_at":{"type":["string","null"],"format":"date-time"},"failed_at":{"type":["string","null"],"format":"date-time"}}},"W9Request":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["pending","completed","cancelled"]},"sandbox":{"type":"boolean"},"payer_contact_id":{"type":"string","format":"uuid"},"recipient_contact_id":{"type":["string","null"],"format":"uuid"},"recipient_email":{"type":"string","format":"email"},"recipient_name":{"type":["string","null"]},"tax_classification":{"type":["string","null"]},"auto_tin_match":{"type":"boolean"},"pdf_available":{"type":"boolean"},"llc_tax_classification":{"type":["string","null"]},"tin_matching_request_id":{"type":["string","null"],"format":"uuid"},"signed_name":{"type":["string","null"]},"signed_at":{"type":["string","null"],"format":"date-time"},"expires_at":{"type":["string","null"],"format":"date-time"},"created_at":{"type":"string","format":"date-time"},"submission_url":{"type":"string","format":"uri","description":"Returned on creation."}}},"ContactUpdateInput":{"type":"object","properties":{"business_name":{"type":"string","description":"Required for EIN contacts."},"first_name":{"type":"string","description":"Required for SSN/ITIN contacts."},"last_name":{"type":"string","description":"Required for SSN/ITIN contacts."},"street_address":{"type":"string","maxLength":40},"city":{"type":"string"},"state":{"type":"string","example":"TX"},"postal_code":{"type":"string","example":"78701"},"country":{"type":"string","enum":["US","CA"],"default":"US"},"phone":{"type":"string"},"email":{"type":"string","format":"email"},"type_of_tin":{"type":"string","enum":["ein","ssn","itin"]},"tin":{"type":"string","example":"12-3456789"},"account_number":{"type":"string"},"last_filing_indicator":{"type":"boolean","default":false},"second_tin_notice":{"type":"boolean","default":false},"fatca_filing_requirement_indicator":{"type":"boolean","default":false}}},"F1099NecFormUpdateInput":{"type":"object","properties":{"tax_year":{"type":"integer","enum":[2020,2021,2022,2023,2024,2025],"example":2025},"payer":{"type":"object","description":"Existing `{ \"id\": \"\u003cuuid\u003e\" }` or inline ContactInput."},"recipient":{"type":"object","description":"Existing `{ \"id\": \"\u003cuuid\u003e\" }` or inline ContactInput."},"box_values":{"type":"object","properties":{"box1":{"type":"string","example":"5000.00","description":"Nonemployee compensation"},"box4":{"type":"string","example":"0.00","description":"Federal income tax withheld"}}},"states":{"type":"array","maxItems":2,"items":{"$ref":"#/components/schemas/StateDetailInput"}},"ready_to_efile":{"type":"boolean","default":false},"ready_to_mail":{"type":"boolean","default":false},"ready_to_edeliver":{"type":"boolean","default":false,"description":"Free electronic recipient delivery portal."}}},"F1099MiscFormUpdateInput":{"type":"object","properties":{"tax_year":{"type":"integer","enum":[2020,2021,2022,2023,2024,2025],"example":2025},"payer":{"type":"object"},"recipient":{"type":"object"},"box_values":{"type":"object","description":"1099-MISC boxes (box1 rents, box2 royalties, box3 other income, box4 federal tax withheld, etc.)."},"states":{"type":"array","maxItems":2,"items":{"$ref":"#/components/schemas/StateDetailInput"}},"ready_to_efile":{"type":"boolean","default":false},"ready_to_mail":{"type":"boolean","default":false},"ready_to_edeliver":{"type":"boolean","default":false}}}}},"webhooks":{"tin_matching.verified":{"post":{"summary":"Webhook event: tin_matching.verified","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"tin_matching.verified"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"tin_matching.failed":{"post":{"summary":"Webhook event: tin_matching.failed","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"tin_matching.failed"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"form.efile_submitted":{"post":{"summary":"Webhook event: form.efile_submitted","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"form.efile_submitted"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"form.efile_approved":{"post":{"summary":"Webhook event: form.efile_approved","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"form.efile_approved"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"form.efile_blocked":{"post":{"summary":"Webhook event: form.efile_blocked","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"form.efile_blocked"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"form.mailed":{"post":{"summary":"Webhook event: form.mailed","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"form.mailed"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"form.edelivered":{"post":{"summary":"Webhook event: form.edelivered","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"form.edelivered"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"form.edelivery_consented":{"post":{"summary":"Webhook event: form.edelivery_consented","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"form.edelivery_consented"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"form.edelivery_opted_out":{"post":{"summary":"Webhook event: form.edelivery_opted_out","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"form.edelivery_opted_out"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"w9.completed":{"post":{"summary":"Webhook event: w9.completed","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"w9.completed"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}},"webhook.test":{"post":{"summary":"Webhook event: webhook.test","description":"Signed with HMAC-SHA256 in the X-FormCasa-Signature header (`t=\u003cunix\u003e,v1=\u003chex\u003e`).","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"evt_0123456789abcdef"},"type":{"type":"string","example":"webhook.test"},"created_at":{"type":"string","format":"date-time"},"sandbox":{"type":"boolean"},"data":{"type":"object"}}}}}},"responses":{"200":{"description":"Webhook acknowledged"}}}}}}