# Add application secret **POST /api/applications/{id}/secrets** Add a new secret for the application. ## Servers - Logto endpoint address.: https://[tenant_id].logto.app (Logto endpoint address.) ## Authentication methods - O auth2 ## Parameters #### Path parameters - **id** (string) The unique identifier of the application. ## Body parameters Content-type: application/json - **name** (string) The secret name. Must be unique within the application. - **expiresAt** (number | null) The epoch time in milliseconds when the secret will expire. If not provided, the secret will never expire. ## Responses ### 201: The secret was added successfully. #### Body Parameters: application/json (object) - **tenantId** (string) - **applicationId** (string) - **name** (string) - **value** (string) - **createdAt** (number) - **expiresAt** (number | null) ### 400: Bad Request ### 401: Unauthorized ### 403: Forbidden ### 422: The secret name is already in use. [Powered by Bump.sh](https://bump.sh)