Palbase ai · API
POST
/ai/endpoints/{name}/user-credentials/{user_id}Store a per-user sealed MCP credential
Store an encrypted per-user access token (and optional refresh token) for an MCP endpoint.
Called by your server, with the project's secret key.
Path
namestring · requiredMCP endpoint nameuser_idstring · requiredApp user identifierRequest body
access_tokenstring · requiredrefresh_tokenstring · optionaltoken_typestring · optionalexpires_in_secondsinteger · optionalscopesstring[] · optionalcurl
curl -X POST "https://<your-ref>.palbase.studio/ai/endpoints/<name>/user-credentials/<user_id>" \
-H "apikey: $PALBASE_SECRET_KEY" \
-H "content-type: application/json" \
-d '{"access_token":"string"}'Responses
200Credential stored
400The request is malformed, or names what this module does not offer (the error names which)
401No valid credential
403A publishable key or a user's session: everything here is the project's server's, called with the secret key
404No such response, job or provider in this project
defaultAn error: the envelope names it (`error`) and explains it (`error_description`).
Operation PutMCPUserCredential of ai's contract.