Skip to main content
POST
Create a Stream Source
Creates a persistent RTMPS ingest point for the authenticated user. Returns 201 with the new source in data. This route replaces the deprecated Create Stream Source (POST /2/users/:user_id/sources); see the migration guide.

Request body

name and region are both required. Use the region from Get Recommended Region. AWS-style region codes are accepted and mapped to the nearest X ingest location: us-west-1 and us-west-2 to US West; us-east-1, us-east-2, ca-central-1, sa-east-1, eu-west-1, eu-west-2, eu-west-3, eu-central-1, eu-north-1, ap-south-1, ap-northeast-1, ap-northeast-2, ap-southeast-1 and ap-southeast-2 to US East. Any other value, or any field other than name and region, returns 400.

Response

The response includes the source’s id and its stream_key:
  • id is the source id. Use it as source_id when you go live and in the other /2/sources/:id routes.
  • stream_key is a credential. Configure your encoder with rtmps_url and stream_key, and store the key securely. This is the only response that includes it; read it again later with Get Source Stream Key.
  • region is the X ingest location serving the source (us-east-1 or us-west-2), which can differ from the region you requested.
See the source object for all fields.

Authorizations

Authorization
string
header
required

The access token received from the authorization server in the OAuth 2.0 flow.

Body

application/json
name
string
required

Label for the source.

Minimum string length: 1
region
string
required

Ingest region, as returned by GET /2/region. us-west-1 and us-west-2 ingest in US West; us-east-1, us-east-2, ca-central-1, sa-east-1, eu-west-1, eu-west-2, eu-west-3, eu-central-1, eu-north-1, ap-south-1, ap-northeast-1, ap-northeast-2, ap-southeast-1 and ap-southeast-2 ingest in US East. The response's region is the serving location (us-east-1 or us-west-2).

Minimum string length: 1

Response

The request has succeeded.

data
object
errors
object[]