Skip to main content
POST
/
messaging_profiles
/
{profile_id}
/
autoresp_configs
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const autoRespConfigResponse = await client.messagingProfiles.autorespConfigs.create('profile_id', {
  country_code: 'US',
  keywords: ['keyword1', 'keyword2'],
  op: 'start',
});

console.log(autoRespConfigResponse.data);
{
  "data": {
    "op": "start",
    "keywords": [
      "START"
    ],
    "resp_text": "Hello there!",
    "country_code": "US",
    "id": "c2298f86-a4dc-4cac-b6b6-4a3d01c290fa",
    "created_at": "2023-03-22T00:06:49.068817+00:00",
    "updated_at": "2023-03-22T00:06:49.068817+00:00"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

profile_id
string
required

Body

application/json
op
enum<string>
required
Available options:
start,
stop,
info
keywords
string[]
required
Example:
["keyword1", "keyword2"]
country_code
string
required
Example:

"US"

resp_text
string
Example:

"Thank you for your message"

Response

Successful Response

data
object
required