> 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/scripts-and-stacks/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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.

### Stack and stack share schemas

## 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. A PUT ignores this field whatever it\ncarries; `DELETE /stacks/{_id}/systemToken` rotates it."}}},"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"]}}}}}
```

## The StackShare object

```json
{"openapi":"3.2.0","info":{"title":"Stacks","version":"1.0.0"},"components":{"schemas":{"StackShare":{"type":"object","description":"A share record granting another user access to one of your stacks — the\nowner's view of a stack share. The `_id` is the share record, not the stack;\nthe recipient sees the same share through `GET /v1/shared/sshares`.","required":["_id","_stackId"],"properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Identifier of the share record. Use it with the `/v1/sshares/{_id}` operations, not the stack id."},"_stackId":{"type":"string","format":"objectId","readOnly":true,"description":"Stack that is shared. Fetch its configuration with `GET /v1/stacks/{_id}`."},"_sharedWithUserId":{"type":"string","format":"objectId","readOnly":true,"description":"Identity of the user the stack is shared with. Present on\n`GET /v1/sshares/{_id}` and the update response; the list and the\ninvite response expand it into `sharedWithUser` instead."},"accepted":{"type":"boolean","readOnly":true,"description":"When true, the recipient accepted the invitation and can use the stack. Present only when true."},"dismissed":{"type":"boolean","readOnly":true,"description":"When true, the recipient declined the invitation; send it again with `PUT /v1/sshares/{_id}/reinvite`. Present only when true."},"disabled":{"type":"boolean","readOnly":true,"description":"When true, you suspended the recipient's use of the stack via `PUT /v1/sshares/{_id}/disable`. Present only when true."},"sharedWithUser":{"type":"object","readOnly":true,"description":"Identity details of the recipient. Present on `GET /v1/sshares` and on the\ninvite response; the single-record operations return `_sharedWithUserId`\ninstead. `name` is included only once the invitation is accepted.","properties":{"_id":{"type":"string","format":"objectId","description":"The recipient's own user id."},"email":{"type":"string","format":"email","description":"Email address the invitation was sent to."},"name":{"type":"string","description":"Display name of the recipient. Present only once the invitation is accepted."},"authTypeSSO":{"type":["object","null"],"description":"SSO linkage of the recipient's own sign-in. `null` when the recipient signs in with a password.","additionalProperties":true},"lastSignIn":{"type":"string","format":"date-time","description":"Timestamp when the recipient last signed in to integrator.io (any account)."},"allowedToResetMFA":{"type":"boolean","description":"When true, the caller may reset the recipient's MFA."}}}}}}}}
```

## 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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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. A PUT ignores this field whatever it\ncarries; `DELETE /stacks/{_id}/systemToken` rotates it."}}},"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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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 \"******\".\nOn a PUT, the mask sent back keeps the stored secret, and leaving\nthe field out is refused with 422."},"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. A PUT ignores this field whatever it\ncarries; `DELETE /stacks/{_id}/systemToken` rotates it."}}},"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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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. A PUT ignores this field whatever it\ncarries; `DELETE /stacks/{_id}/systemToken` rotates it."}}},"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.\
> \
> Send the secrets as a GET returned them. On a lambda stack, a\
> \`lambda.secretAccessKey\` of \`\*\*\*\*\*\*\` keeps the stored secret, and a\
> body without \`secretAccessKey\` is refused with 422 ("secretAccessKey\
> is not provided for the stack of type lambda."). On a server stack, a\
> PUT ignores \`server.systemToken\`, whether the body omits it, masks it\
> or carries another value.

```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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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 \"******\".\nOn a PUT, the mask sent back keeps the stored secret, and leaving\nthe field out is refused with 422."},"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. A PUT ignores this field whatever it\ncarries; `DELETE /stacks/{_id}/systemToken` rotates it."}}},"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.\n\nSend the secrets as a GET returned them. On a lambda stack, a\n`lambda.secretAccessKey` of `******` keeps the stored secret, and a\nbody without `secretAccessKey` is refused with 422 (\"secretAccessKey\nis not provided for the stack of type lambda.\"). On a server stack, a\nPUT ignores `server.systemToken`, whether the body omits it, masks it\nor carries another value.","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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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","cli"]},"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":"Name snapshot of a deleted stack. Once the stack is in the recycle\nbin, every entry in its history carries it — not only the `delete`\nevent — so the name can still be shown after the record is gone.","properties":{"name":{"type":"string","description":"Name of the stack 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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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."},"type":{"type":"string","description":"Sub-type of the dependent resource when its collection distinguishes one, such as\n`stream` for a listener export. Only present for resource types that carry a `type`."},"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"}}}}}}
```

## Share a stack with a user

> Invites another integrator.io user to use this stack and emails them the\
> invitation. Creates a pending share record — the stack becomes usable by\
> the recipient only after they accept it (\`PUT /v1/sshares/{\_id}/accept\`).\
> The recipient is looked up by email before the stack is checked, so an\
> unknown address fails even for a stack id that does not exist. Stacks that\
> back an Integration App cannot be shared.

```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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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":{"StackInviteRequest":{"type":"object","description":"Request body for `POST /v1/stacks/{_id}/invite`.","required":["email"],"properties":{"email":{"type":"string","format":"email","description":"Email address of the integrator.io user to share the stack with, matched\ncase-insensitively. The address must already belong to an integrator.io\naccount — a stack cannot be shared with someone who has not signed up."}}},"StackShare":{"type":"object","description":"A share record granting another user access to one of your stacks — the\nowner's view of a stack share. The `_id` is the share record, not the stack;\nthe recipient sees the same share through `GET /v1/shared/sshares`.","required":["_id","_stackId"],"properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Identifier of the share record. Use it with the `/v1/sshares/{_id}` operations, not the stack id."},"_stackId":{"type":"string","format":"objectId","readOnly":true,"description":"Stack that is shared. Fetch its configuration with `GET /v1/stacks/{_id}`."},"_sharedWithUserId":{"type":"string","format":"objectId","readOnly":true,"description":"Identity of the user the stack is shared with. Present on\n`GET /v1/sshares/{_id}` and the update response; the list and the\ninvite response expand it into `sharedWithUser` instead."},"accepted":{"type":"boolean","readOnly":true,"description":"When true, the recipient accepted the invitation and can use the stack. Present only when true."},"dismissed":{"type":"boolean","readOnly":true,"description":"When true, the recipient declined the invitation; send it again with `PUT /v1/sshares/{_id}/reinvite`. Present only when true."},"disabled":{"type":"boolean","readOnly":true,"description":"When true, you suspended the recipient's use of the stack via `PUT /v1/sshares/{_id}/disable`. Present only when true."},"sharedWithUser":{"type":"object","readOnly":true,"description":"Identity details of the recipient. Present on `GET /v1/sshares` and on the\ninvite response; the single-record operations return `_sharedWithUserId`\ninstead. `name` is included only once the invitation is accepted.","properties":{"_id":{"type":"string","format":"objectId","description":"The recipient's own user id."},"email":{"type":"string","format":"email","description":"Email address the invitation was sent to."},"name":{"type":"string","description":"Display name of the recipient. Present only once the invitation is accepted."},"authTypeSSO":{"type":["object","null"],"description":"SSO linkage of the recipient's own sign-in. `null` when the recipient signs in with a password.","additionalProperties":true},"lastSignIn":{"type":"string","format":"date-time","description":"Timestamp when the recipient last signed in to integrator.io (any account)."},"allowedToResetMFA":{"type":"boolean","description":"When true, the caller may reset the recipient's MFA."}}}}},"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}/invite":{"post":{"summary":"Share a stack with a user","operationId":"inviteUserToStack","tags":["Stacks"],"description":"Invites another integrator.io user to use this stack and emails them the\ninvitation. Creates a pending share record — the stack becomes usable by\nthe recipient only after they accept it (`PUT /v1/sshares/{_id}/accept`).\nThe recipient is looked up by email before the stack is checked, so an\nunknown address fails even for a stack id that does not exist. Stacks that\nback an Integration App cannot be shared.","parameters":[{"name":"_id","in":"path","required":true,"description":"Stack ID.","schema":{"type":"string","format":"objectId"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackInviteRequest"}}}},"responses":{"201":{"description":"Pending share created and the invitation emailed. The `Location` header points at the new share record.","headers":{"Location":{"description":"Relative path of the created share record, `/sshares/{_id}`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackShare"}}}},"400":{"description":"The user already holds a share on this stack.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"description":"No integrator.io user has this email address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## List stack shares you own

> Returns every share record for stacks you own — who each stack is shared\
> with and whether they have accepted. Sorted by \`\_stackId\` ascending. For the\
> stacks other users have shared with \*you\*, use \`GET /v1/shared/sshares\`.

```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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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":{"After":{"name":"after","in":"query","required":false,"description":"Opaque cursor for forward pagination. Pass the value from the `Link`\nresponse header (`rel=\"next\"`) to fetch the next page.","schema":{"type":"string"}}},"schemas":{"StackShare":{"type":"object","description":"A share record granting another user access to one of your stacks — the\nowner's view of a stack share. The `_id` is the share record, not the stack;\nthe recipient sees the same share through `GET /v1/shared/sshares`.","required":["_id","_stackId"],"properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Identifier of the share record. Use it with the `/v1/sshares/{_id}` operations, not the stack id."},"_stackId":{"type":"string","format":"objectId","readOnly":true,"description":"Stack that is shared. Fetch its configuration with `GET /v1/stacks/{_id}`."},"_sharedWithUserId":{"type":"string","format":"objectId","readOnly":true,"description":"Identity of the user the stack is shared with. Present on\n`GET /v1/sshares/{_id}` and the update response; the list and the\ninvite response expand it into `sharedWithUser` instead."},"accepted":{"type":"boolean","readOnly":true,"description":"When true, the recipient accepted the invitation and can use the stack. Present only when true."},"dismissed":{"type":"boolean","readOnly":true,"description":"When true, the recipient declined the invitation; send it again with `PUT /v1/sshares/{_id}/reinvite`. Present only when true."},"disabled":{"type":"boolean","readOnly":true,"description":"When true, you suspended the recipient's use of the stack via `PUT /v1/sshares/{_id}/disable`. Present only when true."},"sharedWithUser":{"type":"object","readOnly":true,"description":"Identity details of the recipient. Present on `GET /v1/sshares` and on the\ninvite response; the single-record operations return `_sharedWithUserId`\ninstead. `name` is included only once the invitation is accepted.","properties":{"_id":{"type":"string","format":"objectId","description":"The recipient's own user id."},"email":{"type":"string","format":"email","description":"Email address the invitation was sent to."},"name":{"type":"string","description":"Display name of the recipient. Present only once the invitation is accepted."},"authTypeSSO":{"type":["object","null"],"description":"SSO linkage of the recipient's own sign-in. `null` when the recipient signs in with a password.","additionalProperties":true},"lastSignIn":{"type":"string","format":"date-time","description":"Timestamp when the recipient last signed in to integrator.io (any account)."},"allowedToResetMFA":{"type":"boolean","description":"When true, the caller may reset the recipient's MFA."}}}}},"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/sshares":{"get":{"summary":"List stack shares you own","operationId":"listStackShares","tags":["Stacks"],"description":"Returns every share record for stacks you own — who each stack is shared\nwith and whether they have accepted. Sorted by `_stackId` ascending. For the\nstacks other users have shared with *you*, use `GET /v1/shared/sshares`.","parameters":[{"name":"limit","in":"query","required":false,"description":"Maximum number of share records to return per page.","schema":{"type":"integer","minimum":1,"maximum":1000,"default":1000}},{"$ref":"#/components/parameters/After"},{"name":"sort_by","in":"query","required":false,"description":"Field to sort by. Values outside the enum are rejected with 400 `invalid_query_param`.","schema":{"type":"string","enum":["_stackId"],"default":"_stackId"}}],"responses":{"200":{"description":"Array of stack share records.","headers":{"Link":{"description":"RFC 5988 pagination link. Includes `<...>; rel=\"next\"` with an\n`after` cursor when more records exist; absent on the final page.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/StackShare"}}}}},"204":{"description":"You have not shared any stacks."},"400":{"description":"Invalid pagination or sort parameter.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"}}}}}}
```

## Get a stack share

> Returns a single share record for a stack you own. Identifies the recipient\
> by \`\_sharedWithUserId\` only — for their name and email, read the record from\
> \`GET /v1/sshares\`.

```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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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":{"StackShare":{"type":"object","description":"A share record granting another user access to one of your stacks — the\nowner's view of a stack share. The `_id` is the share record, not the stack;\nthe recipient sees the same share through `GET /v1/shared/sshares`.","required":["_id","_stackId"],"properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Identifier of the share record. Use it with the `/v1/sshares/{_id}` operations, not the stack id."},"_stackId":{"type":"string","format":"objectId","readOnly":true,"description":"Stack that is shared. Fetch its configuration with `GET /v1/stacks/{_id}`."},"_sharedWithUserId":{"type":"string","format":"objectId","readOnly":true,"description":"Identity of the user the stack is shared with. Present on\n`GET /v1/sshares/{_id}` and the update response; the list and the\ninvite response expand it into `sharedWithUser` instead."},"accepted":{"type":"boolean","readOnly":true,"description":"When true, the recipient accepted the invitation and can use the stack. Present only when true."},"dismissed":{"type":"boolean","readOnly":true,"description":"When true, the recipient declined the invitation; send it again with `PUT /v1/sshares/{_id}/reinvite`. Present only when true."},"disabled":{"type":"boolean","readOnly":true,"description":"When true, you suspended the recipient's use of the stack via `PUT /v1/sshares/{_id}/disable`. Present only when true."},"sharedWithUser":{"type":"object","readOnly":true,"description":"Identity details of the recipient. Present on `GET /v1/sshares` and on the\ninvite response; the single-record operations return `_sharedWithUserId`\ninstead. `name` is included only once the invitation is accepted.","properties":{"_id":{"type":"string","format":"objectId","description":"The recipient's own user id."},"email":{"type":"string","format":"email","description":"Email address the invitation was sent to."},"name":{"type":"string","description":"Display name of the recipient. Present only once the invitation is accepted."},"authTypeSSO":{"type":["object","null"],"description":"SSO linkage of the recipient's own sign-in. `null` when the recipient signs in with a password.","additionalProperties":true},"lastSignIn":{"type":"string","format":"date-time","description":"Timestamp when the recipient last signed in to integrator.io (any account)."},"allowedToResetMFA":{"type":"boolean","description":"When true, the caller may reset the recipient's MFA."}}}}},"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/sshares/{_id}":{"get":{"summary":"Get a stack share","operationId":"getStackShareById","tags":["Stacks"],"description":"Returns a single share record for a stack you own. Identifies the recipient\nby `_sharedWithUserId` only — for their name and email, read the record from\n`GET /v1/sshares`.","parameters":[{"name":"_id","in":"path","required":true,"description":"Share record ID (not the stack ID).","schema":{"type":"string","format":"objectId"}}],"responses":{"200":{"description":"Stack share record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackShare"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"description":"No share with this id exists on a stack you own.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Update a stack share

> Replaces a share record you own. Resend \`\_stackId\` and \`\_sharedWithUserId\`\
> unchanged — they identify the share and cannot be modified — and set\
> \`disabled\` to suspend or restore the recipient's use of the stack. The\
> recipient's acceptance is preserved. Toggling \`disabled\`, or reopening a\
> dismissed invitation with \`dismissed: false\`, notifies the recipient by email.

```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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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":{"StackShareRequest":{"type":"object","description":"Request body for `PUT /v1/sshares/{_id}`. The share's identity fields must be\nresent unchanged; the only state the owner can change here is `disabled` (and\n`dismissed`, to reopen a declined invitation). Acceptance belongs to the\nrecipient and is preserved.","required":["_stackId","_sharedWithUserId"],"properties":{"_stackId":{"type":"string","format":"objectId","description":"Stack the share belongs to. Must match the stored value — a share cannot\nbe moved to another stack."},"_sharedWithUserId":{"type":"string","format":"objectId","description":"User the stack is shared with. Must match the stored value — to share the\nstack with someone else, send a new invitation with `POST /v1/stacks/{_id}/invite`."},"disabled":{"type":"boolean","description":"When true, suspends the recipient's use of the stack without deleting the\nshare; send false to re-enable. Accepted only once the recipient has\naccepted or dismissed the invitation. `PUT /v1/sshares/{_id}/disable` toggles\nthe same flag without resending the body."},"dismissed":{"type":"boolean","description":"Send false on a dismissed share to reopen the invitation; the owner cannot\nset it to true. `PUT /v1/sshares/{_id}/reinvite` does the same and notifies\nthe recipient."}}},"StackShare":{"type":"object","description":"A share record granting another user access to one of your stacks — the\nowner's view of a stack share. The `_id` is the share record, not the stack;\nthe recipient sees the same share through `GET /v1/shared/sshares`.","required":["_id","_stackId"],"properties":{"_id":{"type":"string","format":"objectId","readOnly":true,"description":"Identifier of the share record. Use it with the `/v1/sshares/{_id}` operations, not the stack id."},"_stackId":{"type":"string","format":"objectId","readOnly":true,"description":"Stack that is shared. Fetch its configuration with `GET /v1/stacks/{_id}`."},"_sharedWithUserId":{"type":"string","format":"objectId","readOnly":true,"description":"Identity of the user the stack is shared with. Present on\n`GET /v1/sshares/{_id}` and the update response; the list and the\ninvite response expand it into `sharedWithUser` instead."},"accepted":{"type":"boolean","readOnly":true,"description":"When true, the recipient accepted the invitation and can use the stack. Present only when true."},"dismissed":{"type":"boolean","readOnly":true,"description":"When true, the recipient declined the invitation; send it again with `PUT /v1/sshares/{_id}/reinvite`. Present only when true."},"disabled":{"type":"boolean","readOnly":true,"description":"When true, you suspended the recipient's use of the stack via `PUT /v1/sshares/{_id}/disable`. Present only when true."},"sharedWithUser":{"type":"object","readOnly":true,"description":"Identity details of the recipient. Present on `GET /v1/sshares` and on the\ninvite response; the single-record operations return `_sharedWithUserId`\ninstead. `name` is included only once the invitation is accepted.","properties":{"_id":{"type":"string","format":"objectId","description":"The recipient's own user id."},"email":{"type":"string","format":"email","description":"Email address the invitation was sent to."},"name":{"type":"string","description":"Display name of the recipient. Present only once the invitation is accepted."},"authTypeSSO":{"type":["object","null"],"description":"SSO linkage of the recipient's own sign-in. `null` when the recipient signs in with a password.","additionalProperties":true},"lastSignIn":{"type":"string","format":"date-time","description":"Timestamp when the recipient last signed in to integrator.io (any account)."},"allowedToResetMFA":{"type":"boolean","description":"When true, the caller may reset the recipient's MFA."}}}}},"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/sshares/{_id}":{"put":{"summary":"Update a stack share","operationId":"updateStackShare","tags":["Stacks"],"description":"Replaces a share record you own. Resend `_stackId` and `_sharedWithUserId`\nunchanged — they identify the share and cannot be modified — and set\n`disabled` to suspend or restore the recipient's use of the stack. The\nrecipient's acceptance is preserved. Toggling `disabled`, or reopening a\ndismissed invitation with `dismissed: false`, notifies the recipient by email.","parameters":[{"name":"_id","in":"path","required":true,"description":"Share record ID (not the stack ID).","schema":{"type":"string","format":"objectId"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackShareRequest"}}}},"responses":{"200":{"description":"Updated share record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StackShare"}}}},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"description":"No share with this id exists on a stack you own.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"An identity field is missing, or `_stackId` does not match the stored share.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Revoke a stack share

> Permanently removes the share so the recipient can no longer use the\
> stack. Blocked while any of the recipient's connections, exports, or\
> imports still reference the stack — they must repoint or delete those\
> first. To suspend access without removing the share, use\
> \`PUT /v1/sshares/{\_id}/disable\`.

```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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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/sshares/{_id}":{"delete":{"summary":"Revoke a stack share","operationId":"deleteStackShare","tags":["Stacks"],"description":"Permanently removes the share so the recipient can no longer use the\nstack. Blocked while any of the recipient's connections, exports, or\nimports still reference the stack — they must repoint or delete those\nfirst. To suspend access without removing the share, use\n`PUT /v1/sshares/{_id}/disable`.","parameters":[{"name":"_id","in":"path","required":true,"description":"Share record ID (not the stack ID).","schema":{"type":"string","format":"objectId"}}],"responses":{"204":{"description":"Share revoked."},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"description":"No share with this id exists on a stack you own.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Toggle a stack share (disable or re-enable)

> Flips the \`disabled\` flag on a share you own — call again to re-enable;\
> there is no separate \`/enable\` path. The recipient is notified by email each\
> time. Only an accepted or dismissed share can be toggled: a still-pending\
> invitation is rejected, and a dismissed one is left unchanged. Equivalent to\
> updating \`disabled\` through \`PUT /v1/sshares/{\_id}\` without resending the body.

```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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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/sshares/{_id}/disable":{"put":{"summary":"Toggle a stack share (disable or re-enable)","operationId":"toggleStackShareDisabled","tags":["Stacks"],"description":"Flips the `disabled` flag on a share you own — call again to re-enable;\nthere is no separate `/enable` path. The recipient is notified by email each\ntime. Only an accepted or dismissed share can be toggled: a still-pending\ninvitation is rejected, and a dismissed one is left unchanged. Equivalent to\nupdating `disabled` through `PUT /v1/sshares/{_id}` without resending the body.","parameters":[{"name":"_id","in":"path","required":true,"description":"Share record ID (not the stack ID).","schema":{"type":"string","format":"objectId"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","description":"Empty body — the target is identified by the path parameter alone."}}}},"responses":{"204":{"description":"Share toggled."},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"description":"No share with this id exists on a stack you own.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```

## Reinvite a user who dismissed a stack share

> Re-sends a stack share invitation the recipient dismissed and returns the\
> share to the pending state. Only a dismissed, unaccepted share can be\
> reinvited. To share a stack for the first time, use \`POST /v1/stacks/{\_id}/invite\`.

```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). A stack can be shared with other integrator.io users; the `/v1/sshares` operations manage the shares you own, while the Account API lists the stacks shared with you.\n\n## Stack and stack share schemas\n\n{% openapi-schemas spec=\"stack\" schemas=\"Stack,StackShare\" 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/sshares/{_id}/reinvite":{"put":{"summary":"Reinvite a user who dismissed a stack share","operationId":"reinviteStackShare","tags":["Stacks"],"description":"Re-sends a stack share invitation the recipient dismissed and returns the\nshare to the pending state. Only a dismissed, unaccepted share can be\nreinvited. To share a stack for the first time, use `POST /v1/stacks/{_id}/invite`.","parameters":[{"name":"_id","in":"path","required":true,"description":"Share record ID (not the stack ID).","schema":{"type":"string","format":"objectId"}}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","description":"Empty body — the target is identified by the path parameter alone."}}}},"responses":{"204":{"description":"Invitation re-sent."},"401":{"$ref":"#/components/responses/401-unauthorized"},"404":{"description":"No share with this id exists on a stack you own.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}}}
```
