---
title: "Receive a new SMS message from a mobile phone"
method: POST
path: "/messages/receive"
tags: ["Messages"]
---

# Receive a new SMS message from a mobile phone

`POST /messages/receive`

Add a new message received from a mobile phone

## Request body

- RequestsMessageReceive
  - `attachments` RequestsMessageAttachment[] — Attachments is the list of MMS attachments received with the message
    - `content` string, required — Content is the base64-encoded attachment data
    - `content_type` string, required — ContentType is the MIME type of the attachment
    - `name` string, required — Name is the original filename of the attachment
  - `content` string, required
  - `encrypted` boolean, required — Encrypted is used to determine if the content is end-to-end encrypted. Make sure to set the encryption key on the httpSMS mobile app
  - `from` string, required
  - `sim` 'SIM1' | 'SIM2', required
  - `timestamp` string, required — Timestamp is the time when the event was emitted, Please send the timestamp in UTC with as much precision as possible
  - `to` string, required

## Response `200`

OK

- ResponsesMessageResponse
  - `data` EntitiesMessage, required
    - `attachments` string[], required
    - `contact` string, required
    - `content` string, required
    - `created_at` string, required
    - `delivered_at` string
    - `encrypted` boolean, required
    - `expired_at` string
    - `failed_at` string
    - `failure_reason` string
    - `id` string, required
    - `last_attempted_at` string
    - `max_send_attempts` integer, required
    - `order_timestamp` string, required
    - `owner` string, required
    - `received_at` string
    - `request_id` string
    - `request_received_at` string, required
    - `scheduled_at` string
    - `scheduled_send_time` string
    - `send_attempt_count` integer, required
    - `send_time` integer — SendDuration is the number of nanoseconds from when the request was received until when the mobile phone send the message
    - `sent_at` string
    - `sim` 'SIM1' | 'SIM2', required
    - `status` string, required
    - `type` string, required
    - `updated_at` string, required
    - `user_id` string, required
  - `message` string, required
  - `status` string, required

## Other responses

- `400` — Bad Request
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/ndolestudio/apis/httpsms-api-reference.md) · [All operations](https://skmtc.net/ndolestudio/apis/httpsms-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/ndolestudio/httpsms-api-reference/versions/ddd090b6b679/schema)
