Create Session
POST {{baseUrl}}/vault/sessions
Making a POST request to this endpoint will initiate a Hosted Vault session. Redirect the consumer to the returned URL to allow temporary access to manage their integrations and settings.
Note: This is a short lived token that will expire after 1 hour (TTL: 3600).
Request Body
{"consumer_metadata"=>{"account_name"=>"SpaceX", "user_name"=>"Elon Musk", "email"=>"elon@musk.com", "image"=>"https://www.spacex.com/static/images/share.jpg"}, "redirect_uri"=>"https://mysaas.com/dashboard", "settings"=>{"unified_apis"=>["crm", "crm"], "hide_resource_settings"=>false, "sandbox_mode"=>false, "isolation_mode"=>false, "session_length"=>"30m", "show_logs"=>true, "show_suggestions"=>false, "show_sidebar"=>true, "auto_redirect"=>false, "hide_guides"=>false, "allow_actions"=>["reauthorize", "disable"]}, "theme"=>{"favicon"=>"https://res.cloudinary.com/apideck/icons/intercom", "logo"=>"https://res.cloudinary.com/apideck/icons/intercom", "primary_color"=>"#286efa", "sidepanel_background_color"=>"#286efa", "sidepanel_text_color"=>"#FFFFFF", "vault_name"=>"Intercom", "privacy_url"=>"https://compliance.apideck.com/privacy-policy", "terms_url"=>"https://www.termsfeed.com/terms-conditions/957c85c1b089ae9e3219c83eff65377e"}, "custom_consumer_settings"=>{"feature_flag_1"=>true, "tax_rates"=>[{"label"=>"6%"}, {"label"=>"21%"}]}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
x-apideck-consumer-id | string | (Required) ID of the consumer which you want to get or push data from | |
x-apideck-app-id | string | (Required) The ID of your Unify application | |
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"status_code":200,"status":"OK","data":{"session_uri":"http://vault.apideck.com/session/eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsImFwcGxpY2F0aW9uX2lkIj","session_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjb25zdW1lcl9pZCI6InRlc3RfdXNlcl9pZCIsImFwcGxpY2F0aW9uX2lkIj"}}