---
title: "generate a service binding"
method: PUT
path: "/v2/service_instances/{instance_id}/service_bindings/{binding_id}"
tags: ["ServiceBindings"]
---

# generate a service binding

`PUT /v2/service_instances/{instance_id}/service_bindings/{binding_id}`

## Path parameters

- `instance_id` string, required
- `binding_id` string, required

## Query parameters

- `accepts_incomplete` boolean

## Headers

- `X-Broker-API-Version` string, required
- `X-Broker-API-Originating-Identity` string

## Request body

- ServiceBindingRequest
  - `context` Context — See [Context Conventions](https://github.com/openservicebrokerapi/servicebroker/blob/master/profile.md#context-object) for more details.
  - `service_id` string, required
  - `plan_id` string, required
  - `app_guid` string
  - `bind_resource` ServiceBindingResouceObject
    - `app_guid` string
    - `route` string
  - `parameters` Object
  - `predecessor_binding_id` string

## Response `200`

OK

- ServiceBindingResponse
  - `metadata` ServiceBindingMetadata
    - `expires_at` string
    - `renew_before` string
  - `credentials` Object
  - `syslog_drain_url` string
  - `route_service_url` string
  - `volume_mounts` ServiceBindingVolumeMount[]
    - `driver` string, required
    - `container_dir` string, required
    - `mode` 'r' | 'rw', required
    - `device_type` 'shared', required
    - `device` ServiceBindingVolumeMountDevice, required
      - `volume_id` string, required
      - `mount_config` Object
      - `device_config` Object
  - `endpoints` ServiceBindingEndpoint[]
    - `host` string, required
    - `ports` string[], required
    - `protocol` 'tcp' | 'udp' | 'all'

## Other responses

- `201` — Created
- `202` — Accepted
- `400` — Bad Request
- `401` — Unauthorized
- `409` — Conflict
- `422` — Unprocessable Entity

## Changes

- **2026-07-17** `8e8ca70f8e59` — 2 info
  - added the optional property `volume_mounts/items/device/device_config` to the response with the `200` status
  - added the optional property `volume_mounts/items/device/device_config` to the response with the `201` status
- **2020-05-18** `8cf18c79937e` — 3 info
  - added the new optional request property `predecessor_binding_id`
  - added the optional property `metadata/renew_before` to the response with the `200` status
  - added the optional property `metadata/renew_before` to the response with the `201` status
- **2020-05-12** `c02c8ad06b20` — 3 warning
  - removed the request property `predecessor_binding_id`
  - removed the optional property `metadata/renew_before` from the response with the `200` status
  - removed the optional property `metadata/renew_before` from the response with the `201` status
- **2020-04-28** `25dd370ccbb1` — 4 info
  - added the new optional request property `predecessor_binding_id`
  - added the non-success response with the status `401`
  - added the optional property `metadata/renew_before` to the response with the `200` status
  - added the optional property `metadata/renew_before` to the response with the `201` status
- **2020-04-16** `7310802d3265` — 1 info
  - removed the non-success response with the status `401`

[Full history](https://skmtc.dev/cloudfoundry/apis/open-service-broker-api/changes/v2/service_instances/:instance_id/service_bindings/:binding_id/put.md)

---

[API](https://skmtc.dev/cloudfoundry/apis/open-service-broker-api.md) · [All operations](https://skmtc.dev/cloudfoundry/apis/open-service-broker-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cloudfoundry/open-service-broker-api/revisions/8e8ca70f8e59/schema)
