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

# Create a custom service for an IdP application

> Create (or reuse) a custom IdP service and link a new workspace to the given identity-provider application.



## OpenAPI

````yaml https://api.itmc.i.moneyforward.com/public-api/docs/v1-json post /api/v1/organizations/{organizationId}/custom-services/create-idp-workspace
openapi: 3.0.0
info:
  title: Admina Public API
  description: >-
    Admina API is a RESTfull API providing programmatic access to much of the
    data in the system. It provides predictable URLs for accessing resources,
    and uses built-in HTTP features to receive commands and return responses.
    This makes it easy to communicate with from a wide variety of environments,
    from command-line utilities to gadgets to the browser URL bar itself.
  version: '1.0'
  contact: {}
servers:
  - url: https://api.itmc.i.moneyforward.com
security: []
tags:
  - name: Organizations
    description: ''
  - name: Users
    description: ''
  - name: Directory
    description: ''
  - name: Departments
    description: ''
  - name: Locations
    description: ''
  - name: Companies
    description: ''
  - name: People
    description: ''
  - name: Workspaces
    description: ''
  - name: Custom Service and Workspace
    description: ''
  - name: Custom Services
    description: ''
  - name: Workspace Accounts
    description: ''
  - name: Accounts
    description: ''
  - name: Contracts
    description: ''
  - name: Devices
    description: ''
  - name: Devices (alpha)
    description: ''
  - name: Alerts
    description: ''
  - name: Spends
    description: ''
  - name: Usage Optimization
    description: ''
  - name: Services
    description: ''
  - name: Service Roles
    description: ''
  - name: Service Licenses
    description: ''
  - name: Recommended Services
    description: ''
  - name: Requests
    description: ''
  - name: AuditLogs
    description: ''
  - name: EventLogs
    description: ''
paths:
  /api/v1/organizations/{organizationId}/custom-services/create-idp-workspace:
    post:
      tags:
        - Custom Services
      summary: Create a custom service for an IdP application
      description: >-
        Create (or reuse) a custom IdP service and link a new workspace to the
        given identity-provider application.
      operationId: publicCreateCustomServiceForIdp
      parameters:
        - name: organizationId
          required: true
          in: path
          schema:
            type: number
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PublicCreateIdpCustomServiceRequestDto'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PublicCreateCustomServiceResponseDto'
        '418':
          description: >-
            The feature isn't available for the organization. Please contact the
            support team.
      security:
        - API-Key: []
components:
  schemas:
    PublicCreateIdpCustomServiceRequestDto:
      type: object
      properties:
        identityProviderWorkspaceId:
          type: number
          example: 13
        aggreKey:
          type: string
          example: '000000'
          maxLength: 255
        workspaceName:
          type: string
          example: Custom service workspace name
          maxLength: 255
        serviceName:
          type: string
          example: service name
          maxLength: 255
      required:
        - identityProviderWorkspaceId
        - aggreKey
        - workspaceName
        - serviceName
    PublicCreateCustomServiceResponseDto:
      type: object
      properties:
        service:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/PublicCustomServiceResponseDto'
        workspace:
          readOnly: true
          allOf:
            - $ref: '#/components/schemas/PublicCustomServiceWorkspaceResponseDto'
        isNewService:
          type: boolean
          readOnly: true
          example: true
      required:
        - service
        - workspace
        - isNewService
    PublicCustomServiceResponseDto:
      type: object
      properties:
        id:
          type: number
          readOnly: true
          example: 1
        name:
          type: string
          readOnly: true
          example: Google
        uniqueName:
          type: string
          readOnly: true
          example: google
        url:
          type: string
          readOnly: true
          example: https://google.com
        isEmployeeMasterService:
          type: boolean
          readOnly: true
          example: true
        isCustomService:
          type: boolean
          readOnly: true
          example: false
        isIdentityProvider:
          type: boolean
          readOnly: true
          example: false
      required:
        - id
        - name
        - uniqueName
        - url
        - isEmployeeMasterService
        - isCustomService
        - isIdentityProvider
    PublicCustomServiceWorkspaceResponseDto:
      type: object
      properties:
        id:
          type: number
          readOnly: true
          example: 1
        organizationId:
          type: number
          readOnly: true
          example: 1
        serviceId:
          type: number
          readOnly: true
          example: 1
        workspaceName:
          type: string
          readOnly: true
          example: admina
        isCustomWorkspace:
          type: boolean
          readOnly: true
          example: true
        customWorkspaceType:
          nullable: true
          readOnly: true
          example: google_sheet
          allOf:
            - $ref: '#/components/schemas/CustomWorkspaceType'
        identityProviderWorkspaceId:
          type: number
          nullable: true
          readOnly: true
          example: 13
      required:
        - id
        - organizationId
        - serviceId
        - workspaceName
        - isCustomWorkspace
        - customWorkspaceType
        - identityProviderWorkspaceId
    CustomWorkspaceType:
      type: string
      enum:
        - google_sheet
        - manual_import
  securitySchemes:
    API-Key:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: >-
        For authenticated requests, set the `Authorization: Bearer your_api_key`
        parameter in the header. <br/>You can create and manage your API Keys by
        visiting the **API Keys** tab in the **Settings** page of your
        organization in <a target='_blank'
        href='https://itmc.i.moneyforward.com/'>Admina</a>

````