SmsMessage record that tracks status from queued through to delivered.
List SMS gateways
Retrieve all configured SMS gateways. Passsearch to filter by name, host, or provider type. Each result includes a messages_count field with the number of messages sent through that gateway.
string
Filter gateways by
name, server_host, or provider_type. Matches partial strings.string
Human-readable status. Always
"SMS gateways fetched successfully." on success.object[]
Array of SMS gateway objects.
Example request
Filter by name
200 response
Create a gateway
Register a new SMS gateway. Thepassword field is stored and used for Basic Auth when dispatching messages.
string
required
Display name for this gateway. Maximum 255 characters.
string
required
Gateway provider identifier. Maximum 100 characters (e.g.
"jasmin", "smpp").string
required
Hostname or IP address of the gateway server. Maximum 255 characters.
integer
required
TCP port the gateway listens on. Minimum value:
1.string
Path segment appended after the host and port when building the send URL. Defaults to
send when omitted. Maximum 255 characters.string
required
Authentication username for Basic Auth. Maximum 255 characters.
string
required
Authentication password for Basic Auth. Maximum 255 characters.
string
Default originating address (alphanumeric sender ID or phone number). Maximum 30 characters.
string
Token included in DLR callback validation. Maximum 255 characters. See Webhooks for security guidance.
boolean
default:"false"
Set to
true to enable this gateway for outbound sending.boolean
default:"false"
Set to
true to connect to the gateway over HTTPS.string
Free-text internal notes. No length limit enforced by the API.
object
Arbitrary key-value object for custom metadata. Stored as JSON.
201.
Example request
201 response
Get a gateway
Fetch a single gateway by ID. The response includesmessages_count.
integer
required
The ID of the SMS gateway to retrieve.
Example request
200 response
Update a gateway
Replace all fields on an existing gateway. Every required field from Create a gateway must be included. UsePATCH /api/sms-gateways/{smsGateway} for partial updates with the same field rules.
integer
required
The ID of the SMS gateway to update.
Example request
200 response
Delete a gateway
Permanently delete a gateway. This action cannot be undone. AssociatedSmsMessage records are not automatically removed.
integer
required
The ID of the SMS gateway to delete.
Example request
200 response
List messages for a gateway
Return allSmsMessage records associated with a gateway, ordered newest first. Use this to inspect delivery history for a specific gateway.
integer
required
The ID of the SMS gateway whose messages you want to list.
string
Always
"SMS messages fetched successfully." on success.object[]
Array of SMS message objects ordered by
created_at descending.Example request
200 response
Send an SMS
Dispatch an outbound SMS through the specified gateway. LaraCopilot creates anSmsMessage record with delivery_status: "queued", forwards the message to the gateway over HTTP(S) with Basic Auth, then updates the record to submitted or failed based on the gateway’s response. The final SmsMessage object — with its current delivery_status — is returned synchronously.
integer
required
The ID of the SMS gateway to send through.
string
required
Destination phone number in E.164 format (e.g.
"+447911123456"). Maximum 30 characters.string
required
Originating address shown to the recipient — alphanumeric sender ID or E.164 phone number. Maximum 30 characters.
string
required
SMS body text. Maximum 1000 characters.
integer
ID of the tenant on whose behalf the message is sent. Stored on the
SmsMessage record for attribution. Optional.string
URL where the gateway should POST delivery receipts. Must be a valid URL. Defaults to
https://your-instance.laracopilot.com/api/sms-gateways/{id}/dlr when omitted.1
Record created
An
SmsMessage record is created with delivery_status: "queued" and requested_at set to the current time.2
Dispatch to gateway
LaraCopilot POSTs to
{scheme}://{server_host}:{server_port}/{api_path} using Basic Auth credentials from the gateway. The payload includes to, from, content, dlr-url, dlr-level, and dlr-method.3
Status updated
On a successful gateway response the record is updated to
delivery_status: "submitted" and submitted_at is set. On any HTTP error or network exception the status is set to "failed" and error_message is populated.4
Response returned
The refreshed
SmsMessage record is returned. Poll GET /api/sms-gateways//messages or wait for the DLR webhook to confirm final delivery.string
Always
"SMS request processed.".object
The
SmsMessage record after the gateway interaction.Example request
200 response — submitted
200 response — failed