Skip to content

Create a new subproject

Request

Use this method to create a new subproject off of a parent project. A subproject is a great way to group resources together.

Limitations

  • Subprojects cannot have their own billing account. The billing account is handled by the parent project.
  • You cannot have a subproject created off of a subproject.
Security
OAuth2.0 or Basic
Path
parentProjectIdstring[^/]+required

the parent project ID the subproject belongs to.

Example:dxxxxxba48b144xxxxx184b81e4xxxxx
Bodyapplication/jsonrequired
displayNamestring, [ 1 .. 255 ] charactersrequired

The display name of the subproject. You cannot have a null value. It does not have to be unique.

Example:"Taco Time"
labelsobject, <= 255 properties

A map of labels. String, key-value pairs that are completely customizable to allow for your metadata. Both the key and the value can be modified. Examples: "region": "US-Northwest" or "phoneNumber": "14051234567"

curl -i -X POST \
  https://subproject.api.sinch.com/v1/projects/dxxxxxba48b144xxxxx184b81e4xxxxx/subprojects \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "displayName": "YOUR_customer'\''s_business_name",
    "labels": {
      "YOUR_key1": "YOUR_value1",
      "YOUR_key2": "YOUR_value2",
      "YOUR_key3": "YOUR_value3"
    }
  }'

Responses

A successful response.

Bodyapplication/json
subprojectIdstringread-onlyrequired

The unique subproject identifier. Not to be confused with the parentProjectId; the subprojectId is a new ID related to your parent project.

displayNamestring, [ 1 .. 255 ] charactersrequired

The display name of the subproject. You cannot have a null value. It does not have to be unique.

Example:"Your Customer's Business Name"
parentProjectIdstringread-onlyrequired

The parent project ID the subproject belongs to. Set from the URL path on creation; a value sent in the request body is ignored.

createTimestring, (date-time)read-onlyrequired

The date/time the subproject was created. ISO 8601 format.

updateTimestring, (date-time)read-onlyrequired

The date/time the subproject was updated. ISO 8601 format.

deletedbooleanread-onlyrequired

The current deleted state of the subproject.

Example:false
labelsobject, <= 255 properties
Response
{ "createTime": "2019-08-24T14:15:22Z", "deleted": false, "displayName": "Your Customer's Business Name", "labels": { "property1": "string", "property2": "string" }, "parentProjectId": "string", "subprojectId": "string", "updateTime": "2019-08-24T14:15:22Z" }