---
title: "Create Session"
method: POST
path: "/api/connections/{provider}/session"
tags: ["connections"]
---

# Create Session

`POST /api/connections/{provider}/session`

## Request

- Base URL: `https://api.heymetra.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.heymetra.com/api/connections/{provider}/session`
- Auth: none declared

Mint the token the browser uses to open the provider's own consent screen.

Only owners and admins may start this: connecting an account is what decides
what the agent can see for everyone in the tenant.

## Path parameters

- `provider` 'google_ads' | 'meta_ads' | 'meta_instagram' | 'meta_page' | 'ga4' | 'gsc' | 'zoho_crm' | 'zoho_salesiq' | 'zoho_marketing' | 'telegram' | 'slack' | 'email' | 'adapty' | 'trendyol' | 'revenuecat' | 'appsflyer' | 'app_store_connect' | 'woocommerce' | 'shopify' | 'stripe' | 'posthog' | 'jira' | 'hepsiburada' | 'n11' | 'ciceksepeti' | 'amazon_seller' | 'ikas', required

## Query parameters

- `write` boolean
- `marketplace` string, nullable
- `store_name` string, nullable

## Headers

- `authorization` string, nullable
- `x-workspace-id` string, nullable

## Response `200`

Successful Response

- ConnectSessionOut: What the browser needs to open the provider's consent screen.
  - `integration_id` string, required
  - `session_token` string, required
  - `expires_at` string, required
  - `connection_config` object
  - `authorize_url` string, nullable

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-20** `877b0f87d6d0`: 2 breaking
  - removed the enum value `google_calendar` from the `path` request parameter `provider`
  - removed the enum value `google_meet` from the `path` request parameter `provider`
- **2026-10-20** `488ce9683884`: 3 info
  - added the new optional `query` request parameter `store_name`
  - added the new enum value `ikas` to the `path` request parameter `provider`
  - added the optional property `authorize_url` to the response with the `200` status
- **2026-10-19** `b72baf954a36`: 2 info
  - added the new optional `query` request parameter `marketplace`
  - added the optional property `connection_config` to the response with the `200` status
- **2026-10-19** `8153ccd4dea1`: 4 info
  - added the new enum value `amazon_seller` to the `path` request parameter `provider`
  - added the new enum value `ciceksepeti` to the `path` request parameter `provider`
  - added the new enum value `hepsiburada` to the `path` request parameter `provider`
  - added the new enum value `n11` to the `path` request parameter `provider`

[Operation history](https://skmtc.dev/heymetra/apis/heymetra-api/changes/api/connections/:provider/session/post.md)

---

[API](https://skmtc.dev/heymetra/apis/heymetra-api.md) · [All operations](https://skmtc.dev/heymetra/apis/heymetra-api/llms.txt) · [OpenAPI document](https://skmtc.dev/heymetra/apis/heymetra-api/revisions/877b0f87d6d0?raw)
