--- title: "POST | Create or edit Kubernetes publication profile" slug: "api-clm-post-create-edit-kubernetes" updated: 2026-03-04T12:05:19Z published: 2026-03-04T14:37:38Z canonical: "docs.senhasegura.io/api-clm-post-create-edit-kubernetes" --- > ## 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 edit Kubernetes publication profile Creates or edits an Kubernetesplugin publication profile. - **Endpoint**: `/api/certificate/profile/kubernetes` - **Method**: `POST` - **Request**: `POST` `/api/certificate/profile/kubernetes` ## Request parameters | Field | Type | Required | Description | | --- | --- | --- | --- | | `code_profile` | `int` | No | The code of an already created profile. If not provided, the system will interpret it as the creation of a new profile. | | `name_profile` | `string` | Yes | The name of the profile to be created. | | `code_credential` | `int` | Conditional | The credential code to be used for the publication. A previously registered credential will be used. This is required if no `username` is provided. | | `username` | `string` | Conditional | The `username` to locate credentials for the publication. Required if no `code_credential` is provided. | | `devices` | `array` | Yes | *Array* with the codes of the devices where the certificate should be published. | | `secrets` | `array` | No | *Array* of objects with `names` and `namespaces` of the secrets to be created or updated in the respective `namespaces`. Each item must have a `name` and `namespace`. | | `auto_redeploy` | `array` | No | The system contains an array of automatic redeploy objects. Each object must specify a valid Kubernetes `resource_type` along with `name` and `namespace`. | ### Example using cURL ``` curl -X POST \ https://[segura_vault_url]/api/certificate/profile/kubernetes \ -H 'Content-Type: application/json' \ -H 'Authorization: Bearer [seu-token]' \ -d '{ "name_profile": "teste", "code_credential": 1, "devices": [1], "secrets": [ { "name": "teste", "namespace": "teste" } ], "auto_redeploy": [ { "resource_type": "Deployment", "name": "teste", "namespace": "teste" } ] } ``` ### Response ``` { "name_profile": "teste", "code_credential": 1, "devices": [ 1 ], "secrets": [ { "name": "teste", "namespace": "teste" } ], "auto_redeploy": [ { "resource_type": "Deployment", "name": "teste", "namespace": "teste" } ] } ``` ### 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. |