--- title: "POST | Create or modify request" slug: "api-clm-create-modify-request" updated: 2026-11-03T14:48:14Z published: 2026-11-03T14:48:14Z canonical: "docs.senhasegura.io/api-clm-create-modify-request" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.senhasegura.io/llms.txt > Use this file to discover all available pages before exploring further. # POST | Create or modify request Creates a new certificate request or modifies an existing one. - **Endpoint**: `/api/certificate/request` - **Method**: `POST` - **Request**: `POST /api/certificate/request` ## Request parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `code_request` | `int` | No | Code of an existing request. If not included, a new request will be created. | | `certificate_type` | `int` | Yes | Certificate type. The options are: 1 = `DV SSL - Domain SSL`, 2 = `OV SSL - Organization SSL`, and 3 = `EV SSL - Extended SSL`. | | `domain_type` | `string` | Yes | Domain type. The options are: `SING` = Single domain, `MULT` = Multiple domains, and `WILD` = Wildcard. | | `organization` | `int` | Yes | Organization code. It must be a valid organization registered in the **Segura™ Platform**. | | `common_name` | `string` | Yes | Common name of the certificate. | | `san` | `array` | No | Subject Alternative Names. Will be filled with `common_name` if not provided. | | `tags` | `array` | No | Certificate identification tags. New tags will be created if they don't already exist. | | `encryption` | `string` | Yes | Encryption algorithm. The options are: `RSA` and `DSA` | | `encryption_key_size` | `int` | Yes | Encryption key size. The options are: `4096`, `2048`, and `1024`. | | `certificate_algorithm` | `string` | Yes | Signature algorithm. The options are: `SHA256`, `SHA384`, and `SHA512`. If the encryption is DSA, only `SHA256` is allowed. | | `validity` | `int` | Yes | Certificate validity period in days. | | `key_password` | `string` | No | Certificate key password. | | `senha_revogacao` | `string` | No | Certificate revocation password. | | `environments` | `array` | No | Certificate environments. New environments will be created if they don't already exist. | | `systems` | `array` | No | Certificate systems. New systems will be created if they don't already exist. | | `project` | `string` | No | Project name. | | `external_ip` | `string` | No | External IP of the certificate. | | `hostname_ip` | `string` | No | IP or hostname of the certificate. | | `reason` | `string` | No | Request reason (max. 1024 characters). | | `responsible` | `int` | No | Responsible user code. Must be a user registered in the **Segura™ Platform**. | | `description` | `string` | No | Request description (max. 512 characters). | ### Example using cURL ``` curl -X POST https://[segura_vault_url]/api/certificate/request \ -H "Authorization: Bearer YOUR_API_TOKEN" \ -H "Content-Type: application/json" \ -d ' { "certificate_type": 2, "domain_type": "SING", "organization": 42, "common_name": "api.example.com", "encryption": "RSA", "encryption_key_size": 2048, "certificate_algorithm": "SHA256", "validity": 365, "reason": "Needed for new API service", "description": "Certificate for public API endpoints" }' ``` ### Response ``` { "status": 200, "message": "Request created successfully", "error": false, "code_request": 123, "type_certificate": 2, "type_domain": "SING", "organization": 42, "common_name": "api.example.com", "encryption": "RSA", "encryption_key_size": 2048, "certificate_algorithm": "SHA256", "validity": 365, "justification": "Needed for new API service", "description": "Certificate for public API endpoints" } ``` ### Error responses | HTTP Status Code | Description | | --- | --- | | **400 Bad Request** | Invalid parameters provided. | | **401 Unauthorized** | Unauthorized access. | | **403 Forbidden** | Forbidden access. | | **404 Not Found** | Resource not found. | | **500 Internal Server Error** | Internal server error. |