Potpie API
Save Integration
Save a new integration configuration for third-party services like Sentry, Jira, Linear, etc.
Supported Integrations:
- Sentry: Error tracking and monitoring
- GitHub: Source code management
- Slack: Team communication
- Jira: Issue tracking
- Linear: Project management
- Confluence: Documentation
Integration Flow:
- Create integration with minimal required fields
- Optionally add OAuth tokens via
auth_data - Configure scope-specific data (org, workspace, etc.)
- Integration is activated automatically
POST
Use Cases
- Connect error monitoring systems for better debugging
- Link issue trackers to correlate code changes
- Integrate documentation platforms for reference
- Set up automated workflows across tools
- Enable cross-platform analysis
Request
User-friendly name for this integration (1–255 characters, e.g., “Production Sentry”)
Type of integration:
sentry, jira, linear, confluence, slack, githubIntegration status:
active, inactive, pending, errorWhether the integration is currently active
Custom unique identifier. Auto-generated as
[type]-[uuid] if omitted.Authentication credentials
Scope-specific configuration
Additional integration metadata
Response
Whether the integration was saved successfully
Integration data if successful
Error message if the operation failed (null on success)
Complete Workflow
Success Response
Integration Examples
Error Responses
401 Unauthorized
401 Unauthorized
422 Unprocessable Entity
422 Unprocessable Entity
Request body failed validation — a required field is missing or a field has an invalid value.Missing required field:Invalid integration type:Causes:
- Missing required
nameorintegration_typefield integration_typevalue not in:sentry,jira,linear,confluence,slack,github- Wrong data type for a field
500 Internal Server Error
500 Internal Server Error
The endpoint catches all exceptions and returns them in a structured format.Causes:
- Database connection failures
- Invalid field values
- Service unavailability
Troubleshooting
Integration saves but doesn't appear active
Integration saves but doesn't appear active
Problem: The API returns
success: true but the integration seems inactive.Solution:- Check that
activeis set totruein the request (the default istrue) - Verify
statusisactive(the default isactive) - Check the response
data.activeanddata.has_auth_datafields - Ensure
auth_data.access_tokenis valid and not expired
Authentication errors with valid token
Authentication errors with valid token
Problem: Integration saves but external service authentication fails.Solution:
- Verify the token has not expired — check
auth_data.expires_at - Confirm the token has the required OAuth scopes for your use case
- Test the token directly against the external service API
- Re-authorize and save a fresh token if needed
Integration type not recognized
Integration type not recognized
Problem: Request fails or the integration behaves unexpectedly for a specific type.Solution:
- Use exactly one of the supported types:
sentry,jira,linear,confluence,slack,github - Check for typos — the value is case-sensitive
- Refer to the Integration Examples above for the correct structure per type
scope_data fields not persisted
scope_data fields not persisted
Problem:
has_scope_data returns false even after providing scope information.Solution:- The
has_scope_dataflag istrueonly whenorg_slugorworkspace_idis present - Providing only
project_idorinstallation_iddoes not sethas_scope_datatotrue - Include
org_slug(for Sentry) orworkspace_id(for Jira, Confluence, Slack, Linear) in your request
Authorizations
API key authentication. Get your key from potpie settings page
Body
application/json
User-friendly integration name
Required string length:
1 - 255Type of integration
Available options:
sentry, jira, linear, confluence, slack, github Integration status
Available options:
active, inactive, pending, error Whether integration is active
Custom identifier (auto-generated if not provided)

