/v1/tenants/{tenant_id}/sms-consentAuthentication
Bearer API key or Facily session, subject to permissions and facility scope.
Authentication and scopeRequest example
Replace bracketed path values with real IDs from your environment. The body, where shown, is generated from the schema and uses illustrative values.
curl --request DELETE \
--url 'https://api.staging.facily.ai/v1/tenants/<TENANT_ID>/sms-consent' \
--header "Authorization: Bearer $FACILY_API_KEY"Parameters
tenant_idpath · stringrequiredFormat: uuid
reasonquery · string | nullFree-text note recorded on the audit entry. Never stored on the tenant record, which carries no free-text field by design.
Max length: 500
Responses
Expand a status to inspect its schema. Generated examples show structure and synthetic values.
200Successful Response
{
"data": {
"preferences": {
"email_suppressed": false,
"invoice_delivery": "string",
"marketing_sms_opt_in_evidence_id": "00000000-0000-4000-8000-000000000001",
"marketing_sms_opt_in_recorded_by": "00000000-0000-4000-8000-000000000001",
"marketing_sms_opt_in_source": "string",
"marketing_sms_opted_in_at": "2026-10-29T12:00:00Z",
"marketing_sms_revoked_at": "2026-10-29T12:00:00Z",
"preferred_channels": [
"string"
],
"sms_opt_in_evidence_id": "00000000-0000-4000-8000-000000000001",
"sms_opt_in_recorded_by": "00000000-0000-4000-8000-000000000001",
"sms_opt_in_source": "storedge_import",
"sms_opted_in_at": "2026-10-29T12:00:00Z"
},
"sms_suppression_active": false,
"consent_recorded_by_name": "string",
"marketing_sms_blocked_reason": "string",
"sms_blocked_reason": "string"
},
"meta": {
"request_id": "string"
}
}application/json
dataCommunicationPreferencesResponserequiredShow data schema
consent_recorded_by_namestring | nullDisplay name of the user who recorded the SMS consent, resolved from sms_opt_in_recorded_by. Null when there is no consent, when a system path recorded it, or when the id no longer resolves.
Show consent_recorded_by_name schema
string | nullDisplay name of the user who recorded the SMS consent, resolved from sms_opt_in_recorded_by. Null when there is no consent, when a system path recorded it, or when the id no longer resolves.
Variant 1: string
stringVariant 2: null
nullmarketing_sms_blocked_reasonstring | nullWhy a PROMOTIONAL text to this tenant would be refused, or null. One of `no_phone`, `sms_opted_out`, `marketing_sms_no_recorded_consent`, `marketing_sms_revoked`, `active-suppression`. Marketing SMS is not sent yet; this reports the consent that has accrued.
Show marketing_sms_blocked_reason schema
string | nullWhy a PROMOTIONAL text to this tenant would be refused, or null. One of `no_phone`, `sms_opted_out`, `marketing_sms_no_recorded_consent`, `marketing_sms_revoked`, `active-suppression`. Marketing SMS is not sent yet; this reports the consent that has accrued.
Variant 1: string
stringVariant 2: null
nullpreferencesTenantCommunicationPreferencesrequiredHow one tenant has agreed to be contacted (design 6.4).
Show preferences schema
email_suppressedbooleanDefault: false
invoice_deliverystring | nullShow invoice_delivery schema
string | nullVariant 1: string
stringVariant 2: null
nullmarketing_sms_opt_in_evidence_idstring | nullFormat: uuid
Show marketing_sms_opt_in_evidence_id schema
string | nullVariant 1: string
stringVariant 2: null
nullmarketing_sms_opt_in_recorded_bystring | nullFormat: uuid
Show marketing_sms_opt_in_recorded_by schema
string | nullVariant 1: string
stringVariant 2: null
nullmarketing_sms_opt_in_sourcestring | nullShow marketing_sms_opt_in_source schema
string | nullVariant 1: string
stringVariant 2: null
nullmarketing_sms_opted_in_atstring | nullFormat: date-time
Show marketing_sms_opted_in_at schema
string | nullVariant 1: string
stringVariant 2: null
nullmarketing_sms_revoked_atstring | nullFormat: date-time
Show marketing_sms_revoked_at schema
string | nullVariant 1: string
stringVariant 2: null
nullpreferred_channelsstring[]Show preferred_channels schema
stringsms_opt_in_evidence_idstring | nullFormat: uuid
Show sms_opt_in_evidence_id schema
string | nullVariant 1: string
stringVariant 2: null
nullsms_opt_in_recorded_bystring | nullFormat: uuid
Show sms_opt_in_recorded_by schema
string | nullVariant 1: string
stringVariant 2: null
nullsms_opt_in_sourcestring | nullValues: "storedge_import", "staff_in_person", "staff_phone", "signed_document", "inbound_sms_start", "web_form", "partner"
Show sms_opt_in_source schema
string | nullVariant 1: string
stringValues: "storedge_import", "staff_in_person", "staff_phone", "signed_document", "inbound_sms_start", "web_form", "partner"
Variant 2: null
nullsms_opted_in_atstring | nullFormat: date-time
Show sms_opted_in_at schema
string | nullVariant 1: string
stringVariant 2: null
nullsms_opted_outbooleanDefault: false
sms_blocked_reasonstring | nullWhy an SMS to this tenant would be refused today, or null if it would not be. One of `no_phone`, `sms_opted_out`, `sms_no_recorded_consent`, `active-suppression`, reported in the order the send path would hit them. A preference for SMS does not override this.
Show sms_blocked_reason schema
string | nullWhy an SMS to this tenant would be refused today, or null if it would not be. One of `no_phone`, `sms_opted_out`, `sms_no_recorded_consent`, `active-suppression`, reported in the order the send path would hit them. A preference for SMS does not override this.
Variant 1: string
stringVariant 2: null
nullsms_suppression_activebooleanrequiredWhether this tenant's number carries an active platform-wide SMS suppression. Its only other source is the org-wide suppression list, which needs communication.configure.
metaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired400Validation error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired401Unauthenticated
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired403Permission denied
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired404Not found
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired409Business logic error
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired503Temporary failure
{
"error": {
"code": "string",
"message": "string",
"details": {}
},
"meta": {
"request_id": "string"
}
}application/json
errorErrorBodyrequiredThe shape of error.* in an error response.
Show error schema
codestringrequireddetailsobject | nullShow details schema
object | nullVariant 1: object
objectVariant 2: null
nullmessagestringrequiredmetaMetarequiredEnvelope metadata. Every response carries one.
Show meta schema
request_idstringrequired