Connect a new account for an external user in the project

post/v1/connect/{project_id}/accounts

Request

  • Base URL
    https://api.pipedream.com
  • URL
    https://api.pipedream.com/v1/connect/{project_id}/accounts
  • Auth
    HTTP bearer

Headers

x-pd-environment'development' | 'production' required

The environment in which the server client is running

Request body

app_slugstring required

The app slug for the account

cfmap_jsonstring required

JSON string containing the custom fields mapping

connect_tokenstring required

The connect token for authentication

namestring

Optional name for the account

account_idstring

An existing account ID to reconnect. When provided, the account's credentials are updated instead of creating a new account. Must belong to the same external user and project environment as the connect token, and match the app identified by app_slug.

app_override_idstring

An app override ID. The account is linked to the override and the override's pre-defined custom field values are merged over cfmap_json; with account_id, the account is re-linked to this override. Must belong to the app identified by app_slug, and must not select an OAuth client — overrides that do can only connect through the OAuth flow.

Response

account created

idstring required

The unique ID of the account.

namestring nullable

The custom name of the account if set.

external_idstring

The external ID associated with the account.

healthyboolean

Indicates if the account is healthy. Pipedream will periodically retry token refresh and test requests for unhealthy accounts

deadboolean nullable

Indicates if the account is no longer active

created_atstring date-time

The date and time the account was created, an ISO 8601 formatted string

updated_atstring date-time

The date and time the account was last updated, an ISO 8601 formatted string

authorized_scopesstring[]

The OAuth scopes effectively granted to this account. Empty for non-OAuth apps.

expires_atstring date-time

The date and time the account's credentials expiration, an ISO 8601 formatted string

errorstring nullable

The error message if the account is unhealthy or dead, null otherwise

last_refreshed_atstring date-time nullable

The date and time the account was last refreshed, an ISO 8601 formatted string

next_refresh_atstring date-time nullable

The date and time the account will next be refreshed, an ISO 8601 formatted string

Changes

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status