Suggest a registration from a website

POST /v1/registrations/prefill

Reads the public pages of the website (homepage plus the sign-up, contact, privacy and terms pages it links to) and returns suggestions for a registration: business name, legal name when the site states one, use case, description, opt-in / privacy / terms URLs with ranked candidates, support email, contact phone, address and industry. Creates and files nothing. EIN and entity type are never suggested. Names, contact details and URLs are read with fixed rules; where AI drafting is available (ai: true) a third-party AI model drafts the description, use case, industry and three starter example messages from the same public page text, and every field it returns is validated. Review the fields, then send them to POST /registrations (drafted examples as starter_messages, or as sample_messages once they are yours). One read per website per account every 10 minutes; 10 websites a minute.

Send your API key as a bearer token: Authorization: Bearer ssms_sk_.... Test keys run this endpoint against the sandbox; see Authentication for key modes and scopes.

Request body

JSON (Content-Type: application/json).

FieldTypeRequiredDescription
websitestring (uri)YesExample: https://acmeplumbing.com.

Responses

StatusMeaningBody
200Suggestions (reachable: false when the site could not be read)RegistrationPrefill
400Invalid websiteError
401Missing, malformed, or revoked API keyError
402Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or chargedError
429Rate limit or quota exceededError

200: RegistrationPrefill fields

FieldTypeDescription
objectregistration_prefill
reachablebooleanfalse = the website could not be read; fields then holds only the website
errorstringWhy the site could not be read Nullable.
fieldsobjectSuggestions, shaped like RegistrationInput. Only fields we found are present.
fields.websitestring (uri)
fields.business_namestring
fields.use_casestring
fields.descriptionstringAt most 500 characters.
fields.opt_in_urlstring (uri)
fields.privacy_urlstring (uri)
fields.terms_urlstring (uri)
fields.support_emailstring (email)
fields.sample_messagesarray of stringStarter drafts written for this business (AI drafting only). Send them as starter_messages.
fields.brandobjectNever includes ein or entity_type.
fields.brand.legal_namestring
fields.brand.streetstring
fields.brand.citystring
fields.brand.statestring
fields.brand.postal_codestring
fields.brand.countrystring
fields.brand.verticalPROFESSIONAL, REAL_ESTATE, HEALTHCARE, HUMAN_RESOURCES, ENERGY, ENTERTAINMENT, RETAIL, TRANSPORTATION, AGRICULTURE, INSURANCE, POSTAL, EDUCATION, HOSPITALITY, FINANCIAL, LEGAL, CONSTRUCTION, NGO, MANUFACTURING, GOVERNMENT, TECHNOLOGY, COMMUNICATION
fields.brand.contact_emailstring
fields.brand.contact_phonestring
suggestedarray of stringDotted names of every field filled in, e.g. business_name, brand.city
sourcesobjectWhere each suggested field came from: page = read from your pages by fixed rules; ai = drafted or chosen by an AI model
candidatesobjectPages that could be the opt-in, privacy policy and terms, best first
candidates.opt_inarray of object
candidates.opt_in[].urlstring (uri)
candidates.opt_in[].confidencenumberMaximum 1. Minimum 0.
candidates.opt_in[].reasonstring
candidates.privacyarray of object
candidates.privacy[].urlstring (uri)
candidates.privacy[].confidencenumberMaximum 1. Minimum 0.
candidates.privacy[].reasonstring
candidates.termsarray of object
candidates.terms[].urlstring (uri)
candidates.terms[].confidencenumberMaximum 1. Minimum 0.
candidates.terms[].reasonstring
aboutstringWhat the site says the business is (its meta description) Nullable.
aibooleantrue when an AI model drafted any of these suggestions

Errors

StatusWhen
400Invalid website
401Missing, malformed, or revoked API key
402Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged
429Rate limit or quota exceeded

Every error has the same JSON shape, and request_id matches the X-Request-Id response header. Errors lists every code and what to do about it.

json
{
  "error": {
    "code": "invalid_request",
    "message": "What went wrong, in plain words.",
    "param": "the_field",
    "request_id": "req_a1B2c3D4e5F6g7H8"
  }
}

Examples

curl

bash
curl -X POST "https://api.joinsimplesms.com/v1/registrations/prefill" \
  -H "Authorization: Bearer $SIMPLESMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "website": "https://acmeplumbing.com"
}'

Node.js

The Node.js SDK does not wrap this endpoint yet; call it with fetch.

javascript
const res = await fetch('https://api.joinsimplesms.com/v1/registrations/prefill', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SIMPLESMS_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "website": "https://acmeplumbing.com"
  }),
});

if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();

Python

The Python SDK does not wrap this endpoint yet; call it over HTTP.

python
import json, os, urllib.request

req = urllib.request.Request(
    "https://api.joinsimplesms.com/v1/registrations/prefill",
    method="POST",
    headers={
        "Authorization": f"Bearer {os.environ['SIMPLESMS_API_KEY']}",
        "Content-Type": "application/json",
    },
    data=json.dumps({
        "website": "https://acmeplumbing.com"
    }).encode(),
)
with urllib.request.urlopen(req) as res:
    data = json.load(res)