> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/api/api-reference/stacks.md).

# Stacks

Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).

### Stack schema

## The Stack object

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"components":{"schemas":{"Stack":{"type":"object","description":"Stack resource as returned by the API.","properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Unique identifier for the stack."},"name":{"type":"string","maxLength":1024,"description":"Human-readable display name for the stack."},"type":{"type":"string","enum":["server","lambda"],"description":"Execution environment type that determines which configuration block is present."},"framework":{"type":"string","enum":["twoDotZero"],"description":"Framework version. Currently only `twoDotZero` is supported."},"server":{"type":"object","description":"Configuration for server-type stacks. Present when `type` is `server`.\nLegacy lambda-type stacks may also carry a vestigial empty `server`\nobject (`{\"ipRanges\": []}`).","required":["hostURI","systemToken"],"properties":{"hostURI":{"type":"string","maxLength":1024,"description":"Base URI of the server hosting the stack."},"systemToken":{"type":"string","readOnly":true,"description":"System token for authenticating with the server stack.\nAlways masked as \"******\" in standard responses. Use the\ndedicated `/stacks/{_id}/systemToken` endpoint to retrieve\nthe actual value."}}},"lambda":{"type":"object","description":"Configuration for AWS Lambda-type stacks. Present when `type` is `lambda`.","required":["accessKeyId","secretAccessKey","awsRegion","functionName"],"properties":{"accessKeyId":{"type":"string","maxLength":1024,"description":"AWS access key ID for invoking the Lambda function. Unlike\n`secretAccessKey`, it is returned in plaintext in responses."},"secretAccessKey":{"type":"string","maxLength":511,"description":"AWS secret access key. Write-only — responses mask it as \"******\"."},"awsRegion":{"type":"string","enum":["us-east-1","us-east-2","us-west-1","us-west-2","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ap-south-1","eu-central-1","eu-west-1"],"description":"AWS region where the Lambda function is deployed."},"functionName":{"type":"string","maxLength":1024,"description":"Name or ARN of the AWS Lambda function."},"language":{"type":"string","enum":["Node.js","C#","Java","Other"],"default":"Node.js","description":"Programming language of the Lambda function."}}},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was created."},"lastModified":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was last modified."}},"required":["_id","name","type","createdAt","lastModified"],"if":{"properties":{"type":{"const":"server"}}},"then":{"required":["server"]},"else":{"required":["lambda"]}}}}}
```

## List stacks

> Returns all stacks configured in the account.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"parameters":{"Include":{"name":"include","in":"query","required":false,"description":"Comma-separated list of fields to project into each returned record.\nTriggers summary projection: the response contains a minimal identity\nset (`_id`, `name`, plus resource-specific fields) with the requested\nfields added on top. Supports dot notation for nested fields.\nMutually exclusive with `exclude`.","schema":{"type":"string"}},"Exclude":{"name":"exclude","in":"query","required":false,"description":"Comma-separated list of fields to strip from the default response.\nUnlike `include`, does not trigger summary projection — returns the\nfull record with the named fields removed. Protected identity fields\n(e.g. `name`) cannot be stripped. Mutually exclusive with `include`.","schema":{"type":"string"}}},"schemas":{"Stack":{"type":"object","description":"Stack resource as returned by the API.","properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Unique identifier for the stack."},"name":{"type":"string","maxLength":1024,"description":"Human-readable display name for the stack."},"type":{"type":"string","enum":["server","lambda"],"description":"Execution environment type that determines which configuration block is present."},"framework":{"type":"string","enum":["twoDotZero"],"description":"Framework version. Currently only `twoDotZero` is supported."},"server":{"type":"object","description":"Configuration for server-type stacks. Present when `type` is `server`.\nLegacy lambda-type stacks may also carry a vestigial empty `server`\nobject (`{\"ipRanges\": []}`).","required":["hostURI","systemToken"],"properties":{"hostURI":{"type":"string","maxLength":1024,"description":"Base URI of the server hosting the stack."},"systemToken":{"type":"string","readOnly":true,"description":"System token for authenticating with the server stack.\nAlways masked as \"******\" in standard responses. Use the\ndedicated `/stacks/{_id}/systemToken` endpoint to retrieve\nthe actual value."}}},"lambda":{"type":"object","description":"Configuration for AWS Lambda-type stacks. Present when `type` is `lambda`.","required":["accessKeyId","secretAccessKey","awsRegion","functionName"],"properties":{"accessKeyId":{"type":"string","maxLength":1024,"description":"AWS access key ID for invoking the Lambda function. Unlike\n`secretAccessKey`, it is returned in plaintext in responses."},"secretAccessKey":{"type":"string","maxLength":511,"description":"AWS secret access key. Write-only — responses mask it as \"******\"."},"awsRegion":{"type":"string","enum":["us-east-1","us-east-2","us-west-1","us-west-2","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ap-south-1","eu-central-1","eu-west-1"],"description":"AWS region where the Lambda function is deployed."},"functionName":{"type":"string","maxLength":1024,"description":"Name or ARN of the AWS Lambda function."},"language":{"type":"string","enum":["Node.js","C#","Java","Other"],"default":"Node.js","description":"Programming language of the Lambda function."}}},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was created."},"lastModified":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was last modified."}},"required":["_id","name","type","createdAt","lastModified"],"if":{"properties":{"type":{"const":"server"}}},"then":{"required":["server"]},"else":{"required":["lambda"]}},"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"422-unprocessable-entity":{"description":"Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/stacks":{"get":{"summary":"List stacks","description":"Returns all stacks configured in the account.","operationId":"listStacks","tags":["Stacks"],"parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of stacks to return per page.","schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000}},{"$ref":"#/components/parameters/Include"},{"$ref":"#/components/parameters/Exclude"}],"responses":{"200":{"description":"Array of stack objects.","headers":{"Link":{"description":"RFC 5988 pagination links. When more pages remain, includes a\n`<...>; rel=\"next\"` entry with an `after` cursor; absent on the\nfinal page.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Stack"}}}}},"204":{"description":"No stacks exist in the account."},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"$ref":"#/components/responses/422-unprocessable-entity"}}}}}}
```

## Create a stack

> Creates a new stack. For server stacks, retrieve the system token\
> after creation via \`GET /v1/stacks/{\_id}/systemToken\`.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Request":{"type":"object","description":"Request body for creating or updating a stack.","required":["name","type"],"properties":{"name":{"type":"string","maxLength":1024,"description":"Human-readable display name for the stack."},"type":{"type":"string","enum":["server","lambda"],"description":"Execution environment type."},"framework":{"type":"string","enum":["twoDotZero"],"description":"Framework version. Currently only `twoDotZero` is supported.\nOptional — if omitted on create, the field is absent from the\nresponse. If omitted on PUT, a previously set value is cleared."},"server":{"type":"object","description":"Configuration for server-type stacks. Required when `type` is `server`.\nOmit when `type` is `lambda` — a `server` object sent on a lambda-type\nwrite is accepted but discarded.","required":["hostURI"],"properties":{"hostURI":{"type":"string","maxLength":1024,"description":"Base URI of the server hosting the stack."}}},"lambda":{"type":"object","description":"Configuration for AWS Lambda-type stacks. Required when `type` is `lambda`.","required":["accessKeyId","secretAccessKey","awsRegion","functionName"],"properties":{"accessKeyId":{"type":"string","maxLength":1024,"description":"AWS access key ID for invoking the Lambda function."},"secretAccessKey":{"type":"string","maxLength":511,"description":"AWS secret access key. Write-only — responses mask it as \"******\"."},"awsRegion":{"type":"string","enum":["us-east-1","us-east-2","us-west-1","us-west-2","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ap-south-1","eu-central-1","eu-west-1"],"description":"AWS region where the Lambda function is deployed."},"functionName":{"type":"string","maxLength":1024,"description":"Name or ARN of the AWS Lambda function."},"language":{"type":"string","enum":["Node.js","C#","Java","Other"],"default":"Node.js","description":"Programming language of the Lambda function."}}}},"if":{"properties":{"type":{"const":"server"}}},"then":{"required":["server"]},"else":{"required":["lambda"]}},"Stack":{"type":"object","description":"Stack resource as returned by the API.","properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Unique identifier for the stack."},"name":{"type":"string","maxLength":1024,"description":"Human-readable display name for the stack."},"type":{"type":"string","enum":["server","lambda"],"description":"Execution environment type that determines which configuration block is present."},"framework":{"type":"string","enum":["twoDotZero"],"description":"Framework version. Currently only `twoDotZero` is supported."},"server":{"type":"object","description":"Configuration for server-type stacks. Present when `type` is `server`.\nLegacy lambda-type stacks may also carry a vestigial empty `server`\nobject (`{\"ipRanges\": []}`).","required":["hostURI","systemToken"],"properties":{"hostURI":{"type":"string","maxLength":1024,"description":"Base URI of the server hosting the stack."},"systemToken":{"type":"string","readOnly":true,"description":"System token for authenticating with the server stack.\nAlways masked as \"******\" in standard responses. Use the\ndedicated `/stacks/{_id}/systemToken` endpoint to retrieve\nthe actual value."}}},"lambda":{"type":"object","description":"Configuration for AWS Lambda-type stacks. Present when `type` is `lambda`.","required":["accessKeyId","secretAccessKey","awsRegion","functionName"],"properties":{"accessKeyId":{"type":"string","maxLength":1024,"description":"AWS access key ID for invoking the Lambda function. Unlike\n`secretAccessKey`, it is returned in plaintext in responses."},"secretAccessKey":{"type":"string","maxLength":511,"description":"AWS secret access key. Write-only — responses mask it as \"******\"."},"awsRegion":{"type":"string","enum":["us-east-1","us-east-2","us-west-1","us-west-2","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ap-south-1","eu-central-1","eu-west-1"],"description":"AWS region where the Lambda function is deployed."},"functionName":{"type":"string","maxLength":1024,"description":"Name or ARN of the AWS Lambda function."},"language":{"type":"string","enum":["Node.js","C#","Java","Other"],"default":"Node.js","description":"Programming language of the Lambda function."}}},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was created."},"lastModified":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was last modified."}},"required":["_id","name","type","createdAt","lastModified"],"if":{"properties":{"type":{"const":"server"}}},"then":{"required":["server"]},"else":{"required":["lambda"]}},"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}},"responses":{"400-bad-request":{"description":"Bad request. The server could not understand the request because of malformed syntax or invalid parameters.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"422-unprocessable-entity":{"description":"Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/stacks":{"post":{"summary":"Create a stack","description":"Creates a new stack. For server stacks, retrieve the system token\nafter creation via `GET /v1/stacks/{_id}/systemToken`.","operationId":"createStack","tags":["Stacks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}}},"responses":{"201":{"description":"Created stack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stack"}}}},"400":{"$ref":"#/components/responses/400-bad-request"},"401":{"$ref":"#/components/responses/401-unauthorized"},"422":{"$ref":"#/components/responses/422-unprocessable-entity"}}}}}}
```

## Get a stack

> Returns a single stack by ID.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Stack":{"type":"object","description":"Stack resource as returned by the API.","properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Unique identifier for the stack."},"name":{"type":"string","maxLength":1024,"description":"Human-readable display name for the stack."},"type":{"type":"string","enum":["server","lambda"],"description":"Execution environment type that determines which configuration block is present."},"framework":{"type":"string","enum":["twoDotZero"],"description":"Framework version. Currently only `twoDotZero` is supported."},"server":{"type":"object","description":"Configuration for server-type stacks. Present when `type` is `server`.\nLegacy lambda-type stacks may also carry a vestigial empty `server`\nobject (`{\"ipRanges\": []}`).","required":["hostURI","systemToken"],"properties":{"hostURI":{"type":"string","maxLength":1024,"description":"Base URI of the server hosting the stack."},"systemToken":{"type":"string","readOnly":true,"description":"System token for authenticating with the server stack.\nAlways masked as \"******\" in standard responses. Use the\ndedicated `/stacks/{_id}/systemToken` endpoint to retrieve\nthe actual value."}}},"lambda":{"type":"object","description":"Configuration for AWS Lambda-type stacks. Present when `type` is `lambda`.","required":["accessKeyId","secretAccessKey","awsRegion","functionName"],"properties":{"accessKeyId":{"type":"string","maxLength":1024,"description":"AWS access key ID for invoking the Lambda function. Unlike\n`secretAccessKey`, it is returned in plaintext in responses."},"secretAccessKey":{"type":"string","maxLength":511,"description":"AWS secret access key. Write-only — responses mask it as \"******\"."},"awsRegion":{"type":"string","enum":["us-east-1","us-east-2","us-west-1","us-west-2","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ap-south-1","eu-central-1","eu-west-1"],"description":"AWS region where the Lambda function is deployed."},"functionName":{"type":"string","maxLength":1024,"description":"Name or ARN of the AWS Lambda function."},"language":{"type":"string","enum":["Node.js","C#","Java","Other"],"default":"Node.js","description":"Programming language of the Lambda function."}}},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was created."},"lastModified":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was last modified."}},"required":["_id","name","type","createdAt","lastModified"],"if":{"properties":{"type":{"const":"server"}}},"then":{"required":["server"]},"else":{"required":["lambda"]}},"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"404-not-found":{"description":"Not found. The requested resource does not exist or is not visible to the caller.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/stacks/{_id}":{"get":{"summary":"Get a stack","description":"Returns a single stack by ID.","operationId":"getStackById","tags":["Stacks"],"parameters":[{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Stack ID."}],"responses":{"200":{"description":"Stack object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stack"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"$ref":"#/components/responses/404-not-found"}}}}}}
```

## Update a stack

> Updates a stack. Omitting the config object clears optional fields\
> like \`framework\`. To rotate a server stack's system token, use\
> \`DELETE /v1/stacks/{\_id}/systemToken\` instead.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"Request":{"type":"object","description":"Request body for creating or updating a stack.","required":["name","type"],"properties":{"name":{"type":"string","maxLength":1024,"description":"Human-readable display name for the stack."},"type":{"type":"string","enum":["server","lambda"],"description":"Execution environment type."},"framework":{"type":"string","enum":["twoDotZero"],"description":"Framework version. Currently only `twoDotZero` is supported.\nOptional — if omitted on create, the field is absent from the\nresponse. If omitted on PUT, a previously set value is cleared."},"server":{"type":"object","description":"Configuration for server-type stacks. Required when `type` is `server`.\nOmit when `type` is `lambda` — a `server` object sent on a lambda-type\nwrite is accepted but discarded.","required":["hostURI"],"properties":{"hostURI":{"type":"string","maxLength":1024,"description":"Base URI of the server hosting the stack."}}},"lambda":{"type":"object","description":"Configuration for AWS Lambda-type stacks. Required when `type` is `lambda`.","required":["accessKeyId","secretAccessKey","awsRegion","functionName"],"properties":{"accessKeyId":{"type":"string","maxLength":1024,"description":"AWS access key ID for invoking the Lambda function."},"secretAccessKey":{"type":"string","maxLength":511,"description":"AWS secret access key. Write-only — responses mask it as \"******\"."},"awsRegion":{"type":"string","enum":["us-east-1","us-east-2","us-west-1","us-west-2","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ap-south-1","eu-central-1","eu-west-1"],"description":"AWS region where the Lambda function is deployed."},"functionName":{"type":"string","maxLength":1024,"description":"Name or ARN of the AWS Lambda function."},"language":{"type":"string","enum":["Node.js","C#","Java","Other"],"default":"Node.js","description":"Programming language of the Lambda function."}}}},"if":{"properties":{"type":{"const":"server"}}},"then":{"required":["server"]},"else":{"required":["lambda"]}},"Stack":{"type":"object","description":"Stack resource as returned by the API.","properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Unique identifier for the stack."},"name":{"type":"string","maxLength":1024,"description":"Human-readable display name for the stack."},"type":{"type":"string","enum":["server","lambda"],"description":"Execution environment type that determines which configuration block is present."},"framework":{"type":"string","enum":["twoDotZero"],"description":"Framework version. Currently only `twoDotZero` is supported."},"server":{"type":"object","description":"Configuration for server-type stacks. Present when `type` is `server`.\nLegacy lambda-type stacks may also carry a vestigial empty `server`\nobject (`{\"ipRanges\": []}`).","required":["hostURI","systemToken"],"properties":{"hostURI":{"type":"string","maxLength":1024,"description":"Base URI of the server hosting the stack."},"systemToken":{"type":"string","readOnly":true,"description":"System token for authenticating with the server stack.\nAlways masked as \"******\" in standard responses. Use the\ndedicated `/stacks/{_id}/systemToken` endpoint to retrieve\nthe actual value."}}},"lambda":{"type":"object","description":"Configuration for AWS Lambda-type stacks. Present when `type` is `lambda`.","required":["accessKeyId","secretAccessKey","awsRegion","functionName"],"properties":{"accessKeyId":{"type":"string","maxLength":1024,"description":"AWS access key ID for invoking the Lambda function. Unlike\n`secretAccessKey`, it is returned in plaintext in responses."},"secretAccessKey":{"type":"string","maxLength":511,"description":"AWS secret access key. Write-only — responses mask it as \"******\"."},"awsRegion":{"type":"string","enum":["us-east-1","us-east-2","us-west-1","us-west-2","ap-northeast-2","ap-southeast-1","ap-southeast-2","ap-northeast-1","ap-south-1","eu-central-1","eu-west-1"],"description":"AWS region where the Lambda function is deployed."},"functionName":{"type":"string","maxLength":1024,"description":"Name or ARN of the AWS Lambda function."},"language":{"type":"string","enum":["Node.js","C#","Java","Other"],"default":"Node.js","description":"Programming language of the Lambda function."}}},"createdAt":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was created."},"lastModified":{"type":"string","format":"date-time","readOnly":true,"description":"Timestamp when the stack was last modified."}},"required":["_id","name","type","createdAt","lastModified"],"if":{"properties":{"type":{"const":"server"}}},"then":{"required":["server"]},"else":{"required":["lambda"]}},"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}},"responses":{"400-bad-request":{"description":"Bad request. The server could not understand the request because of malformed syntax or invalid parameters.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"404-not-found":{"description":"Not found. The requested resource does not exist or is not visible to the caller.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422-unprocessable-entity":{"description":"Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"paths":{"/v1/stacks/{_id}":{"put":{"summary":"Update a stack","description":"Updates a stack. Omitting the config object clears optional fields\nlike `framework`. To rotate a server stack's system token, use\n`DELETE /v1/stacks/{_id}/systemToken` instead.","operationId":"updateStack","tags":["Stacks"],"parameters":[{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Stack ID."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Request"}}}},"responses":{"200":{"description":"Updated stack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Stack"}}}},"400":{"$ref":"#/components/responses/400-bad-request"},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"$ref":"#/components/responses/404-not-found"},"422":{"$ref":"#/components/responses/422-unprocessable-entity"}}}}}}
```

## Delete a stack

> Deletes a stack. Soft-deleted and retained in the recycle bin for\
> 30 days.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"404-not-found":{"description":"Not found. The requested resource does not exist or is not visible to the caller.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422-dependency-conflict":{"description":"The resource has dependents that must be deleted first. Each entry\nin the `errors` array names one blocking resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/stacks/{_id}":{"delete":{"summary":"Delete a stack","description":"Deletes a stack. Soft-deleted and retained in the recycle bin for\n30 days.","operationId":"deleteStack","tags":["Stacks"],"parameters":[{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Stack ID."}],"responses":{"204":{"description":"Stack deleted."},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"$ref":"#/components/responses/404-not-found"},"422":{"$ref":"#/components/responses/422-dependency-conflict"}}}}}}
```

## Get stack system token (server stacks only)

> Returns the unmasked system token for a server stack.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"SystemTokenResponse":{"type":"object","description":"Response containing the actual system token value for a server stack.","properties":{"systemToken":{"type":"string","description":"The actual system token value for authenticating with the server stack."}}},"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/stacks/{_id}/systemToken":{"get":{"summary":"Get stack system token (server stacks only)","description":"Returns the unmasked system token for a server stack.","operationId":"getStackSystemToken","tags":["Stacks"],"parameters":[{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Stack ID."}],"responses":{"200":{"description":"System token object.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SystemTokenResponse"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"description":"Stack not found, or the stack is not a server stack. The error\nmessage is \"Stack of type server not found.\" in both cases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Recycle stack system token (server stacks only)

> Rotates (recycles) the server stack's system token. The old token is\
> immediately invalidated. Retrieve the new token via\
> \`GET /v1/stacks/{\_id}/systemToken\`.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/stacks/{_id}/systemToken":{"delete":{"summary":"Recycle stack system token (server stacks only)","description":"Rotates (recycles) the server stack's system token. The old token is\nimmediately invalidated. Retrieve the new token via\n`GET /v1/stacks/{_id}/systemToken`.","operationId":"recycleStackSystemToken","tags":["Stacks"],"parameters":[{"name":"_id","in":"path","required":true,"schema":{"type":"string","format":"objectId"},"description":"Stack ID."}],"responses":{"204":{"description":"Token recycled."},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"description":"Stack not found, or the stack is not a server stack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Get audit log for a stack

> Returns the change history for a stack. Each entry records a mutation\
> event with who made the change, when, and which fields were affected.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"responses":{"400-bad-request":{"description":"Bad request. The server could not understand the request because of malformed syntax or invalid parameters.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}},"404-not-found":{"description":"Not found. The requested resource does not exist or is not visible to the caller.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422-unprocessable-entity":{"description":"Unprocessable entity. The request was well-formed but was unable to be followed due to semantic errors.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","description":"Standard error response envelope returned by integrator.io APIs.","properties":{"errors":{"type":"array","description":"List of errors that occurred while processing the request.","items":{"type":"object","properties":{"code":{"oneOf":[{"type":"string"},{"type":"integer"}],"description":"Machine-readable error code. Usually a string like\n`invalid_ref`, `missing_required_field`, or `unauthorized`;\nmay be an **integer** when the error mirrors an upstream HTTP\nstatus (e.g. `500`) — most commonly returned by connection-ping\nand adaptor-proxy responses."},"message":{"type":"string","description":"Human-readable description of the error."},"field":{"type":"string","description":"Optional pointer to the document field that caused the error.\nUsed by structural validation errors (`missing_required_field`,\n`invalid_ref`) to indicate which field is at fault\n(e.g. `_id`, `type`, `http.baseURI`)."},"source":{"type":"string","description":"Optional origin layer for the error — e.g. `application` when\nthe error came from the remote system the adaptor called,\n`connector` when the adaptor itself rejected the request."}},"required":["message"]}}},"required":["errors"]}}},"paths":{"/v1/stacks/{_id}/audit":{"get":{"summary":"Get audit log for a stack","description":"Returns the change history for a stack. Each entry records a mutation\nevent with who made the change, when, and which fields were affected.","tags":["Stacks"],"operationId":"getStackAudit","parameters":[{"name":"_id","in":"path","description":"Stack ID.","required":true,"schema":{"type":"string","format":"objectId"}},{"name":"limit","in":"query","description":"Maximum number of audit entries to return per page.","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000}},{"name":"after","in":"query","required":false,"description":"Opaque pagination cursor for the next page. Take it from the `after` value in the `Link`\nresponse header's `rel=\"next\"` URL rather than constructing it.","schema":{"type":"string"}},{"name":"from","in":"query","required":false,"description":"Only return entries at or after this timestamp.","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"description":"Only return entries at or before this timestamp.","schema":{"type":"string","format":"date-time"}},{"name":"action","in":"query","required":false,"description":"Filter by the change type. Maps to the `event` field on each entry.","schema":{"type":"string","enum":["create","update","delete","view","restore","purge","signin","signout","purgelogs"]}},{"name":"source","in":"query","required":false,"description":"Filter by how the change was initiated.","schema":{"type":"string","enum":["ui","api","system","connector","script","sso"]}},{"name":"_byUserId","in":"query","required":false,"description":"Filter to changes performed by a single user.","schema":{"type":"string","format":"objectId"}}],"responses":{"200":{"description":"Array of audit entries, newest first.","headers":{"Link":{"description":"RFC 5988 pagination link. Includes `<...>; rel=\"next\"` with an\n`after` cursor when more entries exist; absent on the final page.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string","format":"objectId","description":"Unique identifier for this audit entry."},"resourceType":{"type":"string","description":"Always `stack` for this endpoint."},"_resourceId":{"type":"string","format":"objectId","description":"ID of the stack this entry belongs to."},"event":{"type":"string","description":"Type of change that occurred.","enum":["create","update","delete"]},"source":{"type":"string","description":"How the change was initiated.","enum":["api","ui","system"]},"time":{"type":"string","format":"date-time","description":"When the change occurred."},"byUser":{"type":"object","description":"User who made the change.","properties":{"_id":{"type":"string","format":"objectId","description":"User ID."},"email":{"type":"string","format":"email","description":"User email address."},"name":{"type":"string","description":"User display name."}}},"fieldChanges":{"type":"array","description":"Fields that were modified.","items":{"type":"object","properties":{"fieldPath":{"type":"string","description":"Dot-notation path of the changed field."},"oldValue":{"description":"Previous value (absent on create)."},"newValue":{"description":"New value (absent on delete)."}}}},"deletedInfo":{"type":"object","description":"Metadata about the deleted resource. Present on `delete` events.","properties":{"name":{"type":"string","description":"Name of the resource at the time of deletion."}}}}}}}}},"204":{"description":"No audit entries exist for this stack."},"400":{"$ref":"#/components/responses/400-bad-request"},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"$ref":"#/components/responses/404-not-found"},"422":{"$ref":"#/components/responses/422-unprocessable-entity"}}}}}}
```

## List dependencies of a stack

> Returns the set of resources that depend on the specified stack.

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"tags":[{"name":"Stacks","description":"Stacks are execution environments that run custom extension code for integrations. Two types are supported: **server** (self-hosted) and **lambda** (AWS Lambda).\n\n## Stack schema\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack\" grouped=\"true\" %}"}],"servers":[{"url":"https://api.integrator.io","description":"Production (US / default region)"},{"url":"https://api.eu.integrator.io","description":"Production (EU region)"},{"url":"https://api.au.integrator.io","description":"Production (AU region)"},{"url":"https://api.ca.integrator.io","description":"Production (CA region)"}],"security":[{"bearerAuth":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}},"schemas":{"DependencyResponse":{"type":"object","description":"Map of dependent-resource types to arrays of dependency entries.\nKeys are plural resource type strings (e.g. `flows`, `imports`,\n`connections`). An empty object `{}` means no dependents.\n","additionalProperties":{"type":"array","items":{"$ref":"#/components/schemas/DependencyEntry"}}},"DependencyEntry":{"type":"object","description":"A single resource that depends on the queried resource.","properties":{"id":{"type":"string","description":"Unique identifier of the dependent resource."},"name":{"type":"string","description":"Display name of the dependent resource."},"paths":{"type":"array","description":"Dot-notation paths within the dependent resource that reference\nthe target resource. `[*]` denotes array elements.","items":{"type":"string"}},"accessLevel":{"type":"string","description":"The caller's access level on the dependent resource."},"dependencyIds":{"type":"object","description":"Map of resource types to arrays of IDs that this dependent\nresource references on the target. Keys are singular or plural\nresource type strings; values are arrays of ID strings.","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["id","name","paths","accessLevel","dependencyIds"]}},"responses":{"401-unauthorized":{"description":"Unauthorized. The request lacks a valid bearer token, or the provided token\nfailed to authenticate.\n\nNote: the 401 response is produced by the auth middleware **before** the\nrequest reaches the endpoint handler, so it does **not** follow the\nstandard `{errors: [...]}` envelope. Instead the body is a bare\n`{message: string}` object with no `code`, no `errors` array. Callers\nhandling 401s should key off the HTTP status and the `message` string,\nnot try to destructure an `errors[]`.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Human-readable description of the auth failure. Known values:\n- `\"Unauthorized\"` — no `Authorization` header on the request.\n- `\"Bearer Authentication Failed\"` — header present but token\n  is invalid, revoked, or expired."}},"required":["message"]}}}}}},"paths":{"/v1/stacks/{_id}/dependencies":{"get":{"operationId":"listStackDependencies","tags":["Stacks"],"summary":"List dependencies of a stack","description":"Returns the set of resources that depend on the specified stack.","parameters":[{"name":"_id","in":"path","required":true,"description":"Stack ID.","schema":{"type":"string","format":"objectId"}}],"responses":{"200":{"description":"Dependency map. Keys are resource-type strings; values are arrays\nof dependency entries. Returns `{}` when no dependents exist.\n","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DependencyResponse"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.celigo.com/api/api-reference/stacks.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
