Skip to main content
POST
Upsert Agent Provider Token

Path Parameters

agent_id
string
required

Agent ID

provider_id
string
required

OAuth provider ID

Body

application/json

Import an OAuth token and bind it to an agent for a provider.

Used by Managed Deep Agents Connect flows that obtain tokens out-of-band (e.g. Google OAuth for Gmail) and need them stored under a synthetic agent_id for toolserver resolution.

access_token
string
required
refresh_token
string | null
expires_in_seconds
integer | null
scopes
string[]
provider_account_label
string | null
metadata
Metadata · object | null

Response

Successful Response

id
string
required
agent_id
string
required
oauth_token_id
string
required
provider_id
string
required
provider_account_label
string | null
required
scopes
string[]
required
expires_at
string<date-time> | null
required
created_by
string
required
created_at
string<date-time>
required