Create or update SMS provider settings for an environment
PUT
/v1/environments/{envId}/sms-settings
const url = 'https://your-notavia-host/v1/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/sms-settings';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"kind":"managed","from_number":"example","from_sender_id":"example","twilio_account_sid":"example","twilio_auth_token":"example","vonage_api_key":"example","vonage_api_secret":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://your-notavia-host/v1/environments/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/sms-settings \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "kind": "managed", "from_number": "example", "from_sender_id": "example", "twilio_account_sid": "example", "twilio_auth_token": "example", "vonage_api_key": "example", "vonage_api_secret": "example" }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” envId
required
string format: uuid
Request Body required
Section titled “Request Body required ” Media type application/json
object
kind
required
string
from_number
string
from_sender_id
string
twilio_account_sid
string
twilio_auth_token
string
vonage_api_key
string
vonage_api_secret
string
Responses
Section titled “ Responses ”Updated SMS settings.
Media type application/json
object
id
string format: uuid
kind
string
from_number
string
from_sender_id
string
credentials_validated
boolean
credentials_validated_at
string format: date-time
Example
{ "kind": "Managed"}Validation or request error.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}Missing or invalid credentials.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}Credentials do not have the required scope.
Media type application/json
object
error
required
object
type
required
string
code
required
string
message
required
string
param
string
Example generated
{ "error": { "type": "example", "code": "example", "message": "example", "param": "example" }}