Skip to main content

SMS fallback

Every call needs Authorization: Bearer <key>. 7 calls:

List SMS connections​

GET /v1/sms-connections

The workspace's own SMS provider accounts for SMS fallback. Auth tokens are never returned.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
dataobject[]
data[].account_sidstring
data[].auth_token_last4stringLast four characters of the auth token. Up to 4 characters.
data[].compliance_confirmed_atstring (date-time) or nullISO 8601 timestamp.
data[].compliance_confirmed_bystring (uuid) or nullUser who confirmed compliance.
data[].created_atstring (date-time)ISO 8601 timestamp.
data[].from_numbersstring[]
data[].has_auth_tokenboolean
data[].idstringSMS connection id (smc_...).
data[].inbound_webhook_configured_atstring (date-time) or nullISO 8601 timestamp.
data[].inbound_webhook_urlstringWhere Twilio should send inbound messages and status callbacks.
data[].last_errorstring or null
data[].last_verified_atstring (date-time) or nullISO 8601 timestamp.
data[].messaging_service_sidstring or null
data[].prefix_org_namebooleanStart SMS fallback texts with the organisation name.
data[].providerenumOne of: twilio.
data[].statusenumpending until verified; active when verified; failing when the last check failed; disabled by the workspace. One of: pending, active, failing, disabled.
data[].updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Connect an SMS provider account​

POST /v1/sms-connections

Stores the workspace's own Twilio credentials (the token encrypted) and verifies them. SMS fallback needs the connection active, verified and compliance-confirmed. With configure_inbound_webhook: true, bubbl3 also points the Messaging Service's or numbers' inbound webhook at inbound_webhook_url; otherwise nothing in the Twilio account is changed.

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
account_sidstringYesTwilio Account SID.
auth_tokenstringYesWrite-only. Stored encrypted and never returned.
compliance_confirmedbooleanNotrue records that a signed-in user confirmed the account is registered for the messages it will send (A2P 10DLC or toll-free verification). API keys cannot set it.
configure_inbound_webhookbooleanNoExplicit consent to point the number's or Messaging Service's inbound webhook at bubbl3. Off unless set. Only a signed-in user can set it to true. Default false.
from_numbersstring[]NoUp to 20 items.
messaging_service_sidstringNoTwilio Messaging Service SID.
prefix_org_namebooleanNoDefault false.
providerenumNoOne of: twilio. Default "twilio".

Response 201

FieldTypeDescription
account_sidstring
auth_token_last4stringLast four characters of the auth token. Up to 4 characters.
compliance_confirmed_atstring (date-time) or nullISO 8601 timestamp.
compliance_confirmed_bystring (uuid) or nullUser who confirmed compliance.
created_atstring (date-time)ISO 8601 timestamp.
from_numbersstring[]
has_auth_tokenboolean
idstringSMS connection id (smc_...).
inbound_webhook_configured_atstring (date-time) or nullISO 8601 timestamp.
inbound_webhook_urlstringWhere Twilio should send inbound messages and status callbacks.
last_errorstring or null
last_verified_atstring (date-time) or nullISO 8601 timestamp.
messaging_service_sidstring or null
prefix_org_namebooleanStart SMS fallback texts with the organisation name.
providerenumOne of: twilio.
statusenumpending until verified; active when verified; failing when the last check failed; disabled by the workspace. One of: pending, active, failing, disabled.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Get an SMS connection​

GET /v1/sms-connections/:id

Path parameters

NameTypeRequiredDescription
idstringYesSMS connection id (smc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.

Response 200

FieldTypeDescription
account_sidstring
auth_token_last4stringLast four characters of the auth token. Up to 4 characters.
compliance_confirmed_atstring (date-time) or nullISO 8601 timestamp.
compliance_confirmed_bystring (uuid) or nullUser who confirmed compliance.
created_atstring (date-time)ISO 8601 timestamp.
from_numbersstring[]
has_auth_tokenboolean
idstringSMS connection id (smc_...).
inbound_webhook_configured_atstring (date-time) or nullISO 8601 timestamp.
inbound_webhook_urlstringWhere Twilio should send inbound messages and status callbacks.
last_errorstring or null
last_verified_atstring (date-time) or nullISO 8601 timestamp.
messaging_service_sidstring or null
prefix_org_namebooleanStart SMS fallback texts with the organisation name.
providerenumOne of: twilio.
statusenumpending until verified; active when verified; failing when the last check failed; disabled by the workspace. One of: pending, active, failing, disabled.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Update an SMS connection​

PATCH /v1/sms-connections/:id

Changing the account, token or sender puts the connection back to pending until it is verified again. disabled: true stops SMS fallback; false re-enables it as pending.

Path parameters

NameTypeRequiredDescription
idstringYesSMS connection id (smc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
account_sidstringNoTwilio Account SID.
auth_tokenstringNoRotates the token. The connection must be verified again.
compliance_confirmedbooleanNotrue records that a signed-in user confirmed the account is registered for the messages it will send (A2P 10DLC or toll-free verification). API keys cannot set it.
disabledbooleanNotrue stops SMS fallback; false re-enables it as pending until verified.
from_numbersstring[]NoUp to 20 items.
messaging_service_sidstring or nullNoTwilio Messaging Service SID.
prefix_org_namebooleanNo

Response 200

FieldTypeDescription
account_sidstring
auth_token_last4stringLast four characters of the auth token. Up to 4 characters.
compliance_confirmed_atstring (date-time) or nullISO 8601 timestamp.
compliance_confirmed_bystring (uuid) or nullUser who confirmed compliance.
created_atstring (date-time)ISO 8601 timestamp.
from_numbersstring[]
has_auth_tokenboolean
idstringSMS connection id (smc_...).
inbound_webhook_configured_atstring (date-time) or nullISO 8601 timestamp.
inbound_webhook_urlstringWhere Twilio should send inbound messages and status callbacks.
last_errorstring or null
last_verified_atstring (date-time) or nullISO 8601 timestamp.
messaging_service_sidstring or null
prefix_org_namebooleanStart SMS fallback texts with the organisation name.
providerenumOne of: twilio.
statusenumpending until verified; active when verified; failing when the last check failed; disabled by the workspace. One of: pending, active, failing, disabled.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Delete an SMS connection​

DELETE /v1/sms-connections/:id

Deletes the stored credentials. SMS fallback stops at once. The audit log keeps a record.

Path parameters

NameTypeRequiredDescription
idstringYesSMS connection id (smc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Response 200

FieldTypeDescription
deletedenumOne of: true.
idstringSMS connection id (smc_...).

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.

Send a test text​

POST /v1/sms-connections/:id/test

Sends one fixed text ("Test message from <organization> via bubbl3. Reply STOP to opt out.") to to only, through this connection. Signed-in users only. Needs an active, verified, compliance-confirmed connection. Limited to 5 a minute and 20 in any 24 hours per workspace. Refused for numbers that opted out. Nothing is added to the inbox.

Path parameters

NameTypeRequiredDescription
idstringYesSMS connection id (smc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
tostringYesThe only number the test text is sent to. The text itself is fixed and names the organisation.

Response 200

FieldTypeDescription
idstringSMS connection id (smc_...).
provider_message_idstring
sent_atstring (date-time)ISO 8601 timestamp.
statusstring
tostringPhone number in E.164 format.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500, 503. See errors for the shape and codes.

Verify an SMS connection​

POST /v1/sms-connections/:id/verify

Checks the credentials and sender with the provider. A success makes the connection active; a failure makes it failing with last_error. configure_inbound_webhook: true also sets the inbound webhook.

Path parameters

NameTypeRequiredDescription
idstringYesSMS connection id (smc_...).

Headers

NameTypeRequiredDescription
x-workspace-idstringNoWorkspace for session (JWT) callers. API keys carry their own workspace.
idempotency-keystringNoMakes the write safe to retry for 24 hours. 1 to 255 printable characters. Keys starting with outreach:, workflow: or agent: are reserved for messages bubbl3 sends itself and are refused with 400. Up to 255 characters.

Request body

FieldTypeRequiredDescription
configure_inbound_webhookbooleanNoExplicit consent to point the number's or Messaging Service's inbound webhook at bubbl3. Off unless set. Only a signed-in user can set it to true. Default false.

Response 200

FieldTypeDescription
account_sidstring
auth_token_last4stringLast four characters of the auth token. Up to 4 characters.
compliance_confirmed_atstring (date-time) or nullISO 8601 timestamp.
compliance_confirmed_bystring (uuid) or nullUser who confirmed compliance.
created_atstring (date-time)ISO 8601 timestamp.
from_numbersstring[]
has_auth_tokenboolean
idstringSMS connection id (smc_...).
inbound_webhook_configured_atstring (date-time) or nullISO 8601 timestamp.
inbound_webhook_urlstringWhere Twilio should send inbound messages and status callbacks.
last_errorstring or null
last_verified_atstring (date-time) or nullISO 8601 timestamp.
messaging_service_sidstring or null
prefix_org_namebooleanStart SMS fallback texts with the organisation name.
providerenumOne of: twilio.
statusenumpending until verified; active when verified; failing when the last check failed; disabled by the workspace. One of: pending, active, failing, disabled.
updated_atstring (date-time)ISO 8601 timestamp.

Errors: 400, 401, 403, 404, 409, 413, 415, 429, 500. See errors for the shape and codes.