/api/orgs/{org_id}/provider-connections/{provider}/plans/importImport a plan sign-in
Stores a sign-in you already hold: the contents of ~/.codex/auth.json for ChatGPT, or of Claude Code's ~/.claude/.credentials.json for Claude (only when the deployment runs the shared-client mode, else 404). The refresh token is single-use, so the import hands the sign-in over and the local client must sign in again. Pro gate as for sign-in.
Authentication: Bearer API key in the Authorization header
Path parameters
org_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.providerenumrequiredopenaifor ChatGPT plans,anthropicfor Claude plans. Any other provider answers 404.
Request body
auth_jsonstringrequiredThe file contents of
~/.codex/auth.json(ChatGPT) or~/.claude/.credentials.json(Claude).setup_aliasstringrequiredscopeenum
Responses
200The stored plan account.
Response
setup_aliasstringrequiredplanobjectrequiredWhat a plan account carries instead of a key.
plan
labelstringrequiredplan_typestring | nullrequiredFor example plus, pro, team, max.
primaryobject | nullrequiredOne of
object
used_percentintegerrequiredreset_atstring | nullrequiredwindow_minutesinteger | nullrequired
secondaryobject | nullrequiredOne of
object
used_percentintegerrequiredreset_atstring | nullrequiredwindow_minutesinteger | nullrequired
derivedobject | nullOne of
object
five_hourobject | nullrequiredOne of
object
requestsintegerrequiredinput_tokensintegerrequiredcached_input_tokensintegerrequiredoutput_tokensintegerrequiredfirst_activitystring | nullrequiredlast_activitystring | nullrequired
seven_dayobject | nullrequiredOne of
object
requestsintegerrequiredinput_tokensintegerrequiredcached_input_tokensintegerrequiredoutput_tokensintegerrequiredfirst_activitystring | nullrequiredlast_activitystring | nullrequired
checked_atstring | nullrequiredscopeenumorg: the shared pool;account: only API keys created byowner_user_id.owner_user_idstring | nullrotation_pausedbooleanA paused plan never serves.
refreshes_atstring | nullWhen a plan paused for a spent window refreshes.
statusenumrequiredThe provider-verified key state, written by the hookup check and by real traffic.
provider_errormeans the provider was unreachable when checked, not that the key is bad.scopeenumrequiredowner_user_idstring | nullrequiredrotation_pausedbooleanrequired
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
402Adding a plan account needs Pro.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is valid but may not perform this action (for example an inference key on a provisioning-key route, or a feature outside your plan).
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404The resource does not exist or belongs to another organization.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
409The handle already belongs to a plan in another scope.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
422Missing or bare-provider handle, or
scope: accountfrom an API key (account_scope_needs_member).Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
Request
curl -X POST https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai/plans/import \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"setup_alias": "chatgpt-team",
"scope": "org",
"auth_json": "{\"tokens\":{\"id_token\":\"eyJ...\",\"access_token\":\"eyJ...\",\"refresh_token\":\"rt_EXAMPLE\",\"account_id\":\"acct_EXAMPLE\"}}"
}'Response
{
"setup_alias": "chatgpt-team",
"plan": {
"label": "dev@acme.example",
"plan_type": "team",
"primary": {
"used_percent": 12,
"reset_at": "2026-11-19T18:40:00Z",
"window_minutes": 300
},
"secondary": {
"used_percent": 41,
"reset_at": "2026-11-23T09:00:00Z",
"window_minutes": 10080
},
"derived": null,
"checked_at": "2026-11-19T14:21:07.330Z",
"scope": "org",
"owner_user_id": null,
"rotation_paused": false,
"refreshes_at": null
},
"status": "valid",
"scope": "org",
"owner_user_id": null,
"rotation_paused": false
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/provider-connections/openai/plans/import