---
title: Request a Let's Encrypt certificate
url: https://developers.wpengine.com/docs/managed-hosting-platform/api/reference/operations/createdomaincertificateorder/
image: https://developers.wpengine.com/og/docs/managed-hosting-platform/api/reference/operations/createdomaincertificateorder.png
---

# Request a Let's Encrypt certificate

POST

/installs/{install_id}/domains/{domain_id}/ssl_certificate

Select code sample

```sh
curl --request POST \
  --url https://api.wpengineapi.com/v1/installs/294deacc-d8b8-4005-82c4-0727ba8ddde0/domains/e41fa98f-ea80-4654-b229-a9b765d0863a/ssl_certificate \
  --header 'Authorization: Basic <credentials>' \
  --header 'Content-Type: application/json' \
  --data '{ "email_address": "jane@example.com", "given_name": "Jane", "family_name": "Doe", "region_code": "US", "state": "Texas", "city": "Austin", "phone": "800-123-4567" }'
```

-

Submits an order for a Let’s Encrypt certificate for the specified domain on an install.

## Limitations & Warnings

- Only for domains on the legacy network.
- Asynchronous: the order is accepted for processing, so the certificate isn’t available immediately.

## Authorizations

- **[basicAuth](https://developers.wpengine.com/docs/managed-hosting-platform/api/reference/#basicauth)**

## Parameters

### Path Parameters

**install_id**

required

string format: uuid

ID of install

#### Example

```
294deacc-d8b8-4005-82c4-0727ba8ddde0
```

**domain_id**

required

string format: uuid

ID of domain

#### Example

```
e41fa98f-ea80-4654-b229-a9b765d0863a
```

## Request Bodyrequired

##### Properties

- email_address - **required** - The certificate’s holder’s email address
- given_name - **required** - The certificate holder’s first / given name
- family_name - **required** - The certificate holder’s last / family name
- region_code - **required** - The two-letter ISO 3166-1 alpha-2 code for the certificate’s country
- state - **optional** - The certificate’s state / region
- city - **optional** - The certificate’s city / locality
- phone - **optional** - The certificate holder’s phone number

Media typeapplication/json

object

**email_address**

required

The certificate’s holder’s email address

string

### Example

```
jane@example.com
```

**given_name**

required

The certificate holder’s first / given name

string

### Example

```
Jane
```

**family_name**

required

The certificate holder’s last / family name

string

### Example

```
Doe
```

**region_code**

required

The two-letter ISO 3166-1 alpha-2 code for the certificate’s country

string

### Example

```
US
```

**state**

The certificate’s state/region

string

### Example

```
Texas
```

**city**

The certificate’s city/locality

string

### Example

```
Austin
```

**phone**

The certificate holder’s phone number

string

### Example

```
800-123-4567
```

## Responses

### 202

Accepted. The order has been accepted for processing.

### 400

Bad Request

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

**documentation_url**

(Optional) A URL where documentation regarding this specific error can be found

string

**errors**

An array of error objects describing specific errors that arose when servicing the request

Array\<object>

object

**resource**

required

The name of the resource that was being processed when the error occurred

string

**field**

required

(Optional) The specific field associated with the error

string

**type**

required

(Optional) A type associated with the error. `invalid_value`, `access_error`, `value_unavailable`

string

**code**

required

(Optional) A machine code relating to the error that occurred with the field and resource

string

**message**

required

(Optional) A human-readable message relating to the error that occurred with the field and resource

string

#### Example

```json
{
  "message": "Invalid request.",
  "errors": [
    {
      "resource": "Resource",
      "field": "field_name",
      "type": "invalid_value",
      "code": "invalid",
      "message": "The value is invalid."
    }
  ]
}
```

### 401

Authentication Error

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

**documentation_url**

(Optional) A URL where documentation regarding this specific error can be found

string

#### Example

```json
{
  "message": "Bad Credentials"
}
```

### 403

Not authorized

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

**documentation_url**

(Optional) A URL where documentation regarding this specific error can be found

string

#### Example

```json
{
  "message": "You don't have permission to perform that action"
}
```

### 404

Not found

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

**documentation_url**

(Optional) A URL where documentation regarding this specific error can be found

string

#### Example

```json
{
  "message": "Not Found"
}
```

### 429

Too many requests

### 500

Internal Server Error

Media typeapplication/json

object

**message**

required

A message regarding the error that occurred on the server

string

#### Example

```json
{
  "message": "An unexpected error occurred, please try again in a few minutes"
}
```

### 502

An invalid response was received from an upstream server

### 503

Service unavailable

## Was this helpful?

Thanks for the feedback!

```json
{"@context":"https://schema.org","@graph":[{"@type":"WebSite","@id":"https://developers.wpengine.com/#website","name":"WP Engine Product Documentation","url":"https://developers.wpengine.com/","description":"Resources for developing, deploying, and scaling on WP Engine.","inLanguage":"en-US","keywords":["API documentation","product documentation","headless WordPress","managed WordPress hosting"],"publisher":{"@id":"https://wpengine.com/#organization"}}]}
```
