# Create a Subscription Once you have set up and configured your data collector, create a subscription to stream your colocation data to it. > **Note** > > You can use only one communication channel type in your organization. For example, if you create a subscription with the AWS IoT Core channel, you won't be able to create another subscription using a different channel type. > > Only one channel is allowed for a single subscription. ## Prerequisites[​](#prerequisites "Direct link to Prerequisites") * Before calling the Subscription Management APIs, refer to [Integrating with a Collector](https://docs.equinix.com/smart-view/sv-api/integrating-with-collector.md) to set up and configure the destination for your data. * Submit your user credentials, Client ID, and Client Secret for OAuth2 authentication. Refer to [API Authentication](https://docs.equinix.com/equinix-api/api-authentication.md) for more information on how to authenticate your requests to the Equinix API. ## AWS IoT Core[​](#aws-iot-core "Direct link to AWS IoT Core") To create a subscription to send data to Amazon IoT Core, send a `POST` request to the [`/smartview/v2/streaming/subscriptions`](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/createsubscription.md) endpoint. In the body of the request, specify the `channelType` as `AWS_IOT_CORE` and its URL in `awsIotCoreChannelConfiguration`. Specify which data it should receive in the `messageType` object. Sample cURL Request: ``` curl -X  POST 'https://api.equinix.com/smartview/v2/streaming/subscriptions' -H 'content-type: application/json' -H 'authorization: Bearer ' -d '{     "messageType": {         "asset": [],         "environmental": [             {                 "accountNumber": "116710",                 "ibx": [                     "LD9"                 ],                 "level": [                     "CAGE"                 ]             }         ],         "power": [],         "meteredPower": [],         "systemAlert": [],         "customAlert": []     },     "channel": {         "channelType": "AWS_IOT_CORE",         "awsIotCoreChannelConfiguration": {             "url": "https://.amazonaws.com"         }     } }'  ``` For a complete listing of available options for `messageType`, see the [API Reference](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/createsubscription.md). ## Webhook[​](#webhook "Direct link to Webhook") To create a subscription to send data to a webhook, send a `POST` request to the [`/smartview/v2/streaming/subscriptions`](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/createsubscription.md) endpoint. In the body of the request, specify the `channelType` as `WEBHOOK` and its configuration in `webhookChannelConfiguration`. Specify which data it should receive in the `messageType` object. Sample cURL Request: ``` curl -X  POST 'https://api.equinix.com/smartview/v2/streaming/subscriptions' -H 'content-type: application/json' -H 'authorization: Bearer ' -d '{     "messageType": {         "asset": [],         "environmental": [             {                 "accountNumber": "116710",                 "ibx": [                     "LD9"                 ],                 "level": [                     "CAGE"                 ]             }         ],         "power": [],         "meteredPower": [],         "systemAlert": [],         "customAlert": []     },     "channel": {         "channelType": "WEBHOOK",         "webhookChannelConfiguration": { "sslCertificate": "ZkFzZLY1IGRpY31kZXI=...", "url": "https://.com", "numberOfRetries": 1, "numberOfConcurrentCalls": 20, "batchSize": 5 },     } }'  ``` For a list of webhook configuration options and available options for `messageType`, see the [API Reference](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/createsubscription.md). ## Equinix Rest API[​](#equinix-rest-api "Direct link to Equinix Rest API") To create a subscription to make your data available from the Equinix API, send a `POST` request to the [`/smartview/v2/streaming/subscriptions`](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/createsubscription.md) endpoint. In the body of the request, specify the `channelType` as `REST`. Specify which data it should receive in the `messageType` object. Sample cURL Request: ``` curl -X  POST 'https://api.equinix.com/smartview/v2/streaming/subscriptions' -H 'content-type: application/json' -H 'authorization: Bearer ' -d '{     "messageType": {         "asset": [],         "environmental": [             {                 "accountNumber": "116710",                 "ibx": [                     "LD9"                 ],                 "level": [                     "CAGE"                 ]             }         ],         "power": [],         "meteredPower": [],         "systemAlert": [],         "customAlert": []     },     channel": { "channelType": "REST", "restChannelConfiguration": { } } }'  ``` For a complete listing of available options for `messageType`, see the [API Reference](https://docs.equinix.com/api-catalog/smartviewv2/streaming-subscription-api/createsubscription.md). Sample Response: ``` HTTP/1.1 201 Created Location: /smartview/v2/streaming/subscriptions/0f6bdb36-e130-4924-b038-ee1785fad999 ``` The `Location` header in the response contains the subscription ID required to consume the real-time feed.