# Generate Stir/Shaken Certifiate

You can generate unlimited certificates. Each one remains valid until your PeeringHub.io subscription expires.

## Generate a Stir/Shaken Certificate

<mark style="color:green;">`POST`</mark> [/api/service\_provider/generate\_sti\_spc\_cert](https://api.peeringhub.io/api-doc/#/Service%20Provider/ServiceProviderController_generateStiCert)<br>

You can generate as many certifiate as you want.  The certificate will last till the end of your Peeringhub.io's subscription period. &#x20;

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <token>`   |

**Body**

| Name               | Type   | Description              |
| ------------------ | ------ | ------------------------ |
| `private_key_uuid` | string | Private Key UUID         |
| sti\_pa\_username  | string | Your iConnectiv Username |
| sti\_pa\_password  | string | Your iConnectiv Password |

**Example**

{% code overflow="wrap" %}

```
curl -X 'POST'  
  'https://api.peeringhub.io/api/service_provider/generate_sti_spc_cert'  
  -H 'accept: */*'  
  -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzZXJ2aWNlX3Byb3ZpZGVyX3V1aWQiOiIzZTIwMTk4Z'  
  -H 'Content-Type: application/json'  
  -d '{
  "private_key_uuid": "c02xxx302-adc4-4dff-8016-xxxxx8f79",
  "sti_pa_username": "your_sti_user",
  "sti_pa_password": "your_sti_pass"
}'
```

{% endcode %}

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "payload": {
    "res": {
      "service_provider_uuid": "3xxxx8d-ed19-4089-95e7-ea7axxxxxc81",
      "sti_priv_key_uuid": "c02xxx302-adc4-4dff-8016-xxxxx8f79",
      "cr_path": "https://certificates.peeringhub.io/818H/H6xUJgxY/ABC.crt",
      "success": true,
      "serial_number": "H6xUJgxY",
      "sti_cert_expire_date": "Thu, 14 May 2026 21:34:16 GMT",
      "sti_cert_start_date": "2025-05-14T21:34:16.000Z",
      "error_cause": null,
      "uuid": "5cdf84d9-eb87-4e8d-aa89-249651ce1b0d",
      "created_on": "2025-05-14T21:34:21.087Z"
    }
  }
}
```

{% endtab %}
{% endtabs %}

The `cr_path` field contains the URL from which you can download your STIR/SHAKEN certificate.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.peeringhub.io/guides/peeringhub-sti-api/generate-stir-shaken-certifiate.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
