All URIs are relative to https://subdomain.okta.com
Method | HTTP request | Description |
---|---|---|
createSmsTemplate | POST /api/v1/templates/sms | Create an SMS Template |
deleteSmsTemplate | DELETE /api/v1/templates/sms/{templateId} | Delete an SMS Template |
getSmsTemplate | GET /api/v1/templates/sms/{templateId} | Retrieve an SMS Template |
listSmsTemplates | GET /api/v1/templates/sms | List all SMS Templates |
partialUpdateSmsTemplate | POST /api/v1/templates/sms/{templateId} | Update an SMS Template |
updateSmsTemplate | PUT /api/v1/templates/sms/{templateId} | Replace an SMS Template |
SmsTemplate createSmsTemplate(smsTemplate)
Adds a new custom SMS template to your organization.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.TemplateApi(configuration);
let body:okta.TemplateApiCreateSmsTemplateRequest = {
// SmsTemplate
smsTemplate: {
name: "name_example",
template: "template_example",
translations: {},
type: "SMS_VERIFY_CODE",
},
};
apiInstance.createSmsTemplate(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
smsTemplate | SmsTemplate |
SmsTemplate
| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 400 | Bad Request | - | 403 | Forbidden | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
void deleteSmsTemplate()
Removes an SMS template.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.TemplateApi(configuration);
let body:okta.TemplateApiDeleteSmsTemplateRequest = {
// string
templateId: "templateId_example",
};
apiInstance.deleteSmsTemplate(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
templateId | [string] | defaults to undefined |
void
| Status code | Description | Response headers | |————-|————-|——————| 204 | No Content | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmsTemplate getSmsTemplate()
Fetches a specific template by id
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.TemplateApi(configuration);
let body:okta.TemplateApiGetSmsTemplateRequest = {
// string
templateId: "templateId_example",
};
apiInstance.getSmsTemplate(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
templateId | [string] | defaults to undefined |
SmsTemplate
| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Array
listSmsTemplates()
Enumerates custom SMS templates in your organization. A subset of templates can be returned that match a template type.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.TemplateApi(configuration);
let body:okta.TemplateApiListSmsTemplatesRequest = {
// SmsTemplateType (optional)
templateType: "SMS_VERIFY_CODE",
};
apiInstance.listSmsTemplates(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
templateType | SmsTemplateType | (optional) defaults to undefined |
**Array
| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 403 | Forbidden | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmsTemplate partialUpdateSmsTemplate(smsTemplate)
Updates only some of the SMS template properties:
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.TemplateApi(configuration);
let body:okta.TemplateApiPartialUpdateSmsTemplateRequest = {
// string
templateId: "templateId_example",
// SmsTemplate
smsTemplate: {
name: "name_example",
template: "template_example",
translations: {},
type: "SMS_VERIFY_CODE",
},
};
apiInstance.partialUpdateSmsTemplate(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
smsTemplate | SmsTemplate | ||
templateId | [string] | defaults to undefined |
SmsTemplate
| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 400 | Bad Request | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SmsTemplate updateSmsTemplate(smsTemplate)
Updates the SMS template.
import { okta } from '@okta/okta-sdk-nodejs';
import * as fs from 'fs';
const configuration = okta.createConfiguration();
const apiInstance = new okta.TemplateApi(configuration);
let body:okta.TemplateApiUpdateSmsTemplateRequest = {
// string
templateId: "templateId_example",
// SmsTemplate
smsTemplate: {
name: "name_example",
template: "template_example",
translations: {},
type: "SMS_VERIFY_CODE",
},
};
apiInstance.updateSmsTemplate(body).then((data:any) => {
console.log('API called successfully. Returned data: ' + data);
}).catch((error:any) => console.error(error));
Name | Type | Description | Notes |
---|---|---|---|
smsTemplate | SmsTemplate | ||
templateId | [string] | defaults to undefined |
SmsTemplate
| Status code | Description | Response headers | |————-|————-|——————| 200 | Success | - | 400 | Bad Request | - | 403 | Forbidden | - | 404 | Not Found | - | 429 | Too Many Requests | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]