---
updatedAt: 2026-03-01T18:59:02.000Z
---

# Create a new origin

```curl cURL
egcurl --eg-section default --request POST \

  --url "https://$hostname/config-media-live/v2/msl-origin/origins" \
  --header "Accept: application/json" \
  --header "Content-Type: application/json" \
  --data '
{
    "contractId": "C-Contract-123",
    "hostName": "demohost",
    "cpcode": 123456,
    "encoderZone": "US_EAST",
    "backupEncoderZone": "EUROPE",
    "thirdPartyCdnCpcode": 654321,
    "groupId": 1234,
    "emailIds": [
        "email1",
        "email2"
    ],
    "sharedKeys": [
        {
            "type": "AKAMAI",
            "authMethod": "MSL_MULTI_ACCOUNT",
            "name": "SomeName01",
            "key": "7153f558f89e058ae",
            "enabled": true
        },
        {
            "type": "AKAMAI",
            "authMethod": "MSL_MULTI_ACCOUNT",
            "name": "nonce2",
            "key": "2557f557f39e025db",
            "enabled": false
        },
        {
            "type": "THIRD_PARTY",
            "authMethod": "SIMPLE_AKAMAI_HEADER_VERIFICATION",
            "name": "SomeName03",
            "cdnCode": "dn00x",
            "enabled": false,
            "guid": "402254d3-e75e-4501-8709-5a3a2211f79",
            "key": "h0BhBScF1Wb3y1r8clJqqg==",
            "expiryDate": "2018-12-12T06:15:00.000Z"
        },
        {
            "type": "THIRD_PARTY",
            "authMethod": "SIMPLE_AKAMAI_HEADER_VERIFICATION",
            "name": "SomeName04",
            "cdnCode": "dn00x",
            "enabled": true,
            "guid": "105254f3-e75e-4501-8709-5a3a2277d09",
            "key": "h2MhYEcH1Wu3z1r9clJoob==",
            "expiryDate": "2017-09-25T18:33:00.000Z"
        }
    ]
}'
}
'
```

```node Node
const EdgeGrid = require("akamai-edgegrid");
const os = require("os");
const edgercPath = os.homedir + "/.edgerc.txt";
const edgercSection = "default";  
const eg = new EdgeGrid({
  path: edgercPath,
  section: edgercSection
});   


eg.auth({
  path: `/config-media-live/v2/msl-origin/origins`,
  method: "POST",
  headers: {
    "Content-Type": "application/json",

    "Accept": "application/json"},
  body: {
    "contractId": "C-Contract-123",
    "hostName": "demohost",
    "cpcode": 123456,
    "encoderZone": "US_EAST",
    "backupEncoderZone": "EUROPE",
    "thirdPartyCdnCpcode": 654321,
    "groupId": 1234,
    "emailIds": [
        "email1",
        "email2"
    ],
    "sharedKeys": [
        {
            "type": "AKAMAI",
            "authMethod": "MSL_MULTI_ACCOUNT",
            "name": "SomeName01",
            "key": "7153f558f89e058ae",
            "enabled": true
        },
        {
            "type": "AKAMAI",
            "authMethod": "MSL_MULTI_ACCOUNT",
            "name": "nonce2",
            "key": "2557f557f39e025db",
            "enabled": false
        },
        {
            "type": "THIRD_PARTY",
            "authMethod": "SIMPLE_AKAMAI_HEADER_VERIFICATION",
            "name": "SomeName03",
            "cdnCode": "dn00x",
            "enabled": false,
            "guid": "402254d3-e75e-4501-8709-5a3a2211f79",
            "key": "h0BhBScF1Wb3y1r8clJqqg==",
            "expiryDate": "2018-12-12T06:15:00.000Z"
        },
        {
            "type": "THIRD_PARTY",
            "authMethod": "SIMPLE_AKAMAI_HEADER_VERIFICATION",
            "name": "SomeName04",
            "cdnCode": "dn00x",
            "enabled": true,
            "guid": "105254f3-e75e-4501-8709-5a3a2277d09",
            "key": "h2MhYEcH1Wu3z1r9clJoob==",
            "expiryDate": "2017-09-25T18:33:00.000Z"
        }
    ]
}                    
});
eg.send(function(error, response, body) {
  console.log(body);    
});
```

```python Python
import requests
from akamai.edgegrid import EdgeGridAuth, EdgeRc
from urlparse import urljoin

edgerc = EdgeRc('~/.edgerc.txt')
section = 'default'
baseurl = 'https://%s' % edgerc.get(section, 'host')

session = requests.Session()
session.auth = EdgeGridAuth.from_edgerc(edgerc, section)
 

path= '/config-media-live/v2/msl-origin/origins'
headers = {
  "Content-Type": "application/json",

  "Accept": "application/json"}
payload = {
    "contractId": "C-Contract-123",
    "hostName": "demohost",
    "cpcode": 123456,
    "encoderZone": "US_EAST",
    "backupEncoderZone": "EUROPE",
    "thirdPartyCdnCpcode": 654321,
    "groupId": 1234,
    "emailIds": [
        "email1",
        "email2"
    ],
    "sharedKeys": [
        {
            "type": "AKAMAI",
            "authMethod": "MSL_MULTI_ACCOUNT",
            "name": "SomeName01",
            "key": "7153f558f89e058ae",
            "enabled": true
        },
        {
            "type": "AKAMAI",
            "authMethod": "MSL_MULTI_ACCOUNT",
            "name": "nonce2",
            "key": "2557f557f39e025db",
            "enabled": false
        },
        {
            "type": "THIRD_PARTY",
            "authMethod": "SIMPLE_AKAMAI_HEADER_VERIFICATION",
            "name": "SomeName03",
            "cdnCode": "dn00x",
            "enabled": false,
            "guid": "402254d3-e75e-4501-8709-5a3a2211f79",
            "key": "h0BhBScF1Wb3y1r8clJqqg==",
            "expiryDate": "2018-12-12T06:15:00.000Z"
        },
        {
            "type": "THIRD_PARTY",
            "authMethod": "SIMPLE_AKAMAI_HEADER_VERIFICATION",
            "name": "SomeName04",
            "cdnCode": "dn00x",
            "enabled": true,
            "guid": "105254f3-e75e-4501-8709-5a3a2277d09",
            "key": "h2MhYEcH1Wu3z1r9clJoob==",
            "expiryDate": "2017-09-25T18:33:00.000Z"
        }
    ]
}  

result = session.post(urljoin(baseurl, path), headers=headers, json=payload)
print(result.status_code)
print(result.json())
```

```json Response Example
Location: /api/v2/origins/123
```

# Set up authentication

<!-- curl@1 -->
<!-- node@1-8 -->
<!-- python@1-10 -->

If you haven't already, you need to [create your authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials) in an API client in Control Center. Set up the API client with:

* Access to the Media Streaming API.
* Media Streaming API access level set to READ-WRITE.

Then, you can include this code to apply the token values to validate your requests.

# Form an origin object

<!-- curl@8-52 -->
<!-- node@19-63 -->
<!-- python@19-63 -->

Create a Media Services Live origin object for the request. Refer to the [parameters](https://techdocs.akamai.com/msl/reference/post-origin-1).

# Call the API

<!-- curl@0-100 -->
<!-- node@0-100 -->
<!-- python@0-100 -->

There are no input parameters, so go ahead and call POST on the request URL, providing the body request object.

# Review the response

<!-- curl@0 -->
<!-- node@0 -->
<!-- python@0 -->

The response is successful and returns the `Location` where you can access the new object.