{"openapi":"3.1.0","info":{"title":"Ferrylend API","version":"1.0.0","description":"The Ferrylend REST API, v1. Authenticate with an API key from Settings, API keys and webhooks: `Authorization: Bearer <key>`. Field names never change within v1; new fields may be added."},"servers":[{"url":"https://ferrylend.com/api/v1"}],"security":[{"apiKey":[]}],"tags":[{"name":"Account"},{"name":"Leads"},{"name":"Notes"},{"name":"Deals"},{"name":"Merchants"},{"name":"Lenders"},{"name":"Submissions"},{"name":"Funded"},{"name":"Team"},{"name":"Webhooks"}],"paths":{"/me":{"get":{"operationId":"get_me","summary":"The calling key, its workspace, role and scopes (a connection test)","tags":["Account"],"description":"Any valid key.","parameters":[],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"}]}},"/meta":{"get":{"operationId":"get_meta","summary":"The values of every enum field, with labels","tags":["Account"],"description":"Any valid key.","parameters":[],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"}]}},"/leads":{"get":{"operationId":"get_leads","summary":"List leads","tags":["Leads"],"description":"Scope: `leads:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[status]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). Statuses, or a whole phase as phase:<phase>"},{"name":"filter[lead_source_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[assigned_user_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[state]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). Two-letter codes"},{"name":"filter[contact_type]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[is_test]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). true or false"},{"name":"filter[converted]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). true or false"},{"name":"filter[email]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). Exact: any of the lead's emails, any letter case"},{"name":"filter[phone]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). Exact: any of the lead's phones, in any format (10 US digits match with or without +1)"}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lead"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"leads:read"},"post":{"operationId":"post_leads","summary":"Create a lead","tags":["Leads"],"description":"Scope: `leads:write`.","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"leads:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadInput"}}}}}},"/leads/{lead}":{"get":{"operationId":"get_leads_lead","summary":"Get a lead","tags":["Leads"],"description":"Scope: `leads:read`.","parameters":[{"name":"lead","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"leads:read"},"patch":{"operationId":"patch_leads_lead","summary":"Update a lead (only the fields sent)","tags":["Leads"],"description":"Scope: `leads:write`.","parameters":[{"name":"lead","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lead"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"leads:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadInput"}}}}},"delete":{"operationId":"delete_leads_lead","summary":"Delete a lead","tags":["Leads"],"description":"Scope: `leads:write`.","parameters":[{"name":"lead","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"Done"},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"leads:write"}},"/leads/{lead}/notes":{"post":{"operationId":"post_leads_lead_notes","summary":"Add a note to a lead","tags":["Notes"],"description":"Scope: `notes:write`.","parameters":[{"name":"lead","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Note"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"notes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteInput"}}}}}},"/lead-sources":{"get":{"operationId":"get_lead_sources","summary":"List lead sources","tags":["Leads"],"description":"Scope: `leads:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[active]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). true or false"},{"name":"filter[type]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/LeadSource"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"leads:read"}},"/deals":{"get":{"operationId":"get_deals","summary":"List deals","tags":["Deals"],"description":"Scope: `deals:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[stage]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[phase]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). opportunity, closed_won, closed_lost, nurture"},{"name":"filter[merchant_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[owner_user_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[product_type]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[deal_type]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[lead_source_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Deal"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"deals:read"},"post":{"operationId":"post_deals","summary":"Create a deal (for a merchant, or with a new one)","tags":["Deals"],"description":"Scope: `deals:write`.","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"deals:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealInput"}}}}}},"/deals/{deal}":{"get":{"operationId":"get_deals_deal","summary":"Get a deal","tags":["Deals"],"description":"Scope: `deals:read`.","parameters":[{"name":"deal","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"deals:read"},"patch":{"operationId":"patch_deals_deal","summary":"Update a deal (only the fields sent)","tags":["Deals"],"description":"Scope: `deals:write`.","parameters":[{"name":"deal","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"deals:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DealUpdate"}}}}},"delete":{"operationId":"delete_deals_deal","summary":"Delete a deal","tags":["Deals"],"description":"Scope: `deals:write`.","parameters":[{"name":"deal","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"Done"},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"deals:write"}},"/deals/{deal}/stage":{"post":{"operationId":"post_deals_deal_stage","summary":"Move a deal to another stage (the same requirements as in the app)","tags":["Deals"],"description":"Scope: `deals:write`.","parameters":[{"name":"deal","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Deal"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"deals:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StageInput"}}}}}},"/deals/{deal}/notes":{"post":{"operationId":"post_deals_deal_notes","summary":"Add a note to a deal","tags":["Notes"],"description":"Scope: `notes:write`.","parameters":[{"name":"deal","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Note"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"notes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteInput"}}}}}},"/merchants":{"get":{"operationId":"get_merchants","summary":"List merchants","tags":["Merchants"],"description":"Scope: `merchants:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[state]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[industry]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[status]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[owner_user_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[contact_type]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[archived]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). true or false"},{"name":"filter[name]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). Exact legal name or DBA, any letter case (one name; a comma is part of it)"}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Merchant"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"merchants:read"},"post":{"operationId":"post_merchants","summary":"Create a merchant","tags":["Merchants"],"description":"Scope: `merchants:write`.","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Merchant"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"merchants:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantInput"}}}}}},"/merchants/{merchant}":{"get":{"operationId":"get_merchants_merchant","summary":"Get a merchant with its owners","tags":["Merchants"],"description":"Scope: `merchants:read`.","parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Merchant"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"merchants:read"},"patch":{"operationId":"patch_merchants_merchant","summary":"Update a merchant (only the fields sent)","tags":["Merchants"],"description":"Scope: `merchants:write`.","parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Merchant"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"merchants:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MerchantInput"}}}}},"delete":{"operationId":"delete_merchants_merchant","summary":"Delete a merchant nothing depends on","tags":["Merchants"],"description":"Scope: `merchants:write`.","parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"Done"},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"merchants:write"}},"/merchants/{merchant}/contacts":{"get":{"operationId":"get_merchants_merchant_contacts","summary":"List a merchant's owners and guarantors","tags":["Merchants"],"description":"Scope: `merchants:read`.","parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[role]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[is_primary]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). true or false"}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"merchants:read"},"post":{"operationId":"post_merchants_merchant_contacts","summary":"Add an owner or guarantor","tags":["Merchants"],"description":"Scope: `merchants:write`.","parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"merchants:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}}}},"/merchants/{merchant}/notes":{"post":{"operationId":"post_merchants_merchant_notes","summary":"Add a note to a merchant","tags":["Notes"],"description":"Scope: `notes:write`.","parameters":[{"name":"merchant","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Note"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"notes:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NoteInput"}}}}}},"/contacts/{contact}":{"get":{"operationId":"get_contacts_contact","summary":"Get an owner or guarantor","tags":["Merchants"],"description":"Scope: `merchants:read`.","parameters":[{"name":"contact","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"merchants:read"},"patch":{"operationId":"patch_contacts_contact","summary":"Update an owner or guarantor","tags":["Merchants"],"description":"Scope: `merchants:write`.","parameters":[{"name":"contact","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Contact"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"merchants:write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContactInput"}}}}},"delete":{"operationId":"delete_contacts_contact","summary":"Remove an owner or guarantor","tags":["Merchants"],"description":"Scope: `merchants:write`.","parameters":[{"name":"contact","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"Done"},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"merchants:write"}},"/lenders":{"get":{"operationId":"get_lenders","summary":"List lenders","tags":["Lenders"],"description":"Scope: `lenders:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[status]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[product_type]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[state]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Lender"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"lenders:read"}},"/lenders/{lender}":{"get":{"operationId":"get_lenders_lender","summary":"Get a lender","tags":["Lenders"],"description":"Scope: `lenders:read`.","parameters":[{"name":"lender","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Lender"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"lenders:read"}},"/submissions":{"get":{"operationId":"get_submissions","summary":"List submissions","tags":["Submissions"],"description":"Scope: `submissions:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[deal_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[lender_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[status]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[channel]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Submission"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"submissions:read"}},"/submissions/{submission}":{"get":{"operationId":"get_submissions_submission","summary":"Get a submission","tags":["Submissions"],"description":"Scope: `submissions:read`.","parameters":[{"name":"submission","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Submission"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"submissions:read"}},"/offers":{"get":{"operationId":"get_offers","summary":"List offers","tags":["Submissions"],"description":"Scope: `submissions:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[deal_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[submission_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[lender_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[status]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Offer"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"submissions:read"}},"/offers/{offer}":{"get":{"operationId":"get_offers_offer","summary":"Get an offer","tags":["Submissions"],"description":"Scope: `submissions:read`.","parameters":[{"name":"offer","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/Offer"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"submissions:read"}},"/funded-deals":{"get":{"operationId":"get_funded_deals","summary":"List funded deals","tags":["Funded"],"description":"Scope: `funded:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[deal_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[merchant_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[lender_id]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[status]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/FundedDeal"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"funded:read"}},"/funded-deals/{fundedDeal}":{"get":{"operationId":"get_funded_deals_fundedDeal","summary":"Get a funded deal","tags":["Funded"],"description":"Scope: `funded:read`.","parameters":[{"name":"fundedDeal","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/FundedDeal"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"funded:read"}},"/users":{"get":{"operationId":"get_users","summary":"List team members (for owner and assignee ids)","tags":["Team"],"description":"Scope: `users:read`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[role]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50)."},{"name":"filter[active]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). true or false"}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/User"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"users:read"}},"/webhooks":{"get":{"operationId":"get_webhooks","summary":"List webhook subscriptions made with API keys","tags":["Webhooks"],"description":"Scope: `webhooks:manage`.","parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":25}},{"name":"cursor","in":"query","schema":{"type":"string"},"description":"meta.next_cursor of the previous page (keep the same sort)"},{"name":"sort","in":"query","schema":{"type":"string","enum":["created_at","-created_at","updated_at","-updated_at"],"default":"-created_at"}},{"name":"updated_since","in":"query","schema":{"type":"string","format":"date-time"},"description":"Only records changed at or after this time"},{"name":"q","in":"query","schema":{"type":"string"},"description":"Search (where the list supports it), at most 8 words"},{"name":"filter[source]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). api or zapier"},{"name":"filter[status]","in":"query","schema":{"type":"string"},"description":"Comma-separated values (at most 50). active, paused or disabled"}],"responses":[{"description":"A page of results","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookSubscription"}},"meta":{"$ref":"#/components/schemas/ListMeta"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"webhooks:manage"},"post":{"operationId":"post_webhooks","summary":"Subscribe a URL to events (201 with the signing secret; repeating the same subscribe with the same key answers 200 with that subscription)","tags":["Webhooks"],"description":"Scope: `webhooks:manage`.","parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry: a repeat with the same key and body within an hour returns the first response instead of writing again"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookSubscriptionCreated"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/Invalid"}],"x-scope":"webhooks:manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookSubscriptionInput"}}}}}},"/webhooks/{webhook}":{"get":{"operationId":"get_webhooks_webhook","summary":"Get a webhook subscription","tags":["Webhooks"],"description":"Scope: `webhooks:manage`.","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookSubscription"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"webhooks:manage"},"delete":{"operationId":"delete_webhooks_webhook","summary":"Unsubscribe","tags":["Webhooks"],"description":"Scope: `webhooks:manage`.","parameters":[{"name":"webhook","in":"path","required":true,"schema":{"type":"string"},"description":"ULID"}],"responses":[{"description":"Done"},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"webhooks:manage"}},"/events":{"get":{"operationId":"get_events","summary":"The webhook event types, each with a sample","tags":["Webhooks"],"description":"Scope: `webhooks:manage`.","parameters":[],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/EventCatalog"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"}],"x-scope":"webhooks:manage"}},"/events/{type}/samples":{"get":{"operationId":"get_events_type_samples","summary":"Recent events of one type, from your own records, newest first (shaped like deliveries)","tags":["Webhooks"],"description":"Scope: `webhooks:manage`.","parameters":[{"name":"type","in":"path","required":true,"schema":{"type":"string"},"description":"An event type, like lead.created"}],"responses":[{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#/components/schemas/WebhookEventList"}}}}}},{"$ref":"#/components/responses/Unauthenticated"},{"$ref":"#/components/responses/PaymentRequired"},{"$ref":"#/components/responses/Forbidden"},{"$ref":"#/components/responses/RateLimited"},{"$ref":"#/components/responses/NotFound"}],"x-scope":"webhooks:manage"}}},"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"An API key (flk_...). Scopes: leads:read, leads:write, deals:read, deals:write, merchants:read, merchants:write, notes:write, lenders:read, submissions:read, funded:read, users:read, webhooks:manage."}},"schemas":{"Lead":{"type":"object","description":"A lead (before it becomes a merchant and a deal).","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"status":{"type":"string","enum":["new","hot","cold","attempting","app_out","duplicate","converted","future","not_responsive","dead","disqualified","dnc","bad_data"]},"status_label":{"type":"string"},"business_name":{"type":["string","null"]},"dba":{"type":["string","null"]},"display_name":{"type":"string"},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"alt_email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"alt_phone":{"type":["string","null"]},"website":{"type":["string","null"]},"address_line1":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"industry":{"type":["string","null"]},"entity_type":{"type":["string","null"],"enum":["llc","corporation","s_corp","sole_prop","partnership","nonprofit","other",null]},"ein_masked":{"type":["string","null"]},"has_ein":{"type":"boolean"},"monthly_revenue":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"requested_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"business_start_date":{"type":["string","null"],"format":"date"},"time_in_business_months":{"type":["integer","null"]},"credit_score_range":{"type":["string","null"]},"existing_positions_count":{"type":["integer","null"]},"use_of_funds":{"type":["string","null"]},"campaign":{"type":["string","null"]},"contact_type":{"type":"string","enum":["merchant","referral_partner","lender_contact"]},"is_test":{"type":"boolean"},"lead_source_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"assigned_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"received_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"next_follow_up_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"first_contacted_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"last_contacted_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"contact_attempts":{"type":"integer"},"disqualified_reason":{"type":["string","null"]},"converted_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"converted_merchant_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"converted_deal_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true},"notes":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","status","status_label","business_name","dba","display_name","first_name","last_name","title","email","alt_email","phone","mobile_phone","alt_phone","website","address_line1","city","state","postal_code","industry","entity_type","ein_masked","has_ein","monthly_revenue","requested_amount","business_start_date","time_in_business_months","credit_score_range","existing_positions_count","use_of_funds","campaign","contact_type","is_test","lead_source_id","assigned_user_id","received_at","next_follow_up_at","first_contacted_at","last_contacted_at","contact_attempts","disqualified_reason","converted_at","converted_merchant_id","converted_deal_id","tags","custom","notes","created_at","updated_at"]},"Deal":{"type":"object","description":"A deal: one funding request for a merchant, moving through the pipeline.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"title":{"type":["string","null"]},"display_name":{"type":"string"},"merchant_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lead_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"stage":{"type":"string","enum":["app_in","ready_for_submission","funder_reviewing","offers_in","merchant_reviewing_offer","offer_accepted","merchant_reviewing_contracts","contracts_signed","funded","paid_in_full","defaulted","in_collections","in_legal","funder_declined","clawback","internal_declined","merchant_declined","write_off","do_not_contact","future","not_responsive","dead"]},"stage_label":{"type":"string"},"phase":{"type":"string","enum":["lead","opportunity","closed_won","closed_lost","nurture"]},"stage_entered_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"deal_type":{"type":"string","enum":["new","renewal","add_on","consolidation","reverse_consolidation"]},"product_type":{"type":["string","null"],"enum":["mca","sba_7a","sba_express","sba_504","loc","term_loan","equipment","factoring","rbf",null]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"requested_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"requested_term_months":{"type":["integer","null"]},"use_of_funds":{"type":["string","null"]},"expected_close_date":{"type":["string","null"],"format":"date"},"owner_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"processor_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"underwriter_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lead_source_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"funder_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"parent_deal_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lost_reason":{"type":["string","null"]},"lost_reason_label":{"type":["string","null"]},"lost_note":{"type":["string","null"]},"closed_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","title","display_name","merchant_id","lead_id","stage","stage_label","phase","stage_entered_at","deal_type","product_type","priority","requested_amount","requested_term_months","use_of_funds","expected_close_date","owner_user_id","processor_user_id","underwriter_user_id","lead_source_id","funder_id","parent_deal_id","lost_reason","lost_reason_label","lost_note","closed_at","tags","custom","created_at","updated_at"]},"Merchant":{"type":"object","description":"A merchant (the business). The EIN is only ever masked.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"legal_name":{"type":"string"},"dba":{"type":["string","null"]},"display_name":{"type":"string"},"entity_type":{"type":["string","null"],"enum":["llc","corporation","s_corp","sole_prop","partnership","nonprofit","other",null]},"ein_masked":{"type":["string","null"]},"has_ein":{"type":"boolean"},"industry":{"type":["string","null"]},"date_established":{"type":["string","null"],"format":"date"},"state_of_incorporation":{"type":["string","null"]},"address_line1":{"type":["string","null"]},"address_line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"website":{"type":["string","null"]},"monthly_revenue_stated":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"status":{"type":"string","enum":["prospect","active","funded","inactive","do_not_contact"]},"contact_type":{"type":"string","enum":["merchant","referral_partner","lender_contact"]},"is_test":{"type":"boolean"},"owner_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lead_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"archived_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true},"notes":{"type":["string","null"]},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/Contact"}},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","legal_name","dba","display_name","entity_type","ein_masked","has_ein","industry","date_established","state_of_incorporation","address_line1","address_line2","city","state","postal_code","phone","email","website","monthly_revenue_stated","status","contact_type","is_test","owner_user_id","lead_id","archived_at","tags","custom","notes","created_at","updated_at"]},"Contact":{"type":"object","description":"An owner or guarantor of a merchant. SSN, date of birth and licence number are never returned: only whether one is on file.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"merchant_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"role":{"type":"string","enum":["owner","guarantor","accountant","other"]},"is_primary":{"type":"boolean"},"first_name":{"type":"string"},"last_name":{"type":["string","null"]},"full_name":{"type":["string","null"]},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"alt_email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"alt_phone":{"type":["string","null"]},"ownership_pct":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"credit_score":{"type":["integer","null"]},"credit_score_date":{"type":["string","null"],"format":"date"},"address_line1":{"type":["string","null"]},"address_line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"has_ssn":{"type":"boolean"},"has_dob":{"type":"boolean"},"has_dl_number":{"type":"boolean"},"notes":{"type":["string","null"]},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","merchant_id","role","is_primary","first_name","last_name","full_name","title","email","alt_email","phone","mobile_phone","alt_phone","ownership_pct","credit_score","credit_score_date","address_line1","address_line2","city","state","postal_code","has_ssn","has_dob","has_dl_number","notes","created_at","updated_at"]},"Lender":{"type":"object","description":"A lender in the workspace's directory and its headline criteria.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"name":{"type":"string"},"legal_name":{"type":["string","null"]},"status":{"type":["string","null"],"enum":["active","inactive",null]},"product_type":{"type":["string","null"],"enum":["mca","sba_7a","sba_express","sba_504","loc","term_loan","equipment","factoring","rbf",null]},"products":{"type":"array","items":{"type":"string"}},"tier":{"type":["string","null"],"enum":["a","b","c","d",null]},"website":{"type":["string","null"]},"phone":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"submission_channel":{"type":["string","null"],"enum":["email","portal","api","manual",null]},"submission_email":{"type":["string","null"]},"min_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"max_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"min_revenue_monthly":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"min_tib_months":{"type":["integer","null"]},"min_credit_score":{"type":["integer","null"]},"max_positions":{"type":["integer","null"]},"restricted_industries":{"type":"array","items":{"type":"string"}},"restricted_states":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","name","legal_name","status","product_type","products","tier","website","phone","city","state","submission_channel","submission_email","min_amount","max_amount","min_revenue_monthly","min_tib_months","min_credit_score","max_positions","restricted_industries","restricted_states","created_at","updated_at"]},"Submission":{"type":"object","description":"A deal sent to one lender.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"deal_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lender_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"channel":{"type":"string","enum":["email","portal","api","manual"]},"status":{"type":"string","enum":["queued","submitted","in_progress","prequalified","prequal_rejected","approved","cond_approved","declined","does_not_qualify","rejected_resubmit","error","withdrawn","funded"]},"status_label":{"type":"string"},"status_updated_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"sent_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"response_due_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"decline_reasons":{"type":"array","items":{"type":"string"}},"resubmit_of_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","deal_id","lender_id","channel","status","status_label","status_updated_at","sent_at","response_due_at","decline_reasons","resubmit_of_id","created_at","updated_at"]},"Offer":{"type":"object","description":"A lender's offer on a deal.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"deal_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"submission_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lender_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"status":{"type":"string","enum":["draft","pending","presented","accepted","rejected","expired","countered","superseded"]},"product_type":{"type":["string","null"],"enum":["mca","sba_7a","sba_express","sba_504","loc","term_loan","equipment","factoring","rbf",null]},"advance_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"factor_rate":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"interest_rate_pct":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"apr_estimate":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"payback_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"net_funding":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"origination_fee_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"payment_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"payment_frequency":{"type":["string","null"],"enum":["daily","weekly","biweekly","monthly","split_percent",null]},"n_payments":{"type":["integer","null"]},"term_months":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"holdback_pct":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"expires_at":{"type":["string","null"],"format":"date"},"presented_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"selected_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","deal_id","submission_id","lender_id","status","product_type","advance_amount","factor_rate","interest_rate_pct","apr_estimate","payback_amount","net_funding","origination_fee_amount","payment_amount","payment_frequency","n_payments","term_months","holdback_pct","expires_at","presented_at","selected_at","created_at","updated_at"]},"FundedDeal":{"type":"object","description":"A funded deal and how it is paying back.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"deal_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"merchant_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lender_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"offer_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"status":{"type":"string","enum":["performing","behind","nsf_returns","modified","default","collections","legal","settled","written_off","paid_off","renewed","cancelled"]},"product_type":{"type":["string","null"],"enum":["mca","sba_7a","sba_express","sba_504","loc","term_loan","equipment","factoring","rbf",null]},"funded_at":{"type":["string","null"],"format":"date"},"funded_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"net_funded":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"payback_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"factor_rate":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"interest_rate_pct":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"term_months":{"type":["integer","null"]},"payment_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"frequency":{"type":["string","null"],"enum":["daily","weekly","biweekly","monthly","split_percent",null]},"n_payments":{"type":["integer","null"]},"position_number":{"type":["integer","null"]},"estimated_end_date":{"type":["string","null"],"format":"date"},"amount_remitted":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"pct_paid":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"balance_remaining":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"last_payment_date":{"type":["string","null"],"format":"date"},"renewal_eligible_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"renewal_deal_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"paid_off_at":{"type":["string","null"],"format":"date"},"default_date":{"type":["string","null"],"format":"date"},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","deal_id","merchant_id","lender_id","offer_id","status","product_type","funded_at","funded_amount","net_funded","payback_amount","factor_rate","interest_rate_pct","term_months","payment_amount","frequency","n_payments","position_number","estimated_end_date","amount_remitted","pct_paid","balance_remaining","last_payment_date","renewal_eligible_at","renewal_deal_id","paid_off_at","default_date","created_at","updated_at"]},"User":{"type":"object","description":"A team member: for owner and assignee fields.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"name":{"type":"string"},"role":{"type":"string","enum":["owner","manager","agent","processor","readonly"]},"active":{"type":"boolean"}},"required":["object","id","name","role","active"]},"LeadSource":{"type":"object","description":"Where leads come from.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"name":{"type":"string"},"type":{"type":"string","enum":["web_form","live_transfer","ucc_list","aged_lead","mailer","referral","renewal","funder_referral","import","other"]},"active":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","description":"UTC"},"updated_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","name","type","active","created_at","updated_at"]},"Note":{"type":"object","description":"A note on a lead, deal or merchant's timeline.","properties":{"object":{"type":"string"},"id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"subject_type":{"type":"string"},"subject_id":{"type":"string","description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"body":{"type":"string"},"note_type":{"type":"string","enum":["general","call","sales","underwriting","compliance","legal","document","payment"]},"occurred_at":{"type":"string","format":"date-time","description":"UTC"},"created_at":{"type":"string","format":"date-time","description":"UTC"}},"required":["object","id","subject_type","subject_id","body","note_type","occurred_at","created_at"]},"LeadInput":{"type":"object","description":"Normalized like the app: phones to E.164, states to two letters, emails lower-case. A new lead needs a business name, contact name, phone or email.","properties":{"business_name":{"type":["string","null"]},"dba":{"type":["string","null"]},"first_name":{"type":["string","null"]},"last_name":{"type":["string","null"]},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"alt_email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"alt_phone":{"type":["string","null"]},"website":{"type":["string","null"]},"address_line1":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"industry":{"type":["string","null"]},"entity_type":{"type":["string","null"],"enum":["llc","corporation","s_corp","sole_prop","partnership","nonprofit","other",null]},"ein":{"type":["string","null"]},"monthly_revenue":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"requested_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"business_start_date":{"type":["string","null"],"format":"date"},"time_in_business_months":{"type":["integer","null"]},"credit_score_range":{"type":["string","null"]},"existing_positions_count":{"type":["integer","null"]},"use_of_funds":{"type":["string","null"]},"campaign":{"type":["string","null"]},"received_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"next_follow_up_at":{"type":["string","null"],"format":"date-time","description":"UTC"},"lead_source_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"contact_type":{"type":"string","enum":["merchant","referral_partner","lender_contact"]},"is_test":{"type":"boolean"},"assigned_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"status":{"type":"string","enum":["new","hot","cold","attempting","app_out","duplicate","converted","future","not_responsive","dead","disqualified","dnc","bad_data"]},"disqualified_reason":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"notes":{"type":["string","null"]},"custom":{"type":"object","additionalProperties":true},"move_tasks":{"type":"boolean"}}},"DealInput":{"type":"object","description":"Give merchant_id, or merchant (and optionally contact) to create the merchant with the deal: that also needs the merchants:write scope (403 insufficient_scope otherwise). A new merchant with an EIN already on file is refused; only keys with merchants:read are told more. A deal starts in App in.","properties":{"merchant_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"merchant":{"type":"object","additionalProperties":true},"contact":{"type":"object","additionalProperties":true},"title":{"type":["string","null"]},"deal_type":{"type":["string","null"],"enum":["new","renewal","add_on","consolidation","reverse_consolidation",null]},"product_type":{"type":["string","null"],"enum":["mca","sba_7a","sba_express","sba_504","loc","term_loan","equipment","factoring","rbf",null]},"priority":{"type":["string","null"],"enum":["low","normal","high","urgent",null]},"requested_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"requested_term_months":{"type":["integer","null"]},"use_of_funds":{"type":["string","null"]},"expected_close_date":{"type":["string","null"],"format":"date"},"owner_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"processor_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lead_source_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"parent_deal_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true}}},"DealUpdate":{"type":"object","description":"Pricing, the payment schedule, the broker and the lender are changed in the app.","properties":{"title":{"type":["string","null"]},"deal_type":{"type":"string","enum":["new","renewal","add_on","consolidation","reverse_consolidation"]},"priority":{"type":"string","enum":["low","normal","high","urgent"]},"product_type":{"type":"string","enum":["mca","sba_7a","sba_express","sba_504","loc","term_loan","equipment","factoring","rbf"]},"requested_amount":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"requested_term_months":{"type":["integer","null"]},"use_of_funds":{"type":["string","null"]},"expected_close_date":{"type":["string","null"],"format":"date"},"owner_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"move_tasks":{"type":"boolean"},"processor_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"lead_source_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true}}},"StageInput":{"type":"object","description":"Declined stages need lost_reason (see GET /meta). A 422 stage_guard lists what is missing; a manager key may resend with override=true.","properties":{"stage":{"type":"string","enum":["app_in","ready_for_submission","funder_reviewing","offers_in","merchant_reviewing_offer","offer_accepted","merchant_reviewing_contracts","contracts_signed","funded","paid_in_full","defaulted","in_collections","in_legal","funder_declined","clawback","internal_declined","merchant_declined","write_off","do_not_contact","future","not_responsive","dead"]},"note":{"type":["string","null"]},"lost_reason":{"type":["string","null"]},"lost_note":{"type":["string","null"]},"override":{"type":"boolean"}},"required":["stage"]},"MerchantInput":{"type":"object","description":"A new merchant needs legal_name. A duplicate EIN is refused.","properties":{"legal_name":{"type":"string"},"dba":{"type":["string","null"]},"entity_type":{"type":["string","null"],"enum":["llc","corporation","s_corp","sole_prop","partnership","nonprofit","other",null]},"ein":{"type":["string","null"]},"industry":{"type":["string","null"]},"date_established":{"type":["string","null"],"format":"date"},"state_of_incorporation":{"type":["string","null"]},"address_line1":{"type":["string","null"]},"address_line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"phone":{"type":["string","null"]},"email":{"type":["string","null"]},"website":{"type":["string","null"]},"monthly_revenue_stated":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"status":{"type":"string","enum":["prospect","active","funded","inactive","do_not_contact"]},"contact_type":{"type":"string","enum":["merchant","referral_partner","lender_contact"]},"is_test":{"type":"boolean"},"notes":{"type":["string","null"]},"owner_user_id":{"type":["string","null"],"description":"ULID","example":"01jcz8y3p7m4x6q2r9t5v0w8kd"},"tags":{"type":"array","items":{"type":"string"}},"custom":{"type":"object","additionalProperties":true}},"required":["legal_name"]},"ContactInput":{"type":"object","description":"SSN, date of birth and driver's licence number are entered in the app, never through the API (sending one is a 422). Ownership stays within 100% across a merchant's owners.","properties":{"role":{"type":"string","enum":["owner","guarantor","accountant","other"]},"first_name":{"type":"string"},"last_name":{"type":["string","null"]},"title":{"type":["string","null"]},"email":{"type":["string","null"]},"phone":{"type":["string","null"]},"mobile_phone":{"type":["string","null"]},"alt_phone":{"type":["string","null"]},"alt_email":{"type":["string","null"]},"ownership_pct":{"type":["string","null"],"format":"decimal","description":"A decimal as a string","example":"50000.00"},"address_line1":{"type":["string","null"]},"address_line2":{"type":["string","null"]},"city":{"type":["string","null"]},"state":{"type":["string","null"]},"postal_code":{"type":["string","null"]},"credit_score":{"type":["integer","null"]},"credit_score_date":{"type":["string","null"],"format":"date"},"dl_state":{"type":["string","null"]},"is_primary":{"type":"boolean"},"notes":{"type":["string","null"]}},"required":["first_name"]},"NoteInput":{"type":"object","description":"A note on the record's timeline, shown as written by the key.","properties":{"body":{"type":"string"},"note_type":{"type":"string","enum":["general","call","sales","underwriting","compliance","legal","document","payment"]}},"required":["body"]},"WebhookSubscription":{"type":"object","description":"A REST-hook subscription made with an API key. Endpoints made in Settings are not listed.","required":["object","id","url","events","description","source","status","disabled_reason","created_at","updated_at"],"properties":{"object":{"type":"string","const":"webhook_subscription"},"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["*","lead.created","lead.updated","lead.converted","lead.imported","merchant.created","deal.created","deal.stage_changed","submission.status_changed","offer.received","deal.funded"]}},"description":{"type":["string","null"]},"source":{"type":"string","enum":["api","zapier"]},"status":{"type":"string","enum":["active","paused","disabled"]},"disabled_reason":{"type":["string","null"],"enum":["failing","gone",null]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}},"WebhookSubscriptionCreated":{"type":"object","description":"The new subscription, with its signing secret: shown only in this answer.","required":["object","id","url","events","description","source","status","disabled_reason","created_at","updated_at","secret"],"properties":{"object":{"type":"string","const":"webhook_subscription"},"id":{"type":"string"},"url":{"type":"string","format":"uri"},"events":{"type":"array","items":{"type":"string","enum":["*","lead.created","lead.updated","lead.converted","lead.imported","merchant.created","deal.created","deal.stage_changed","submission.status_changed","offer.received","deal.funded"]}},"description":{"type":["string","null"]},"source":{"type":"string","enum":["api","zapier"]},"status":{"type":"string","enum":["active","paused","disabled"]},"disabled_reason":{"type":["string","null"],"enum":["failing","gone",null]},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"secret":{"type":"string","description":"whsec_...: verify each delivery's webhook-signature with it (Standard Webhooks)"}}},"WebhookSubscriptionInput":{"type":"object","description":"Public https URLs only. url may be sent as target_url, and one event as event (the Zapier REST Hook shape). Each event type also needs its read scope (GET /events, required_scope; \"*\" needs all of them), else 403 insufficient_scope. A 410 Gone from the URL removes the subscription; revoking the key, or removing a scope, stops its events.","required":["url","events"],"properties":{"url":{"type":"string","format":"uri"},"events":{"type":"array","minItems":1,"items":{"type":"string","enum":["*","lead.created","lead.updated","lead.converted","lead.imported","merchant.created","deal.created","deal.stage_changed","submission.status_changed","offer.received","deal.funded"]}},"description":{"type":["string","null"]},"source":{"type":"string","enum":["api","zapier"],"default":"api"}}},"WebhookEvent":{"type":"object","description":"A webhook delivery's body. data.object is the record's v1 object; previous (updates) holds the old values of what changed.","required":["id","type","created_at","api_version","organization_id","data"],"properties":{"id":{"type":"string","description":"Same as the webhook-id header"},"type":{"type":"string","enum":["lead.created","lead.updated","lead.converted","lead.imported","merchant.created","deal.created","deal.stage_changed","submission.status_changed","offer.received","deal.funded","webhook.test"]},"created_at":{"type":"string","format":"date-time"},"api_version":{"type":"string"},"organization_id":{"type":"string"},"data":{"type":"object","properties":{"object":{"type":"object"}}},"previous":{"type":"object"}}},"WebhookEventList":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEvent"}},"EventCatalog":{"type":"object","properties":{"events":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"label":{"type":"string"},"description":{"type":"string"},"object":{"type":"string"},"required_scope":{"type":["string","null"],"description":"The read scope a key needs, besides webhooks:manage, to subscribe to this event or read its samples"},"sample":{"$ref":"#/components/schemas/WebhookEvent"}}}},"api_version":{"type":"string"},"max_attempts":{"type":"integer"}}},"Error":{"type":"object","required":["message","error"],"properties":{"message":{"type":"string","description":"Human-readable; safe to show"},"error":{"type":"string","description":"Stable machine code","examples":["unauthenticated","insufficient_scope","forbidden","not_found","validation_failed","feature_locked","billing_inactive","too_many_requests","stage_guard","idempotency_key_reused"]},"errors":{"type":"object","description":"Field => messages, on validation_failed","additionalProperties":{"type":"array","items":{"type":"string"}}}}},"ListMeta":{"type":"object","properties":{"next_cursor":{"type":["string","null"],"description":"Pass as ?cursor= for the next page; null on the last page"},"has_more":{"type":"boolean"},"limit":{"type":"integer"}}}},"responses":{"Unauthenticated":{"description":"Missing, invalid, revoked or expired key (unauthenticated)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"PaymentRequired":{"description":"The API add-on is not on (feature_locked) or the workspace is unpaid and read-only (billing_inactive)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"The key lacks the scope (insufficient_scope) or its role cannot do this (forbidden); or the workspace is suspended or limited by IP","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NotFound":{"description":"No such record in this workspace (not_found)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Invalid":{"description":"Validation failed (validation_failed, with errors) or a business rule refused the change (stage_guard...)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"RateLimited":{"description":"Too many requests for this key (too_many_requests); see Retry-After","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}