# Distribute an HPP session

> `POST https://api.kustom.co/hpp/v1/sessions/{session_id}/distribution`

Use this API to distribute to the Consumer a link to the Hosted Payment Page either by e-mail or SMS after you have created an HPP session.
Read more on **[Distribute link to the HPP Session to the Consumer](../v3/hosted-payment-page/api-documentation/distribute-session)**.

## Parameters

- `session_id` (string, path, required) — HPP session id

## Request body

Distribution Request parameters

`application/json`

- `contact_information` (object, required)
  - `access_id` (string) — Access Id for connection to HPP session. Only required if distribution method is 'token' Enum: `klarna:09f4a78d-d096-47d4-a0f6-abcf680c70fe`, `467521087419`, `278352`.
  - `email` (string) — Email where to send the email with the HPP link. Only required if distribution method is 'email'
  - `phone` (string) — Phone number where to send the sms with the HPP link. Only required if distribution method is 'sms'
  - `phone_country` (string) — ISO 3166 alpha-2 phone country. Only required if distribution method is 'sms'
- `method` (string, required) — Method used for distribution Enum: `sms`, `email`, `token`.
- `template` (string) — Template to use for distribution. In the current version this value is not used and might be removed in the future. Enum: `INSTORE_PURCHASE`.

### Example request

```json
{
  "contact_information": {
    "access_id": "klarna:09f4a78d-d096-47d4-a0f6-abcf680c70fe",
    "email": "test@example.com",
    "phone": "07000212345",
    "phone_country": "SE"
  },
  "method": "sms",
  "template": "INSTORE_PURCHASE"
}
```

## Responses

### 201

Created

### 204

Successfully distributed the HPP Session

### 400

We were unable to distribute the link with the provided data. Some field constraint was violated. Or session is disabled by merchant.

### 401

Unauthorized

### 403

Forbidden

### 404

HPP session not found or access token not found

### 503

We were unable to distribute the link due to an internal error. Please try again
