Skip to content

Commit

Permalink
Update sms.md (2600hz#6517)
Browse files Browse the repository at this point in the history
lazedo authored May 1, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 3e08f4a commit b855adf
Showing 1 changed file with 31 additions and 3 deletions.
34 changes: 31 additions & 3 deletions applications/crossbar/doc/sms.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

#### About Sms

SMS api endpoint allows sending a text message.

#### Schema

sms document
@@ -16,12 +18,38 @@ Key | Description | Type | Default | Required | Support Level



#### Fetch
## Sending a text message

> GET /v2/accounts/{ACCOUNT_ID}/sms
> PUT /v2/accounts/{ACCOUNT_ID}/sms
```shell
curl -v -X GET \
curl -v -X PUT \
-H "X-Auth-Token: {AUTH_TOKEN}" \
-d '{"data": {"from": "+15551112222", "to": "+15552221111", "body": "wave if you received this"}}' \
http://{SERVER}:8000/v2/accounts/{ACCOUNT_ID}/sms
```

```json
{
"request_id": "{REQUEST_ID}",
"tokens": {
"consumed": 1,
"remaining": 100
},
"auth_token": "{AUTH_TOKEN}",
"data": {
"message_id": "{REQUEST_ID}",
"from": "+15551112222",
"to": "+15552221111",
"body": "waive if you received this",
"custom_vars": {
"account_id": "{ACCOUNT_ID}",
"reseller_id": "{RESELLER_ID}",
"authorizing_type": "account",
"authorizing_id": "{ACCOUNT_ID}"
},
"route_type": "offnet"
},
"status": "success"
}
```

0 comments on commit b855adf

Please sign in to comment.