POST | Activate credential

Prev Next

Description

Activate a credential in PAM Core. An active credential can be used for password checkout, remote sessions, and password rotation.

This action is the only way to set a credential as active. The active field is derived and cannot be sent in a create or update request.


Prerequisites

  • An application authorization granted by the administrator in A2A, with its PAM resource permission set to Read and write. For more information, access How to manage authorizations in A2A.
  • A valid OAuth 2.0 access token. For more information, access How to authenticate an application in A2A.
  • The credential must be inactive. Activating a credential that is already active returns 409.
Info

An access token carries only the authorizations that existed when it was generated. After the administrator changes an application's permissions, generate a new token, an existing token will not gain the new permission.


Request

POST /api/v2/pam/credentials/{id}/activate

Path parameters

Field Type Required Description
id integer Yes Unique identification code of the credential. Note: this value is assigned by Segura®.

The request has no body.


Example request

POST {{url}}/api/v2/pam/credentials/12/activate


Response

HTTP/1.1 204 No Content

The response has no body. To confirm the new state, retrieve the credential with GET | List a credential by [id] and check the credential.active field.


Errors

HTTP code Message Possible cause Solution
401 api.auth.token.invalid The access token is missing or has expired. Request a new access token.
403 api.permission.denied The authorization does not have permission to update credentials. Ask the administrator to set the PAM resource permission to Read and write in A2A, then generate a new token.
404 api.resource.not_found The credential does not exist, or it is outside the scope of the authorization. Check the identification code sent in the path.
409 api.resource.conflict.already_active The credential is already active. No action is needed, the credential is already in the requested state.
429 rate_limit_exceeded The request rate limit was exceeded. Reduce the request rate and try again.
500 api.internal.error Internal server error. Contact the Segura® support team.

Example error response

409 the credential is already active:

{
    "error": {
        "code": "api.resource.conflict.already_active",
        "message": "Credential is already active."
    }
}
Info

This action is not idempotent. Repeating it on a credential that is already active returns 409 rather than 204. Retrieve the credential's current state before retrying a request whose outcome you are unsure of.


Related documents

For authentication error messages, the 403 versus 404 policy, and the current limits of the meta.actions block, access API v2 - Conventions and shared behaviors.