v1

latestOpenAPI 3.0.42026-08-0462132372.2 KB

Create account

Connect a new account for an external user in the project

post/v1/connect/{project_id}/accounts

Headers

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

The environment in which the server client is running

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.

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