> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/connect/n8n-api/instance-operations/promotions.md).

# Promotions

Operations about promotion providers, environments, and package operations

## List promotion providers

> Returns a cursor-paginated list of providers, without their public configuration.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/providers":{"get":{"operationId":"getPromotionProviders","tags":["Promotions"],"summary":"List promotion providers","description":"Returns a cursor-paginated list of providers, without their public configuration.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]}},"nextCursor":{"type":"string","nullable":true}},"required":["data","nextCursor"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Create a promotion provider

> Creates a provider and its authentication material. A Git host provider validates authenticated API access before it saves. For GitLab, the service uses n8n as the Git transport username. Its auth.username is optional. The service ignores any supplied username. Plain Git token authentication requires auth.username. An SSH provider returns the generated public key; add it to the remote as a deploy key.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/providers":{"post":{"operationId":"createPromotionProvider","tags":["Promotions"],"summary":"Create a promotion provider","description":"Creates a provider and its authentication material. A Git host provider validates authenticated API access before it saves. For GitLab, the service uses n8n as the Git transport username. Its auth.username is optional. The service ignores any supplied username. Plain Git token authentication requires auth.username. An SSH provider returns the generated public key; add it to the remote as a deploy key.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"type":{"type":"string","enum":["git","gitlab"]},"auth":{"oneOf":[{"type":"object","properties":{"authType":{"type":"string","enum":["ssh-key"]},"keyType":{"type":"string","enum":["ed25519","rsa"],"default":"ed25519"}},"required":["authType"],"additionalProperties":false},{"type":"object","properties":{"authType":{"type":"string","enum":["token"]},"username":{"type":"string","minLength":1,"description":"Required for plain Git token authentication. For GitLab, the service ignores this field and uses n8n for Git transport."},"password":{"type":"string","minLength":1}},"required":["authType","password"],"additionalProperties":false}],"type":"object"},"config":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseUrl":{"type":"string"}},"required":["schemaVersion","baseUrl"],"additionalProperties":false}},"required":["name","type","auth"],"additionalProperties":false}}}},"responses":{"201":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"config":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"publicKey":{"type":"string","minLength":1},"keyType":{"type":"string","enum":["ed25519","rsa"]}},"required":["schemaVersion","publicKey","keyType"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]}},"required":["schemaVersion"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseUrl":{"type":"string"}},"required":["schemaVersion","baseUrl"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","config","createdAt","updatedAt"]},"publicKey":{"type":"string","nullable":true}},"required":["provider","publicKey"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Retrieve a promotion provider

> Returns the provider with its public configuration. Secrets are never returned.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"promotionProviderPublicDto.generated":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"config":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"publicKey":{"type":"string","minLength":1},"keyType":{"type":"string","enum":["ed25519","rsa"]}},"required":["schemaVersion","publicKey","keyType"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]}},"required":["schemaVersion"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseUrl":{"type":"string"}},"required":["schemaVersion","baseUrl"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","config","createdAt","updatedAt"]}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/providers/{promotionProviderId}":{"get":{"operationId":"getPromotionProvider","tags":["Promotions"],"summary":"Retrieve a promotion provider","description":"Returns the provider with its public configuration. Secrets are never returned.","parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the promotion provider.","name":"promotionProviderId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotionProviderPublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Update a promotion provider

> Renames the provider, and replaces its credentials when \`auth\` is sent. A Git host provider can also update its base URL. A different API destination requires \`auth\` in the same request. Changed credentials and host settings are validated before they save. If another request changes the credentials or configuration before this update saves, the update returns 409. Reload the provider and try again. For GitLab, the service uses n8n as the Git transport username. Its auth.username is optional. The service ignores any supplied username. Plain Git token authentication requires auth.username. New credentials apply to every environment that uses this provider. The authentication method cannot change.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"promotionProviderPublicDto.generated":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"config":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"publicKey":{"type":"string","minLength":1},"keyType":{"type":"string","enum":["ed25519","rsa"]}},"required":["schemaVersion","publicKey","keyType"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]}},"required":["schemaVersion"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseUrl":{"type":"string"}},"required":["schemaVersion","baseUrl"],"additionalProperties":false}]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","config","createdAt","updatedAt"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/providers/{promotionProviderId}":{"put":{"operationId":"updatePromotionProvider","tags":["Promotions"],"summary":"Update a promotion provider","description":"Renames the provider, and replaces its credentials when `auth` is sent. A Git host provider can also update its base URL. A different API destination requires `auth` in the same request. Changed credentials and host settings are validated before they save. If another request changes the credentials or configuration before this update saves, the update returns 409. Reload the provider and try again. For GitLab, the service uses n8n as the Git transport username. Its auth.username is optional. The service ignores any supplied username. Plain Git token authentication requires auth.username. New credentials apply to every environment that uses this provider. The authentication method cannot change.","parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the promotion provider.","name":"promotionProviderId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"auth":{"oneOf":[{"type":"object","properties":{"authType":{"type":"string","enum":["ssh-key"]},"keyType":{"type":"string","enum":["ed25519","rsa"]}},"required":["authType"],"additionalProperties":false},{"type":"object","properties":{"authType":{"type":"string","enum":["token"]},"username":{"type":"string","minLength":1,"description":"Required for plain Git token authentication. For GitLab, the service ignores this field and uses n8n for Git transport."},"password":{"type":"string","minLength":1}},"required":["authType","password"],"additionalProperties":false}],"type":"object"},"config":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseUrl":{"type":"string"}},"required":["schemaVersion","baseUrl"],"additionalProperties":false}},"additionalProperties":false,"minProperties":1}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotionProviderPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Delete a promotion provider

> A provider used by an environment cannot be deleted.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/providers/{promotionProviderId}":{"delete":{"operationId":"deletePromotionProvider","tags":["Promotions"],"summary":"Delete a promotion provider","description":"A provider used by an environment cannot be deleted.","parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the promotion provider.","name":"promotionProviderId","in":"path"}],"responses":{"204":{"description":"Operation successful."},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## List repositories of a promotion provider

> Lists repositories where the GitLab token identity has at least the Developer role. The token also needs Git write scope for promotions. Protected branches can restrict pushes. Use remoteUrl as an environment remote. Search matches names and namespaces in similarity order. Unfiltered results use ascending repository ID order. The limit is an upper bound. GitLab returns at most 100 items per page. Follow nextCursor even when a page has fewer items than the requested limit. A saved environment is not required. Invalid credentials return an error, not an empty list. If a response is too large, restart the list with a smaller limit and no cursor.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/providers/{promotionProviderId}/repositories":{"get":{"operationId":"getPromotionProviderRepositories","tags":["Promotions"],"summary":"List repositories of a promotion provider","description":"Lists repositories where the GitLab token identity has at least the Developer role. The token also needs Git write scope for promotions. Protected branches can restrict pushes. Use remoteUrl as an environment remote. Search matches names and namespaces in similarity order. Unfiltered results use ascending repository ID order. The limit is an upper bound. GitLab returns at most 100 items per page. Follow nextCursor even when a page has fewer items than the requested limit. A saved environment is not required. Invalid credentials return an error, not an empty list. If a response is too large, restart the list with a smaller limit and no cursor.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"schema":{"type":"string"},"required":true,"description":"The ID of the promotion provider.","name":"promotionProviderId","in":"path"},{"schema":{"type":"string","maxLength":255},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"fullPath":{"type":"string"},"remoteUrl":{"type":"string"},"defaultBranch":{"type":"string","nullable":true}},"required":["id","name","fullPath","remoteUrl","defaultBranch"]}},"nextCursor":{"type":"string","nullable":true}},"required":["data","nextCursor"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## List branches of a promotion repository

> Lists branches of the selected GitLab repository and identifies its default branch. Pass the URL-encoded fullPath from repository discovery, or the repositoryPath of a saved GitLab environment, as repositoryId. GitLab project IDs are also accepted, but environments do not store them. Supports branch search and cursor pagination. The limit is an upper bound. GitLab returns at most 100 items per page. Follow nextCursor even when a page has fewer items than the requested limit. A saved environment is not required. Invalid credentials and inaccessible repositories return errors, not empty lists. If a response is too large, restart the list with a smaller limit and no cursor.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/providers/{promotionProviderId}/repositories/{repositoryId}/branches":{"get":{"operationId":"getPromotionProviderRepositoryBranches","tags":["Promotions"],"summary":"List branches of a promotion repository","description":"Lists branches of the selected GitLab repository and identifies its default branch. Pass the URL-encoded fullPath from repository discovery, or the repositoryPath of a saved GitLab environment, as repositoryId. GitLab project IDs are also accepted, but environments do not store them. Supports branch search and cursor pagination. The limit is an upper bound. GitLab returns at most 100 items per page. Follow nextCursor even when a page has fewer items than the requested limit. A saved environment is not required. Invalid credentials and inaccessible repositories return errors, not empty lists. If a response is too large, restart the list with a smaller limit and no cursor.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"schema":{"type":"string"},"required":true,"description":"The ID of the promotion provider.","name":"promotionProviderId","in":"path"},{"schema":{"type":"string","minLength":1,"maxLength":256},"required":true,"description":"The URL-encoded fullPath of the repository. A GitLab project ID is also accepted.","name":"repositoryId","in":"path"},{"schema":{"type":"string","maxLength":255},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"isDefault":{"type":"boolean"}},"required":["name","isDefault"]}},"nextCursor":{"type":"string","nullable":true}},"required":["data","nextCursor"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## List promotion environments

> Returns a cursor-paginated list of environments. Filter by \`scope\` and \`direction\` for the instance environments, or by \`providerId\` to see which environments a provider edit affects.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"limit":{"name":"limit","in":"query","description":"The maximum number of items to return.","required":false,"schema":{"type":"number","default":100,"maximum":250}},"cursor":{"name":"cursor","in":"query","description":"Paginate by setting the cursor parameter to the nextCursor attribute returned by the previous request's response. Default value fetches the first \"page\" of the collection. See pagination for more detail.","required":false,"style":"form","schema":{"type":"string"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments":{"get":{"operationId":"getPromotionEnvironments","tags":["Promotions"],"summary":"List promotion environments","description":"Returns a cursor-paginated list of environments. Filter by `scope` and `direction` for the instance environments, or by `providerId` to see which environments a provider edit affects.","parameters":[{"$ref":"#/components/parameters/limit"},{"$ref":"#/components/parameters/cursor"},{"schema":{"type":"string","enum":["instance","projects"]},"required":false,"name":"scope","in":"query"},{"schema":{"type":"string","enum":["apply","promote"]},"required":false,"name":"direction","in":"query"},{"schema":{"type":"string","minLength":1,"maxLength":36},"required":false,"name":"providerId","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"scope":{"type":"string","enum":["instance","projects"]},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1},"repositoryPath":{"type":"string","description":"The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it."}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["apply"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"branchName":{"type":"string","minLength":1,"maxLength":255}},"required":["schemaVersion","branchName"],"additionalProperties":false}},"required":["id","name","scope","remote","provider","createdAt","updatedAt","direction","settings"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"scope":{"type":"string","enum":["instance","projects"]},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1},"repositoryPath":{"type":"string","description":"The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it."}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["promote"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseBranchName":{"type":"string","minLength":1,"maxLength":255},"createBranchOnPromotion":{"type":"boolean"}},"required":["schemaVersion","baseBranchName","createBranchOnPromotion"],"additionalProperties":false}},"required":["id","name","scope","remote","provider","createdAt","updatedAt","direction","settings"]}],"type":"object"}},"nextCursor":{"type":"string","nullable":true}},"required":["data","nextCursor"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Create a promotion environment

> Creates an environment for one direction on an existing provider. The settings must match the direction. A GitLab remote URL must belong to the saved provider. The environment stores only the repository path and derives remoteUrl from the current provider base URL. Plain Git environments keep the full remote URL. The instance can have one environment for each direction.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"schemas":{"promotionEnvironmentPublicDto.generated":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"scope":{"type":"string","enum":["instance","projects"]},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1},"repositoryPath":{"type":"string","description":"The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it."}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["apply"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"branchName":{"type":"string","minLength":1,"maxLength":255}},"required":["schemaVersion","branchName"],"additionalProperties":false},"checkout":{"type":"object","properties":{"hasCheckout":{"type":"boolean"},"matchesEnvironment":{"type":"boolean"}},"required":["hasCheckout","matchesEnvironment"]}},"required":["id","name","scope","remote","provider","createdAt","updatedAt","direction","settings","checkout"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"scope":{"type":"string","enum":["instance","projects"]},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1},"repositoryPath":{"type":"string","description":"The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it."}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["promote"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseBranchName":{"type":"string","minLength":1,"maxLength":255},"createBranchOnPromotion":{"type":"boolean"}},"required":["schemaVersion","baseBranchName","createBranchOnPromotion"],"additionalProperties":false},"checkout":{"type":"object","properties":{"hasCheckout":{"type":"boolean"},"matchesEnvironment":{"type":"boolean"}},"required":["hasCheckout","matchesEnvironment"]}},"required":["id","name","scope","remote","provider","createdAt","updatedAt","direction","settings","checkout"]}],"type":"object"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments":{"post":{"operationId":"createPromotionEnvironment","tags":["Promotions"],"summary":"Create a promotion environment","description":"Creates an environment for one direction on an existing provider. The settings must match the direction. A GitLab remote URL must belong to the saved provider. The environment stores only the repository path and derives remoteUrl from the current provider base URL. Plain Git environments keep the full remote URL. The instance can have one environment for each direction.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"scope":{"type":"string","enum":["instance","projects"]},"providerId":{"type":"string","minLength":1,"maxLength":36},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"direction":{"type":"string","enum":["apply"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"branchName":{"type":"string","minLength":1,"maxLength":255}},"required":["schemaVersion","branchName"],"additionalProperties":false}},"required":["name","scope","providerId","remote","direction","settings"],"additionalProperties":false},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"scope":{"type":"string","enum":["instance","projects"]},"providerId":{"type":"string","minLength":1,"maxLength":36},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"direction":{"type":"string","enum":["promote"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseBranchName":{"type":"string","minLength":1,"maxLength":255},"createBranchOnPromotion":{"type":"boolean"}},"required":["schemaVersion","baseBranchName","createBranchOnPromotion"],"additionalProperties":false}},"required":["name","scope","providerId","remote","direction","settings"],"additionalProperties":false}],"type":"object"}}}},"responses":{"201":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotionEnvironmentPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Retrieve a promotion environment

> Returns the environment with its provider summary and the state of its local checkout.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"promotionEnvironmentPublicDto.generated":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"scope":{"type":"string","enum":["instance","projects"]},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1},"repositoryPath":{"type":"string","description":"The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it."}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["apply"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"branchName":{"type":"string","minLength":1,"maxLength":255}},"required":["schemaVersion","branchName"],"additionalProperties":false},"checkout":{"type":"object","properties":{"hasCheckout":{"type":"boolean"},"matchesEnvironment":{"type":"boolean"}},"required":["hasCheckout","matchesEnvironment"]}},"required":["id","name","scope","remote","provider","createdAt","updatedAt","direction","settings","checkout"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"scope":{"type":"string","enum":["instance","projects"]},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1},"repositoryPath":{"type":"string","description":"The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it."}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["promote"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseBranchName":{"type":"string","minLength":1,"maxLength":255},"createBranchOnPromotion":{"type":"boolean"}},"required":["schemaVersion","baseBranchName","createBranchOnPromotion"],"additionalProperties":false},"checkout":{"type":"object","properties":{"hasCheckout":{"type":"boolean"},"matchesEnvironment":{"type":"boolean"}},"required":["hasCheckout","matchesEnvironment"]}},"required":["id","name","scope","remote","provider","createdAt","updatedAt","direction","settings","checkout"]}],"type":"object"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}":{"get":{"operationId":"getPromotionEnvironment","tags":["Promotions"],"summary":"Retrieve a promotion environment","description":"Returns the environment with its provider summary and the state of its local checkout.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotionEnvironmentPublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Update a promotion environment

> Updates the name, provider, remote, or settings. A remote replaces the whole saved remote, and settings replace the whole saved settings. The settings must match the direction of the environment, so \`createBranchOnPromotion\` is always required for Promote. GitLab environments store a repository path and derive remoteUrl from the provider. Plain Git environments keep the full remote URL. A new provider type or repository closes the open promotion reviews of the environment in n8n. Their merge requests stay open on the Git host. If the provider changes during the update, the update returns 409. Reload the environment and try again. Direction and scope cannot change.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"promotionEnvironmentPublicDto.generated":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"scope":{"type":"string","enum":["instance","projects"]},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1},"repositoryPath":{"type":"string","description":"The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it."}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["apply"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"branchName":{"type":"string","minLength":1,"maxLength":255}},"required":["schemaVersion","branchName"],"additionalProperties":false},"checkout":{"type":"object","properties":{"hasCheckout":{"type":"boolean"},"matchesEnvironment":{"type":"boolean"}},"required":["hasCheckout","matchesEnvironment"]}},"required":["id","name","scope","remote","provider","createdAt","updatedAt","direction","settings","checkout"]},{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"scope":{"type":"string","enum":["instance","projects"]},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1},"repositoryPath":{"type":"string","description":"The stored repository path of a Git host remote. URL-encode it before you use it as repositoryId to list branches. Requests do not accept it."}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"provider":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["git","gitlab"]},"authType":{"type":"string","enum":["ssh-key","token"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"}},"required":["id","name","type","authType","createdAt","updatedAt"]},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time"},"direction":{"type":"string","enum":["promote"]},"settings":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseBranchName":{"type":"string","minLength":1,"maxLength":255},"createBranchOnPromotion":{"type":"boolean"}},"required":["schemaVersion","baseBranchName","createBranchOnPromotion"],"additionalProperties":false},"checkout":{"type":"object","properties":{"hasCheckout":{"type":"boolean"},"matchesEnvironment":{"type":"boolean"}},"required":["hasCheckout","matchesEnvironment"]}},"required":["id","name","scope","remote","provider","createdAt","updatedAt","direction","settings","checkout"]}],"type":"object"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}":{"put":{"operationId":"updatePromotionEnvironment","tags":["Promotions"],"summary":"Update a promotion environment","description":"Updates the name, provider, remote, or settings. A remote replaces the whole saved remote, and settings replace the whole saved settings. The settings must match the direction of the environment, so `createBranchOnPromotion` is always required for Promote. GitLab environments store a repository path and derive remoteUrl from the provider. Plain Git environments keep the full remote URL. A new provider type or repository closes the open promotion reviews of the environment in n8n. Their merge requests stay open on the Git host. If the provider changes during the update, the update returns 409. Reload the environment and try again. Direction and scope cannot change.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":128},"providerId":{"type":"string","minLength":1,"maxLength":36},"remote":{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"remoteUrl":{"type":"string","minLength":1}},"required":["schemaVersion","remoteUrl"],"additionalProperties":false},"settings":{"anyOf":[{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"branchName":{"type":"string","minLength":1,"maxLength":255}},"required":["schemaVersion","branchName"],"additionalProperties":false},{"type":"object","properties":{"schemaVersion":{"type":"number","enum":[1]},"baseBranchName":{"type":"string","minLength":1,"maxLength":255},"createBranchOnPromotion":{"type":"boolean"}},"required":["schemaVersion","baseBranchName","createBranchOnPromotion"],"additionalProperties":false}]}},"additionalProperties":false,"minProperties":1}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotionEnvironmentPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Delete a promotion environment

> Deletes the environment with its project links and local checkout. Its provider is kept. Nothing in the Git repository changes. The open promotion reviews of the environment close in n8n. Their merge requests stay open on the Git host.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}":{"delete":{"operationId":"deletePromotionEnvironment","tags":["Promotions"],"summary":"Delete a promotion environment","description":"Deletes the environment with its project links and local checkout. Its provider is kept. Nothing in the Git repository changes. The open promotion reviews of the environment close in n8n. Their merge requests stay open on the Git host.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"responses":{"204":{"description":"Operation successful."},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Connect an environment

> Prepares the environment on the instance that handles the request. For a Git provider, this clones the configured branch into local storage. Safe to call repeatedly. Connecting one environment does not make another ready.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"schemas":{"promotionCheckoutPublicDto.generated":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"direction":{"type":"string","enum":["apply","promote"]},"branchName":{"type":"string"},"hasCheckout":{"type":"boolean"}},"required":["environmentId","direction","branchName","hasCheckout"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/connect":{"post":{"operationId":"connectPromotionCheckout","tags":["Promotions"],"summary":"Connect an environment","description":"Prepares the environment on the instance that handles the request. For a Git provider, this clones the configured branch into local storage. Safe to call repeatedly. Connecting one environment does not make another ready.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"},{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotionCheckoutPublicDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Remove an environment's local checkout

> Removes the local checkout and keeps the environment, its credentials, and the trusted SSH host keys.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"schemas":{"promotionCheckoutPublicDto.generated":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"direction":{"type":"string","enum":["apply","promote"]},"branchName":{"type":"string"},"hasCheckout":{"type":"boolean"}},"required":["environmentId","direction","branchName","hasCheckout"]}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/disconnect":{"post":{"operationId":"disconnectPromotionCheckout","tags":["Promotions"],"summary":"Remove an environment's local checkout","description":"Removes the local checkout and keeps the environment, its credentials, and the trusted SSH host keys.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotionCheckoutPublicDto.generated"}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## GET /promotions/environments/{promotionEnvironmentId}/projects

> List projects linked to a promotion environment

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/projects":{"get":{"operationId":"getPromotionEnvironmentProjects","tags":["Promotions"],"summary":"List projects linked to a promotion environment","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"projectIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36}}},"required":["projectIds"]}}}},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## List package projects that are missing on this instance

> Reads the package at the Apply branch tip and returns its team projects whose IDs do not exist on this instance. Projects are matched by ID, not by name. An ID that a personal project uses counts as existing. Create each project with \`POST /projects\`, using the returned id, name, icon, description, and customTelemetryTags. The new project is empty, and the caller becomes its project admin. Then use the project Apply flow to apply its resources. An empty \`data\` means that no setup is needed. \`git\` is null when the branch has no package yet. Requires a connected Apply environment with instance scope.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/missing-projects":{"get":{"operationId":"getPromotionEnvironmentMissingProjects","tags":["Promotions"],"summary":"List package projects that are missing on this instance","description":"Reads the package at the Apply branch tip and returns its team projects whose IDs do not exist on this instance. Projects are matched by ID, not by name. An ID that a personal project uses counts as existing. Create each project with `POST /projects`, using the returned id, name, icon, description, and customTelemetryTags. The new project is empty, and the caller becomes its project admin. Then use the project Apply flow to apply its resources. An empty `data` means that no setup is needed. `git` is null when the branch has no package yet. Requires a connected Apply environment with instance scope.","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","nullable":true,"properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string"},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["id","name"]}}},"required":["environmentId","git","data"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Link a project to a promotion environment

> Links a team project to a project-scoped environment. A project can have one environment for each direction. A direction without a project environment uses the instance environment.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/projects/{projectId}":{"post":{"operationId":"addProjectToPromotionEnvironment","tags":["Promotions"],"summary":"Link a project to a promotion environment","description":"Links a team project to a project-scoped environment. A project can have one environment for each direction. A direction without a project environment uses the instance environment.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"},{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the project.","name":"projectId","in":"path"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"projectId":{"type":"string","minLength":1,"maxLength":36},"environmentId":{"type":"string","minLength":1,"maxLength":36}},"required":["projectId","environmentId"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## DELETE /promotions/environments/{promotionEnvironmentId}/projects/{projectId}

> Unlink a project from a promotion environment

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/projects/{projectId}":{"delete":{"operationId":"removeProjectFromPromotionEnvironment","tags":["Promotions"],"summary":"Unlink a project from a promotion environment","parameters":[{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"},{"schema":{"type":"string"},"required":true,"description":"The ID of the project.","name":"projectId","in":"path"}],"responses":{"204":{"description":"Operation successful."},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Promote all team projects

> Exports every team project, commits it, and pushes to the configured base branch or a new timestamped branch. The response reports the target branch in \`git.branchName\`. Personal projects are ignored. A workflow on the branch that moved to a personal project is refused with 400, because the destination would delete it. A workflow or folder on the branch that moved to another team project is refused with 400 while its old project still exists, because Apply can't move it between projects. Requires a connected Promote environment with instance scope. The API key also needs variable:list when the workflows reference variables.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"schemas":{"promotePackageResultDto.generated":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"counts":{"type":"object","properties":{"workflows":{"type":"integer","minimum":0},"folders":{"type":"integer","minimum":0},"credentials":{"type":"integer","minimum":0},"dataTables":{"type":"integer","minimum":0},"variables":{"type":"integer","minimum":0},"tags":{"type":"integer","minimum":0}},"required":["workflows","folders","credentials","dataTables","variables","tags"]},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"review":{"type":"object","properties":{"reviewId":{"type":"string","minLength":1,"maxLength":36},"number":{"type":"integer"},"webUrl":{"type":"string"}},"required":["reviewId","number","webUrl"]},"warnings":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"linkUrl":{"type":"string"}},"required":["message"]}}},"required":["environmentId","counts","git"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/promote":{"post":{"operationId":"promotePackage","tags":["Promotions"],"summary":"Promote all team projects","description":"Exports every team project, commits it, and pushes to the configured base branch or a new timestamped branch. The response reports the target branch in `git.branchName`. Personal projects are ignored. A workflow on the branch that moved to a personal project is refused with 400, because the destination would delete it. A workflow or folder on the branch that moved to another team project is refused with 400 while its old project still exists, because Apply can't move it between projects. Requires a connected Promote environment with instance scope. The API key also needs variable:list when the workflows reference variables.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"},{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"commitMessage":{"type":"string","minLength":1,"maxLength":1000,"description":"Message for the promotion commit. If you omit it, the commit uses a generated message."},"force":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotePackageResultDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Apply a package to the instance

> Checks the full package at the configured branch tip. Optionally send expectedSource with the environmentId, branchName, and full commitSha from the reviewed change preview; status \`source-changed\` means the branch moved since that review and nothing was imported. Returns status \`blocked\` before import writes if bindings need setup, if the import conflicts with this instance, or if the apply would delete team projects that the package does not hold. Retain environmentId and git for Continue. Status \`applied\` includes counts and warnings. Inspect status before reading counts. Existing target variable values, including empty strings, are preserved. Workflows and folders move within their project to match the branch, and folders take the name on the branch. Apply cannot move a workflow or folder between projects. It returns a \`moved\` conflict in \`blocked\` with both projects. For a personal project, the conflict gives only the ID. Requires a connected Apply environment with instance scope. The API key needs the promotions:apply scope. The importer checks user write permissions; granular API-key write scopes are not passed to it.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"schemas":{"applyPackageResultDto.generated":{"oneOf":[{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["applied"]},"counts":{"type":"object","properties":{"projects":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0}},"required":["created","updated","skipped","deleted"]},"folders":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0,"description":"Existing folders that Apply moved or renamed to match the branch."},"skipped":{"type":"integer","minimum":0},"moved":{"type":"integer","minimum":0,"description":"Updated folders that Apply moved under another parent of their project. Included in `updated`."},"renamed":{"type":"integer","minimum":0,"description":"Updated folders that Apply gave the name on the branch. Included in `updated`."},"removed":{"type":"integer","minimum":0}},"required":["created","updated","skipped","moved","renamed","removed"]},"workflows":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"moved":{"type":"integer","minimum":0,"description":"Updated workflows that Apply also moved to another folder of their project. Included in `updated`."},"archived":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0},"publishing":{"type":"object","properties":{"published":{"type":"integer","minimum":0},"unpublished":{"type":"integer","minimum":0},"unchanged":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}},"required":["published","unpublished","unchanged","blocked","failed"]}},"required":["created","updated","skipped","moved","archived","deleted","publishing"]},"credentials":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"stubbed":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0}},"required":["matched","stubbed","updated"]},"dataTables":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0}},"required":["matched","created","updated"]},"variables":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"stubbed":{"type":"integer","minimum":0},"missing":{"type":"integer","minimum":0}},"required":["matched","created","updated","stubbed","missing"]},"tags":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"renamed":{"type":"integer","minimum":0},"reconciled":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["matched","created","renamed","reconciled","skipped"]}},"required":["projects","folders","workflows","credentials","dataTables","variables","tags"]},"warnings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["variable-shadowed"]},"name":{"type":"string","minLength":1},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","scope","consumers"]}}},"required":["environmentId","git","status","counts","warnings"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["blocked"]},"check":{"type":"object","properties":{"missingProjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string"},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["id","name"]},"description":"Projects in the package that do not exist on this instance. The check keeps their metadata without checking project creation rules. The project creation API can reject invalid values."},"missingBindings":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","minLength":1},"name":{"type":"string"},"credentialType":{"type":"string","minLength":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"ownerProject":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"expressionData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"},"description":"Credential expressions."}},"required":["kind","sourceId","name","credentialType","consumers","ownerProject"]},{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"name":{"type":"string","minLength":1},"variableType":{"type":"string","enum":["string"],"default":"string"},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}},"required":["kind","project"]}],"type":"object"},"sourceValue":{"type":"string","maxLength":1000},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","name","scope","consumers"]}],"type":"object"}},"accessRequirements":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","minLength":1},"name":{"type":"string"},"credentialType":{"type":"string","minLength":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["access-required"]}},"required":["kind","sourceId","name","credentialType","consumers","code"]}},"conflicts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["missing-id"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["conflicting-types"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["unknown-type"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["unknown-owner"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["type-mismatch"]},"targetType":{"type":"string"}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code","targetType"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["incompatible-usage-scope"]},"usageScope":{"type":"string"}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code","usageScope"]},{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["missing-definition"]},"name":{"type":"string","minLength":1},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","referenceFiles","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-not-team"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"filePath":{"type":"string"},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}}},"required":["kind","code","project","filePath","workflows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-deletion"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}},"required":["kind","code","project"]},{"type":"object","properties":{"kind":{"type":"string","enum":["data-table"]},"code":{"type":"string","enum":["destructive-change"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"changes":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["add-column"]},"column":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","column","type","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["remove-column"]},"column":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[true]}},"required":["kind","column","type","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["change-column-type"]},"column":{"type":"string"},"from":{"type":"string","enum":["string","number","boolean","date"]},"to":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[true]}},"required":["kind","column","from","to","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rename-column"]},"from":{"type":"string"},"to":{"type":"string"},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","from","to","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["reorder-columns"]},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rename-table"]},"from":{"type":"string"},"to":{"type":"string"},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","from","to","destructive"]}],"type":"object"},"minItems":1}},"required":["kind","code","id","name","consumers","changes"]},{"type":"object","properties":{"kind":{"type":"string","enum":["workflow"]},"code":{"type":"string","enum":["workflow-id-conflict","lineage-conflict","policy-violation","missing-node-type","workflow-forbidden"]},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["data-table"]},"code":{"type":"string","enum":["data-table-conflict"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","reason","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tag"]},"code":{"type":"string","enum":["tag-conflict"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","reason","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-conflict","check-not-run","import-blocked","project-not-on-branch"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"reason":{"type":"string"}},"required":["kind","code","project"]},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"projectExists":{"type":"boolean"},"instanceProject":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"]},"kind":{"type":"string","enum":["workflow","folder"]},"code":{"type":"string","enum":["moved"]}},"required":["id","name","project","projectExists","instanceProject","kind","code"]}],"type":"object"}},"warnings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["variable-shadowed"]},"name":{"type":"string","minLength":1},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","scope","consumers"]}}},"required":["missingProjects","missingBindings","accessRequirements","conflicts","warnings"]}},"required":["environmentId","git","status","check"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["source-changed"]}},"required":["environmentId","git","status"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["preview-changed"]}},"required":["environmentId","git","status"]}],"type":"object"},"promotionCredentialExpressionValue.generated":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"}}],"description":"Values can be strings, arrays, or nested objects. Every leaf is an expression string."}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/apply":{"post":{"operationId":"applyPackage","tags":["Promotions"],"summary":"Apply a package to the instance","description":"Checks the full package at the configured branch tip. Optionally send expectedSource with the environmentId, branchName, and full commitSha from the reviewed change preview; status `source-changed` means the branch moved since that review and nothing was imported. Returns status `blocked` before import writes if bindings need setup, if the import conflicts with this instance, or if the apply would delete team projects that the package does not hold. Retain environmentId and git for Continue. Status `applied` includes counts and warnings. Inspect status before reading counts. Existing target variable values, including empty strings, are preserved. Workflows and folders move within their project to match the branch, and folders take the name on the branch. Apply cannot move a workflow or folder between projects. It returns a `moved` conflict in `blocked` with both projects. For a personal project, the conflict gives only the ID. Requires a connected Apply environment with instance scope. The API key needs the promotions:apply scope. The importer checks user write permissions; granular API-key write scopes are not passed to it.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"},{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"expectedSource":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"branchName":{"type":"string","minLength":1},"commitSha":{"type":"string","pattern":"^[0-9a-f]{40}([0-9a-f]{24})?$"}},"required":["environmentId","branchName","commitSha"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyPackageResultDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Continue Apply after binding setup

> Rechecks the configured source and current target bindings. Send expectedSource with the environmentId, branchName, and full commitSha from the reviewed Apply result. Send \`confirmDestructiveChanges: true\` to also apply destructive data table changes and delete the reported team projects. Status \`source-changed\` requires a new Apply review. Status \`blocked\` returns every blocker again, without import writes. Status \`applied\` includes counts and warnings. Inspect status before reading counts. Existing target variable values are preserved. Requires the same connected instance environment and permissions as Apply. The importer checks user write permissions; granular API-key write scopes are not passed to it. No server session or exactly-once guarantee is provided.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"schemas":{"applyPackageResultDto.generated":{"oneOf":[{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["applied"]},"counts":{"type":"object","properties":{"projects":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0}},"required":["created","updated","skipped","deleted"]},"folders":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0,"description":"Existing folders that Apply moved or renamed to match the branch."},"skipped":{"type":"integer","minimum":0},"moved":{"type":"integer","minimum":0,"description":"Updated folders that Apply moved under another parent of their project. Included in `updated`."},"renamed":{"type":"integer","minimum":0,"description":"Updated folders that Apply gave the name on the branch. Included in `updated`."},"removed":{"type":"integer","minimum":0}},"required":["created","updated","skipped","moved","renamed","removed"]},"workflows":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"moved":{"type":"integer","minimum":0,"description":"Updated workflows that Apply also moved to another folder of their project. Included in `updated`."},"archived":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0},"publishing":{"type":"object","properties":{"published":{"type":"integer","minimum":0},"unpublished":{"type":"integer","minimum":0},"unchanged":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}},"required":["published","unpublished","unchanged","blocked","failed"]}},"required":["created","updated","skipped","moved","archived","deleted","publishing"]},"credentials":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"stubbed":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0}},"required":["matched","stubbed","updated"]},"dataTables":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0}},"required":["matched","created","updated"]},"variables":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"stubbed":{"type":"integer","minimum":0},"missing":{"type":"integer","minimum":0}},"required":["matched","created","updated","stubbed","missing"]},"tags":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"renamed":{"type":"integer","minimum":0},"reconciled":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["matched","created","renamed","reconciled","skipped"]}},"required":["projects","folders","workflows","credentials","dataTables","variables","tags"]},"warnings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["variable-shadowed"]},"name":{"type":"string","minLength":1},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","scope","consumers"]}}},"required":["environmentId","git","status","counts","warnings"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["blocked"]},"check":{"type":"object","properties":{"missingProjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string"},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["id","name"]},"description":"Projects in the package that do not exist on this instance. The check keeps their metadata without checking project creation rules. The project creation API can reject invalid values."},"missingBindings":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","minLength":1},"name":{"type":"string"},"credentialType":{"type":"string","minLength":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"ownerProject":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"expressionData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"},"description":"Credential expressions."}},"required":["kind","sourceId","name","credentialType","consumers","ownerProject"]},{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"name":{"type":"string","minLength":1},"variableType":{"type":"string","enum":["string"],"default":"string"},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}},"required":["kind","project"]}],"type":"object"},"sourceValue":{"type":"string","maxLength":1000},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","name","scope","consumers"]}],"type":"object"}},"accessRequirements":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","minLength":1},"name":{"type":"string"},"credentialType":{"type":"string","minLength":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["access-required"]}},"required":["kind","sourceId","name","credentialType","consumers","code"]}},"conflicts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["missing-id"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["conflicting-types"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["unknown-type"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["unknown-owner"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["type-mismatch"]},"targetType":{"type":"string"}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code","targetType"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["incompatible-usage-scope"]},"usageScope":{"type":"string"}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code","usageScope"]},{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["missing-definition"]},"name":{"type":"string","minLength":1},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","referenceFiles","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-not-team"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"filePath":{"type":"string"},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}}},"required":["kind","code","project","filePath","workflows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-deletion"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}},"required":["kind","code","project"]},{"type":"object","properties":{"kind":{"type":"string","enum":["data-table"]},"code":{"type":"string","enum":["destructive-change"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"changes":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["add-column"]},"column":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","column","type","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["remove-column"]},"column":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[true]}},"required":["kind","column","type","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["change-column-type"]},"column":{"type":"string"},"from":{"type":"string","enum":["string","number","boolean","date"]},"to":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[true]}},"required":["kind","column","from","to","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rename-column"]},"from":{"type":"string"},"to":{"type":"string"},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","from","to","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["reorder-columns"]},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rename-table"]},"from":{"type":"string"},"to":{"type":"string"},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","from","to","destructive"]}],"type":"object"},"minItems":1}},"required":["kind","code","id","name","consumers","changes"]},{"type":"object","properties":{"kind":{"type":"string","enum":["workflow"]},"code":{"type":"string","enum":["workflow-id-conflict","lineage-conflict","policy-violation","missing-node-type","workflow-forbidden"]},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["data-table"]},"code":{"type":"string","enum":["data-table-conflict"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","reason","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tag"]},"code":{"type":"string","enum":["tag-conflict"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","reason","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-conflict","check-not-run","import-blocked","project-not-on-branch"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"reason":{"type":"string"}},"required":["kind","code","project"]},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"projectExists":{"type":"boolean"},"instanceProject":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"]},"kind":{"type":"string","enum":["workflow","folder"]},"code":{"type":"string","enum":["moved"]}},"required":["id","name","project","projectExists","instanceProject","kind","code"]}],"type":"object"}},"warnings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["variable-shadowed"]},"name":{"type":"string","minLength":1},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","scope","consumers"]}}},"required":["missingProjects","missingBindings","accessRequirements","conflicts","warnings"]}},"required":["environmentId","git","status","check"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["source-changed"]}},"required":["environmentId","git","status"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["preview-changed"]}},"required":["environmentId","git","status"]}],"type":"object"},"promotionCredentialExpressionValue.generated":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"}}],"description":"Values can be strings, arrays, or nested objects. Every leaf is an expression string."}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/environments/{promotionEnvironmentId}/apply/continue":{"post":{"operationId":"continueApplyPackage","tags":["Promotions"],"summary":"Continue Apply after binding setup","description":"Rechecks the configured source and current target bindings. Send expectedSource with the environmentId, branchName, and full commitSha from the reviewed Apply result. Send `confirmDestructiveChanges: true` to also apply destructive data table changes and delete the reported team projects. Status `source-changed` requires a new Apply review. Status `blocked` returns every blocker again, without import writes. Status `applied` includes counts and warnings. Inspect status before reading counts. Existing target variable values are preserved. Requires the same connected instance environment and permissions as Apply. The importer checks user write permissions; granular API-key write scopes are not passed to it. No server session or exactly-once guarantee is provided.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"},{"schema":{"type":"string","format":"uuid"},"required":true,"description":"The ID of the promotion environment.","name":"promotionEnvironmentId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"expectedSource":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"branchName":{"type":"string","minLength":1},"commitSha":{"type":"string","pattern":"^[0-9a-f]{40}([0-9a-f]{24})?$"}},"required":["environmentId","branchName","commitSha"],"additionalProperties":false},"confirmDestructiveChanges":{"type":"boolean","description":"Also applies destructive data table changes, which a `destructive-change` conflict reports: removed or retyped columns. The values in those columns are removed. Rows and other columns are kept. On a full apply, also deletes the team projects that a `project-deletion` conflict reports, with everything in them. The confirmation covers every such change and deletion when Continue runs, including those that are not in the reviewed result."}},"required":["expectedSource"],"additionalProperties":false}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyPackageResultDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## List the changes of a project in one direction

> Compares a team project on this instance with the branch of its promotion environment for that direction and lists the workflows that differ. For \`promote\` the rows are what a promotion sends to the branch, and the key needs the promotions:promote scope. A \`deleted\` or \`new\` promote row can be a workflow that moved between projects; promoting it is refused until it moves back. For \`apply\` the rows are what applying the branch changes on this instance, and the key needs the promotions:apply scope. \`commitSha\` is the commit the rows were read from. Requires the environment to be connected first.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/projects/{projectId}/changes/{direction}":{"get":{"operationId":"getPromotionChanges","tags":["Promotions"],"summary":"List the changes of a project in one direction","description":"Compares a team project on this instance with the branch of its promotion environment for that direction and lists the workflows that differ. For `promote` the rows are what a promotion sends to the branch, and the key needs the promotions:promote scope. A `deleted` or `new` promote row can be a workflow that moved between projects; promoting it is refused until it moves back. For `apply` the rows are what applying the branch changes on this instance, and the key needs the promotions:apply scope. `commitSha` is the commit the rows were read from. Requires the environment to be connected first.","parameters":[{"schema":{"type":"string"},"required":true,"description":"The ID of the project.","name":"projectId","in":"path"},{"schema":{"type":"string","enum":["apply","promote"]},"required":true,"description":"The direction of the promotion: apply or promote.","name":"direction","in":"path"},{"schema":{"type":"string"},"required":false,"name":"search","in":"query"},{"schema":{"type":"string","enum":["name","updatedAt","status"],"default":"name"},"required":false,"name":"sort","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"asc"},"required":false,"name":"order","in":"query"}],"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"type":"object","properties":{"commitSha":{"type":"string","nullable":true},"source":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"branchName":{"type":"string"}},"required":["environmentId","branchName"]},"changes":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":36},"name":{"type":"string"},"type":{"type":"string","enum":["workflow"]},"status":{"type":"string","enum":["new","modified","renamed","renamed-and-modified","archived","deleted"]},"version":{"type":"integer","nullable":true,"minimum":0},"updatedAt":{"type":"string","nullable":true},"updatedBy":{"type":"string","nullable":true},"dependencyCount":{"type":"integer","minimum":0}},"required":["id","name","type","status","version","updatedAt","updatedBy","dependencyCount"]}}},"required":["commitSha","source","changes"]}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Promote a selection of a project's workflows

> Promotes a chosen set of a team project's workflows to the branch of the project's Promote environment. Send workflow ids only; the server reads each one now, so the push carries the current state. Live and archived workflows the project owns are exported, so an archived id stays on the branch as archived; an id whose workflow is gone from the instance leaves the branch, matching the project's change list. A workflow that moved into or out of the project since the branch was written is refused with 400; move it back first. A deletion the branch does not hold under this project rejects the whole request before any write. Requires a Promote environment to resolve for the project (its own Promote environment, otherwise the instance Promote environment), and requires it to be connected first. The API key also needs variable:list when the workflows reference variables.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"schemas":{"promotePackageResultDto.generated":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"counts":{"type":"object","properties":{"workflows":{"type":"integer","minimum":0},"folders":{"type":"integer","minimum":0},"credentials":{"type":"integer","minimum":0},"dataTables":{"type":"integer","minimum":0},"variables":{"type":"integer","minimum":0},"tags":{"type":"integer","minimum":0}},"required":["workflows","folders","credentials","dataTables","variables","tags"]},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"review":{"type":"object","properties":{"reviewId":{"type":"string","minLength":1,"maxLength":36},"number":{"type":"integer"},"webUrl":{"type":"string"}},"required":["reviewId","number","webUrl"]},"warnings":{"type":"array","items":{"type":"object","properties":{"message":{"type":"string"},"linkUrl":{"type":"string"}},"required":["message"]}}},"required":["environmentId","counts","git"]}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/projects/{projectId}/promote":{"post":{"operationId":"promoteProjectSelection","tags":["Promotions"],"summary":"Promote a selection of a project's workflows","description":"Promotes a chosen set of a team project's workflows to the branch of the project's Promote environment. Send workflow ids only; the server reads each one now, so the push carries the current state. Live and archived workflows the project owns are exported, so an archived id stays on the branch as archived; an id whose workflow is gone from the instance leaves the branch, matching the project's change list. A workflow that moved into or out of the project since the branch was written is refused with 400; move it back first. A deletion the branch does not hold under this project rejects the whole request before any write. Requires a Promote environment to resolve for the project (its own Promote environment, otherwise the instance Promote environment), and requires it to be connected first. The API key also needs variable:list when the workflows reference variables.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"},{"schema":{"type":"string"},"required":true,"description":"The ID of the project.","name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36},"minItems":1},"commitMessage":{"type":"string","minLength":1,"maxLength":1000,"description":"Message for the promotion commit. If you omit it, the commit uses a generated message."}},"required":["workflowIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/promotePackageResultDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Apply a selection of a project's workflows

> Applies selected workflow changes from the project's Apply branch. Send the selected change-list IDs in workflowIds. The server imports IDs present on the branch for this project. It removes instance workflows owned by this project when their IDs are absent from the branch. Duplicate or invalid IDs reject the whole request. Unselected content stays unchanged. A selected workflow moves within the project to match the branch, together with the folders that hold it, and those folders take the name on the branch; other folders stay as they are. Optionally send expectedSource with the environmentId, branchName, and full commitSha from the reviewed change preview. Status \`source-changed\` means the source changed since that review and nothing was imported. Optionally send expectedPreviewRevision with the revision of the reviewed Apply preview. Status \`preview-changed\` means this instance changed since that review and nothing was imported. Status \`blocked\` returns the blockers before import writes: bindings that need setup and conflicts with this instance. Apply cannot move a selected workflow or a folder of this project between projects. It returns a \`moved\` conflict in \`blocked\` with both projects. For a personal project, the conflict gives only the ID. Retain environmentId and git for Continue. Status \`applied\` includes counts and warnings. Inspect status before reading counts. Requires a connected Apply environment for the project: its own Apply environment, otherwise the instance Apply environment. The API key needs the promotions:apply scope. The importer checks user write permissions.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"schemas":{"applyPackageResultDto.generated":{"oneOf":[{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["applied"]},"counts":{"type":"object","properties":{"projects":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0}},"required":["created","updated","skipped","deleted"]},"folders":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0,"description":"Existing folders that Apply moved or renamed to match the branch."},"skipped":{"type":"integer","minimum":0},"moved":{"type":"integer","minimum":0,"description":"Updated folders that Apply moved under another parent of their project. Included in `updated`."},"renamed":{"type":"integer","minimum":0,"description":"Updated folders that Apply gave the name on the branch. Included in `updated`."},"removed":{"type":"integer","minimum":0}},"required":["created","updated","skipped","moved","renamed","removed"]},"workflows":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"moved":{"type":"integer","minimum":0,"description":"Updated workflows that Apply also moved to another folder of their project. Included in `updated`."},"archived":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0},"publishing":{"type":"object","properties":{"published":{"type":"integer","minimum":0},"unpublished":{"type":"integer","minimum":0},"unchanged":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}},"required":["published","unpublished","unchanged","blocked","failed"]}},"required":["created","updated","skipped","moved","archived","deleted","publishing"]},"credentials":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"stubbed":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0}},"required":["matched","stubbed","updated"]},"dataTables":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0}},"required":["matched","created","updated"]},"variables":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"stubbed":{"type":"integer","minimum":0},"missing":{"type":"integer","minimum":0}},"required":["matched","created","updated","stubbed","missing"]},"tags":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"renamed":{"type":"integer","minimum":0},"reconciled":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["matched","created","renamed","reconciled","skipped"]}},"required":["projects","folders","workflows","credentials","dataTables","variables","tags"]},"warnings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["variable-shadowed"]},"name":{"type":"string","minLength":1},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","scope","consumers"]}}},"required":["environmentId","git","status","counts","warnings"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["blocked"]},"check":{"type":"object","properties":{"missingProjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string"},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["id","name"]},"description":"Projects in the package that do not exist on this instance. The check keeps their metadata without checking project creation rules. The project creation API can reject invalid values."},"missingBindings":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","minLength":1},"name":{"type":"string"},"credentialType":{"type":"string","minLength":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"ownerProject":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"expressionData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"},"description":"Credential expressions."}},"required":["kind","sourceId","name","credentialType","consumers","ownerProject"]},{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"name":{"type":"string","minLength":1},"variableType":{"type":"string","enum":["string"],"default":"string"},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}},"required":["kind","project"]}],"type":"object"},"sourceValue":{"type":"string","maxLength":1000},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","name","scope","consumers"]}],"type":"object"}},"accessRequirements":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","minLength":1},"name":{"type":"string"},"credentialType":{"type":"string","minLength":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["access-required"]}},"required":["kind","sourceId","name","credentialType","consumers","code"]}},"conflicts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["missing-id"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["conflicting-types"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["unknown-type"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["unknown-owner"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["type-mismatch"]},"targetType":{"type":"string"}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code","targetType"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["incompatible-usage-scope"]},"usageScope":{"type":"string"}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code","usageScope"]},{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["missing-definition"]},"name":{"type":"string","minLength":1},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","referenceFiles","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-not-team"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"filePath":{"type":"string"},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}}},"required":["kind","code","project","filePath","workflows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-deletion"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}},"required":["kind","code","project"]},{"type":"object","properties":{"kind":{"type":"string","enum":["data-table"]},"code":{"type":"string","enum":["destructive-change"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"changes":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["add-column"]},"column":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","column","type","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["remove-column"]},"column":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[true]}},"required":["kind","column","type","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["change-column-type"]},"column":{"type":"string"},"from":{"type":"string","enum":["string","number","boolean","date"]},"to":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[true]}},"required":["kind","column","from","to","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rename-column"]},"from":{"type":"string"},"to":{"type":"string"},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","from","to","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["reorder-columns"]},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rename-table"]},"from":{"type":"string"},"to":{"type":"string"},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","from","to","destructive"]}],"type":"object"},"minItems":1}},"required":["kind","code","id","name","consumers","changes"]},{"type":"object","properties":{"kind":{"type":"string","enum":["workflow"]},"code":{"type":"string","enum":["workflow-id-conflict","lineage-conflict","policy-violation","missing-node-type","workflow-forbidden"]},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["data-table"]},"code":{"type":"string","enum":["data-table-conflict"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","reason","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tag"]},"code":{"type":"string","enum":["tag-conflict"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","reason","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-conflict","check-not-run","import-blocked","project-not-on-branch"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"reason":{"type":"string"}},"required":["kind","code","project"]},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"projectExists":{"type":"boolean"},"instanceProject":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"]},"kind":{"type":"string","enum":["workflow","folder"]},"code":{"type":"string","enum":["moved"]}},"required":["id","name","project","projectExists","instanceProject","kind","code"]}],"type":"object"}},"warnings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["variable-shadowed"]},"name":{"type":"string","minLength":1},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","scope","consumers"]}}},"required":["missingProjects","missingBindings","accessRequirements","conflicts","warnings"]}},"required":["environmentId","git","status","check"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["source-changed"]}},"required":["environmentId","git","status"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["preview-changed"]}},"required":["environmentId","git","status"]}],"type":"object"},"promotionCredentialExpressionValue.generated":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"}}],"description":"Values can be strings, arrays, or nested objects. Every leaf is an expression string."}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/projects/{projectId}/apply":{"post":{"operationId":"applyProjectSelection","tags":["Promotions"],"summary":"Apply a selection of a project's workflows","description":"Applies selected workflow changes from the project's Apply branch. Send the selected change-list IDs in workflowIds. The server imports IDs present on the branch for this project. It removes instance workflows owned by this project when their IDs are absent from the branch. Duplicate or invalid IDs reject the whole request. Unselected content stays unchanged. A selected workflow moves within the project to match the branch, together with the folders that hold it, and those folders take the name on the branch; other folders stay as they are. Optionally send expectedSource with the environmentId, branchName, and full commitSha from the reviewed change preview. Status `source-changed` means the source changed since that review and nothing was imported. Optionally send expectedPreviewRevision with the revision of the reviewed Apply preview. Status `preview-changed` means this instance changed since that review and nothing was imported. Status `blocked` returns the blockers before import writes: bindings that need setup and conflicts with this instance. Apply cannot move a selected workflow or a folder of this project between projects. It returns a `moved` conflict in `blocked` with both projects. For a personal project, the conflict gives only the ID. Retain environmentId and git for Continue. Status `applied` includes counts and warnings. Inspect status before reading counts. Requires a connected Apply environment for the project: its own Apply environment, otherwise the instance Apply environment. The API key needs the promotions:apply scope. The importer checks user write permissions.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"},{"schema":{"type":"string"},"required":true,"description":"The ID of the project.","name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36},"minItems":1},"expectedSource":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"branchName":{"type":"string","minLength":1},"commitSha":{"type":"string","pattern":"^[0-9a-f]{40}([0-9a-f]{24})?$"}},"required":["environmentId","branchName","commitSha"],"additionalProperties":false},"expectedPreviewRevision":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The `revision` of the reviewed Apply preview. Apply builds the preview again and returns status `preview-changed` without writing when it differs, for example after a local edit."}},"required":["workflowIds"],"additionalProperties":false}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyPackageResultDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```

## Continue applying a selection after binding setup

> Rechecks the project's Apply source and the current bindings for the selection. Resend the full selection in workflowIds. Send the required expectedSource with the environmentId, branchName, and full commitSha from the reviewed Apply result. Optionally send expectedPreviewRevision with the revision of the reviewed Apply preview. Send \`confirmDestructiveChanges: true\` to also apply destructive data table changes. The server does not keep a session. Status \`source-changed\` or \`preview-changed\` requires a new Apply review. Status \`blocked\` returns every blocker again, before import writes. Status \`applied\` includes counts and warnings. Inspect status before reading counts. Unselected content stays unchanged. Requires the same connected Apply environment and permissions as the initial selection apply. The API key needs the promotions:apply scope. The importer checks user write permissions.

```json
{"openapi":"3.0.0","info":{"title":"n8n Public API","version":"1.1.1"},"tags":[{"name":"Promotions","description":"Operations about promotion providers, environments, and package operations"}],"servers":[{"url":"/api/v1","description":"Current n8n instance (self-hosted built-in playground)"},{"url":"{url}/api/v1","description":"Self-hosted n8n instance","variables":{"url":{"default":"https://example.com"}}}],"security":[{"ApiKeyAuth":[]},{"BearerAuth":[]},{"CookieAuth":[]}],"components":{"securitySchemes":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"X-N8N-API-KEY"},"BearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"CookieAuth":{"type":"apiKey","in":"cookie","name":"n8n-auth"}},"parameters":{"idempotencyKey":{"name":"Idempotency-Key","in":"header","description":"Safe retry key for this POST. Use 1 to 128 visible ASCII characters. The same key and the same request return the first successful response. A different request with this key returns 422. A retry while the first request is in progress returns 409.","required":false,"schema":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[\\x21-\\x7E]+$"}}},"schemas":{"applyPackageResultDto.generated":{"oneOf":[{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["applied"]},"counts":{"type":"object","properties":{"projects":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0}},"required":["created","updated","skipped","deleted"]},"folders":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0,"description":"Existing folders that Apply moved or renamed to match the branch."},"skipped":{"type":"integer","minimum":0},"moved":{"type":"integer","minimum":0,"description":"Updated folders that Apply moved under another parent of their project. Included in `updated`."},"renamed":{"type":"integer","minimum":0,"description":"Updated folders that Apply gave the name on the branch. Included in `updated`."},"removed":{"type":"integer","minimum":0}},"required":["created","updated","skipped","moved","renamed","removed"]},"workflows":{"type":"object","properties":{"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0},"moved":{"type":"integer","minimum":0,"description":"Updated workflows that Apply also moved to another folder of their project. Included in `updated`."},"archived":{"type":"integer","minimum":0},"deleted":{"type":"integer","minimum":0},"publishing":{"type":"object","properties":{"published":{"type":"integer","minimum":0},"unpublished":{"type":"integer","minimum":0},"unchanged":{"type":"integer","minimum":0},"blocked":{"type":"integer","minimum":0},"failed":{"type":"integer","minimum":0}},"required":["published","unpublished","unchanged","blocked","failed"]}},"required":["created","updated","skipped","moved","archived","deleted","publishing"]},"credentials":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"stubbed":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0}},"required":["matched","stubbed","updated"]},"dataTables":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0}},"required":["matched","created","updated"]},"variables":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"updated":{"type":"integer","minimum":0},"stubbed":{"type":"integer","minimum":0},"missing":{"type":"integer","minimum":0}},"required":["matched","created","updated","stubbed","missing"]},"tags":{"type":"object","properties":{"matched":{"type":"integer","minimum":0},"created":{"type":"integer","minimum":0},"renamed":{"type":"integer","minimum":0},"reconciled":{"type":"integer","minimum":0},"skipped":{"type":"integer","minimum":0}},"required":["matched","created","renamed","reconciled","skipped"]}},"required":["projects","folders","workflows","credentials","dataTables","variables","tags"]},"warnings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["variable-shadowed"]},"name":{"type":"string","minLength":1},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","scope","consumers"]}}},"required":["environmentId","git","status","counts","warnings"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["blocked"]},"check":{"type":"object","properties":{"missingProjects":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"},"icon":{"type":"object","properties":{"type":{"type":"string","enum":["emoji","icon"]},"value":{"type":"string"}},"required":["type","value"]},"description":{"type":"string"},"customTelemetryTags":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"required":["key","value"]}}},"required":["id","name"]},"description":"Projects in the package that do not exist on this instance. The check keeps their metadata without checking project creation rules. The project creation API can reject invalid values."},"missingBindings":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","minLength":1},"name":{"type":"string"},"credentialType":{"type":"string","minLength":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"ownerProject":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"expressionData":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"},"description":"Credential expressions."}},"required":["kind","sourceId","name","credentialType","consumers","ownerProject"]},{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"name":{"type":"string","minLength":1},"variableType":{"type":"string","enum":["string"],"default":"string"},"scope":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}},"required":["kind","project"]}],"type":"object"},"sourceValue":{"type":"string","maxLength":1000},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","name","scope","consumers"]}],"type":"object"}},"accessRequirements":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","minLength":1},"name":{"type":"string"},"credentialType":{"type":"string","minLength":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["access-required"]}},"required":["kind","sourceId","name","credentialType","consumers","code"]}},"conflicts":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["missing-id"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["conflicting-types"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["unknown-type"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["unknown-owner"]}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["type-mismatch"]},"targetType":{"type":"string"}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code","targetType"]},{"type":"object","properties":{"kind":{"type":"string","enum":["credential"]},"sourceId":{"type":"string","nullable":true,"minLength":1},"name":{"type":"string"},"expectedTypes":{"type":"array","items":{"type":"string"},"minItems":1},"filePath":{"type":"string"},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"code":{"type":"string","enum":["incompatible-usage-scope"]},"usageScope":{"type":"string"}},"required":["kind","sourceId","name","expectedTypes","referenceFiles","consumers","code","usageScope"]},{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["missing-definition"]},"name":{"type":"string","minLength":1},"referenceFiles":{"type":"array","items":{"type":"string"},"minItems":1},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","referenceFiles","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-not-team"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"filePath":{"type":"string"},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}}},"required":["kind","code","project","filePath","workflows"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-deletion"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]}},"required":["kind","code","project"]},{"type":"object","properties":{"kind":{"type":"string","enum":["data-table"]},"code":{"type":"string","enum":["destructive-change"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1},"changes":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","enum":["add-column"]},"column":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","column","type","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["remove-column"]},"column":{"type":"string"},"type":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[true]}},"required":["kind","column","type","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["change-column-type"]},"column":{"type":"string"},"from":{"type":"string","enum":["string","number","boolean","date"]},"to":{"type":"string","enum":["string","number","boolean","date"]},"destructive":{"type":"boolean","enum":[true]}},"required":["kind","column","from","to","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rename-column"]},"from":{"type":"string"},"to":{"type":"string"},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","from","to","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["reorder-columns"]},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","destructive"]},{"type":"object","properties":{"kind":{"type":"string","enum":["rename-table"]},"from":{"type":"string"},"to":{"type":"string"},"destructive":{"type":"boolean","enum":[false]}},"required":["kind","from","to","destructive"]}],"type":"object"},"minItems":1}},"required":["kind","code","id","name","consumers","changes"]},{"type":"object","properties":{"kind":{"type":"string","enum":["workflow"]},"code":{"type":"string","enum":["workflow-id-conflict","lineage-conflict","policy-violation","missing-node-type","workflow-forbidden"]},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["data-table"]},"code":{"type":"string","enum":["data-table-conflict"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","reason","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["tag"]},"code":{"type":"string","enum":["tag-conflict"]},"id":{"type":"string","minLength":1},"name":{"type":"string"},"reason":{"type":"string"},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","reason","consumers"]},{"type":"object","properties":{"kind":{"type":"string","enum":["project"]},"code":{"type":"string","enum":["project-conflict","check-not-run","import-blocked","project-not-on-branch"]},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"reason":{"type":"string"}},"required":["kind","code","project"]},{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"projectExists":{"type":"boolean"},"instanceProject":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id"]},"kind":{"type":"string","enum":["workflow","folder"]},"code":{"type":"string","enum":["moved"]}},"required":["id","name","project","projectExists","instanceProject","kind","code"]}],"type":"object"}},"warnings":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["variable"]},"code":{"type":"string","enum":["variable-shadowed"]},"name":{"type":"string","minLength":1},"scope":{"type":"object","properties":{"kind":{"type":"string","enum":["global"]}},"required":["kind"]},"consumers":{"type":"array","items":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"workflows":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1},"name":{"type":"string"}},"required":["id","name"]},"minItems":1}},"required":["project","workflows"]},"minItems":1}},"required":["kind","code","name","scope","consumers"]}}},"required":["missingProjects","missingBindings","accessRequirements","conflicts","warnings"]}},"required":["environmentId","git","status","check"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["source-changed"]}},"required":["environmentId","git","status"]},{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"git":{"type":"object","properties":{"commitSha":{"type":"string"},"branchName":{"type":"string"}},"required":["commitSha","branchName"]},"status":{"type":"string","enum":["preview-changed"]}},"required":["environmentId","git","status"]}],"type":"object"},"promotionCredentialExpressionValue.generated":{"anyOf":[{"type":"string"},{"type":"array","items":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"}},{"type":"object","additionalProperties":{"$ref":"#/components/schemas/promotionCredentialExpressionValue.generated"}}],"description":"Values can be strings, arrays, or nested objects. Every leaf is an expression string."}},"responses":{"badRequest":{"description":"The request is invalid or provides malformed data."},"unauthorized":{"description":"Unauthorized"},"forbidden":{"description":"Forbidden"},"notFound":{"description":"The specified resource was not found."},"conflict":{"description":"Conflict"},"unsupportedMediaType":{"description":"Unsupported media type."},"unprocessableEntity":{"description":"Unprocessable Entity"},"tooManyRequests":{"description":"Too many requests.","headers":{"Retry-After":{"description":"The number of seconds to wait before you retry the request.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"The maximum number of requests allowed in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Remaining":{"description":"The number of requests remaining in the rate-limit window.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Reset":{"description":"The time when the rate-limit window resets, as a Unix timestamp in seconds.","schema":{"type":"integer","format":"int64","minimum":0}}},"content":{"application/json":{"schema":{"type":"object","required":["message"],"properties":{"message":{"type":"string"}}}}}},"serviceUnavailable":{"description":"The requested service is temporarily unavailable."}}},"paths":{"/promotions/projects/{projectId}/apply/continue":{"post":{"operationId":"continueApplyProjectSelection","tags":["Promotions"],"summary":"Continue applying a selection after binding setup","description":"Rechecks the project's Apply source and the current bindings for the selection. Resend the full selection in workflowIds. Send the required expectedSource with the environmentId, branchName, and full commitSha from the reviewed Apply result. Optionally send expectedPreviewRevision with the revision of the reviewed Apply preview. Send `confirmDestructiveChanges: true` to also apply destructive data table changes. The server does not keep a session. Status `source-changed` or `preview-changed` requires a new Apply review. Status `blocked` returns every blocker again, before import writes. Status `applied` includes counts and warnings. Inspect status before reading counts. Unselected content stays unchanged. Requires the same connected Apply environment and permissions as the initial selection apply. The API key needs the promotions:apply scope. The importer checks user write permissions.","parameters":[{"$ref":"#/components/parameters/idempotencyKey"},{"schema":{"type":"string"},"required":true,"description":"The ID of the project.","name":"projectId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workflowIds":{"type":"array","items":{"type":"string","minLength":1,"maxLength":36},"minItems":1},"expectedSource":{"type":"object","properties":{"environmentId":{"type":"string","minLength":1,"maxLength":36},"branchName":{"type":"string","minLength":1},"commitSha":{"type":"string","pattern":"^[0-9a-f]{40}([0-9a-f]{24})?$"}},"required":["environmentId","branchName","commitSha"],"additionalProperties":false},"expectedPreviewRevision":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The `revision` of the reviewed Apply preview. Apply builds the preview again and returns status `preview-changed` without writing when it differs, for example after a local edit."},"confirmDestructiveChanges":{"type":"boolean","description":"Also applies destructive data table changes, which a `destructive-change` conflict reports: removed or retyped columns. The values in those columns are removed. Rows and other columns are kept. On a full apply, also deletes the team projects that a `project-deletion` conflict reports, with everything in them. The confirmation covers every such change and deletion when Continue runs, including those that are not in the reviewed result."}},"required":["workflowIds","expectedSource"],"additionalProperties":false}}}},"responses":{"200":{"description":"Operation successful.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/applyPackageResultDto.generated"}}}},"400":{"$ref":"#/components/responses/badRequest"},"401":{"$ref":"#/components/responses/unauthorized"},"403":{"$ref":"#/components/responses/forbidden"},"404":{"$ref":"#/components/responses/notFound"},"409":{"$ref":"#/components/responses/conflict"},"415":{"$ref":"#/components/responses/unsupportedMediaType"},"422":{"$ref":"#/components/responses/unprocessableEntity"},"429":{"$ref":"#/components/responses/tooManyRequests"},"503":{"$ref":"#/components/responses/serviceUnavailable"}}}}}}
```
