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

# Get surface details

GET https://api.runtype.com/v1/products/{id}/surfaces/{surfaceId}

Get a surface by ID including its items and keys.

Reference: https://docs.runtype.com/api-reference/runtype-api/products/get-surface-details

## Authentication

- `Authorization` header (bearer token, required) — API key or Clerk session token

## Servers

- `https://api.runtype.com` (Production, default)
- `https://api.runtype-staging.com` (Staging)

## Request

### Path parameters

- `id` (string, required)
- `surfaceId` (string, required)

## Response

### 200

Surface details

- `createdAt` (string, required)
- `endpoint` (string, required, nullable) — Canonical public URL of this surface (MCP, API, A2A, AG-UI, webhook, chat). Null for surface types reached through their own channels (Slack, email, schedule, ...). Clients should use this instead of constructing the URL themselves.
- `id` (string, required)
- `items` (list of V1ProductsIdSurfacesSurfaceIdGetResponsesContentApplicationJsonSchemaItemsItems, required)
- `keys` (list of V1ProductsIdSurfacesSurfaceIdGetResponsesContentApplicationJsonSchemaKeysItems, required)
- `lastModifiedSource` (string, required, nullable)
- `name` (string, required)
- `productId` (string, required)
- `scopeTargets` (list of V1ProductsIdSurfacesSurfaceIdGetResponsesContentApplicationJsonSchemaScopeTargetsItems, required)
- `status` (string, required)
- `type` (string, required)
- `updatedAt` (string, required)
- `webhookHealth` (WebhookHealth, required)
- `behavior` (any, optional)
- `inbound` (any, optional)
- `outbound` (any, optional)

## Errors

### 400 Bad Request Error

Invalid surface ID

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 401 Unauthorized Error

Unauthorized

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 403 Forbidden Error

Insufficient permissions

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 404 Not Found Error

Surface not found

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

### 500 Internal Server Error

Internal server error

- `error` (string, required)
- `code` (string, optional) — Stable error code. `insufficient_scope` marks an API key that lacks a scope this request needs.
- `details` (list of ErrorDetailsItems, optional)
- `requiredScopes` (list of string, optional) — On `insufficient_scope`: every API key scope this request needs.

## Types

### V1ProductsIdSurfacesSurfaceIdGetResponsesContentApplicationJsonSchemaItemsItems

- `agentId` (string, required, nullable)
- `agentType` (string, required, nullable)
- `cachedSkills` (list of any, required, nullable)
- `capabilityId` (string, required)
- `capabilityName` (string, required, nullable)
- `createdAt` (string, required)
- `displayOrder` (integer, required, nullable)
- `enabled` (boolean, required)
- `endpointSlug` (string, required, nullable)
- `exposedDescription` (string, required, nullable)
- `exposedName` (string, required, nullable)
- `flowId` (string, required, nullable)
- `id` (string, required)
- `isEntryPoint` (boolean, required)
- `config` (any, optional)
- `parametersSchema` (any, optional)

### V1ProductsIdSurfacesSurfaceIdGetResponsesContentApplicationJsonSchemaKeysItems

- `canReveal` (boolean, required)
- `createdAt` (string, required)
- `environment` (string, required)
- `expiresAt` (string, required, nullable)
- `id` (string, required)
- `isActive` (boolean, required)
- `isDevelopment` (boolean, required)
- `keyHint` (string, required, nullable)
- `keyPrefix` (string, required)
- `lastUsedAt` (string, required, nullable)
- `name` (string, required, nullable)
- `rateLimitPerDay` (integer, required, nullable)
- `rateLimitPerMinute` (integer, required, nullable)
- `scopeTargetIds` (list of string, required, nullable)
- `scopes` (list of string, required)
- `usageCount` (integer, required, nullable)

### V1ProductsIdSurfacesSurfaceIdGetResponsesContentApplicationJsonSchemaScopeTargetsItems

- `id` (string, required)
- `name` (string, required)
- `capabilityId` (string, optional)
- `surfaceItemId` (string, optional)

### WebhookHealth

- `lastDeliveryAt` (string, required, nullable) — ISO timestamp of the most recent accepted inbound delivery.
- `recentFailures` (list of WebhookHealthRecentFailuresItems, required) — Most recent inbound rejections, newest first, capped at a small fixed number. A failure newer than lastDeliveryAt means the webhook is currently rejecting events (commonly a credential mismatch such as a wrong Slack signing secret).

### ErrorDetailsItems

- `message` (string, required)
- `code` (string, optional) — Stable Runtype validation code (e.g. MISSING_REQUIRED_FIELD, INVALID_ENUM).
- `path` (string, optional) — Dotted JSON path to the offending field.
- `suggestion` (string, optional) — Actionable hint (allowed values, accepted range, …).

### WebhookHealthRecentFailuresItems

- `at` (string, required)
- `reason` (string, required)
- `statusCode` (double, optional)

## Examples

**Response**

```json
{
  "createdAt": "string",
  "endpoint": "string",
  "id": "string",
  "items": [
    {
      "agentId": "string",
      "agentType": "string",
      "cachedSkills": [
        null
      ],
      "capabilityId": "string",
      "capabilityName": "string",
      "createdAt": "string",
      "displayOrder": 1,
      "enabled": true,
      "endpointSlug": "string",
      "exposedDescription": "string",
      "exposedName": "string",
      "flowId": "string",
      "id": "string",
      "isEntryPoint": true
    }
  ],
  "keys": [
    {
      "canReveal": true,
      "createdAt": "string",
      "environment": "string",
      "expiresAt": "string",
      "id": "string",
      "isActive": true,
      "isDevelopment": true,
      "keyHint": "string",
      "keyPrefix": "string",
      "lastUsedAt": "string",
      "name": "string",
      "rateLimitPerDay": 1,
      "rateLimitPerMinute": 1,
      "scopeTargetIds": [
        "string"
      ],
      "scopes": [
        "string"
      ],
      "usageCount": 1
    }
  ],
  "lastModifiedSource": "string",
  "name": "string",
  "productId": "string",
  "scopeTargets": [
    {
      "id": "string",
      "name": "string",
      "capabilityId": "string",
      "surfaceItemId": "string"
    }
  ],
  "status": "string",
  "type": "string",
  "updatedAt": "string",
  "webhookHealth": {
    "lastDeliveryAt": "string",
    "recentFailures": [
      {
        "at": "string",
        "reason": "string",
        "statusCode": 1.1
      }
    ]
  }
}
```

**SDK Code**

```python
import requests

url = "https://api.runtype.com/v1/products/id/surfaces/surfaceId"

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

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

print(response.json())
```

```javascript
const url = 'https://api.runtype.com/v1/products/id/surfaces/surfaceId';
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
package main

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

func main() {

	url := "https://api.runtype.com/v1/products/id/surfaces/surfaceId"

	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
require 'uri'
require 'net/http'

url = URI("https://api.runtype.com/v1/products/id/surfaces/surfaceId")

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
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.runtype.com/v1/products/id/surfaces/surfaceId")
  .header("Authorization", "Bearer <token>")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

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

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

```csharp
using RestSharp;

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

```swift
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://api.runtype.com/v1/products/id/surfaces/surfaceId")! 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()
```