> For the complete documentation index, see [llms.txt](https://dantonia.gitbook.io/test/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dantonia.gitbook.io/test/messaging/retrieve-extended-sms-info.md).

# Retrieve Extended SMS Info

## GetSMSByUUID

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/rest/sms/outbound/{uuid}`

This will get extended outbound SMS info.

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| uuid | string |             |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| Authorization | string | JWT or Bearer |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "success": true,
  "payload": {
    "state": "sending",
    "created_on": "2020-10-27T16:33:05.928Z",
    "modified_on": "2020-10-27T16:33:07.045Z",
    "uuid": "6f837aa1-f6aa-45af-9764-3c4bfa84098f",
    "to": "J Smith",
    "thread": "fdbbf3c163f386c272ed1b75a1d898bf",
    "message": "test message",
    "delivered": false,
    "automated": false,
    "reference_id": "yRUCycblUjwqpkMBwPbJf4",
    "custom_callback_url": "www.example.com",
    "tn": {
      "created_on": "2020-10-27T16:30:48.249Z",
      "modified_on": "2020-10-27T16:30:49.593Z",
      "tn": 12013046585,
      "deleted_on": null,
      "voice": false,
      "fax": false,
      "sms": true,
      "mms": false,
      "emergency": false,
      "registered": true
    },
    "account": {
      "created_on": "2020-10-26T08:44:15.621Z",
      "modified_on": "2020-10-26T08:44:15.914Z",
      "uuid": "cfb6fe69-d7b2-4e66-bc23-872a2baf3b00",
      "email": "user@mail.co.uk",
      "name": "John Smith",
      "level": "Level0",
      "deleted_on": null,
      "balance": 3.24,
      "class4_id": 268
    },
    "created_by": {
      "created_on": "2020-10-26T08:44:15.621Z",
      "modified_on": "2020-10-26T08:44:16.023Z",
      "uuid": "60e9fa76-20e7-45ee-bf24-8c4a95143dad",
      "email": "user@mail.co.uk",
      "phone_number": null,
      "first_name": "John",
      "last_name": "Smith",
      "dob": null,
      "gmail_user_id": "107653031006300523703",
      "facebook_user_id": null,
      "apple_user_id": null,
      "wechat_user_id": null,
      "role": "User",
      "gender": null,
      "deleted_on": null
    }
  }
}
```

{% endtab %}

{% tab title="401 " %}

```javascript
{
  "success": true,
  "message": "string",
  "status": 0
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "success": true,
  "message": "string",
  "status": 0
}
```

{% endtab %}
{% endtabs %}

### Code Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET "https://api.opentact.org/rest/sms/outbound/{uuid}" \
-H  "accept: application/json" -H  "X-Auth-Token:JWT_TOKEN"
```

{% endtab %}

{% tab title="PHP" %}

```php
<?php
include('vendor/rmccue/requests/library/Requests.php');
Requests::register_autoloader();
$headers = array(
    'accept' => 'application/json',
    'X-Auth-Token' => 'JWT_TOKEN'
);
$response = Requests::get('https://api.opentact.org/rest/sms/outbound/{uuid}', $headers);

```

{% endtab %}

{% tab title="Python" %}

```python
import requests

headers = {
    'accept': 'application/json',
    'X-Auth-Token': 'JWT_TOKEN',
}

response = requests.get('https://api.opentact.org/rest/sms/outbound/%7Buuid%7D', headers=headers)

```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var fetch = require('node-fetch');

fetch('https://api.opentact.org/rest/sms/outbound/{uuid}', {
    headers: {
        'accept': 'application/json',
        'X-Auth-Token': 'JWT_TOKEN'
    }
});

```

{% endtab %}

{% tab title="Go" %}

```go
package main

import (
	"fmt"
	"io/ioutil"
	"log"
	"net/http"
)

func main() {
	client := &http.Client{}
	req, err := http.NewRequest("GET", "https://api.opentact.org/rest/sms/outbound/{uuid}", nil)
	if err != nil {
		log.Fatal(err)
	}
	req.Header.Set("accept", "application/json")
	req.Header.Set("X-Auth-Token", "JWT_TOKEN")
	resp, err := client.Do(req)
	if err != nil {
		log.Fatal(err)
	}
	bodyText, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		log.Fatal(err)
	}
	fmt.Printf("%s\n", bodyText)
}

```

{% endtab %}
{% endtabs %}

## GetSMSIByUUID

<mark style="color:blue;">`GET`</mark> `https://api.opentact.org/rest/sms/inbound/{uuid}`

This will get extended inbound SMS info.

#### Path Parameters

| Name | Type   | Description |
| ---- | ------ | ----------- |
| uuid | string |             |

#### Headers

| Name          | Type   | Description   |
| ------------- | ------ | ------------- |
| Authorization | string | JWT or Bearer |

{% tabs %}
{% tab title="200 " %}

```javascript
{
  "success": true,
  "payload": {
    "created_on": "2019-08-24T14:15:22Z",
    "modified_on": "2019-08-24T14:15:22Z",
    "uuid": "string",
    "tn": {},
    "tnlease": {},
    "to": "string",
    "from": "string",
    "thread": "stringstringstringstringstringstr",
    "message": "string",
    "provider_event": {},
    "state": "created",
    "delivered": true,
    "readed": true,
    "account": {}
  }
}
```

{% endtab %}

{% tab title="401 " %}

```javascript
{
  "success": false,
  "message": "string",
  "status": 0
}
```

{% endtab %}

{% tab title="404 " %}

```javascript
{
  "success": false,
  "message": "SMS not found",
  "status": "404"
}
```

{% endtab %}
{% endtabs %}

### Code Example

{% tabs %}
{% tab title="cURL" %}

```bash
curl -X GET "https://api.opentact.org/rest/sms/inbound/{uuid}" \
-H  "accept: application/json" -H  "X-Auth-Token:JWT_TOKEN"
```

{% endtab %}
{% endtabs %}
