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

# Create Embedded App

> Register an embedded app for the hub named in ``hub_id``.

``client_secret`` (and ``webhook_signing_secret`` when ``webhook_url`` is set) appear
only in this response; store them now. Use ``rotate-secret`` to replace one.



## OpenAPI

````yaml /openapi/mio-openapi.json post /api/v1/teams/{team_id}/embedded-apps
openapi: 3.1.0
info:
  description: >-
    Production API reference for Membership.io. Use the authored guides for
    workflows and the generated endpoint pages for exact parameters and schemas.
  title: Membership.io API
  version: 0.1.0
servers:
  - description: Production
    url: https://api.member.dev
security:
  - bearerAuth: []
paths:
  /api/v1/teams/{team_id}/embedded-apps:
    post:
      tags:
        - embedded-apps
      summary: Create Embedded App
      description: >-
        Register an embedded app for the hub named in ``hub_id``.


        ``client_secret`` (and ``webhook_signing_secret`` when ``webhook_url``
        is set) appear

        only in this response; store them now. Use ``rotate-secret`` to replace
        one.
      operationId: embedded_apps.post_embedded_apps_post_teams_by_team_id_embedded_apps
      parameters:
        - in: path
          name: team_id
          required: true
          schema:
            title: Team Id
            type: string
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/EmbeddedAppCreateRequest'
        required: true
      responses:
        '201':
          content:
            application/vnd.api+json:
              schema:
                $ref: >-
                  #/components/schemas/JsonApiResponse_EmbeddedAppSecretAttributes_
          description: Successful Response
        '401':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/JsonApiErrorResponse'
          description: >-
            access_token_invalid: the access token was issued before the
            account's sessions were revoked. Sign in again.
        '422':
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validation Error
      security:
        - HTTPBearer: []
components:
  schemas:
    EmbeddedAppCreateRequest:
      additionalProperties: false
      description: >-
        Register an embedded app. ``hub_id`` is explicit: the developer picks
        the hub.
      properties:
        allowed_origins:
          items:
            type: string
          maxItems: 5
          minItems: 1
          title: Allowed Origins
          type: array
        hub_id:
          maxLength: 36
          minLength: 1
          title: Hub Id
          type: string
        launch_url:
          title: Launch Url
          type: string
        name:
          maxLength: 255
          minLength: 1
          title: Name
          type: string
        redirect_uris:
          items:
            type: string
          maxItems: 10
          title: Redirect Uris
          type: array
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
      required:
        - name
        - hub_id
        - launch_url
        - allowed_origins
      title: EmbeddedAppCreateRequest
      type: object
    JsonApiResponse_EmbeddedAppSecretAttributes_:
      properties:
        data:
          $ref: '#/components/schemas/JsonApiResource_EmbeddedAppSecretAttributes_'
        included:
          anyOf:
            - items: {}
              type: array
            - type: 'null'
          title: Included
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - data
      title: JsonApiResponse[EmbeddedAppSecretAttributes]
      type: object
    JsonApiErrorResponse:
      description: Error JSON:API response.
      properties:
        errors:
          items:
            $ref: '#/components/schemas/JsonApiError'
          title: Errors
          type: array
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
      required:
        - errors
      title: JsonApiErrorResponse
      type: object
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      type: object
    JsonApiResource_EmbeddedAppSecretAttributes_:
      properties:
        attributes:
          $ref: '#/components/schemas/EmbeddedAppSecretAttributes'
        id:
          title: Id
          type: string
        links:
          anyOf:
            - $ref: '#/components/schemas/JsonApiLinks'
            - type: 'null'
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        relationships:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Relationships
        type:
          title: Type
          type: string
      required:
        - id
        - type
        - attributes
      title: JsonApiResource[EmbeddedAppSecretAttributes]
      type: object
    JsonApiLinks:
      properties:
        self:
          anyOf:
            - type: string
            - type: 'null'
          title: Self
      title: JsonApiLinks
      type: object
    JsonApiError:
      properties:
        code:
          anyOf:
            - type: string
            - type: 'null'
          title: Code
        detail:
          anyOf:
            - type: string
            - type: 'null'
          title: Detail
        id:
          anyOf:
            - type: string
            - type: 'null'
          title: Id
        meta:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Meta
        source:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Source
        status:
          title: Status
          type: string
        title:
          title: Title
          type: string
      required:
        - status
        - title
      title: JsonApiError
      type: object
    ValidationError:
      properties:
        ctx:
          title: Context
          type: object
        input:
          title: Input
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
    EmbeddedAppSecretAttributes:
      description: 'Create and rotate responses: the plaintext secrets, shown once.'
      properties:
        allowed_origins:
          items:
            type: string
          title: Allowed Origins
          type: array
        client_id:
          title: Client Id
          type: string
        client_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Client Secret
        created_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Created At
        has_webhook_secret:
          default: false
          title: Has Webhook Secret
          type: boolean
        hub_id:
          title: Hub Id
          type: string
        launch_url:
          title: Launch Url
          type: string
        name:
          title: Name
          type: string
        redirect_uris:
          items:
            type: string
          title: Redirect Uris
          type: array
        team_id:
          title: Team Id
          type: string
        updated_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Updated At
        webhook_signing_secret:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Signing Secret
        webhook_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Webhook Url
      required:
        - name
        - client_id
        - hub_id
        - team_id
        - launch_url
        - allowed_origins
      title: EmbeddedAppSecretAttributes
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: JWT or mio_sk API key
      description: >-
        Send platform JWTs, contact JWTs, or team API keys as `Authorization:
        Bearer <token>`.
      scheme: bearer
      type: http
    HTTPBearer:
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.