HydraCore
API by router

Sms channel

Sms Status

Get SMS channel status for an instance.

GET
/v1/instances/{instance_id}/channels/sms
AuthorizationBearer <token>

In: header

Path Parameters

instance_idInstance Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X GET "https://loading/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/sms" \  -H "X-Api-Key: string"
{
  "enabled": true,
  "phone_number": "string",
  "status": "string",
  "webhook_url": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Setup Sms

Configure SMS for an instance. Creates channel_endpoint + encrypted credentials.

POST
/v1/instances/{instance_id}/channels/sms
AuthorizationBearer <token>

In: header

Path Parameters

instance_idInstance Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key
account_sidAccount Sid

Twilio Account SID

auth_tokenAuth Token

Twilio Auth Token (stored encrypted)

phone_numberPhone Number

Twilio phone number (E.164 format, e.g. +61400111222)

Lengthlength <= 30

Response Body

curl -X POST "https://loading/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/sms" \  -H "X-Api-Key: string" \  -H "Content-Type: application/json" \  -d '{    "account_sid": "string",    "auth_token": "string",    "phone_number": "string"  }'
{
  "enabled": true,
  "phone_number": "string",
  "status": "string",
  "webhook_url": "string"
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

Teardown Sms

Remove SMS channel + credentials from instance.

DELETE
/v1/instances/{instance_id}/channels/sms
AuthorizationBearer <token>

In: header

Path Parameters

instance_idInstance Id
Formatuuid

Header Parameters

X-Api-Key?X-Api-Key

Response Body

curl -X DELETE "https://loading/v1/instances/497f6eca-6276-4993-bfeb-53cbbbba6f08/channels/sms" \  -H "X-Api-Key: string"
Empty
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}