SMS Consent API

Record an affirmative SMS-consent receipt from your own website. Each credential is limited to one sending phone number and one website domain.

Create a credential

  1. Open Text settings and choose Consent API.
  2. Select the sending number, enter a credential name, and enter the website domain. Turn on Create a CRM lead if submissions should also appear in CRM Leads. The credential name is the lead source; you can rename it later.
  3. Use the canonical hostname, such as example.com or forms.example.com. We normalize https://www.example.com/ to example.com.
  4. Copy the key. You can return to the same settings row to Reveal key, Rotate key, or Revoke it later.

Send the receipt from your server

Call this endpoint only from your website's server. Do not put the credential in browser JavaScript or a public form.

curl -X POST https://app.centerleap.com/api/public/sms/consent \
  -H "Content-Type: application/json" \
  -H "X-CenterLeap-Consent-Key: $CENTERLEAP_SMS_CONSENT_KEY" \
  -d '{
    "phone": "+15551234567",
    "consent_text": "I agree to receive text messages from Example Company.",
    "source_url": "https://example.com/contact",
    "data": {
      "business_name": "Example Company",
      "contact_name": "Jane Doe",
      "email": "jane@example.com"
    }
  }'

phone, consent_text, and source_url are required. source_url must be a page on the credential's approved domain. Store the exact wording your visitor accepted in consent_text.

data is optional JSON captured with the consent receipt. Use it for your form's context, such as business_name, contact_name, and email. It accepts a bounded JSON object (maximum 16 KB, three levels deep); field names use letters, numbers, underscores, or hyphens. If the credential has Create a CRM lead on, those fields also become a CRM lead. The lead source is the credential name. Consent is recorded either way.

What CenterLeap records

The receipt is attached to the exact sending phone number and records the recipient, consent text, source URL, time, and credential. A STOP from the recipient and future send enforcement are also sender-specific.

Your organization is responsible for the consent form, disclosure wording, and the lawful basis for sending messages.