> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runalloy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a Credential for a Connector

> Create a credential for a specified



## OpenAPI

````yaml post /connectors/{connectorId}/credentials
openapi: 3.0.1
info:
  title: Connectivity API
  description: >
    The Alloy Connectivity API enables you to create and manage MCP (Model
    Context Protocol) servers that provide secure, controlled access to platform
    integrations for AI assistants.
  version: '1.0'
  contact:
    name: Alloy Support
    email: support@runalloy.com
    url: https://runalloy.com
servers:
  - url: https://production.runalloy.com
    description: Production server
security: []
tags:
  - name: Connectors
    description: Get connector details and execute actions
  - name: Credentials
    description: Manage credentials for connectors
  - name: Files
    description: Manage file uploads and downloads
  - name: Users
    description: Manage users
paths:
  /connectors/{connectorId}/credentials:
    post:
      tags:
        - Credentials
      summary: Create a Credential for a Connector
      description: Create a credential for a specified
      operationId: create-connector-credential
      parameters:
        - name: x-api-version
          in: header
          required: true
          description: API version
          schema:
            type: string
            default: 2025-09
          example: 2025-09
        - name: connectorId
          in: path
          required: true
          description: Connector ID
          schema:
            type: string
          example: slack
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateConnectorCredentialRequest'
            example:
              userId: '{{userId}}'
              authenticationType: oauth2
              redirectUri: http://localhost:3000
      responses:
        '200':
          description: Credential created successfully
          content:
            application/json:
              schema:
                anyOf:
                  - type: object
                    required:
                      - oauthUrl
                    properties:
                      oauthUrl:
                        type: string
                        format: uri
                        description: >-
                          OAuth authorization URL to redirect the user and
                          complete credential linking
                    example:
                      oauthUrl: >-
                        http://localhost:4040/api/strategy/connector/slack/authorize?userId=5eba51a03fe9631316668514&redirectUri=http%3A%2F%2Flocalhost%3A3000&token=abcdefghijklmnopqrstvwxyz123456790
                  - type: object
                    required:
                      - credentialId
                    properties:
                      credentialId:
                        type: string
                        description: >-
                          Unique credential identifier for the newly created
                          credential
                    example:
                      credentialId: 67a37f29e0aa276e50d7253a
      security:
        - bearerAuth: []
components:
  schemas:
    CreateConnectorCredentialRequest:
      type: object
      required:
        - userId
        - authenticationType
      properties:
        userId:
          type: string
          description: User identifier for the credential
          example: '{{userId}}'
        authenticationType:
          type: string
          description: Type of authentication method
          example: oauth2
        authConfigId:
          type: string
          description: ID of the auth config you want to create the credential with
          example: 67a37f29e0aa276e50d7253a
        redirectUri:
          type: string
          format: uri
          description: The URI to which we'll redirect the user after authenticating
          example: https://myapp.com
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: Bearer

````