Ir al contenido

Create a new quick message

POST
/quick-messages
curl --request POST \
--url https://api.matiasimpulso.com/quick-messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "shortcode": "hello", "title": "Saludo inicial", "message": "Hola, ¿en qué puedo ayudarte hoy?", "category": "general", "isVisible": true, "isActive": true, "fileBase64": "data:application/pdf;base64,JVBERi0xLjQKJeLjz9MK...", "fileName": "document.pdf" }'

Creates a new quick message for the authenticated user’s company

Media type application/json
object
shortcode
required

Unique shortcode for the quick message

string
>= 1 characters <= 50 characters

Example

hello
title
required

Display title for the quick message

string
>= 1 characters <= 255 characters

Example

Saludo inicial
message

Message content

string

Example

Hola, ¿en qué puedo ayudarte hoy?
category

Message category

string
default: general
Allowed values: general sales support billing welcome information appointment delivery followup feedback promotional emergency other greeting farewell

Example

general
isVisible

Visible for the whole company. Only tenant admins can create visible messages; for other users it is always false

boolean

Example

true
isActive

Whether the quick message is active

boolean
default: true

Example

true
fileBase64

Base64-encoded file content for media attachment (transitory field, not stored in database)

string

Example

data:application/pdf;base64,JVBERi0xLjQKJeLjz9MK...
fileName

Original filename for the media attachment (transitory field, used only during creation)

string

Example

document.pdf

Quick message created successfully

Media type application/json
object
id
required

Unique identifier

number
shortcode
required

Unique shortcode

string
title
required

Display title

string
message

Message content

string
category
required

Message category

string
isVisible
required

Visibility status

boolean
isActive
required

Active status

boolean
isMedia
required

Has media content

boolean
mediaPath

Media file path

string
mediaName

Original media file name

string
userId

Creator user ID

number
companyId

Company ID

number
createdAt
required

Creation timestamp

string format: date-time
updatedAt
required

Last update timestamp

string format: date-time
user

Creator user information

object
id
number
name
string
email
string

Example

{
"id": 1,
"shortcode": "hello",
"title": "Saludo inicial",
"message": "Hola, ¿en qué puedo ayudarte?",
"category": "greeting",
"isVisible": true,
"isActive": true,
"isMedia": false,
"mediaPath": "/uploads/quick-messages/image.jpg",
"mediaName": "welcome-image.jpg",
"userId": 1,
"companyId": 1,
"createdAt": "2025-10-04T06:07:41.000Z",
"updatedAt": "2025-10-04T06:07:41.000Z",
"user": {
"id": 1,
"name": "John Doe",
"email": "john@example.com"
}
}

Quick message with the same shortcode already exists