# create_credential_binding

Source: <https://everruns.com/docs/api/operations/create_credential_binding/>

POST

/v1/agents/{agent\_id}/credentials

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/agents/example/credentials';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json'},
  body: '{"agent_id":"agent_01933b5a000070008000000000000001","description":"Delivers scheduled status notifications","label":"Visti channel key","mcp_server_name":"visti","parameter_name":"channel_key","tool_name":"visti_send"}'
};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/agents/example/credentials \
  --header 'Content-Type: application/json' \
  --data '{ "agent_id": "agent_01933b5a000070008000000000000001", "description": "Delivers scheduled status notifications", "label": "Visti channel key", "mcp_server_name": "visti", "parameter_name": "channel_key", "tool_name": "visti_send" }'
```

* Production APIapp.everruns.com/api/v1/agents/{agent\_id}/credentials

Declare a write-only credential binding for one MCP tool parameter. The secret value is provisioned separately.

## Parameters

### Path Parameters

**agent\_id**

required

string

Agent ID

## Request Bodyrequired

Media typeapplication/json

Declare a credential requirement for an agent’s attached MCP tool.

object

**agent\_id**

Agent ID, populated from the request path by the HTTP API.

string

##### Example

```plaintext
agent_01933b5a000070008000000000000001
```

**description**

Optional explanation of how the credential will be used.

string | null

##### Example

```plaintext
Delivers scheduled status notifications
```

**label**

required

Human-readable label shown in the secure setup UI.

string

##### Example

```plaintext
Visti channel key
```

**mcp\_server\_name**

required

Name of an MCP server attached to the agent.

string

##### Example

```plaintext
visti
```

**parameter\_name**

required

Top-level tool argument to inject outside model context.

string

##### Example

```plaintext
channel_key
```

**tool\_name**

required

MCP tool whose outbound call requires the credential.

string

##### Example

```plaintext
visti_send
```

## Responses

### 200

Credential binding created or updated

Media typeapplication/json

Metadata for a write-only credential bound to one agent and MCP tool parameter.

object

**agent\_id**

required

Agent that exclusively owns and may use this credential.

string

**configured**

required

Whether an encrypted value has been provisioned.

boolean

**created\_at**

required

RFC 3339 creation time.

string

**description**

Optional explanation of why the credential is needed.

string | null

**id**

required

Stable credential binding identifier.

string format: uuid

**label**

required

Human-readable credential label.

string

**mcp\_server\_name**

required

Name of the attached MCP server.

string

**mcp\_server\_url**

required

Exact MCP endpoint authorized to receive the credential.

string

**parameter\_name**

required

Top-level tool argument injected by the server.

string

**setup\_url**

required

Relative UI route where the user can securely provision the value.

string

**tool\_name**

required

MCP tool whose outbound call receives the credential.

string

**updated\_at**

required

RFC 3339 last-update time.

string

##### Example

```json
{
  "agent_id": "agent_01933b5a000070008000000000000001",
  "configured": true,
  "created_at": "2026-08-08T16:00:00Z",
  "description": "Delivers scheduled status notifications",
  "id": "01933b5a-0000-7000-8000-000000000001",
  "label": "Visti channel key",
  "mcp_server_name": "visti",
  "mcp_server_url": "https://visti.sh/mcp",
  "parameter_name": "channel_key",
  "setup_url": "/agents/agent_01933b5a000070008000000000000001?tab=credentials",
  "tool_name": "visti_send",
  "updated_at": "2026-08-08T16:05:00Z"
}
```