younifyd
Menu

Create Project

Create a project

POST/projects

Use it in a workflow

  1. Add a step and choose the Sanity connector.
  2. Pick the Create Project action (under Projects).
  3. Fill in the fields below, then reference the result from later steps as {{createProject.response.data}}.

Request

Request body

Enter the body as JSON in the step's Body field.

displayNamestringrequired

The display name of the project.

organizationIdstring

Assign the created project to the specified organization. The organization to which organizationId belongs must already exist and you must have sufficient permissions to assign a project to the organization. If omitted, a new organization is created for you and the project is assigned to it.

idstring

A preferred ID for the project, 5 to 16 characters. It is converted to lowercase.

metadataobject
colorstring
externalStudioHoststring

This field is deprecated. Use the /user-applications API instead.

studioHoststring

This field is deprecated. Use the /user-applications API instead.

createDefaultCorsOriginboolean

Whether to create a default localhost CORS origin for the project.

Default true

json
{
  "displayName": "My Project",
  "organizationId": "oAbC123xyz",
  "id": "wefsadfj",
  "metadata": {
    "color": "#000000",
    "externalStudioHost": "https://my-project.my-domain.com"
  },
  "studioHost": "string",
  "createDefaultCorsOrigin": true
}

Response

Returns 201 with an object. Read it in later steps with {{createProject.response.data.<field>}}.

idstring
displayNamestring
studioHoststring | null

This field is deprecated. Use the /user-applications API instead.

organizationIdstring | null
metadataobject
colorstring
isBlockedboolean
isDisabledboolean
isDisabledByUserboolean
activityFeedEnabledboolean
createdAtstring (date-time)
updatedAtstring (date-time)
membersarray<object>

Only included when `includeMembers` is `true`.

idstring
rolestring

The member's legacy role. Only returned in the create project response and on API versions before v2021-06-07. Use `roles` instead.

rolesarray<object>3 fields
isCurrentUserboolean

Whether this member is you. Not included in the create project response.

isRobotboolean

Whether this member is a token rather than a person. Not included in the create project response.

createdAtstring (date-time)
updatedAtstring (date-time)
featuresarray<string>

Only included when `includeFeatures` is `true`.

organizationobject

The project's organization. Only included when retrieving a single project with `includeOrganization` set to `true`.

json
{
  "id": "string",
  "displayName": "string",
  "studioHost": "string",
  "organizationId": "string",
  "metadata": {
    "color": "string"
  },
  "isBlocked": false,
  "isDisabled": false,
  "isDisabledByUser": false,
  "activityFeedEnabled": false,
  "createdAt": "2025-01-01T00:00:00Z",
  "updatedAt": "2025-01-01T00:00:00Z",
  "members": [
    {
      "id": "string",
      "role": "administrator",
      "roles": [
        {
          "name": "string",
          "title": "string",
          "description": "string"
        }
      ],
      "isCurrentUser": false,
      "isRobot": false,
      "createdAt": "2025-01-01T00:00:00Z",
      "updatedAt": "2025-01-01T00:00:00Z"
    }
  ]
}

Need more? See the Sanity guide for connection setup and behaviour shared by every action.

Was this page helpful?