# Integrations

## Bulk integration health check

> Quick health status of all enabled integrations.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}}},"paths":{"/v1/{workspace_id}/integrations/health-check":{"get":{"tags":["Integrations"],"summary":"Bulk integration health check","description":"Quick health status of all enabled integrations.","operationId":"integration-health-check","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Integration-Health-Check"}}}}}}}}}
```

## List integrations

> List integrations for a workspace with pagination. Optionally filter by enabled status. Requires \`Integration.view\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"SearchString":{"type":"string","maxLength":200,"minLength":1},"PaginatedResponse_IntegrationResponse_":{"properties":{"items":{"items":{"$ref":"#/components/schemas/IntegrationResponse"},"type":"array","title":"Items"},"has_more":{"type":"boolean","title":"Has More"},"continuation_token":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Continuation Token"},"total":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total"}},"type":"object","required":["items","has_more"],"title":"PaginatedResponse[IntegrationResponse]"},"IntegrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"protocol":{"type":"string","title":"Protocol"},"base_url":{"type":"string","title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled"},"builtin":{"type":"boolean","title":"Builtin","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"mcp_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["id","workspace_id","name","display_name","protocol","enabled","created_at","updated_at"],"title":"IntegrationResponse"},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_scopes_in_jwt":{"type":"boolean","title":"Assertion Scopes In Jwt","default":false},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/integrations":{"get":{"tags":["Integrations"],"summary":"List integrations","description":"List integrations for a workspace with pagination. Optionally filter by enabled status. Requires `Integration.view` permission.","operationId":"list-integrations","parameters":[{"name":"enabled","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"}},{"name":"protocol","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Protocol"}},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/SearchString"},{"type":"null"}],"title":"Search"}},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sort By"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":20,"exclusiveMinimum":0,"default":10,"title":"Limit"}},{"name":"continuation_token","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Continuation Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaginatedResponse_IntegrationResponse_"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Create an integration

> Create a new external API integration in a workspace. Requires \`Integration.create\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"CreateIntegrationRequest":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"$ref":"#/components/schemas/NameString"},"protocol":{"type":"string","enum":["rest","fhir","mcp"],"title":"Protocol","default":"rest"},"base_url":{"type":"string","maxLength":2048,"title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfigWithSecrets"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled","default":true},"mcp_transport":{"anyOf":[{"type":"string","enum":["stdio","sse","http"]},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["name","display_name"],"title":"CreateIntegrationRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"AuthConfigWithSecrets":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_scopes_in_jwt":{"type":"boolean","title":"Assertion Scopes In Jwt","default":false},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"},"api_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"bearer_token_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"client_secret_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"private_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]}},"type":"object","required":["type"],"title":"AuthConfigWithSecrets","description":"AuthConfig that accepts inline secret values for auto-provisioning.\n\nIf provided, platform-api writes the value to SSM and replaces\nthe field with the generated ssm_param_path."},"SecretInput":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"SecretInput","description":"Inline secret value — auto-provisioned to SSM on create/update."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_scopes_in_jwt":{"type":"boolean","title":"Assertion Scopes In Jwt","default":false},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."},"IntegrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"protocol":{"type":"string","title":"Protocol"},"base_url":{"type":"string","title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled"},"builtin":{"type":"boolean","title":"Builtin","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"mcp_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["id","workspace_id","name","display_name","protocol","enabled","created_at","updated_at"],"title":"IntegrationResponse"}}},"paths":{"/v1/{workspace_id}/integrations":{"post":{"tags":["Integrations"],"summary":"Create an integration","description":"Create a new external API integration in a workspace. Requires `Integration.create` permission.","operationId":"create-integration","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateIntegrationRequest"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Workspace not found."},"409":{"description":"Integration name already taken in this workspace."},"422":{"description":"Invalid request body."}}}}}}
```

## Get an integration

> Retrieve an integration by ID. Requires \`Integration.view\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"IntegrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"protocol":{"type":"string","title":"Protocol"},"base_url":{"type":"string","title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled"},"builtin":{"type":"boolean","title":"Builtin","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"mcp_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["id","workspace_id","name","display_name","protocol","enabled","created_at","updated_at"],"title":"IntegrationResponse"},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_scopes_in_jwt":{"type":"boolean","title":"Assertion Scopes In Jwt","default":false},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/integrations/{integration_id}":{"get":{"tags":["Integrations"],"summary":"Get an integration","description":"Retrieve an integration by ID. Requires `Integration.view` permission.","operationId":"get-integration","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Integration not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Update an integration

> Update an integration's configuration. Requires \`Integration.update\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"UpdateIntegrationRequest":{"properties":{"display_name":{"anyOf":[{"$ref":"#/components/schemas/NameString"},{"type":"null"}]},"protocol":{"anyOf":[{"type":"string","enum":["rest","fhir","mcp"]},{"type":"null"}],"title":"Protocol"},"base_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfigWithSecrets"},{"type":"null"}]},"endpoints":{"anyOf":[{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array"},{"type":"null"}],"title":"Endpoints"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"mcp_transport":{"anyOf":[{"type":"string","enum":["stdio","sse","http"]},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string","maxLength":2048},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","title":"UpdateIntegrationRequest"},"NameString":{"type":"string","maxLength":256,"minLength":1},"AuthConfigWithSecrets":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_scopes_in_jwt":{"type":"boolean","title":"Assertion Scopes In Jwt","default":false},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"},"api_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"bearer_token_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"client_secret_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]},"private_key_value":{"anyOf":[{"$ref":"#/components/schemas/SecretInput"},{"type":"null"}]}},"type":"object","required":["type"],"title":"AuthConfigWithSecrets","description":"AuthConfig that accepts inline secret values for auto-provisioning.\n\nIf provided, platform-api writes the value to SSM and replaces\nthe field with the generated ssm_param_path."},"SecretInput":{"properties":{"value":{"type":"string","title":"Value"}},"type":"object","required":["value"],"title":"SecretInput","description":"Inline secret value — auto-provisioned to SSM on create/update."},"EndpointConfig":{"properties":{"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","default":"POST"},"path":{"type":"string","title":"Path"},"base_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Base Url"},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"input_schema":{"additionalProperties":true,"type":"object","title":"Input Schema","default":{}},"response_mapping":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Response Mapping"},"response_filter":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Response Filter"},"result_template":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Template"},"result_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Result Key"},"max_result_length":{"type":"integer","title":"Max Result Length","default":0},"retry_config":{"$ref":"#/components/schemas/RetryConfig","default":{"max_retries":2,"retry_on_status":[429,502,503,504]}},"result_delivery":{"type":"string","enum":["interrupt","queue"],"title":"Result Delivery","default":"interrupt"},"headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Headers","default":{}},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","default":"json"}},"type":"object","required":["name","description","path"],"title":"EndpointConfig","description":"Configuration for a single integration endpoint."},"AuthConfig":{"properties":{"type":{"type":"string","enum":["api_key_header","bearer_token","oauth2_client_credentials","oauth2_jwt_bearer","gcp_wif","smart_backend_services"],"title":"Type"},"header_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Header Name"},"ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ssm Param Path"},"token_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Ssm Param Path"},"token_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Token Url"},"client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"},"client_secret_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret Ssm Param Path"},"scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Scopes"},"gcp_scopes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Gcp Scopes"},"private_key_ssm_param_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Private Key Ssm Param Path"},"assertion_issuer":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Issuer"},"assertion_subject":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Subject"},"assertion_audience":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Audience"},"token_lifetime_seconds":{"type":"integer","title":"Token Lifetime Seconds","default":3600},"assertion_algorithm":{"anyOf":[{"type":"string","enum":["RS384","ES384"]},{"type":"null"}],"title":"Assertion Algorithm"},"assertion_scopes_in_jwt":{"type":"boolean","title":"Assertion Scopes In Jwt","default":false},"assertion_kid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Assertion Kid"}},"type":"object","required":["type"],"title":"AuthConfig","description":"Authentication configuration for an integration.\n\nSupports api_key_header, bearer_token, oauth2_client_credentials,\noauth2_jwt_bearer, and gcp_wif."},"RetryConfig":{"properties":{"max_retries":{"type":"integer","title":"Max Retries","default":2},"retry_on_status":{"items":{"type":"integer"},"type":"array","title":"Retry On Status","default":[429,502,503,504]}},"type":"object","title":"RetryConfig","description":"Retry configuration for an endpoint."},"IntegrationResponse":{"properties":{"id":{"type":"string","title":"Id"},"workspace_id":{"type":"string","title":"Workspace Id"},"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"protocol":{"type":"string","title":"Protocol"},"base_url":{"type":"string","title":"Base Url","default":""},"auth":{"anyOf":[{"$ref":"#/components/schemas/AuthConfig"},{"type":"null"}]},"endpoints":{"items":{"$ref":"#/components/schemas/EndpointConfig"},"type":"array","title":"Endpoints","default":[]},"enabled":{"type":"boolean","title":"Enabled"},"builtin":{"type":"boolean","title":"Builtin","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"mcp_transport":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Transport"},"mcp_command":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Command"},"mcp_args":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Mcp Args"},"mcp_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mcp Url"},"mcp_headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Mcp Headers"}},"type":"object","required":["id","workspace_id","name","display_name","protocol","enabled","created_at","updated_at"],"title":"IntegrationResponse"}}},"paths":{"/v1/{workspace_id}/integrations/{integration_id}":{"put":{"tags":["Integrations"],"summary":"Update an integration","description":"Update an integration's configuration. Requires `Integration.update` permission.","operationId":"update-integration","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateIntegrationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Integration not found."},"422":{"description":"Invalid request body."}}}}}}
```

## Delete an integration

> Delete an integration. Requires \`Integration.delete\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/integrations/{integration_id}":{"delete":{"tags":["Integrations"],"summary":"Delete an integration","description":"Delete an integration. Requires `Integration.delete` permission.","operationId":"delete-integration","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}}],"responses":{"204":{"description":"Successful Response"},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Integration not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```

## Test an integration endpoint

> Execute an integration endpoint with test parameters and return the full response pipeline breakdown. Requires \`Integration.view\` permission.

```json
{"openapi":"3.1.0","info":{"title":"Platform API","version":"1.0.0"},"servers":[{"url":"https://api.platform.amigo.ai","description":"Production"}],"security":[{"BearerAuth":[]}],"components":{"securitySchemes":{"BearerAuth":{"type":"http","scheme":"bearer","description":"API key issued via `POST /v1/{workspace_id}/api-keys`. Pass the returned `api_key` value as a Bearer token."}},"schemas":{"TestEndpointRequest":{"properties":{"params":{"additionalProperties":true,"type":"object","title":"Params","default":{}}},"type":"object","title":"TestEndpointRequest"},"TestEndpointResponse":{"properties":{"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"duration_ms":{"type":"number","title":"Duration Ms","default":0},"retries":{"type":"integer","title":"Retries","default":0},"raw_response":{"title":"Raw Response"},"after_filter":{"title":"After Filter"},"after_mapping":{"title":"After Mapping"},"final_result":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Final Result"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","title":"TestEndpointResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"paths":{"/v1/{workspace_id}/integrations/{integration_id}/endpoints/{endpoint_name}/test":{"post":{"tags":["Integrations"],"summary":"Test an integration endpoint","description":"Execute an integration endpoint with test parameters and return the full response pipeline breakdown. Requires `Integration.view` permission.","operationId":"test-integration-endpoint","parameters":[{"name":"integration_id","in":"path","required":true,"schema":{"type":"string","title":"Integration Id"}},{"name":"endpoint_name","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Name"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TestEndpointResponse"}}}},"401":{"description":"Missing or invalid API key."},"403":{"description":"Insufficient permissions."},"404":{"description":"Integration not found."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}}}
```
