Skip to content

Sms template ​

SMS message templates

INFO

Every response arrives in the shared envelope — code, message, messages, status_code, time — with the payload in data. The tables below describe what is inside data.

POST /sms-template/create ​

Create a new SMS template for the tenant.

Request body

FieldTypeRequiredDescription
contentstringYesSMS message body text
json
{
  "content": "string"
}

Response

FieldTypeDescription
_idstringSMS template ObjectId
account_idstringTenant identifier (immutable, injected server-side)
contentstringSMS message body text
is_deletedbooleanSoft-delete flag
created_atstring (date-time)Creation timestamp (ISO 8601)
updated_atstring (date-time)Last update timestamp (ISO 8601)
created_bystringObjectId of the user who created this template
updated_bystringObjectId of the user who last updated this template
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "_id": "string",
    "account_id": "string",
    "content": "string",
    "is_deleted": false,
    "created_at": "2025-05-01T12:00:00Z",
    "updated_at": "2025-05-01T12:00:00Z",
    "created_by": "string",
    "updated_by": "string"
  },
  "time": "2025-05-01T12:00:00Z"
}

GET /sms-template/get-by-id/{id} ​

Fetch a single SMS template by ObjectId.

Path parameters

ParameterTypeRequiredDescription
idstringYesSMS template ObjectId

Request body

No request body.

Response

Same response shape as POST /sms-template/create.

POST /sms-template/get-paging ​

Paginated list of SMS templates scoped to the tenant.

Request body

FieldTypeRequiredDescription
pagenumberYesDefault: 1
limitnumberYesDefault: 20
json
{
  "page": 1,
  "limit": 20
}

Response

FieldTypeDescription
totalnumber
listobject[]
list[]._idstringSMS template ObjectId
list[].account_idstringTenant identifier (immutable, injected server-side)
list[].contentstringSMS message body text
list[].is_deletedbooleanSoft-delete flag
list[].created_atstring (date-time)Creation timestamp (ISO 8601)
list[].updated_atstring (date-time)Last update timestamp (ISO 8601)
list[].created_bystringObjectId of the user who created this template
list[].updated_bystringObjectId of the user who last updated this template
json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": {
    "total": 0,
    "list": [
      {
        "_id": "string",
        "account_id": "string",
        "content": "string",
        "is_deleted": false,
        "created_at": "2025-05-01T12:00:00Z",
        "updated_at": "2025-05-01T12:00:00Z",
        "created_by": "string",
        "updated_by": "string"
      }
    ]
  },
  "time": "2025-05-01T12:00:00Z"
}

PUT /sms-template/update/{id} ​

Update an existing SMS template by ObjectId.

Path parameters

ParameterTypeRequiredDescription
idstringYesSMS template ObjectId

Request body

FieldTypeRequiredDescription
contentstringYesSMS message body text
json
{
  "content": "string"
}

Response

Same response shape as POST /sms-template/create.

DELETE /sms-template/delete/{id} ​

Soft-delete an SMS template by ObjectId (sets is_deleted=true).

Path parameters

ParameterTypeRequiredDescription
idstringYesSMS template ObjectId

Request body

No request body.

Response

json
{
  "code": 0,
  "message": "Success",
  "status_code": 200,
  "data": "ok",
  "time": "2025-05-01T12:00:00Z"
}

This page is generated from the OpenAPI spec.

Bito 2.0 Integration API