v1

latestOpenAPI 3.0.3Apache 2.02026-07-133681213.9 KB
Sessions

Create Session

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).

post/vault/sessions

Headers

x-apideck-consumer-idstring required

ID of the consumer which you want to get or push data from

x-apideck-app-idstring required

The ID of your Unify application

Request body

redirect_uristring

The URL to redirect the user to after the session has been configured.

custom_consumer_settingsobject

Custom consumer settings that are passed as part of the session.

Example request

{
  "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"
    ],
    "session_length": "30m"
  },
  "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": [
      {
        "id": "6",
        "label": "6%"
      },
      {
        "id": "21",
        "label": "21%"
      }
    ]
  }
}

Response

Session created

status_codeinteger required

HTTP Response Status Code

statusstring required

HTTP Response Status

_rawRaw nullable

Raw response from the integration when raw=true query param is provided

Example response

{
  "status_code": 200,
  "status": "OK",
  "data": {
    "session_uri": "https://vault.apideck.com/session/<session_token>",
    "session_token": "<session_token>"
  }
}