JT Noble SMS documentation home

Two-way and opt-outs

Every two-way and opt-outs route, with request, response, errors and samples in curl, Node, Python and PHP.

See the overview for sign-in and the error shape.

List conversations

GET /v1/conversations

Who can call it: Any API key, or a dashboard session token.

QueryTypeRequiredDefaultMeaning
qstringNoSearch text.
unreadbooleanNofalse
archivedbooleanNofalseArchive or restore.
environmentstringNolive or test.
limitintegerNo100Items per page.
curl -X GET "https://api.sms.jtnoble.com/v1/conversations" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/conversations', {
  method: 'GET',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.get(
    "https://api.sms.jtnoble.com/v1/conversations",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/conversations');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "conversations": [
    {
      "phone": "+2348031000111",
      "number": null,
      "last_text": "START",
      "last_direction": "inbound",
      "last_at": "2026-11-07T17:01:07.785001+00:00",
      "unread": 3,
      "archived": false,
      "opted_out": false,
      "environment": "test"
    }
  ],
  "unread": 3
}
HTTPcodeMessage
401unauthorizedNot authenticated
429rate_limitedToo many requests. Try again in a moment.

Read one conversation

GET /v1/conversations/{phone}

The newest limit messages, oldest first for display.

Who can call it: Any API key, or a dashboard session token.

Path valueTypeMeaning
phonestringMobile number in international format.
QueryTypeRequiredDefaultMeaning
environmentstringNolive or test.
limitintegerNo200Items per page.
curl -X GET "https://api.sms.jtnoble.com/v1/conversations/+2348030000000" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/conversations/+2348030000000', {
  method: 'GET',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.get(
    "https://api.sms.jtnoble.com/v1/conversations/+2348030000000",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/conversations/+2348030000000');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "phone": "+2348031000111",
  "opted_out": false,
  "messages": [
    {
      "id": "d7aa94ff-351d-4d29-99f2-9de9a5b41f78",
      "text": "FEES hello",
      "direction": "inbound",
      "status": "received",
      "purpose": null,
      "created_at": "2026-11-07T17:01:06.789078+00:00"
    },
    {
      "id": "test_f3810d1ac5d843489f0c670085e70b43",
      "text": "Thanks again.",
      "direction": "outbound",
      "status": "delivered",
      "purpose": "auto_reply",
      "created_at": "2026-11-07T17:01:06.822665+00:00"
    }
  ]
}
HTTPcodeMessage
401unauthorizedNot authenticated
404conversation_not_foundNo conversation with this number.
429rate_limitedToo many requests. Try again in a moment.

Mark read or archive

PATCH /v1/conversations/{phone}

Who can call it: Any API key, or a dashboard session token.

Path valueTypeMeaning
phonestringMobile number in international format.

Body (JSON):

FieldTypeRequiredDefaultMeaning
archivedbooleanNoArchive or restore.
readbooleanNoMark read.
environmentstringNolive or test.
curl -X PATCH "https://api.sms.jtnoble.com/v1/conversations/+2348030000000" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"read":true,"environment":"test"}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/conversations/+2348030000000', {
  method: 'PATCH',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"read":true,"environment":"test"}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.patch(
    "https://api.sms.jtnoble.com/v1/conversations/+2348030000000",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"read":True,"environment":"test"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/conversations/+2348030000000');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"read":true,"environment":"test"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "phone": "+2348031000111",
  "unread": 0
}
HTTPcodeMessage
401unauthorizedNot authenticated
404conversation_not_foundNo conversation with this number.
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Reply in a conversation

POST /v1/conversations/{phone}/reply

Who can call it: API key with the send scope, or a dashboard session token.

Path valueTypeMeaning
phonestringMobile number in international format.

Body (JSON):

FieldTypeRequiredDefaultMeaning
textstringYesThe message.
environmentstringNolive or test.
curl -X POST "https://api.sms.jtnoble.com/v1/conversations/+2348030000000/reply" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Thanks","environment":"test"}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/conversations/+2348030000000/reply', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"text":"Thanks","environment":"test"}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/conversations/+2348030000000/reply",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"text":"Thanks","environment":"test"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/conversations/+2348030000000/reply');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"text":"Thanks","environment":"test"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "id": "test_ebd53f466a054d98bc7ccdbc3940bef3",
  "status": "queued",
  "segments": 1,
  "cost": 0,
  "currency": "USD",
  "balance_after": null
}
HTTPcodeMessage
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
404conversation_not_foundNo conversation with this number.
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

List opt-outs

GET /v1/opt-outs

Who can call it: Any API key, or a dashboard session token.

QueryTypeRequiredDefaultMeaning
limitintegerNo200Items per page.
curl -X GET "https://api.sms.jtnoble.com/v1/opt-outs" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/opt-outs', {
  method: 'GET',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.get(
    "https://api.sms.jtnoble.com/v1/opt-outs",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/opt-outs');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "opt_outs": [
    {
      "phone": "+2348030001153",
      "source": "api",
      "keyword": null,
      "created_at": "2026-11-07T17:01:12.056526+00:00"
    },
    {
      "phone": "+2348030001152",
      "source": "api",
      "keyword": null,
      "created_at": "2026-11-07T17:01:12.056521+00:00"
    }
  ]
}
HTTPcodeMessage
401unauthorizedNot authenticated
429rate_limitedToo many requests. Try again in a moment.

Add an opt-out

POST /v1/opt-outs

Who can call it: Any API key, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
phonestringYesMobile number in international format.
curl -X POST "https://api.sms.jtnoble.com/v1/opt-outs" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"phone":"+2348030000000"}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/opt-outs', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"phone":"+2348030000000"}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/opt-outs",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"phone":"+2348030000000"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/opt-outs');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"phone":"+2348030000000"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 201:

{
  "phone": "+2348030001151",
  "opted_out": true
}
HTTPcodeMessage
400bad_request
401unauthorizedNot authenticated
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Export opt-outs as CSV

GET /v1/opt-outs/export

Who can call it: Any API key, or a dashboard session token.

curl -X GET "https://api.sms.jtnoble.com/v1/opt-outs/export" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/opt-outs/export', {
  method: 'GET',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.get(
    "https://api.sms.jtnoble.com/v1/opt-outs/export",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/opt-outs/export');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200, a CSV file:

phone,source,keyword,created_at
HTTPcodeMessage
401unauthorizedNot authenticated
429rate_limitedToo many requests. Try again in a moment.

Add many opt-outs

POST /v1/opt-outs/import

Who can call it: Any API key, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
numbersarray of stringYesMobile numbers in international format.
curl -X POST "https://api.sms.jtnoble.com/v1/opt-outs/import" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"numbers":["+2348030001152","+2348030001153"]}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/opt-outs/import', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"numbers":["+2348030001152","+2348030001153"]}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/opt-outs/import",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"numbers":["+2348030001152","+2348030001153"]},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/opt-outs/import');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"numbers":["+2348030001152","+2348030001153"]}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "added": 2,
  "already_listed": 0,
  "invalid": 0
}
HTTPcodeMessage
401unauthorizedNot authenticated
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Remove an opt-out

DELETE /v1/opt-outs/{phone}

Who can call it: Any API key, or a dashboard session token.

Path valueTypeMeaning
phonestringMobile number in international format.
curl -X DELETE "https://api.sms.jtnoble.com/v1/opt-outs/+2348030000000" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/opt-outs/+2348030000000', {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.delete(
    "https://api.sms.jtnoble.com/v1/opt-outs/+2348030000000",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/opt-outs/+2348030000000');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "phone": "+2348030001151",
  "opted_out": false
}
HTTPcodeMessage
401unauthorizedNot authenticated
429rate_limitedToo many requests. Try again in a moment.

Numbers, keywords and auto-replies

GET /v1/two-way

Who can call it: Any API key, or a dashboard session token.

curl -X GET "https://api.sms.jtnoble.com/v1/two-way" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/two-way', {
  method: 'GET',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.get(
    "https://api.sms.jtnoble.com/v1/two-way",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/two-way');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'GET',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "numbers": [],
  "keywords": [],
  "settings": {
    "default_reply_enabled": false,
    "default_reply": null,
    "stop_reply": null
  }
}
HTTPcodeMessage
401unauthorizedNot authenticated
429rate_limitedToo many requests. Try again in a moment.

Reserve a keyword

POST /v1/two-way/keywords

Who can call it: Any API key, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
keywordstringYesOne word, 2 to 30 characters. STOP, START and HELP words are reserved.
number_idintegerNoWhich number the keyword is on. Leave it out for all your numbers.
reply_textstringNoAuto-reply, up to 612 characters.
forward_urlstringNoPublic URL that receives the signed inbound event for this keyword.
is_activebooleanNotrueOn or off.
curl -X POST "https://api.sms.jtnoble.com/v1/two-way/keywords" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"FEES","reply_text":"Thanks, we got your message."}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/two-way/keywords', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"keyword":"FEES","reply_text":"Thanks, we got your message."}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/two-way/keywords",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"keyword":"FEES","reply_text":"Thanks, we got your message."},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/two-way/keywords');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"keyword":"FEES","reply_text":"Thanks, we got your message."}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 201:

{
  "id": 1,
  "keyword": "FEES",
  "number_id": null,
  "number": null,
  "reply_text": "Thanks, we got your message.",
  "forward_url": null,
  "is_active": true,
  "hits": 0,
  "last_hit_at": null
}
HTTPcodeMessage
400keyword_one_wordA keyword is one word.
400keyword_reservedThis word is reserved.
401unauthorizedNot authenticated
409keyword_takenThis keyword is already in use.
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Change a keyword

PUT /v1/two-way/keywords/{kid}

Who can call it: Any API key, or a dashboard session token.

Path valueTypeMeaning
kidintegerThe keyword id.

Body (JSON):

FieldTypeRequiredDefaultMeaning
keywordstringYesOne word, 2 to 30 characters. STOP, START and HELP words are reserved.
number_idintegerNoWhich number the keyword is on. Leave it out for all your numbers.
reply_textstringNoAuto-reply, up to 612 characters.
forward_urlstringNoPublic URL that receives the signed inbound event for this keyword.
is_activebooleanNotrueOn or off.
curl -X PUT "https://api.sms.jtnoble.com/v1/two-way/keywords/KID" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"keyword":"FEES","reply_text":"Thanks again."}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/two-way/keywords/KID', {
  method: 'PUT',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"keyword":"FEES","reply_text":"Thanks again."}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.put(
    "https://api.sms.jtnoble.com/v1/two-way/keywords/KID",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"keyword":"FEES","reply_text":"Thanks again."},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/two-way/keywords/KID');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"keyword":"FEES","reply_text":"Thanks again."}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "id": 1,
  "keyword": "FEES",
  "number_id": null,
  "number": null,
  "reply_text": "Thanks again.",
  "forward_url": null,
  "is_active": true,
  "hits": 0,
  "last_hit_at": null
}
HTTPcodeMessage
400keyword_one_wordA keyword is one word.
400keyword_reservedThis word is reserved.
401unauthorizedNot authenticated
404keyword_not_foundNo such keyword.
409keyword_takenThis keyword is already in use.
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Delete a keyword

DELETE /v1/two-way/keywords/{kid}

Who can call it: Any API key, or a dashboard session token.

Path valueTypeMeaning
kidintegerThe keyword id.
curl -X DELETE "https://api.sms.jtnoble.com/v1/two-way/keywords/KID" \
  -H "Authorization: Bearer $JTSMS_API_KEY"
const resp = await fetch('https://api.sms.jtnoble.com/v1/two-way/keywords/KID', {
  method: 'DELETE',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}` },
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.delete(
    "https://api.sms.jtnoble.com/v1/two-way/keywords/KID",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/two-way/keywords/KID');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'DELETE',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY')],
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 204, no body.

HTTPcodeMessage
400keyword_one_wordA keyword is one word.
400keyword_reservedThis word is reserved.
401unauthorizedNot authenticated
404keyword_not_foundNo such keyword.
409keyword_takenThis keyword is already in use.
429rate_limitedToo many requests. Try again in a moment.

Auto-reply settings

PUT /v1/two-way/settings

Who can call it: Any API key, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
default_reply_enabledbooleanNofalseAnswer every other inbound message.
default_replystringNoThat answer, up to 612 characters.
stop_replystringNoSent after a STOP, up to 320 characters.
curl -X PUT "https://api.sms.jtnoble.com/v1/two-way/settings" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"default_reply_enabled":true,"default_reply":"Thanks for your message.","stop_reply":"You will get no more messages."}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/two-way/settings', {
  method: 'PUT',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"default_reply_enabled":true,"default_reply":"Thanks for your message.","stop_reply":"You will get no more messages."}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.put(
    "https://api.sms.jtnoble.com/v1/two-way/settings",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"default_reply_enabled":True,"default_reply":"Thanks for your message.","stop_reply":"You will get no more messages."},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/two-way/settings');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'PUT',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"default_reply_enabled":true,"default_reply":"Thanks for your message.","stop_reply":"You will get no more messages."}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "default_reply_enabled": true,
  "default_reply": "Thanks for your message.",
  "stop_reply": "You will get no more messages."
}
HTTPcodeMessage
400reply_requiredWrite the auto-reply first.
401unauthorizedNot authenticated
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

Simulate an inbound message (sandbox)

POST /v1/two-way/simulate

Who can call it: API key with the send scope, or a dashboard session token.

Body (JSON):

FieldTypeRequiredDefaultMeaning
fromstringNo"+2348031000111"
tostringNo""Mobile number in international format, for example +2348030000000. Also accepted: 2348030000000, or 08030000000 in your default country.
textstringYesThe message.
curl -X POST "https://api.sms.jtnoble.com/v1/two-way/simulate" \
  -H "Authorization: Bearer $JTSMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"from":"+2348031000111","text":"FEES hello"}'
const resp = await fetch('https://api.sms.jtnoble.com/v1/two-way/simulate', {
  method: 'POST',
  headers: { Authorization: `Bearer ${process.env.JTSMS_API_KEY}`, 'Content-Type': 'application/json' },
  body: JSON.stringify({"from":"+2348031000111","text":"FEES hello"}),
});
console.log(resp.status, await resp.text());
import os
import requests

resp = requests.post(
    "https://api.sms.jtnoble.com/v1/two-way/simulate",
    headers={"Authorization": f"Bearer {os.environ['JTSMS_API_KEY']}"},
    json={"from":"+2348031000111","text":"FEES hello"},
    timeout=30,
)
print(resp.status_code, resp.text)
<?php
$ch = curl_init('https://api.sms.jtnoble.com/v1/two-way/simulate');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . getenv('JTSMS_API_KEY'), 'Content-Type: application/json'],
    CURLOPT_POSTFIELDS => '{"from":"+2348031000111","text":"FEES hello"}',
]);
$body = curl_exec($ch);
echo curl_getinfo($ch, CURLINFO_RESPONSE_CODE), ' ', $body, PHP_EOL;

HTTP 200:

{
  "status": "received",
  "attributed_to": "3f0c7a52-6d1e-4b9a-8f21-7c5e2a9d1b40",
  "action": null,
  "keyword": "FEES",
  "message_id": "d7aa94ff-351d-4d29-99f2-9de9a5b41f78"
}
HTTPcodeMessage
401unauthorizedNot authenticated
403insufficient_scopeThis API key is not authorised for this action.
422validation_errorRequest validation failed
429rate_limitedToo many requests. Try again in a moment.

On this page