# Create a Managed Input
Managed inputs are created via the Managed Inputs endpoints in the API. To create an input the endpoint to be used is:
POST /managed-inputs
A basic example of creating a Managed Input with the RTMP_PUSH protocol can be observed below:
{
"name": "ManagedInput1",
"region": "eu-west-1",
"type": "VIRTUAL_INPUT",
"protocol": "RTMP_PUSH"
}
As we can see in this example, all we need in order to create a simple RTMP Push input are 4 fields. This allows for a faster creation of inputs in case we don't need to have any restrictions like which IP address is allowed to stream to our input. Created like this the managed input uses a default CIDR group which allows access from everywhere without any restrictions.
If we want to restrict the IP's allowed to stream to our input we can add an additional field which contains an array of CIDR blocks like this:
{
"allowedCidrBlocks": [
"54.16.39.10/5000"
],
"name": "ManagedInput1",
"region": "eu-west-1",
"type": "VIRTUAL_INPUT",
"protocol": "RTMP_PUSH"
}
Another example this time of a Pull input can be observed below:
{
"sources": [
{
"url": "https://example.ioio.tv/broker/play/c49860fb-7ffc-4275-9ff3-c31273e771b4.m3u8",
"username": "string",
"password": "string"
}
],
"name": "ManagedInput1",
"region": "eu-west-1",
"type": "VIRTUAL_INPUT",
"protocol": "URL_PULL"
}
As we can see here it is basically the same configuration with the addition of a sources field. The sources field consists of an array which can have one or more elements each having its own URL, username and password, like main and a backup streaming URL's. In the example above we can see that username and password have for values "string" this is a default value and when no other value is passed on this is ignored. However if our URL requires authentication with username and password we can pass these parameters to authenticate the input and allow it pull the video stream.
Once the Managed Input has been created with the desired configuration an ID is returned as a response to the POST request. Using this ID we can manage the input and attach it to a workflow.