Register a third-party provider — Slack in this walkthrough — as a project-scoped integration. Once active, the integration is usable by workflows in the same project.

Before you start

  • You have a Mobius API key exported as MOBIUS_API_KEY. See Create an API key if you do not.
  • Your project handle is exported as PROJECT and your API base URL as MOBIUS_BASE_URL.
  • You have the credentials for the provider ready. Pass sensitive values through the credentials field, not config; credentials are encrypted at rest and never returned by the API.

Walkthrough

  1. Create the integration with POST /v1/projects/{project}/integrations. The provider string is free-form and immutable after creation; the (provider, name) pair must be unique within the project. Returns 201 with the new integration record — capture id as INTEGRATION_ID.

    The credentials shape is provider-defined. This example passes a Slack bot token.

    curl -X POST "$MOBIUS_BASE_URL/v1/projects/$PROJECT/integrations" \
      -H "Authorization: Bearer $MOBIUS_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "name": "slack-main",
        "provider": "slack",
        "credentials": { "token": "xoxb-your-bot-token" }
      }'
  2. Confirm the integration is ready with GET /v1/projects/{project}/integrations/{id}. A status: active response means the integration is enabled and usable by workflows.

    curl "$MOBIUS_BASE_URL/v1/projects/$PROJECT/integrations/$INTEGRATION_ID" \
      -H "Authorization: Bearer $MOBIUS_API_KEY"
  3. List all integrations for this provider with GET /v1/projects/{project}/integrations. Pass ?provider=slack to scope results to a single provider. Returns a paginated { items, next_cursor, has_more } response.

    curl "$MOBIUS_BASE_URL/v1/projects/$PROJECT/integrations?provider=slack" \
      -H "Authorization: Bearer $MOBIUS_API_KEY"

Follow-ups

  • Rotate credentials by sending a replacement blob with PUT /v1/projects/{project}/integrations/{id}. Both credentials and config are fully replaced, not merged. The provider field is immutable.
  • Disable without deleting: PUT the same endpoint with { "status": "inactive" }. Re-enable by setting "status": "active".
  • Hard-delete the record and its stored config with DELETE /v1/projects/{project}/integrations/{id}.
  • Clone an integration into another project in the same org with POST /v1/projects/{project}/integrations/copy. Supply source_project_id and source_integration_id; the full config blob is copied as-is. Supply a different name if the (provider, name) pair conflicts in the destination project.

Troubleshooting

  • 400 on createIntegration: a required field is missing, or a (provider, name) pair already exists in this project. List existing records with ?provider=slack and rename or update the conflicting integration.
  • 401 on any call: the API key is missing or revoked. Re-issue with Create an API key and re-export MOBIUS_API_KEY.
  • status: expired: the stored credential has expired. Rotate it with updateIntegration using a fresh credentials object.

See also