> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://devin.ferndocs.com/api-reference/v-3/get-enterprise-playbooks-by-playbook-id/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://devin.ferndocs.com/_mcp/server. # Get a playbook by ID. GET https://api.devin.ai/v3/enterprise/playbooks/{playbook_id} Get a specific playbook by ID. Reference: https://devin.ferndocs.com/api-reference/v-3/get-enterprise-playbooks-by-playbook-id ## Authentication - `Authorization` header (bearer token, required) — Personal API Key (apk_user_*) or Service API Key (apk_*) ## Request ### Path parameters - `playbook_id` (string, required) — Playbook ID (prefix: playbook-) ## Response ### 200 Successful Response - `access_type` (enum, required) — Scope of the playbook: org or enterprise. - Allowed values: `enterprise`, `org` - `body` (string, required) — Markdown body / instructions of the playbook. - `created_at` (integer, required) — ISO 8601 timestamp when the playbook was created. - `created_by` (string, required) — User ID of the playbook creator. - `macro` (string, required, nullable) — Shortcut macro for quick reference. - `org_id` (string, required, nullable) — Organization that owns this playbook (prefix org-). - `playbook_id` (string, required) — Unique identifier for the playbook (prefix playbook-). - `title` (string, required) — Display title of the playbook. - `updated_at` (integer, required) — ISO 8601 timestamp of the last update. - `updated_by` (string, required) — User ID of the last person to update the playbook. ## Errors ### 422 Unprocessable Entity Error Validation Error - `detail` (list of ValidationError, optional) ## Types ### ValidationError - `loc` (list of ValidationErrorLocItems, required) - `msg` (string, required) - `type` (string, required) ### ValidationErrorLocItems ## Examples **Request** ```json {} ``` **Response** ```json { "access_type": "enterprise", "body": "Step 1: Assess the situation.\nStep 2: Notify the incident response team.\nStep 3: Contain the breach.\nStep 4: Eradicate the threat.\nStep 5: Recover systems and data.\nStep 6: Conduct a post-incident review.", "created_at": "2024-05-10T09:15:00Z", "macro": "incident_response_macro_v2", "org_id": "org-456def789", "playbook_id": "playbook-abc123def456", "title": "Incident Response Playbook", "updated_at": "2024-06-01T16:45:00Z", "created_by_user_id": "user-7890abc123", "created_by_user_name": "Alice Johnson", "status": "active", "updated_by_user_id": "user-7890abc123", "updated_by_user_name": "Alice Johnson" } ``` **SDK Code** ```python import requests url = "https://api.devin.ai/v3/enterprise/playbooks/playbook-abc123def456" payload = {} headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.get(url, json=payload, headers=headers) print(response.json()) ``` ```javascript const url = 'https://api.devin.ai/v3/enterprise/playbooks/playbook-abc123def456'; const options = { method: 'GET', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{}' }; 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" "strings" "net/http" "io" ) func main() { url := "https://api.devin.ai/v3/enterprise/playbooks/playbook-abc123def456" payload := strings.NewReader("{}") req, _ := http.NewRequest("GET", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") 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.devin.ai/v3/enterprise/playbooks/playbook-abc123def456") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{}" response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://api.devin.ai/v3/enterprise/playbooks/playbook-abc123def456") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{}") .asString(); ``` ```php request('GET', 'https://api.devin.ai/v3/enterprise/playbooks/playbook-abc123def456', [ 'body' => '{}', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://api.devin.ai/v3/enterprise/playbooks/playbook-abc123def456"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://api.devin.ai/v3/enterprise/playbooks/playbook-abc123def456")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers request.httpBody = postData as Data 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() ```