---
title: "assign_credential — AI Ability"
description: "Assign a vault credential to a webhook — Reference a stored vault credential from a webhook by id (the secret is injected at dispatch time and never exposed)."
url: "https://wpwebhooks.org/docs/ability-assign-credential/"
---

[WP Webhooks](/) / [Docs](/docs/) / assign\_credential

AI Ability since v2.0.0

# assign\_credential

Assign a vault credential to a webhook — Reference a stored vault credential from a webhook by id (the secret is injected at dispatch time and never exposed).

Reference a stored vault credential from a webhook by id (the secret is injected at dispatch time and never exposed). Registered as the WordPress Ability `flowsystems-webhook-actions/assign_credential`, so external AI tools (Claude Code, Cursor) can call it over MCP or REST with a scoped API token.

/ Plan step shape

```
{ "ability": "assign_credential", "input": { "webhook_id": …, "credential_id": … } }
```

/ Scope & confirmation

Minimum API-token scope for external (MCP/REST) callers: `full`. Runs without a confirmation pause (the overall plan is still user-approved before execution starts).

/ Input fields

| Name | In | Type | Req | Description |
| --- | --- | --- | --- | --- |
| webhook\_id | param | integer | yes |  |
| credential\_id | param | integer,null | — |  |

/ Examples

Plan step as the AI Builder proposes it

```
{
  "id": "step_1",
  "ability": "assign_credential",
  "summary": "…",
  "input": {
    "webhook_id": 12,
    "credential_id": 3
  }
}
```

/ Related

[list\_credentials](/docs/ability-list-credentials/)[Credentials Vault](/docs/credentials-vault/)[REST API reference](/webhook-wordpress-plugin-api/)

/Ready

## Your next automation is  
one sentence away.

[Install Plugin→](https://wordpress.org/plugins/flowsystems-webhook-actions/) [See the Plugin →](/wordpress-webhook-plugin/)

$ wp plugin install flowsystems-webhook-actions --activate

## Structured data

```json
{"@context":"https://schema.org","@type":"TechArticle","name":"assign_credential — AI Ability — Webhook Actions Docs","description":"Assign a vault credential to a webhook — Reference a stored vault credential from a webhook by id (the secret is injected at dispatch time and never exposed).","url":"https://wpwebhooks.org/docs/ability-assign-credential/","isPartOf":{"@type":"WebSite","name":"WP Webhooks","url":"https://wpwebhooks.org"},"about":{"@type":"SoftwareApplication","name":"Webhook Actions","applicationCategory":"WordPress Plugin"}}
```
