Skip to main content
GET
/
personas
/
{persona_id}
/
sms
python
import datetime as dt

from notte_sdk.client import NotteClient

notte = NotteClient()
# retrieve an existing persona or use console.notte.cc/personas to create a new one
persona = notte.Persona("<my-persona-id>")
# read recent sms (received in the past 5 minutes)
recent_sms = persona.sms(
    only_unread=True,
    limit=10,
    timedelta=dt.timedelta(minutes=5),
)
print(f"Recent sms: {recent_sms}")
import { NotteClient } from "notte-sdk";

const notte = new NotteClient();
// retrieve an existing persona or use console.notte.cc/personas to create a new one
const persona = notte.Persona({ persona_id: "<my-persona-id>" });
// read recent sms (received in the past 5 minutes)
const recentSms = await persona.sms({
only_unread: true,
limit: 10,
timedelta: "5m",
});
console.log("Recent sms:", recentSms);
curl -X GET "https://api.notte.cc/personas/$persona_id/sms?limit=10&only_unread=true" \
-H "Authorization: Bearer $NOTTE_API_KEY" \
-H "Content-Type: application/json"
[
  {
    "body": "<string>",
    "sms_id": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "sender": "<string>"
  }
]
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Headers

x-notte-request-origin
string | null
x-notte-sdk-version
string | null

Path Parameters

persona_id
string
required

Query Parameters

limit
integer
default:10

Maximum number of emails

Required range: 1 <= x <= 100
timedelta
string<duration> | null

Maximum time since email reception

only_unread
boolean
default:false

Whether to only return unread messages

Response

Successful Response

body
string
required

SMS message body

sms_id
string
required

SMS UUID

created_at
string<date-time>
required

Creation date

sender
string | null
required

SMS sender phone number