Skip to main content
PUT
/
api
/
v2
/
public
/
linked-account
/
integration
/
save-key-credentials
/
:slug
curl -X PUT "https://app.refold.ai/api/v2/public/linked-account/integration/save-key-credentials/{slug}" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "YOUR_ACCOUNT_ID",
    "consumer_key": "YOUR_CONSUMER_KEY",
    "consumer_secret": "YOUR_CONSUMER_SECRET",
    "token_id": "YOUR_TOKEN_ID",
    "token_secret": "YOUR_TOKEN_SECRET"
  }'
{
  "success": true
}
Store key-based credentials for an app on a linked account. The app must support keybased auth. The request body is treated as opaque auth_data and forwarded to the app’s save-credentials handler — the exact fields depend on the app’s auth schema (see Get Application for an app’s auth_input_map).
Many apps verify the credentials against the provider before storing them. Invalid credentials return a verification error rather than being saved.

Authentication

x-api-key
string
required
Your Refold API key. Find it in Settings → Credentials.
linked_account_id
string
required
The linked account to store credentials on. May also be passed as a query parameter.

Path Parameters

slug
string
required
The app slug. Must be an app that supports key-based auth.Example: netsuite

Query Parameters

auth_type
string
Optional auth type when the app supports more than one.

Body Parameters

The body is the app-specific credential map. For example, NetSuite expects:
account_id
string
required
Provider account ID.
consumer_key
string
required
OAuth consumer key.
consumer_secret
string
required
OAuth consumer secret.
token_id
string
required
Token ID.
token_secret
string
required
Token secret.

Response

Returns an app-specific success object confirming the credentials were saved.
{
  "success": true
}
curl -X PUT "https://app.refold.ai/api/v2/public/linked-account/integration/save-key-credentials/{slug}" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "linked_account_id: YOUR_LINKED_ACCOUNT_ID" \
  -H "Content-Type: application/json" \
  -d '{
    "account_id": "YOUR_ACCOUNT_ID",
    "consumer_key": "YOUR_CONSUMER_KEY",
    "consumer_secret": "YOUR_CONSUMER_SECRET",
    "token_id": "YOUR_TOKEN_ID",
    "token_secret": "YOUR_TOKEN_SECRET"
  }'