Connected Accounts

Create a new connected account

Initiates a new connection to an external service for a user. For OAuth-based toolkits, this returns a redirect URL to complete authentication. For API key-based toolkits, provide the credentials directly in the request body. Use the user_id field to associate the connection with a specific user in your system.

Deprecated for Composio-managed OAuth: For Composio-managed auth configs on OAuth1, OAuth2, or DCR_OAUTH schemes, this endpoint is being retired and will start returning 400 BadRequest on 2026-05-08 for new organizations and 2026-07-03 for all remaining organizations. Migrate those calls to POST /api/v3/connected_accounts/link. Custom auth configs and non-OAuth schemes (API key, bearer, basic) continue to be supported here. Responses on the retiring path carry a Deprecation header (RFC 9745) and a Sunset header (RFC 8594) for client-side detection.

post/api/v3.1/connected_accounts

Request body

validate_credentialsboolean

[EXPERIMENTAL] Whether to validate the provided credentials, validates only for API Key Auth scheme

Response

Successfully created connected account

idstring connectedAccountId required

The id of the connected account

status'INITIALIZING' | 'INITIATED' | 'ACTIVE' | 'FAILED' | 'EXPIRED' | 'INACTIVE' | 'REVOKED' required

DEPRECATED: This field will be removed in a future version

redirect_urlstring nullable required

DEPRECATED: This field will be removed in a future version

redirect_uristring nullable required

DEPRECATED: This field will be removed in a future version

Changes

Changed in 11 of the 61 revisions of this API.8414

    • removed the optional property deprecated from the response with the 201 status

      response-optional-property-removed

  • ad121cf38fe022See the full diff
    • removed subschema #3 subschema #4 from the connection/state/oneOf[subschema #14]/val request property oneOf list

      request-property-one-of-removed

    • added subschema #3 subschema #4 to the connectionData/oneOf[subschema #14]/val response property oneOf list for the response status 201

      response-property-one-of-added

    • added subschema #3 subschema #4 to the connection/state/oneOf[subschema #14]/val request property oneOf list

      request-property-one-of-added

    • removed subschema #3 subschema #4 from the connectionData/oneOf[subschema #14]/val response property oneOf list for the response status 201

      response-property-one-of-removed

    • the endpoint scheme security CookieAuth was removed from the API

      api-security-removed

    • the endpoint scheme security UserApiKeyAuth was removed from the API

      api-security-removed

    • the response property deprecated became optional for the status 201

      response-property-became-optional

    • the response property deprecated became required for the status 201

      response-property-became-required

    • the response property deprecated became optional for the status 201

      response-property-became-optional

  • 166dca8a495b122See the full diff
    • removed the required property account_type from the response with the 201 status

      response-required-property-removed

    • removed the request property connection/account_type

      request-property-removed

    • removed the request property connection/acl_config_for_shared

      request-property-removed

    • added the new optional request property connection/experimental

      new-optional-request-property

    • added the optional property experimental to the response with the 201 status

      response-optional-property-added

  • 23348819b35e23See the full diff
    • removed subschema #3 subschema #4 from the connection/state/oneOf[subschema #2]/val request property oneOf list

      request-property-one-of-removed

    • added subschema #3 subschema #4 to the connectionData/oneOf[subschema #2]/val response property oneOf list for the response status 201

      response-property-one-of-added

    • added the new optional request property connection/acl_config_for_shared

      new-optional-request-property

    • added subschema #3 subschema #4 to the connection/state/oneOf[subschema #2]/val request property oneOf list

      request-property-one-of-added

    • removed subschema #3 subschema #4 from the connectionData/oneOf[subschema #2]/val response property oneOf list for the response status 201

      response-property-one-of-removed

    • added the new optional request property connection/account_type

      new-optional-request-property

    • added the required property account_type to the response with the 201 status

      response-required-property-added

  • 5a3709be76a7111See the full diff
    • added subschema #7 to the connectionData/oneOf[subschema #2]/val response property oneOf list for the response status 201

      response-property-one-of-added

    • added the new REVOKED enum value to the status response property for the response status 201

      response-property-enum-value-added

    • added subschema #7 to the connection/state/oneOf[subschema #2]/val request property oneOf list

      request-property-one-of-added

    This revision also has 1 change that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog