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

# Create resource server credential

> Create a new resource server credential



## OpenAPI

````yaml api-reference/openapi.json post /api/bridge/v1/available-providers/{provider_controller_type_id}/available-credentials/{credential_controller_type_id}/credential/resource-server
openapi: 3.1.0
info:
  title: soma
  version: v1
servers: []
security: []
tags:
  - name: task
    description: >-
      Task management endpoints for creating, listing, and managing tasks and
      their messages
  - name: secret
    description: Secret management endpoints for storing and retrieving encrypted secrets
  - name: encryption
    description: >-
      Encryption key management endpoints for envelope keys, data encryption
      keys, and aliases
  - name: bridge
    description: >-
      Bridge endpoints for managing providers, credentials, functions, and MCP
      protocol communication
  - name: _internal
    description: >-
      Internal endpoints for health checks, runtime configuration, and SDK code
      generation
  - name: a2a
    description: >-
      Agent-to-agent communication endpoints for agent cards, definitions, and
      JSON-RPC requests
  - name: v1
    description: API version v1 endpoints
paths:
  /api/bridge/v1/available-providers/{provider_controller_type_id}/available-credentials/{credential_controller_type_id}/credential/resource-server:
    post:
      tags:
        - bridge
        - v1
      summary: Create resource server credential
      description: Create a new resource server credential
      operationId: create-resource-server-credential
      parameters:
        - name: provider_controller_type_id
          in: path
          description: Provider controller type ID
          required: true
          schema:
            type: string
        - name: credential_controller_type_id
          in: path
          description: Credential controller type ID
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateResourceServerCredentialParamsInner'
        required: true
      responses:
        '200':
          description: Create resource server credential
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceServerCredentialSerialized'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    CreateResourceServerCredentialParamsInner:
      type: object
      required:
        - resource_server_configuration
        - dek_alias
      properties:
        dek_alias:
          type: string
        metadata:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/Metadata'
        resource_server_configuration:
          $ref: '#/components/schemas/WrappedJsonValue'
    ResourceServerCredentialSerialized:
      type: object
      required:
        - id
        - type_id
        - metadata
        - value
        - created_at
        - updated_at
        - dek_alias
      properties:
        created_at:
          $ref: '#/components/schemas/WrappedChronoDateTime'
        dek_alias:
          type: string
        id:
          $ref: '#/components/schemas/WrappedUuidV4'
        metadata:
          $ref: '#/components/schemas/Metadata'
        next_rotation_time:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/WrappedChronoDateTime'
        type_id:
          type: string
        updated_at:
          $ref: '#/components/schemas/WrappedChronoDateTime'
        value:
          $ref: '#/components/schemas/WrappedJsonValue'
    Error:
      type: object
      required:
        - message
      properties:
        data: {}
        message:
          type: string
    Metadata:
      type: object
      additionalProperties: {}
      propertyNames:
        type: string
    WrappedJsonValue: {}
    WrappedChronoDateTime:
      type: string
      format: date-time
    WrappedUuidV4:
      type: string
      format: uuid

````