An SMS step's counter and estimated cost
POST
/api/v1/workspaces/{workspace}/sms/step-estimate
package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://reputecast.example.com/api/v1/workspaces/acme-newsletter/sms/step-estimate"
payload := strings.NewReader("{ \"body\": \"example\", \"consentListId\": \"example\", \"noOptOut\": true }")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}const url = 'https://reputecast.example.com/api/v1/workspaces/acme-newsletter/sms/step-estimate';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"body":"example","consentListId":"example","noOptOut":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://reputecast.example.com/api/v1/workspaces/acme-newsletter/sms/step-estimate \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "body": "example", "consentListId": "example", "noOptOut": true }'Permission: automations:view
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”workspace
required
Workspace slug
string
Workspace slug
Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
body
required
string
consentListId
string
noOptOut
boolean
Example generated
{ "body": "example", "consentListId": "example", "noOptOut": true}Responses
Section titled “Responses”OK
Media typeapplication/json
object
budget
required
object
after
required
number format: double
alertPct
required
integer format: int64
budget
required
number format: double
month
required
string format: date-time
setAt
string format: date-time
setBy
string
spent
required
number format: double
cost
required
number format: double
costs
required
Array<object>
object
adapter
required
string
cost
required
number format: double
country
required
string
pendingPrice
required
number format: double
price
required
number format: double
provider
required
string
recipients
required
integer format: int64
segments
required
integer format: int64
sender
required
string
senderKind
required
string
skipReason
string
skipped
required
integer format: int64
counter
required
object
base
required
integer format: int64
capacity
required
integer format: int64
characters
required
integer format: int64
encoding
required
string
fields
required
Array<object>
object
fallback
required
string
hasFallback
required
boolean
key
required
string
fill
required
Array<integer>
left
required
integer format: int64
longest
object
characters
required
integer format: int64
cost
required
number format: double
name
required
string
recipients
required
integer format: int64
segments
required
integer format: int64
value
required
string
outside
required
Array<object>
object
char
required
string
count
required
integer format: int64
first
required
integer format: int64
kind
required
string
removable
required
boolean
replacement
required
string
segments
required
integer format: int64
spread
required
Array<object>
object
recipients
required
integer format: int64
segments
required
integer format: int64
units
required
integer format: int64
links
required
Array<object>
object
host
required
string
length
required
integer format: int64
shortener
required
boolean
url
required
string
utmCampaign
required
string
optOut
required
string
prefix
required
string
shortDomain
required
string
shorteners
required
Array<string>
texts
required
integer format: int64
window
required
string
Example
{ "counter": { "encoding": "gsm7", "outside": [ { "kind": "curly_apostrophe" } ] }}default
Section titled “default”Error
Media typeapplication/problem+json
object
code
Stable error code, e.g. permission_denied
string
detail
A human-readable explanation specific to this occurrence of the problem.
string
errors
Optional list of individual error details
Array<object>
object
location
Where the error occurred, e.g. ‘body.items[3].tags’ or ‘path.thing-id’
string
message
Error message text
string
value
The value at the given location
helpers
Members who hold the missing permission
Array<string>
instance
A URI reference that identifies the specific occurrence of the problem.
string format: uri
meta
object
key
additional properties
permission
The missing permission key
string
status
HTTP status code
integer format: int64
title
A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
string
type
A URI reference to human-readable documentation for the error.
string format: uri
Example
{ "detail": "Property foo is required but is missing.", "instance": "https://example.com/error-log/abc123", "status": 400, "title": "Bad Request", "type": "about:blank"}