Skip to content

Instantly share code, notes, and snippets.

@plehoux
Last active April 3, 2024 14:23
Show Gist options
  • Save plehoux/2029b4faff981a512a3b1aeeaf331a9d to your computer and use it in GitHub Desktop.
Save plehoux/2029b4faff981a512a3b1aeeaf331a9d to your computer and use it in GitHub Desktop.

Assuming this SMS:

From: +1555666777
TO: +1222333444
Body: Nice to meet you.
Received at: 03 April 2024, 2:12:13

The body of the POST request to /posts should be:

{
  "posts": {
    "notification": { "title": "+1555666777", "body": "Nice to meet you." },
    "references": ["+1222333444+1555666777"],
    "username": "+1555666777",
    "created_at": 1711843200,
    "text": "Nice to meet you."
  }
}

"username" could be a name too like : "username": "Philippe Lehoux (+1555666777)"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment