younifyd
Menu

Upsert Environment Alias

Create or update an environment alias

PUT/spaces/{spaceId}/environment_aliases/{aliasId}

Use it in a workflow

  1. Add a step and choose the Contentful connector.
  2. Pick the Upsert Environment Alias action (under Contentful Content Management API).
  3. Fill in the fields below, then reference the result from later steps as {{upsertEnvironmentAlias.response.data}}.

Request

Path parameters

spaceIdstringrequired

ID of the space

aliasIdstringrequired

ID of the environment alias

Headers

X-Contentful-Versioninteger (int64)required

The version of the locale to update.

Request body

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

environmentobjectrequired
sysobject3 fields
json
{
  "environment": {
    "sys": {
      "id": "string",
      "linkType": "Environment",
      "type": "Link"
    }
  }
}

Response

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

environmentobject
sysobject3 fields
sysobject
idstringrequired

Resource ID

typestringrequired

Resource type

environmentobject1 fields
spaceobjectrequired1 fields
createdByobjectrequired1 fields
updatedByobject1 fields
updatedAtstring (date-time)

Last update timestamp

versioninteger (int64)required

Resource version

json
{
  "environment": {
    "sys": {
      "id": "string",
      "linkType": "Environment",
      "type": "Link"
    }
  },
  "sys": {
    "id": "string",
    "type": "string",
    "space": {
      "sys": {
        "id": "string",
        "type": "string",
        "linkType": "string"
      }
    },
    "createdBy": {
      "sys": {
        "id": "string",
        "type": "string",
        "linkType": "string"
      }
    },
    "version": 0,
    "environment": {
      "sys": {
        "id": "string",
        "type": "string",
        "linkType": "string"
      }
    },
    "updatedBy": {
      "sys": {
        "id": "string",
        "type": "string",
        "linkType": "string"
      }
    },
    "updatedAt": "2025-01-01T00:00:00Z"
  }
}

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

Was this page helpful?
Upsert Environment Alias — Contentful — Documentation