> For the complete documentation index, see [llms.txt](https://developers.gleantap.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.gleantap.com/update-data/sms-opt-in-a-contact.md).

# SMS Opt-in a Contact

## Opt-in a contact

> Sends a double-optin message to a contact. Once the contact responds YES, the contact will be opted in. The double optin message can be configured from the Configure SMS settings.

```json
{"openapi":"3.0.0","info":{"title":"Gleantap External API","version":"1.0.0"},"tags":[{"name":"Contacts","description":"Contacts"}],"servers":[{"url":"https://api.gleantap.com","description":"Production server"}],"paths":{"/v2/ExternalApi/optin":{"post":{"tags":["Contacts"],"summary":"Opt-in a contact","description":"Sends a double-optin message to a contact. Once the contact responds YES, the contact will be opted in. The double optin message can be configured from the Configure SMS settings.","operationId":"4e2209fe49e5005f2418712b3679e6a6","parameters":[{"name":"X-API-KEY","in":"header","description":"Your API key","required":true,"schema":{"type":"string"}},{"name":"X-SECRET-KEY","in":"header","description":"Your Secret key","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"required":["app_id","phone","email","user_id"],"properties":{"app_id":{"type":"string"},"phone":{"type":"string"},"email":{"type":"string","format":"email"},"user_id":{"type":"string"},"dob":{"description":"Date of birth in YYYY-MM-DD format","type":"string","format":"date"}},"type":"object"}}}},"responses":{"200":{"description":"Contact opted-in successfully","content":{"application/json":{"schema":{"properties":{"status":{"type":"string"}},"type":"object"}}}},"400":{"description":"Invalid request or age restriction"}}}}}}
```
