POST
/
connections
/
{projectId}
curl --request POST \
  --url https://partner.peaka.studio/api/v1/connections/{projectId} \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "exampleStripeConnection21",
  "type": "stripe",
  "credential": {
    "token": "<stripeToken>"
  }
}'
{
  "id": "6243f42a-42d0-4821-a90f-763cda6cda50",
  "name": "exampleStripeConnection21",
  "type": "stripe"
}

Path Parameters

projectId
string
required

ID of the project

Body

application/json
Connection Request
name
string

Name of the connection given by the user

type
string

Type of connection.

Example: airtable for AirTable, stripe for Stripe, hubspot_access_token for HubSpot (with Access Token), etc.

Exact list can be fetched by following url: /connections/config

credential
object

Credential object for the connection.

Its structure is dependent on the connection type and can be fetched by following url: /connections/config

connectionCallback
string

The url to redirect to after an oauth connection is established.

Response

200 - application/json
Connection created successfully
id
string

Connection ID

name
string

Name of the connection

type
string

Type of connection.

Example: airtable for AirTable, stripe for Stripe, hubspot_access_token for HubSpot (with Access Token), etc.

Exact list can be fetched by following url: /connections/config

url
string

Oauth callback url if the connection is Oauth based.