Skip to main content
POST
/
api
/
v1
/
credentials
/
{id}
curl --request POST \
  --url 'https://transaction-tax.api.in.commenda.io/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  --header 'Authorization: Bearer <your_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "corporation_id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "California CDTFA Portal (Updated)",
    "blocks": [
      {
        "id": "block-uuid-1",
        "block_key": "username",
        "block_label": "Username",
        "block_type": "String",
        "value": "new-user@example.com"
      }
    ]
  }'
{
  "message": "Successfully updated credential.",
  "data": {
    "credential": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "updated_at": "2024-02-01T14:00:00Z"
    }
  }
}
Update a credential’s details and blocks. You can add new blocks, update existing ones, and delete blocks by ID.

Path parameters

id
string
required
The unique identifier (UUID) of the credential to update.

Request body

corporation_id
string
required
The unique identifier (UUID) for the corporation.
portal_id
string
The portal ID to associate the credential with.
name
string
Updated display name.
portal_url
string
Updated portal URL.
notes
string
Updated notes.
status
string
Updated status. Values: ACTIVE, EXPIRED.
blocks
array
Array of blocks to add or update. Each block requires block_key, block_label, block_type, and value. Include id for existing blocks to update them; omit id to create new blocks.
blocks_to_delete
array
Array of block IDs to delete from this credential.
curl --request POST \
  --url 'https://transaction-tax.api.in.commenda.io/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
  --header 'Authorization: Bearer <your_token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "corporation_id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "California CDTFA Portal (Updated)",
    "blocks": [
      {
        "id": "block-uuid-1",
        "block_key": "username",
        "block_label": "Username",
        "block_type": "String",
        "value": "new-user@example.com"
      }
    ]
  }'
{
  "message": "Successfully updated credential.",
  "data": {
    "credential": {
      "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
      "updated_at": "2024-02-01T14:00:00Z"
    }
  }
}