SMS Templates

The SMS Templates API provides operations to manage custom SMS templates for verification.

Note: Only SMS custom Templates are available through the API.

SMS Templates customize the SMS message that is sent to users. One default SMS Template is provided. All custom Templates must have the variable ${code} as part of the text. The ${code} variable is replaced with the actual SMS code when the message is sent. Optionally, you can also use the variable ${org.name}. If a Template contains ${org.name}, it is replaced with the organization name before the SMS message is sent.

List all SMS Templates
OAuth 2.0: okta.templates.read

Lists all custom SMS templates. A subset of templates can be returned that match a template type.

Request
query Parameters
templateType
string (SmsTemplateType)
Value: "SMS_VERIFY_CODE"
Responses
200

Success

403

Forbidden

429

Too Many Requests

get/api/v1/templates/sms
Request samples
Response samples
application/json
[
  • {
    • "created": "2019-08-24T14:15:22Z",
    • "id": "string",
    • "lastUpdated": "2019-08-24T14:15:22Z",
    • "name": "string",
    • "template": "string",
    • "translations": { },
    • "type": "SMS_VERIFY_CODE"
    }
]

Create an SMS Template
OAuth 2.0: okta.templates.manage

Creates a new custom SMS template

Request
Request Body schema: application/json
name
string
template
string
translations
object (SmsTemplateTranslations)
type
string (SmsTemplateType)
Value: "SMS_VERIFY_CODE"
Responses
200

Success

400

Bad Request

403

Forbidden

429

Too Many Requests

post/api/v1/templates/sms
Request samples
application/json
{
  • "name": "string",
  • "template": "string",
  • "translations": { },
  • "type": "SMS_VERIFY_CODE"
}
Response samples
application/json
{
  • "created": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "template": "string",
  • "translations": { },
  • "type": "SMS_VERIFY_CODE"
}

Retrieve an SMS Template
OAuth 2.0: okta.templates.read

Retrieves a specific template by id

Request
path Parameters
templateId
required
string

id of the Template

Example: 6NQUJ5yR3bpgEiYmq8IC
Responses
200

Success

403

Forbidden

404

Not Found

429

Too Many Requests

get/api/v1/templates/sms/{templateId}
Request samples
Response samples
application/json
{
  • "created": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "template": "string",
  • "translations": { },
  • "type": "SMS_VERIFY_CODE"
}

Update an SMS Template
OAuth 2.0: okta.templates.manage

Updates an SMS template

Request
path Parameters
templateId
required
string

id of the Template

Example: 6NQUJ5yR3bpgEiYmq8IC
Request Body schema: application/json
name
string
template
string
translations
object (SmsTemplateTranslations)
type
string (SmsTemplateType)
Value: "SMS_VERIFY_CODE"
Responses
200

Success

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

post/api/v1/templates/sms/{templateId}
Request samples
application/json
{
  • "name": "string",
  • "template": "string",
  • "translations": { },
  • "type": "SMS_VERIFY_CODE"
}
Response samples
application/json
{
  • "created": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "template": "string",
  • "translations": { },
  • "type": "SMS_VERIFY_CODE"
}

Replace an SMS Template
OAuth 2.0: okta.templates.manage

Replaces the SMS template

Request
path Parameters
templateId
required
string

id of the Template

Example: 6NQUJ5yR3bpgEiYmq8IC
Request Body schema: application/json
name
string
template
string
translations
object (SmsTemplateTranslations)
type
string (SmsTemplateType)
Value: "SMS_VERIFY_CODE"
Responses
200

Success

400

Bad Request

403

Forbidden

404

Not Found

429

Too Many Requests

put/api/v1/templates/sms/{templateId}
Request samples
application/json
{
  • "name": "string",
  • "template": "string",
  • "translations": { },
  • "type": "SMS_VERIFY_CODE"
}
Response samples
application/json
{
  • "created": "2019-08-24T14:15:22Z",
  • "id": "string",
  • "lastUpdated": "2019-08-24T14:15:22Z",
  • "name": "string",
  • "template": "string",
  • "translations": { },
  • "type": "SMS_VERIFY_CODE"
}

Delete an SMS Template
OAuth 2.0: okta.templates.manage

Deletes an SMS template

Request
path Parameters
templateId
required
string

id of the Template

Example: 6NQUJ5yR3bpgEiYmq8IC
Responses
204

No Content

403

Forbidden

404

Not Found

429

Too Many Requests

delete/api/v1/templates/sms/{templateId}
Request samples
Response samples
application/json
{
  • "errorCode": "E0000006",
  • "errorSummary": "You do not have permission to perform the requested action",
  • "errorLink": "E0000006",
  • "errorId": "sampleNUSD_8fdkFd8fs8SDBK",
  • "errorCauses": [ ]
}