--- title: "List keys" source_url: https://dev.digicert.com/certcentral-apis/services-api/api-keys/list-keys.html api_method: GET api_endpoint: "/services/v2/key" api_url: "https://www.digicert.com/services/v2/key" --- **GET** `https://www.digicert.com/services/v2/key` Use this endpoint to get a list of API keys. ## Example requests and responses **cURL** ```bash curl -X GET \ 'https://www.digicert.com/services/v2/key' \ -H 'Content-Type: application/json' \ -H 'X-DC-DEVKEY: {{api_key}}' ``` **Python** ```python import requests url = "https://www.digicert.com/services/v2/key" querystring = {"user_id":"125039"} headers = { 'X-DC-DEVKEY': "{{api_key}}", 'Content-Type': "application/xml" } response = requests.request("GET", url, headers=headers, params=querystring) print(response.text) ``` **Go** ```go package main import ( "fmt" "net/http" "io/ioutil" ) func main() { url := "https://www.digicert.com/services/v2/key" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-DC-DEVKEY", "{{api_key}}") req.Header.Add("Content-Type", "application/xml") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := ioutil.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` **NodeJS** ```javascript var request = require("request"); var options = { method: 'GET', url: 'https://www.digicert.com/services/v2/key', qs: { user_id: '125039' }, headers: { 'Content-Type': 'application/xml', 'X-DC-DEVKEY': '{{api_key}}' } }; request(options, function (error, response, body) { if (error) throw new Error(error); console.log(body); }); ``` ## 200 OK ```json { "api_keys": [ { "id": 182, "user": { "id": 125039, "first_name": "John", "last_name": "Smith" }, "status": "active", "create_date": "2018-08-07T23:27:58+00:00", "last_used_date": "2018-08-18T19:08:19+00:00", "name": "Key Name", "is_legacy": false, "restricted_to_role_id": 0 }, { "id": 184, "user": { "id": 125039, "first_name": "John", "last_name": "Smith" }, "status": "active", "create_date": "2018-06-21T08:20:51+00:00", "last_used_date": "2018-07-11T15:28:14+00:00", "name": "Another Key Name", "is_legacy": false, "restricted_to_role_id": 101 }, { "id": 42, "user": { "id": 125039, "first_name": "John", "last_name": "Smith" }, "status": "revoked", "create_date": "2018-10-01T22:18:11+00:00", "name": "A Third Key Name", "is_legacy": false, "restricted_to_role_id": 100 } ], "acme_urls": [ { "id": 15, "user": { "id": 10, "first_name": "Jill", "last_name": "Valentine" }, "status": "active", "create_date": "2019-07-31T22:02:31+00:00", "last_used_date": "2019-07-31T22:07:33+00:00", "name": "Secure Site Pro certificates", "is_legacy": false, "restricted_to_role_id": 100, "acme_directory_url": "******bbBB", "product_name_id": "ssl_securesite_pro", "product_name": "Secure Site Pro SSL", "organization_id": 123456, "organization_name": "STARS", "validity_days": "0", "validity_years": "2" }, { "id": 16, "user": { "id": 12, "first_name": "Leon", "last_name": "Kennedy" }, "status": "active", "create_date": "2019-07-29T14:09:34+00:00", "name": "Standard SSL certificates", "is_legacy": false, "restricted_to_role_id": 100, "acme_directory_url": "******aaAA", "product_name_id": "ssl_plus", "product_name": "Standard SSL", "organization_id": 123456, "organization_name": "RCPD", "validity_days": "90", "validity_years": "0", "profile_option": "http_signed_exchange" } ] } ``` ## URL query strings
Name Req/Opt Type Description
user_id optional integer Get keys for only the specified user.
container_id optional integer Get keys for only the specified container.
## Response parameters
Name Type Description
api_keys array List of all keys found by the request. For information about the parameters returned for each key object, see Structures – Access key object.
acme_urls array List of all ACME URLs found by the request. For information about the parameters returned for each ACME URL object, see Structures – Access key object.