Skip to main content
POST
/
auth-scopes
/
{scope_slug}
/
credentials
Create a credential
curl --request POST \
  --url https://api.smith.langchain.com/v1/deepagents/auth-scopes/{scope_slug}/credentials \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "display_name": "Search API token",
  "description": "Bearer token for the MCP search server.",
  "auth": {
    "type": "static_bearer",
    "token": "<SECRET_TOKEN>"
  },
  "bindings": [
    {
      "kind": "mcp_server",
      "url": "https://tools.langchain.com"
    }
  ]
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "scope_slug": "default",
  "display_name": "<string>",
  "description": "<string>",
  "auth_type": "static_bearer",
  "bindings": [
    {
      "kind": "mcp_server",
      "url": "<string>"
    }
  ],
  "created_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.langchain.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-Api-Key
string
header
default:LANGSMITH_API_KEY
required

Path Parameters

scope_slug
enum<string>
required

Auth scope slug. Currently only default is supported.

Available options:
default

Body

application/json
display_name
string
required

Human-readable credential name. Must not be blank.

auth
object
required
bindings
object[]
required

Targets the credential applies to.

Minimum array length: 1
description
string

Optional credential description.

Response

Credential created. The secret token is not returned.

id
string<uuid>
scope_slug
enum<string>
Available options:
default
display_name
string
description
string
auth_type
enum<string>

Credential auth type. The secret token is not returned.

Available options:
static_bearer
bindings
object[]
created_at
string<date-time>