> This page is for version 2020-05-18.
> For other versions, use one of these documentation indexes:
> - 2026-09-29 (default): https://docs.withpersona.com/2026-09-29/llms.txt
> - 2025-12-08: https://docs.withpersona.com/2025-12-08/llms.txt
> - 2025-10-27: https://docs.withpersona.com/2025-10-27/llms.txt
> - 2023-01-05: https://docs.withpersona.com/2023-01-05/llms.txt
> - 2022-09-01: https://docs.withpersona.com/2022-09-01/llms.txt
> - 2021-07-05: https://docs.withpersona.com/2021-07-05/llms.txt
> - 2021-05-14: https://docs.withpersona.com/2021-05-14/llms.txt
> - 2020-05-18: https://docs.withpersona.com/2020-05-18/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.withpersona.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.withpersona.com/_mcp/server.

# Retrieve a Deployment

GET https://api.withpersona.com/api/v1/deployments/{deployment-id}

Retrieves a deployment. Its `routes` carry the effective state as of it — the newest route per (resource template, environment) key at or before the deployment — including routes written by earlier deployments.
This endpoint requires a production API key; sandbox API keys receive 401.

Reference: https://docs.withpersona.com/api-reference/deployments/retrieve-a-deployment

## Authentication

- `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer <token>`, where token is your auth token.

## Request

### Path parameters

- `deployment-id` (string, required)

### Query parameters

- `fields` (map from string to string, optional) — Comma-separated list(s) of attributes to include in the response. This can be used to customize which attributes will be serialized in the response. See [Serialization](https://docs.withpersona.com/serialization#sparse-fieldsets) for more details.

### Headers

- `Key-Inflection` (enum, optional) — Determines casing for the API response.
  - Allowed values: `camel`, `kebab`, `snake`
- `Idempotency-Key` (string, optional) — Ensures the request is idempotent.
- `Persona-Version` (enum, optional) — Server API version. More info on versioning can be found [here](https://docs.withpersona.com/versioning).
  - Allowed values: `2026-09-29`, `2025-12-08`, `2025-10-27`, `2023-01-05`, `2022-09-01`, `2021-08-18`, `2021-07-05`, `2021-02-21`, `2020-05-18`

## Response

### 200

This endpoint returns a Deployment object.

- `data` (deployment, required) — A Deployment object. A deployment is an atomic, immutable write of routing rules across a set of (resource, environment) keys — the state the deployment engine serves traffic from.

## Errors

### 400 Bad Request Error

The request was unacceptable, often due to invalid parameters.

- `errors` (list of DeploymentsDeploymentIdGetResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 401 Unauthorized Error

An invalid API key was provided.

- `errors` (list of DeploymentsDeploymentIdGetResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 403 Forbidden Error

The given API key doesn’t have permissions to perform the request or a quota has been exceeded.

- `errors` (list of DeploymentsDeploymentIdGetResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 404 Not Found Error

The requested resource doesn’t exist.

- `errors` (list of DeploymentsDeploymentIdGetResponsesContentApplicationJsonSchemaErrorsItems, optional)

### 429 Too Many Requests Error

Your organization’s rate limit has been exceeded. We recommend an exponential backoff on requests.

- `errors` (list of DeploymentsDeploymentIdGetResponsesContentApplicationJsonSchemaErrorsItems, optional)

## Types

### deployment

A Deployment object. A deployment is an atomic, immutable write of routing rules across a set of (resource, environment) keys — the state the deployment engine serves traffic from.

- `type` ("deployment", optional)
- `id` (string, optional)
- `attributes` (DeploymentAttributes, optional)

### DeploymentsDeploymentIdGetResponsesContentApplicationJsonSchemaErrorsItems

- `title` (string, optional)
- `details` (string, optional)

### DeploymentAttributes

- `created-at` (datetime, optional)
- `routes` (list of DeploymentAttributesRoutesItems, optional) — The routes this deployment puts in force. Each route binds a (resource template, environment) key to a rules tree. Without `filter[changes-only]` this is the effective state as of the deployment — including routes written by earlier deployments — so a route whose `source-deployment-id` is set was authored by the deployment named there. With `filter[changes-only]` it is exactly the rows this deployment wrote.

### DeploymentAttributesRoutesItems

- `resource-type` (string, optional) — The platform resource type the route targets. `inquiry-template` is the only supported resource type today; `workflow` and `scheduled-run-config` support is planned for a future deploy-manager release.
- `template-id` (string, optional) — The token of the resource template the route targets.
- `environment` (DeploymentAttributesRoutesItemsEnvironment, optional) — The environment the route applies to.
- `rules` (list of DeploymentAttributesRoutesItemsRulesItems, optional) — The routing rules evaluated for the key. An empty list undeploys the resource from the environment. Each rule has a strategy and may have a criteria tree with `and`, `or`, and `!` operators over context or resource origins.
- `source-deployment-id` (string, optional, nullable) — The token of the deployment that wrote this route, when it predates this deployment; null when this deployment wrote it.

### DeploymentAttributesRoutesItemsEnvironment

The environment the route applies to.

- `token` (string, required)
- `name` (string, required)

### DeploymentAttributesRoutesItemsRulesItems

- `strategy` (DeploymentAttributesRoutesItemsRulesItemsStrategy, required)
- `criteria` (route-criteria, optional) — A deployment route criteria node: an `and`/`or`/`!` operator tree whose `origin` leaves are either `{ context }` or `{ resource-type, template-id, version }`. Version references carry the version token and its deployment tag object (null when the version is untagged). Each operator's operand may be a single node or a non-empty array of nodes.

### DeploymentAttributesRoutesItemsRulesItemsStrategy

### route-criteria

A deployment route criteria node: an `and`/`or`/`!` operator tree whose `origin` leaves are either `{ context }` or `{ resource-type, template-id, version }`. Version references carry the version token and its deployment tag object (null when the version is untagged). Each operator's operand may be a single node or a non-empty array of nodes.

### DeploymentAttributesRoutesItemsRulesItemsStrategy0

- `type` ("constant", required)
- `version` (DeploymentAttributesRoutesItemsRulesItemsStrategyOneOf0Version, required)

### DeploymentAttributesRoutesItemsRulesItemsStrategy1

- `type` ("weighted-random", required)
- `version-refs` (list of DeploymentAttributesRoutesItemsRulesItemsStrategyOneOf1VersionRefsItems, required)

### RouteCriteria0

- `and` (RouteCriteriaOneOf0And, required)

### RouteCriteria1

- `or` (RouteCriteriaOneOf1Or, required)

### RouteCriteria2

- `!` (RouteCriteriaOneOf2, required)

### RouteCriteria3

- `origin` (RouteCriteriaOneOf3Origin, required)

### DeploymentAttributesRoutesItemsRulesItemsStrategyOneOf0Version

- `token` (string, required) — The resource version's token.
- `tag` (VersionTag, required, nullable) — The version's deployment tag, when one was minted.

### DeploymentAttributesRoutesItemsRulesItemsStrategyOneOf1VersionRefsItems

- `version` (DeploymentAttributesRoutesItemsRulesItemsStrategyOneOf1VersionRefsItemsVersion, required)
- `weight` (integer, required) — The ref's weight within the weighted split.

### RouteCriteriaOneOf0And

### RouteCriteriaOneOf1Or

### RouteCriteriaOneOf2

### RouteCriteriaOneOf3Origin

### VersionTag

The version's deployment tag, when one was minted.

- `name` (string, required)
- `description` (string, required, nullable)
- `created-at` (datetime, required)

### DeploymentAttributesRoutesItemsRulesItemsStrategyOneOf1VersionRefsItemsVersion

- `token` (string, required)
- `tag` (VersionTag, required, nullable) — The version's deployment tag, when one was minted.

### RouteCriteriaOneOf3Origin0

- `context` (string, required) — The request context the route matches on.

### RouteCriteriaOneOf3Origin1

- `resource-type` (string, required) — The platform resource type the origin targets.
- `template-id` (string, required) — The token of the resource template the origin targets.
- `version` (RouteCriteriaOneOf3OriginOneOf1Version, optional, nullable)

### RouteCriteriaOneOf3OriginOneOf1Version

- `token` (string, required)
- `tag` (VersionTag, required, nullable) — The version's deployment tag, when one was minted.

## Examples

**Response**

```json
{
  "data": {
    "type": "deployment",
    "id": "dply_7KqH4xVnR2bPmYwL9sTgD3cE",
    "attributes": {
      "created-at": "2026-10-01T18:34:17.000Z",
      "routes": [
        {
          "resource-type": "inquiry-template",
          "template-id": "itmpl_H5wJqL8vNrXmPyKsTdGc2Vz",
          "environment": {
            "token": "env_2VpXc7nMqZwKjRfLsGdYb8Ht",
            "name": "production"
          },
          "rules": [
            {
              "strategy": {
                "type": "constant",
                "version": {
                  "tag": {
                    "created-at": "2026-03-26T18:29:41.000Z",
                    "description": "Initial production release",
                    "name": "v2"
                  },
                  "token": "itv_C7kNmQr9wJxYtHvLgPsBd4Fz"
                }
              },
              "criteria": {
                "origin": {
                  "resource-type": "inquiry-template",
                  "template-id": "itmpl_H5wJqL8vNrXmPyKsTdGc2Vz",
                  "version": null
                }
              }
            }
          ],
          "source-deployment-id": "dply_1AbCdEfGhIjKlMnOpQrStUv"
        }
      ]
    }
  }
}
```

**SDK Code**

```python Success
import requests

url = "https://api.withpersona.com/api/v1/deployments/deployment-id"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Success
const url = 'https://api.withpersona.com/api/v1/deployments/deployment-id';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Success
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.withpersona.com/api/v1/deployments/deployment-id"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Success
require 'uri'
require 'net/http'

url = URI("https://api.withpersona.com/api/v1/deployments/deployment-id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Success
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.withpersona.com/api/v1/deployments/deployment-id")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Success
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.withpersona.com/api/v1/deployments/deployment-id', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Success
using RestSharp;

var client = new RestClient("https://api.withpersona.com/api/v1/deployments/deployment-id");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Success
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.withpersona.com/api/v1/deployments/deployment-id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```